The CPU: fetch–decode–execute cycle and components
The CPU (Central Processing Unit) is the brain of the computer. OCR J277 Paper 1 regularly sets 4–6 mark questions on the CPU — both short-answer component identification and explain-the-cycle questions.
Components of the CPU
| Component | Function |
|---|---|
| ALU (Arithmetic Logic Unit) | Performs arithmetic operations (+, −, ×, ÷) and logical/comparison operations (AND, OR, NOT, >, <, =) |
| CU (Control Unit) | Manages and coordinates all CPU operations; sends control signals; manages the fetch–decode–execute cycle |
| Cache | Very fast, small memory built into the CPU; stores frequently used instructions/data so the CPU doesn't wait for RAM |
| Registers (general) | Very fast temporary storage locations inside the CPU |
Key registers
| Register | Full name | Function |
|---|---|---|
| PC | Program Counter | Holds the memory address of the next instruction to be fetched |
| MAR | Memory Address Register | Holds the address currently being read from or written to |
| MDR | Memory Data Register | Temporarily holds the data being transferred to/from memory |
| ACC | Accumulator | Holds the result of ALU calculations |
| CIR | Current Instruction Register | Holds the instruction currently being decoded/executed |
The fetch–decode–execute (FDE) cycle
The CPU works by repeating three steps millions of times per second:
1. FETCH
- Contents of PC copied to MAR.
- Instruction at the address in MAR is fetched from RAM and copied to MDR.
- Contents of MDR copied to CIR.
- PC is incremented (increased by 1) to point to the next instruction.
2. DECODE
- CU decodes the instruction in CIR.
- CU determines what operation is needed and what data is involved.
3. EXECUTE
- CU sends control signals to relevant components.
- If arithmetic/logic: ALU performs the operation; result stored in ACC.
- If memory access: data moved to/from RAM via MAR/MDR.
- If a branch/jump: PC updated to the new address (not just incremented).
Common OCR exam mistakes
- Saying the PC holds the current instruction — it holds the address of the next instruction. The CIR holds the current instruction.
- Forgetting to mention that PC is incremented after the fetch — this is a frequently tested step.
- Saying the ALU does all processing — the CU coordinates everything; only arithmetic and logic go to the ALU.
- Confusing cache with RAM — cache is smaller, faster, and inside/close to the CPU.
AI-generated · claude-opus-4-7 · v3-ocr-computer-science