AiTechWorlds
AiTechWorlds
Look at a circuit board. There are no instructions printed on it. No label saying "first do this, then do that." No roadmap. Just copper traces, silicon chips, and tiny electronic components.
So how does it know what to do when you press the power button?
For the first computers, the answer was brutally literal: you told it physically. The ENIAC computer (1945) had no program stored inside it. To change what it calculated, engineers had to physically rearrange thousands of cables and reset hundreds of switches — a process that could take days. Changing from calculating artillery trajectories to computing weather patterns meant rewiring the entire machine by hand.
This was obviously unsustainable. Computing would never scale if every new task required a team of engineers with screwdrivers.
The answer came from one of the most brilliant mathematicians of the 20th century — and it was so elegant that every single computer built after 1945 uses essentially the same design.
John von Neumann (1903–1957) was a Hungarian-American mathematician who made foundational contributions to quantum mechanics, game theory, set theory, nuclear physics, and — most relevantly here — computer science.
In 1945, while consulting for the US Army's computer projects, von Neumann wrote a draft report titled "First Draft of a Report on the EDVAC." In it, he described a computer architecture that solved the rewiring problem with breathtaking simplicity:
Store the program instructions in the same memory as the data.
That's it. That is the entire insight. Programs are just data — numbers stored in memory, just like the numbers being calculated. To run a different program, you don't rewire the machine; you load different numbers into memory.
This is called the stored-program concept, and it is the foundation of every computer you have ever used.
Before von Neumann, the prevailing assumption was that a computer's program (its instructions) and its data (the numbers it worked with) were fundamentally different things stored differently.
Von Neumann recognised they are the same kind of thing — sequences of numbers — and can live together in memory.
What this enabled:
Without the stored-program concept, you would own a word-processor machine, a spreadsheet machine, a music-player machine — each one a dedicated piece of hardware. The stored-program concept is why your phone can be a camera, a GPS, a bank, a music player, and a video editor all at once.
The Control Unit is the manager of the CPU. It does no actual calculation itself — that's the ALU's job. The CU's role is to:
Think of the Control Unit as a film director. The director doesn't act in the film, doesn't operate the camera, and doesn't do the lighting. But nothing happens without the director's guidance.
The ALU is where actual computation happens. Every calculation your computer performs — every addition, subtraction, comparison, or logical decision — runs through the ALU.
It handles two categories of operations:
When you open a website and your browser calculates where to position text on screen, the ALU is performing hundreds of thousands of those positioning calculations every second.
Memory (specifically RAM — Random Access Memory) stores:
Both live together in the same space — that is the stored-program concept in action.
Memory is organised as a long list of numbered locations called addresses. The CPU can say "give me what's stored at address 4,096" and memory retrieves it in nanoseconds.
I/O devices connect the computer to the outside world:
Without I/O devices, a computer could still calculate — but you would have no way to give it problems or receive its answers.
This is the heartbeat of every computer. Right now, as you read this on a screen, your computer's CPU is running this cycle billions of times per second.
The Control Unit checks the Program Counter (PC) — a special register that holds the memory address of the next instruction to execute. The CU sends a request to memory: "Give me what's at address 1042." Memory returns the instruction.
The Program Counter immediately increments to point to the next instruction (address 1043), so the cycle is ready to continue.
The instruction arrives as a binary number — say 00000001 00101001. The Control Unit decodes this: "This is an ADD instruction; add the values at memory locations 41 and 42."
This is like reading sheet music — the Control Unit reads the musical notation (binary instruction) and prepares the "musicians" (ALU, registers) to play the right notes.
The CU retrieves the required data from memory into registers (tiny, ultra-fast storage locations inside the CPU). Then it commands the ALU to perform the operation. The ALU executes and produces a result.
The result is written back to the appropriate memory location (or kept in a register for the next instruction). The cycle is complete.
Then it starts again. Instantly. Billions of times per second.
Imagine a professional chef working from a recipe:
| Kitchen | Computer |
|---|---|
| Recipe card | Program in memory |
| Ingredients in the pantry | Data in memory |
| Chef | CPU |
| Chef reading the recipe | Control Unit fetching/decoding |
| Chef chopping, mixing, cooking | ALU executing operations |
| Chef's hands holding current ingredients | Registers |
| Finished dish on the counter | Output / result stored in memory |
| Page number on the recipe | Program Counter |
The chef does not memorise the whole recipe before starting. They read one step, execute it, then read the next. That is exactly how the Fetch-Decode-Execute cycle works.
Von Neumann architecture has one famous weakness: the Von Neumann bottleneck.
The CPU and memory share a single bus — the pathway that data travels along. Since both instructions and data travel the same path, they compete for access. The CPU can calculate far faster than data can arrive from memory.
Imagine a brilliant chef who can cook 100 dishes per minute — but their pantry has a single tiny door that can only pass ingredients one at a time. The chef spends most of their time waiting.
Engineers have developed clever workarounds:
Next Lesson: The CPU is the engine of the computer — but what's actually inside it? We'll zoom into the silicon and understand clock speeds, cores, cache, and why 4 GHz matters more than you think.
Get this course's notes on Telegram!
Free cheat sheets, summaries & practice exercises