The von Neumann Architecture

Look at almost any computer built in the last seventy years — the phone in your pocket, a games console, the laptop in the corner of the classroom, the tiny chip inside a washing machine — and under the hood they all share the same basic blueprint. It has a name: the von Neumann architecture, after the mathematician John von Neumann whose 1945 report described it. It is so common that we usually just call it "how a computer works".

The blueprint has three big ideas, and this page unpacks them one at a time:

Memory: instructions and data, side by side

The heart of the idea is main memory (you might know it as RAM). Memory is just an enormous list of numbered storage boxes, called addresses. Every box holds a pattern of binary — a row of 0s and 1s — and that is all it holds.

Here is the surprising part. Some of those boxes contain the numbers your program is working on (a score, a pixel colour, someone's age) — that's the data. Other boxes contain the program's own instructions ("add these two", "store this here", "jump back to the start"). But a memory box has no idea which kind it is holding. An instruction and a piece of data look exactly the same: both are just binary. What makes a pattern an instruction is simply that the CPU fetches it and treats it as one.

The whole machine on one diagram

Step through this figure. The CPU sits on the left and main memory on the right, with instructions (marked I) and data (marked D) mixed together in the same boxes. The bus between them carries everything: the address the CPU wants, and the instruction or data that comes back.

Notice there is one road (one bus) between the CPU and memory, and the memory is one shared store. Instructions and data take turns travelling along that same road — a detail that turns out to matter (see the vignette below).

The CPU works one instruction at a time

The CPU never runs a whole program at once. It repeats a tight little loop, over and over, billions of times a second — the fetch–decode–execute cycle:

  1. Fetch — read the next instruction from its address in memory, across the bus.
  2. Decode — work out what that instruction is asking for.
  3. Execute — actually do it (add, compare, store a result, jump somewhere else), then move on to the next instruction.

A special register called the program counter just holds the address of the next instruction, and normally ticks up by one each cycle — which is exactly how the CPU marches through a program in order. You will meet this cycle in much more detail in the CPU lesson; here the point is only that the instructions being fetched are coming out of the same memory as the data.

Why "stored program" changed everything

That last point is the whole reason a modern computer is so useful. The same laptop can be a calculator, a paint program, a web browser and a games machine — not because the hardware changes, but because you load a different program (different data) into memory. The machine is general-purpose: it does whatever program currently sits in its memory.

It is easy to assume computers were always programmed by loading software. They weren't. Early machines like ENIAC (1945) were programmed by physically rewiring them — engineers plugged in cables and flicked switches for days to set up a single calculation. To run a different job, you rebuilt the wiring.

The stored-program insight was the leap: put the instructions in the same memory as the data, as ordinary binary. Now "reprogramming" the machine just means loading new numbers into memory — something the computer can do itself in a fraction of a second. This is the single most important thing to take from this page.

The flip side of sharing one memory: because instructions and data look identical, a program that is careless (or malicious) can accidentally treat data as instructions, or overwrite its own instructions with data — the root of a whole family of computer-security bugs.

Yes — a real weakness. In a strict von Neumann machine the CPU can't fetch an instruction and read a piece of data in the same instant, because both must travel along the same bus. The CPU can end up waiting for memory. People call this the von Neumann bottleneck.

Engineers work around it. Fast on-chip cache memory keeps recently used instructions and data close to the CPU, and an alternative blueprint — the Harvard architecture — gives instructions and data separate memories and buses so both can move at once. Many chips today are a practical blend of the two ideas.

The buses in a bit more detail

When people say "the bus", they usually mean three cooperating bundles of wires between the CPU and memory (and other components):

A wider address bus can reach more memory boxes, and a wider data bus can move more bits per trip — which is part of what people mean when they compare a "32-bit" and a "64-bit" machine.