GCSE Computer Science (9-1)
The Function of the CPU
What is the Purpose of the CPU?
The CPU is often known as the 'brain of the computer'. Its job is to process data. And
by processing we mean things like searching, sorting, calculating and decision
making. Whenever you are on working on your computer, it is the CPU which is at the
heart of everything.
The CPU follows three steps in order to process data. It is known as the Fetch -
Decode - Execute cycle (aka Fetch-Execute Cycle).
To begin with, whenever you open and work with a program, its data and instructions
are loaded onto the RAM. As the RAM is accessed directly by the CPU, the CPU can get
to work!
The Fetch Stage
In this step the CPU fetches some data and instructions from main memory (RAM) and then
stores them in its own temporary memory called 'registers'.
For this to happen, the CPU uses a piece of hardware path called the 'address bus'.
The address of the next item that the CPU wants is put onto the ‘address bus’.
Data from this area then travels from the RAM to the CPU on another piece of
hardware called the ‘Data Bus’.
The Decode Stage
3
, GCSE Computer Science (9-1)
The decode step is where the CPU understands / works out what the instruction it has
just fetched actually means. The CPU ‘decodes’ the instruction and gets things ready
for the next step.
The Execute Stage
The Execute stage is where data processing happens. Instructions are carried out on
the data. Once a cycle has been completed, another begins.
What makes up a CPU?
Now that we know the basic actions performed by the CPU it’s time to look at the
areas of the CPU responsible:
Control Unit
Immediate Access Store (IAS) or “Cache”
Arithmetic and Logic Unit (ALU)
The Control Unit
There are three main jobs of the Control Unit:
It manages and monitors hardware on the computer to ensure the correct data
goes to the correct hardware.
It manages the input and output signals ensuring these are dealt with correctly.
It uses clock signals to synchronise the running of the Fetch-Decode-Execute
cycle.
Immediate Access Store (Cache)
This part stores the data which is to be immediately processed. The CPU takes a
chunk of data / instructions from the RAM and keeps it close so that it always has a
constant supply of data to process. If data and instructions were moved from the RAM
one instruction at a time, the CPU would work far slower because the CPU cycles
much faster than the RAM can deliver data. So instead, chunks are moved from the
RAM and stored on the cache so the CPU doesn’t spend wasted time waiting for a
delivery of data. Efficiently coded programs will also ensure that regularly used
instructions are stored in the cache so that they can be accessed regularly, at speed.
Arithmetic and Logic Unit (ALU)
3
The Function of the CPU
What is the Purpose of the CPU?
The CPU is often known as the 'brain of the computer'. Its job is to process data. And
by processing we mean things like searching, sorting, calculating and decision
making. Whenever you are on working on your computer, it is the CPU which is at the
heart of everything.
The CPU follows three steps in order to process data. It is known as the Fetch -
Decode - Execute cycle (aka Fetch-Execute Cycle).
To begin with, whenever you open and work with a program, its data and instructions
are loaded onto the RAM. As the RAM is accessed directly by the CPU, the CPU can get
to work!
The Fetch Stage
In this step the CPU fetches some data and instructions from main memory (RAM) and then
stores them in its own temporary memory called 'registers'.
For this to happen, the CPU uses a piece of hardware path called the 'address bus'.
The address of the next item that the CPU wants is put onto the ‘address bus’.
Data from this area then travels from the RAM to the CPU on another piece of
hardware called the ‘Data Bus’.
The Decode Stage
3
, GCSE Computer Science (9-1)
The decode step is where the CPU understands / works out what the instruction it has
just fetched actually means. The CPU ‘decodes’ the instruction and gets things ready
for the next step.
The Execute Stage
The Execute stage is where data processing happens. Instructions are carried out on
the data. Once a cycle has been completed, another begins.
What makes up a CPU?
Now that we know the basic actions performed by the CPU it’s time to look at the
areas of the CPU responsible:
Control Unit
Immediate Access Store (IAS) or “Cache”
Arithmetic and Logic Unit (ALU)
The Control Unit
There are three main jobs of the Control Unit:
It manages and monitors hardware on the computer to ensure the correct data
goes to the correct hardware.
It manages the input and output signals ensuring these are dealt with correctly.
It uses clock signals to synchronise the running of the Fetch-Decode-Execute
cycle.
Immediate Access Store (Cache)
This part stores the data which is to be immediately processed. The CPU takes a
chunk of data / instructions from the RAM and keeps it close so that it always has a
constant supply of data to process. If data and instructions were moved from the RAM
one instruction at a time, the CPU would work far slower because the CPU cycles
much faster than the RAM can deliver data. So instead, chunks are moved from the
RAM and stored on the cache so the CPU doesn’t spend wasted time waiting for a
delivery of data. Efficiently coded programs will also ensure that regularly used
instructions are stored in the cache so that they can be accessed regularly, at speed.
Arithmetic and Logic Unit (ALU)
3