Part 08 of 12
Assembling a CPU datapath
Join the calculator, memory, counters, and communication lines into one machine.
The story before the details
A CPU is not an ALU with a fancy name. It is a coordinated system containing storage, arithmetic, data paths and sequencing. For a simple accumulator CPU, the accumulator stores a working value, memory stores additional values, an instruction register holds the currently selected command and a program counter tracks where execution goes next.
Every instruction therefore requires both data movement and control. To add a value from memory, hardware must select a memory address, make the memory data available, route it to the ALU, perform addition, and capture the result into a register. The sequence is straightforward once the individual parts are familiar.
The fetch-decode-execute cycle is a practical mental model, not a literal universal implementation sequence. Modern processors pipeline stages and perform multiple operations in flight. First, learn the tiny working model with complete confidence; then the optimization strategies will have something concrete to extend.
What you will discover
These six lessons are arranged so each one answers a question created by the previous one. Do not rush to the last lesson. If a concept feels opaque, use the checkpoint before continuing.
- 08.01The accumulator model↗Where does a CPU keep the current answer?
- 08.02General-purpose registers↗Why keep several values close to the ALU?
- 08.03The instruction register↗How does a CPU hold its current command?
- 08.04The program counter↗How does a computer know the next instruction?
- 08.05Fetch, decode, execute↗What repeats while code runs?
- 08.06Datapath versus control↗Who moves the data and who decides when?
Join the calculator, memory, counters, and communication lines into one machine. You should be able to explain each concept using only an input, a rule, an output, and any state that must be retained.