The CPU and Von Neumann Architecture
What Is the CPU?
The CPU is the brain of any computer system. It carries out the instructions that make up every program you run — from loading a webpage to running a game. Without the CPU, no processing can happen. Every calculation, decision and data movement passes through this single chip.
The design that almost every modern CPU is built on was described by mathematician John von Neumann in 1945. Von Neumann architecture states that a program’s instructions and its data should be stored in the same memory, and that the CPU should fetch each instruction in sequence, decode it, and then execute it. This idea — so straightforward it seems obvious now — was revolutionary at the time and remains the foundation of almost every computer built today.
A CPU contains two main sub-units: the Control Unit (CU), which manages the fetch-decode-execute cycle, and the Arithmetic Logic Unit (ALU), which performs calculations and logical comparisons.
The Control Unit
The Control Unit (CU) acts as the conductor of the CPU. It does not process data itself — instead it sends control signals that tell every other component what to do and when to do it. The CU reads the current instruction, works out what operation is needed, and then triggers the correct sequence of actions across the CPU, memory and input/output devices.
Think of the CU as a traffic controller at a busy junction: it does not drive any of the vehicles, but without it the whole system would grind to a halt. Every time your computer opens a file or responds to a keystroke, the CU is orchestrating the response.
The Arithmetic Logic Unit
The Arithmetic Logic Unit (ALU) is the calculator inside the CPU. It handles two types of operation. Arithmetic operations include addition, subtraction, multiplication and division — used whenever a program works with numbers. Logical operations include AND, OR, NOT and comparisons (is A greater than B? are two values equal?) — used every time a program makes a decision.
When you sort a list of names alphabetically, the ALU is comparing characters thousands of times per second. When a game calculates a bullet’s trajectory, the ALU is doing the maths. The ALU receives its inputs from registers (small, fast storage locations inside the CPU), performs the operation, and places the result back into a register.
Registers
Registers are tiny storage locations built directly into the CPU chip. Because they sit so close to the processing circuits, they are the fastest storage in any computer system — far faster than even cache or RAM. The specification names five key registers you must know:
- Program Counter (PC) — holds the memory address of the next instruction to be fetched. It increments automatically after each fetch so that instructions are processed in order (unless a jump instruction changes it).
- Memory Address Register (MAR) — holds the address in memory that the CPU is about to read from or write to.
- Memory Data Register (MDR) — holds the data that has just been read from memory, or the data that is about to be written to memory. It acts as a buffer between the CPU and RAM.
- Current Instruction Register (CIR) — holds the instruction that is currently being decoded and executed. While the CIR is busy, the PC can already move on to the address of the next instruction.
- Accumulator (ACC) — the register where the ALU stores the results of arithmetic and logical operations. When two numbers are added, the answer lands in the ACC.
The five named registers are: PC (address of the next instruction), MAR (address being accessed in memory), MDR (data travelling to/from memory), CIR (the current instruction being executed) and ACC (the result of ALU calculations).
Cache Memory
Cache memory sits between the CPU and main memory (RAM). Accessing RAM takes far longer than accessing the CPU’s own circuits — if the CPU had to fetch every instruction directly from RAM, it would spend most of its time waiting. Cache solves this problem by storing copies of recently used or frequently needed instructions close to the processor.
Cache is organised into levels. L1 cache is the smallest and fastest (typically 32–64 KB per core), built directly into the processor core. L2 cache is larger (256 KB–1 MB) and slightly slower. L3 cache is shared between cores and can reach 8–32 MB on modern chips. When the CPU needs data, it checks L1 first, then L2, then L3, and only falls back to RAM if all levels fail to supply it.
In Von Neumann architecture, both the program being executed and the data it operates on are stored together in RAM. This is significant: it means a program can treat other programs as data and modify itself — the basis of all modern software.
RAM is volatile, meaning it loses all its contents the moment power is removed. This is why you must save a document before switching off your computer — anything in RAM that has not been written to a storage device is lost. The CPU reads instructions from RAM into the MDR, then passes them to the CIR for decoding. It also reads data values from RAM for the ALU to process, and writes results back to RAM when needed.
The amount of RAM a computer has directly affects how many programs it can run at once. If RAM fills up, the operating system must resort to virtual memory — using part of the secondary storage device as an overflow area. Because secondary storage is far slower than RAM, this causes a significant performance drop.
Misconception 1: The CU does calculations. It does not. The CU only controls and coordinates — all calculations go to the ALU. A common exam error is stating that the CU “adds numbers together” or “processes data”.
Misconception 2: Cache is the same as RAM. Cache is much smaller, much faster, and located on or very close to the CPU die. RAM is separate from the CPU and connects via the memory bus. They serve different purposes: cache reduces the time the CPU spends waiting; RAM stores all running programs and their data.
Misconception 3: The MAR stores the data, and the MDR stores the address. It’s the other way round. MAR = address, MDR = data. A helpful reminder: Address goes in the Address register (MAR); Data goes in the Data register (MDR).