Menu

Parts of the CPU

Von Neumann Architecture

Von Neumann architecture is the design used by most modern computers. Its key feature is that a program's instructions and its data are stored together in the same memory, in binary, with no separate memory set aside for instructions.

That shared memory matters because the CPU treats instructions and data in exactly the same way: it fetches both from memory as and when they are needed, rather than reading one from one place and the other from somewhere else. A single program's instructions sit alongside the values it works on.

Von Neumann architecture: the CPU holds the Control Unit, ALU and the four registers, and is joined by a two-way link to one memory that stores instructions and data side by side, using the pedestrian crossing example.

An example

Imagine a program that works the lights at a pedestrian crossing. Memory holds the binary for each instruction — such as switch on the green figure, or switch off the red light — and also the binary for the data the program is working on: whether the push button has been pressed, and which stage of the sequence the crossing has reached. Both sit in the same memory, side by side. When the CPU reaches the instruction that switches on the green figure, it fetches that instruction, then fetches the button data it needs from the same memory.

The Von Neumann registers

Four registers inside the CPU are named as part of Von Neumann architecture: the Program Counter, the Memory Address Register, the Memory Data Register and the Accumulator. Each of these holds just one item — either a memory address, which says where something is stored, or a piece of data, which is what is actually stored there.

An address and the value stored at that address are not the same thing, so it matters which of the two a register holds; swapping them makes the registers impossible to tell apart.

Practise this