Registers and the FDE Cycle
1. CPU Registers
Registers are high-speed storage locations inside the CPU. They hold data that is being processed immediately.
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.
- Address Bus: Carries addresses from CPU to Memory. (One-way / Simplex).
- Data Bus: Carries actual data/instructions between CPU and Memory. (Two-way / Duplex).
- Control Bus: Carries signals (e.g., Read/Write) from the Control Unit. (Two-way).
3. The Fetch-Decode-Execute (FDE) Cycle
This is the continuous process the CPU performs to run programs.
- The PC contains the address of the next instruction.
- This address is copied to the MAR via the Address Bus.
- The instruction at that address is moved to the MDR via the Data Bus.
- The PC is incremented by 1 (pointing to the next instruction).
- The instruction is copied from the MDR to the CIR.
The Control Unit (CU) decodes the instruction in the CIR to see what needs to be done (e.g., is it an ADD, a STORE, or a LOAD?).
The CPU carries out the instruction. If a calculation is needed, the ALU handles it and stores the result in the Accumulator (ACC).