The Purpose and Function of the Processor
intermediate25 minLearning objectives
- Explain the role of the CPU
- Describe the Fetch–Decode–Execute cycle
- Identify the functions of the CU, ALU and registers
- Explain how buses transfer data within a computer system
Learn
AQA 4.6.1 — CPU architecture and the Fetch–Decode–Execute cycle
Retrieval: Sequence 7 established that every value a computer stores, including a program's own instructions, is ultimately binary. This lesson answers the next question: what actually does something with those binary instructions?
The CPU (Central Processing Unit) is the component that actually carries out program instructions. Its key parts:
- Control Unit (CU) — coordinates the fetch-decode-execute cycle and directs data flow.
- Arithmetic Logic Unit (ALU) — performs arithmetic and logical operations.
- Registers — tiny, extremely fast storage locations inside the CPU.
- Buses — the "wires" that carry data, addresses and control signals between components.
The Fetch–Decode–Execute cycle
Every single instruction a CPU runs goes through this three-stage cycle:
- Fetch — the next instruction's address (held in the Program Counter) is used to retrieve the instruction from memory.
- Decode — the Control Unit interprets what the instruction means.
- Execute — the instruction is carried out (e.g. the ALU performs a calculation).
This cycle repeats, continuously, for every instruction in a running program — billions of times per second on a modern processor.
Common mistake
A higher clock speed doesn't automatically mean a faster computer overall — it's easy to assume clock speed alone determines performance, but the number of cores, cache size, and even what the software is doing all matter too (you'll cover this properly in the Processor Performance lesson later in this sequence).
Why this matters for programmers
Understanding that "your Python line of code" ultimately becomes many low-level machine instructions, each individually fetched, decoded and executed, explains why things like loop efficiency and algorithm complexity matter: an O(n²) algorithm doesn't just "take longer" abstractly — it genuinely requires far more fetch-decode-execute cycles to complete.
Reflection
If a CPU's clock speed is 3 GHz, roughly how many fetch-decode-execute cycles could it perform in one second? (This is a simplification — modern CPUs pipeline and can do more than one instruction per cycle — but it's a useful first estimate.)