The CPU operates using the Fetch-Decode-Execute cycle.
The Control Unit (CU) makes sense of the instruction sitting in the CIR.
The instruction is split into two parts:
The CU interprets the opcode and prepares any necessary hardware pathways.
The instruction is carried out. Depending on the command, this might involve:
Once finished, the processor checks for interrupts (signals from hardware or software needing attention) and restarts the cycle with the new address in the PC.
| Register | Full Name | Purpose |
|---|---|---|
| PC | Program Counter | Holds the address of the next instruction to be fetched. |
| MAR | Memory Address Register | Holds the address of the current location being accessed in memory. |
| MDR | Memory Data Register | Acts as a buffer for data/instructions traveling between memory and the CPU. |
| CIR | Current Instruction Register | Holds the instruction currently being decoded and executed. |
| ACC | Accumulator | Stores the intermediate results of ALU calculations. |