Mission 1 · Spec 1.1.1
The CPU and Von Neumann architecture
What the CPU is for, its main components, the four registers you need to know, and the fetch-execute cycle.
- Starter 5 min
- Learn 10 min
- Lab 20 min
- Quiz 10 min
- Exam 10 min
The world's fastest chef
A chef reads a recipe one step at a time: read the step, work out what it means, do it, move to the next. What in a computer does the same job?
Reveal
The CPU. It repeats fetch, decode, execute billions of times a second. Its purpose is to process data and instructions so the computer can work.
Key ideas
The purpose of the CPU is to fetch, decode and execute instructions. In the Von Neumann architecture, data and instructions are stored together in the same memory.
ALU
Arithmetic Logic Unit: performs calculations and logical comparisons.
CU
Control Unit: decodes instructions and sends signals to control how data moves around the CPU.
Cache
Very fast memory inside the CPU that stores frequently used data and instructions.
Registers
Tiny, extremely fast memory locations within the CPU.
| Register | Holds |
|---|---|
| PC Program Counter | The address of the next instruction to be fetched |
| MAR Memory Address Register | The address of the memory location currently being read from or written to |
| MDR Memory Data Register | The data or instruction that has been fetched from, or is to be written to, memory |
| ACC Accumulator | The results of calculations carried out by the ALU |
Fetch-execute simulator
Watch the registers change at every micro-step.The cycle in order
Exam-style questions
1. State the purpose of the CPU.
[1 mark]Mark scheme
- To fetch, decode and execute instructions / to process data (1)
2. Describe the role of the MAR and the MDR in the fetch stage.
[4 marks]Mark scheme
- The address of the next instruction is copied from the PC into the MAR (1)
- The MAR holds the address of the memory location to be accessed (1)
- The instruction at that address is fetched and stored in the MDR (1)
- The MDR holds the data / instruction that has been fetched from memory (1)
3. Describe what is meant by the Von Neumann architecture.
[2 marks]Mark scheme
- Instructions and data are stored in the same memory (1)
- The CPU fetches, decodes and executes instructions one at a time / uses registers such as the PC, MAR, MDR and ACC (1)
TUTOR NOTES
- Misconception: the MAR holds data. It holds an address; the MDR holds the data.
- Misconception: the PC counts how many programs have run. It holds the address of the next instruction.
- Exam habit: name registers in full the first time, then abbreviate.
- Extension: why does the PC increment during the fetch stage rather than after execution?
Mission 2 · Spec 1.1.2
CPU performance
How clock speed, cache size and the number of cores affect how fast a CPU works.
- Starter 5 min
- Learn 10 min
- Lab 15 min
- Quiz 10 min
- Exam 10 min
Faster kitchen
A restaurant kitchen is too slow. Would you hire a faster chef, hire more chefs, or move the ingredients closer to the cooker? When would each help?
Reveal
Faster chef = higher clock speed. More chefs = more cores (only helps if the work can be shared). Ingredients closer = bigger cache. All three are ways to make a CPU faster.
Three factors
Clock speed
The number of fetch-execute cycles per second, measured in hertz. 3.5 GHz = 3.5 billion cycles per second. Higher clock speed means more instructions processed each second.
Cache size
More cache means more frequently used data can be stored close to the CPU, so it waits for slower RAM less often.
Number of cores
Each core can fetch, decode and execute instructions independently. More cores can process more instructions at the same time, but only if the program can be split into tasks that run in parallel.
Build a faster CPU
Exam-style questions
1. Explain how increasing the cache size can improve the performance of a CPU.
[2 marks]Mark scheme
- More frequently used data / instructions can be stored in cache (1)
- Cache is faster to access than RAM, so the CPU spends less time waiting (1)
2. A computer's CPU is upgraded from 2 cores to 4 cores. Explain why some programs may not run any faster.
[2 marks]Mark scheme
- The program may not be designed to use multiple cores / can't be split into parallel tasks (1)
- Some tasks depend on the result of the previous one so must be done in sequence (1)
TUTOR NOTES
- Misconception: "4 cores = 4 times faster".
- Misconception: clock speed is how fast the computer turns on.
- Lab prompt: find two different CPU designs that give the same time for the video task.
Mission 3 · Spec 1.1.3
Embedded systems
The small, dedicated computers hidden inside everyday devices.
- Starter 5 min
- Learn 5 min
- Lab 10 min
- Quiz 10 min
- Exam 10 min
Hidden computers
How many computers are in your kitchen? Look around before you reveal.
Reveal
The microwave, oven, dishwasher, fridge, washing machine, kettle, coffee machine… Most modern appliances contain an embedded system.
Key ideas
An embedded system is a computer system with a dedicated function, built into a larger device.
Characteristics
Does one job; small; low power; usually cheap to make; often has its program stored in ROM; reliable, often running for years without being restarted.
Examples
Washing machines, microwaves, traffic lights, car engine management, central heating controllers, digital cameras, fitness trackers.
Embedded or not?
Exam-style questions
1. Define an embedded system and give two examples.
[3 marks]Mark scheme
- A computer system with a dedicated function within a larger mechanical or electrical system (1)
- Two valid examples (1 each)
2. Give two characteristics of embedded systems.
[2 marks]Mark scheme
- Any two: dedicated / single function; small; low power consumption; cheap to manufacture; reliable; program stored in ROM / can't easily be changed by the user (1 each)
TUTOR NOTES
- Misconception: smartphones are embedded systems. They are general purpose.
- Extension: why are embedded systems often programmed in low-level languages?