Registers and the FDE Cycle
1. CPU Registers
Registers are high-speed storage locations inside the CPU. Each one holds a single value the processor is working with at this instant.
Holds the address of the next instruction to be fetched.
Holds the address of the current instruction or data being read from/written to memory.
Holds the actual data or instruction fetched from memory (or waiting to be written).
Holds the instruction that is currently being decoded and executed.
Holds the results of calculations performed by the ALU.
2. System Buses
Buses are the physical connections (wires) that move data between the CPU and memory. They are not used for movement between two registers — registers are all inside the CPU already.
- Address Bus: Carries addresses from the MAR to memory. (One-way / unidirectional).
- Data Bus: Carries actual data/instructions between memory and the MDR. (Two-way / bidirectional).
- Control Bus: Carries signals such as Read and Write from the Control Unit. (Two-way).
3. The Fetch-Decode-Execute (FDE) Cycle
This is the process the CPU repeats continuously, for as long as it is switched on, to run programs.
- The PC contains the address of the next instruction.
- That address is copied from the PC to the MAR. This happens inside the CPU — no system bus is involved.
- The MAR places the address onto the Address Bus, which carries it out to memory, while the Control Unit sends a read signal along the Control Bus.
- The contents of that memory location travel back along the Data Bus into the MDR.
- The instruction is copied from the MDR to the CIR.
- The PC is incremented by 1, so it now points at the following instruction.
The Control Unit (CU) decodes the instruction held in the CIR, splitting it into its opcode (what to do) and operand (what to do it to), and works out which components need to act.
The CPU carries out the instruction. If a calculation is required, the ALU performs it and the result is stored in the Accumulator (ACC).
Worked example: two passes
Suppose memory holds an instruction LOAD 200 at address 100, and ADD 201 at address 101. Following the registers through:
| Stage | PC | MAR | MDR | CIR | ACC |
|---|---|---|---|---|---|
| Start | 100 | — | — | — | — |
| PC → MAR | 100 | 100 | — | — | — |
| Memory → MDR | 100 | 100 | LOAD 200 | — | — |
| MDR → CIR | 100 | 100 | LOAD 200 | LOAD 200 | — |
| PC incremented | 101 | 100 | LOAD 200 | LOAD 200 | — |
| Decode + Execute | 101 | 200 | 25 | LOAD 200 | 25 |
| — cycle repeats — | 101 | 101 | ADD 201 | ADD 201 | 25 |
Notice two things in that trace. The PC changed from 100 to 101 during the first fetch, which is what makes the second pass collect a different instruction. And on the last row the MAR and MDR are reused — they are not dedicated to instructions, they are used again whenever memory is accessed for anything.
- A common mistake is saying the "Data Bus carries addresses." Addresses go on the Address Bus; data goes on the Data Bus. Only the Address Bus is unidirectional (CPU → Memory).
- PC to MAR does not use a bus. Both are registers inside the CPU. The buses only carry things between the CPU and memory.
- Say that the cycle repeats, and link the PC increment to it. "The PC is incremented" earns more credit when you add "so the next instruction is fetched on the following cycle".