The central processing unit (CPU), or processor, is the primary component responsible for processing data and executing instructions.
The CPU continually reads instructions stored in main memory and executes them as required.
Main memory holds the instructions of the programs that are running and the data they use. The CPU can access main memory directly.
Inside the CPU are the arithmetic logic unit (ALU), the control unit, the clock, registers and usually cache. Buses connect the CPU to main memory and other components.
Older books and videos may mention Von Neumann architecture. It is no longer on the AQA course.
The main parts of the CPU, joined to main memory by buses.
Exam tipSay data and instructions, never “information”. Mark schemes reject “information” in CPU and memory answers.
Central processing unit (CPU)
The primary component responsible for processing data and executing instructions.
Main memory
Any form of memory that is directly accessible by the CPU (except for cache and registers). It holds the instructions and data of running programs.
3.4.5 Arithmetic logic unit
The arithmetic logic unit (ALU)
The ALU is a part of the processor where arithmetic and logical operations are performed.
Arithmetic operations: adding, subtracting and other calculations, such as working out total + 5.
Logical operations: comparing values (is score > 50? are two values equal?) and Boolean operations such as AND, OR and NOT.
The ALU does its work during the execute stage of the fetch-execute cycle. Its results are usually stored in a register.
Arithmetic logic unit (ALU)
A part of the processor where arithmetic and logical operations are performed.
3.4.5 Control unit
The control unit
The control unit is a part of the processor which:
decodes instructions, to work out what each one is;
coordinates/directs the execution of instructions, so each step happens in the right order;
sends control signals to other components, such as telling the ALU which operation to do, or telling main memory to send or store data.
Exam tip“The control unit controls the computer” scores nothing. Use one of the three actions: decodes instructions, coordinates/directs their execution, sends control signals. Write “signals”, not “messages”.
Control unit
A part of the processor which decodes instructions, coordinates/directs the execution of instructions and sends control signals to other components.
3.4.5 Clock
The clock and clock speed
The clock synchronises operations of the computer by sending regular timing signals to the processor.
Each pulse is a signal for the components to carry out their next step, so they all work in step with each other.
Clock speed is the frequency of these pulses: the number of pulses per second. It is measured in hertz (Hz), where 1 hertz = 1 pulse per second.
Modern processors run at gigahertz speeds: 1 GHz = 1000 MHz = 1,000,000,000 Hz. Like other units in this course, the prefixes go up in 1000s.
The clock sends out regular pulses that keep the components in step.
Worked exampleA processor’s clock speed is 2.8 GHz. How many clock pulses does it send each second?
1 GHz = 1,000,000,000 Hzgiga = one thousand million
2.8 × 1,000,000,000 = 2,800,000,000multiply by 1,000,000,000
2,800,000,000 pulses per second
Worked exampleWrite 1500 MHz in GHz.
1500 ÷ 1000 = 1.51 GHz = 1000 MHz
1.5 GHz
Exam tipThe clock doesn’t “measure how long instructions take” or “tell the time”. And don’t leave out regular: it sends regular timing signals/pulses that synchronise operations.
Clock
Synchronises operations of the computer by sending regular timing signals to the processor.
Clock speed
The frequency of the clock’s pulses, measured in hertz (Hz), where 1 hertz = 1 pulse per second.
3.4.5 Register
Registers
A register is a memory location on a processor that can be accessed quickly.
A register can hold data used when executing an instruction and the result of executing an instruction. Registers can also hold the instruction being worked on, or a memory address.
Registers are tiny (each holds one value) but they are the fastest memory in the computer, because they are inside the processor.
You don’t need to know any specific registers. Other courses and some videos name them; AQA doesn’t ask for them.
Exam tip“A register is fast memory” is only half an answer. Add where it is (on the processor) and what it holds (data used when executing an instruction, or the result).
Register
A memory location on a processor that can be accessed quickly. It can hold data used when executing an instruction and the result of executing an instruction.
3.4.5 Bus
Buses
A bus is a collection of wires through which data/signals are transmitted from one component to another.
Buses carry data, instructions, memory addresses and control signals, for example between the CPU and main memory.
Without buses, an instruction couldn’t travel from main memory to the CPU, and results couldn’t be written back.
Bus
A collection of wires through which data/signals are transmitted from one component to another.
3.4.5 Fetch-execute cycle
The fetch-execute cycle
The CPU continually reads instructions stored in main memory and executes them as required. Each instruction goes through three stages, and then the cycle repeats.
Fetch: the next instruction is fetched to the CPU from main memory.
Decode: the instruction is decoded to work out what it is. The control unit does this.
Execute: the instruction is executed (carried out). This may include reading data from or writing data to main memory, and may use the ALU.
That is all AQA asks for. You don’t need named registers or the order in which buses are used.
Fetch, decode, execute, then repeat.
Worked exampleFollow one instruction that copies the value held in a register into main memory, at an address given in the instruction.
Fetch: the instruction is copied from main memory to the CPU along the busesthe instruction is stored in main memory
Decode: the control unit works out that it is a STORE, and which memory address the value must go todecoding tells the CPU what to do
Execute: the control unit sends control signals; the address and the value (data) travel along the buses, and main memory writes the value at that addressthis stage may write to main memory
The cycle repeats: the next instruction is fetchedthe CPU runs continually
Exam tipKeep instructions and data apart. Instructions are fetched and decoded; data may be read or written during execute. “The data is decoded” and “the memory is fetched” are wrong.
Fetch-execute cycle
The continual cycle in which the CPU fetches the next instruction from main memory, decodes it to work out what it is, and executes it.
3.4.5 Main memory and the cycle
How main memory is used in the cycle
Before the cycle: a program’s instructions and its data are held in main memory while it runs.
Fetch: the next instruction is read from main memory and sent to the CPU.
Execute: if the instruction needs data, it may be read from main memory. Results may be written back to main memory.
Main memory is used because the CPU can access it directly. Programs on secondary storage, such as an SSD, have to be copied into main memory before they can run.
Stage
Main memory’s part
Fetch
Holds the instructions; the next instruction is read from it
Decode
Not usually used: the instruction is already in the CPU
Execute
Data may be read from it; results may be written back to it
Exam tipIf a question asks how main memory is used, don’t just describe the cycle. Say what main memory stores (instructions and data) and when it is read from or written to.
3.4.5 Clock speed, cores and cache
What affects CPU performance
Three factors on the AQA course affect how quickly a CPU gets through a program. For each, learn why it helps and when it doesn’t.
Clock speed: a higher clock speed means more pulses per second, so more instructions can be fetched, decoded and executed each second.
Number of cores: a core is a processing unit within a processor. Each core can fetch, decode and execute instructions independently of the other cores, so a multi-core CPU can process several instructions simultaneously.
Cache size: cache is a small area of fast memory built into the processor that holds frequently used instructions and data. A larger cache can hold more of them, so the CPU has to fetch from slower main memory less often.
Limits of more cores: doubling the cores doesn’t always double performance. Some tasks can’t be split into parts that run at the same time, the software must be written to use several cores, and cores may have to wait for each other or for main memory.
Limits of clock speed: a higher clock speed makes the processor use more power and get hotter, and the CPU may still have to wait for data from main memory.
Limits of cache: cache only helps when instructions or data are reused. It is expensive, so processors only have a small amount.
Factor
Why increasing it can help
When it helps less
Clock speed
More pulses per second, so more instructions executed per second
When the CPU is waiting for data from main memory
Number of cores
Each core processes instructions independently, so several are processed simultaneously
A single task that can’t be split, or software not written for several cores
Cache size
More frequently used instructions and data kept in fast memory on the processor, so fewer slower fetches from main memory
Programs that rarely reuse the same instructions or data
Worked exampleProcessor P runs at 2.0 GHz and processor Q at 3.0 GHz. Everything else is the same. How many times as many clock pulses per second does Q have?
3.0 ÷ 2.0 = 1.5compare the clock speeds
So Q can carry out about 1.5 times as many instructions per secondone more step per pulse
1.5 times as many
Exam tipCores “do two things at once” is too vague. Write that each core can process instructions simultaneously / independently. And cache here means memory on the processor, not a web browser’s cache or a disk cache.
Exam tip“Faster” on its own earns nothing. Say what is faster and why: “more instructions executed per second because there are more clock pulses per second”.
Core
A processing unit within a processor. Each core can fetch, decode and execute instructions independently of the other cores.
Cache
A small area of fast memory built into a modern processor. It holds frequently used instructions and data that the processor is likely to reuse.