- Home
- Lessons
- KS3 Computing
- How the CPU runs programs
How the CPU runs programs
🎬 The doodle video for this lesson is coming soon. Subscribe on YouTube to see it first.
A program is a list of instructions stored as binary in memory. The CPU fetches them one by one and carries them out, billions of times a second.
Stored programs
In modern computers, instructions and data are both stored in main memory (RAM) as binary.
This is called the stored program idea (often linked to John von Neumann).
The CPU reads each instruction from memory, works out what it means and carries it out.
This is called the stored program idea (often linked to John von Neumann).
The CPU reads each instruction from memory, works out what it means and carries it out.
The fetch-decode-execute cycle
Fetch: the CPU gets the next instruction from memory. A register called the program counter holds its address, then moves on to the next one.
Decode: the control unit works out what the instruction means.
Execute: the instruction is carried out, for example adding two numbers.
Then the cycle repeats.
Decode: the control unit works out what the instruction means.
Execute: the instruction is carried out, for example adding two numbers.
Then the cycle repeats.
Parts of the CPU
Put these in order and say what happens: execute, fetch, decode.
- Fetch: get the instruction from memory.
- Decode: work out what it means.
- Execute: carry it out.
Answer: Fetch, decode, execute, then repeat.
Instructions and data are stored in memory as binary. The CPU repeats the fetch-decode-execute cycle. The CU controls, the ALU calculates, registers and cache are fast stores, and clock speed measures cycles per second.
The interactive lesson includes the diagrams for this topic.
Check you have got it
Answer 6 quick questions with instant marking. If you get one wrong, GCSE-ready shows you why and gives you another go. It is free, and you do not need an account.