DEFINITION
The Central Processing Unit is a small and important piece of hardware in a computer system that is responsible for fetching, decoding and executing instructions.
A processor is another term used to refer to the CPU.
Computers work by following the instructions that humans give them. These instructions come in the form of code that programmers write.
In a computer, there needs to be a central component to receive these instructions and process them. That component is the CPU.
All of the other parts of a computer provide support to the CPU to help process these instructions.
A good analogy is to compare the CPU in a computer to an engine in a car. In a car, a driver controls the speed of the car using pedals, but it is the engine that actually moves the car forward at the required speed.
Comparatively, a programmer instructs a computer what to do by writing code, but it is the CPU which processes and executes these instructions.
Here is an example of what a modern CPU looks like:
A close up photograph of a CPU. This particular CPU is designed by Intel.
The CPU consists of several smaller components that each have a specific objective.
While each component can only complete a certain objective, together, these components grant the CPU the ability to process instructions.
KEY POINT
The CPU consists of two main units, five registers and three buses.
Below is a table of these components:
Units | Registers | Buses |
---|---|---|
Arithmetic and Logic Unit | The Accumulator | Address Bus |
Control Unit | Instruction Register | Control Bus |
Memory Address Register | Data Bus | |
Memory Data Register | ||
Program Counter |
A table of the different types of components within a CPU. The components are grouped together by type.
Within a CPU, the components mentioned above are arranged like this:
A block diagram which shows how the internal components of a CPU are organised and connected together.
KEY POINT
A processor is another term used to refer to the CPU.
The term processor, just like the CPU, is used to refer to a piece of hardware in a computer system that is responsible for fetching, decoding and executing instructions.
DEFINITION
The Arithmetic and Logic Unit is a component of the CPU where arithmetic calculations and logical operations take place.
Computers need to be able to handle all sorts of complex tasks, such as simulating 3D environments and powering self-driving cars. Fortunately, all of these difficult tasks can be broken down into millions of small, simple arithmetic and logical operations.
This is why the ALU is a necessary component for the CPU. The ALU is able to rapidly solve millions of basic problems, which gives computers the ability to complete extraordinary tasks.
KEY POINT
The ALU is also referred to as a "core" of the CPU.
In everyday life, people refer to the ALU as a "core". When you hear that a CPU is dual-core or quad-core, it means that the CPU contains several ALUs inside it.
Collectively, these CPUs are known as multi-core processors.
KEY POINT
A CPU that has several cores is able to complete calculations simultaneously.
With two or more cores, a CPU is now able to solve several calculations at once instead of one at a time. This means that instructions can be processed faster, improving the overall performance of a computer.
For this reason, the number of cores a CPU has is one of the many metrics used to measure performance.
The ability of a CPU to process instructions simultaneously is called parallel processing.
KEY POINT
The ALU also contains the Accumulator, which is a register used to temporarily store the results of calculations.
When you solve a problem in a mathematics exam, you need space to write down your answer. Similarly, after completing a calculation, the ALU needs a place to store the result.
In the ALU, that space is called the Accumulator.
DEFINITION
The Control Unit is a component of the CPU that coordinates the fetch-decode-execute cycle.
The main responsibility of the Control Unit is to decode and interpret instructions.
Instructions in a computer come in the form of a short code, called the opcode (operation code), which specifies what needs to be done.
When the Control Unit receives an instruction, it checks this opcode, and generates the necessary signals to activate certain pieces of hardware within the CPU to execute the instruction.
A few examples of such instructions are loading data, storing data and a calculation in the ALU.
KEY POINT
The Control Unit also contains the Program Counter, which is a register which stores the address of next instruction to be executed.
After an instruction is executed, the value inside the Program Counter is incremented in order to load the instruction from the next memory address in the primary memory.
DEFINITION
A register is a small capacity but extremely fast piece of memory, that temporarily stores frequently used data and intermediate results from calculations.
CPUs use registers to store temporary and frequently used data.
Before the CPU can execute an instruction, it must know where it can find the instruction and what the instruction itself is.
This is why registers are essential. The CPU uses these internal registers to store crucial information such as instructions, memory addresses and other temporary data it may need.
KEY POINT
Registers have a really small capacity, typically ranging from 8 to 64 bits (1 to 8 bytes).
In modern CPUs, registers usually have either a 32 or 64 bit capacity. However, that is all that is necessary for a CPU to process each instruction.
Some registers, found in specialised and more complex computer systems, can have a larger capacity of 128 or 256 bits.
KEY POINT
Registers are directly “built into” the circuitry of the CPU.
Registers are contained internally within the CPU. This means that data access is much faster than waiting for the data to arrive from the primary memory of a computer.
You will need to know about 5 important registers in the CPU:
DEFINITION
The Accumulator is a register, located within the ALU, that temporarily stores the results of calculations.
After completing a calculation, the ALU then needs a place to temporarily store the result before it is used by the CPU. The ALU stores the result in its own internal register, called the Accumulator.
This is because storing the result in the Accumulator is much faster than primary memory. To reach the primary memory, the result will have to be transmitted via the data bus, which causes a delay.
DEFINITION
The Memory Address Register is a register, located within the CPU, that stores the address at which the next instruction or piece of data can be found.
Before a CPU executes an instruction or uses a piece of data, it needs to fetch the information from primary memory. The CPU may also need to store the result after it has executed an instruction.
This information is stored at certain memory addresses within the primary memory.
The CPU stores the memory addresses in the MAR, so that the corresponding instruction or data can be fetched or stored in the primary memory.
DEFINITION
The Memory Data Register is a register, located within the CPU, that stores the instruction or piece of data that is being either loaded from or stored in the primary memory.
After the CPU has located the instruction or data in the primary memory, the information is transmitted via the data bus and stored in the MDR.
Once the CPU has executed an instruction, it may need to store the result in primary memory. The CPU stores the result temporarily in the MDR so that later, it can be transmitted along the Data Bus and stored in primary memory.
DEFINITION
The Instruction Register is a register, located within the CU, that stores the current instruction that is being processed.
After the instruction has been fetched from the primary memory, it is stored in the Memory Data Register. However, the MDR is used to store information being stored and loaded from the primary memory.
In order to not be overwritten, the instruction needs to be stored in another register, so that later it can be processed. That register is the Instruction Register.
DEFINITION
The Program Counter is a register, located within the CU, that stores the address of the next instruction to be processed.
After fetching the previous instruction, the value inside the Program Counter is incremented to point to the address of the next instruction in primary memory.
Each instruction is of the same size and is stored in order in the primary memory. The size of these instructions depends on the particular design of the CPU.
Once an instruction has been fetched, the CPU no longer needs the address of the instruction that it is ready to execute.
At the end of the previous instruction, the next instruction begins, and this is the address that the CPU will use to fetch the next instruction.
DEFINITION
A bus is a physical connection between two or more components that facilitates the communication of data through signals in a wire.
Buses are given that name because similarly to how buses transport people between locations, buses in CPUs transmit data between components.
KEY POINT
The width of a bus is the amount of data that can be transmitted at a time.
In modern CPUs, buses are typically 32-bit or 64-bit. The width of the bus is one of the factors that affects its speed.
KEY POINT
A bus can be either unidirectional or bidirectional.
Unidirectional buses can only send data along a single direction.
Bidirectional buses can send data both directions.
You will need to know about the 3 main buses within the CPU:
DEFINITION
The Address Bus is a unidirectional bus that connects the primary memory of a computer to the Memory Address Register in the CPU.
The Address Bus is used to transfer memory addresses.
Before the primary memory sends the instruction that was requested by the CPU, it first needs to know the address where it is stored at.
The CPU takes the memory address of the instruction, which is stored in the Memory Address Register, and sends it to the primary memory along the Address bus.
This allows the primary memory to locate and then send the instruction back to the CPU.
DEFINITION
The Control Bus is a unidirectional bus that connects the primary memory of a computer to the Control Unit in the CPU.
The Control Bus sends control signals, which come from the Control Unit, to the primary memory.
The Control Unit generates a certain control signal that coordinates the movement of information from the primary memory.
Data and instructions can either be fetched from or stored in the primary memory. This information is transmitted along the data bus, which is bidirectional, allowing for information to travel both ways.
When information needs to be fetched instead of stored, the Control Unit will send a control signal via the Control bus to the primary memory. This will change the direction that data is transmitting through the Data bus.
The same happens for when information needs to be stored instead of fetched from the primary memory.
DEFINITION
The Data Bus is a bidirectional bus that connects the primary memory of a computer to the Memory Data Register in the CPU.
The Data Bus is used to transfer data and instructions.
Before execution, the CPU may need to fetch an instruction or data from the primary memory. The CPU uses the data bus to transmit this information from the primary memory to the Memory Data Register.
The Data bus is also bidirectional, meaning that it can transmit data and instructions to and from the primary memory.
Once the CPU has executed an instruction, it can store the result by transmitting the information back into the primary memory using the Data bus.
DEFINITION
Parallel processing is the ability of a computer to process instructions and solve calculations simultaneously.
Parallel processing means that the computer can execute several instructions at once. This allows a computer to process separate parts of a program at the same time or even many different programs together.
KEY POINT
Parallel processing improves the overall speed and efficiency of computation.
Instead of processing instructions sequentially, one at a time, a computer that has parallel processing abilities can process several instructions at once, increasing its computational speed and efficiency.
KEY POINT
A computer can only perform parallel processing if it has a multi-core processor or additional coprocessors.
DEFINITION
A Multi-core processor is a processor that has two or more cores, which together are able to process instructions simultaneously.
A single core is able to process instructions sequentially. A processor with several cores is able to process several instructions at the same time.
Most modern computers, such as desktop PCs and laptops, have multi-core processors with 4 to 8 cores.
DEFINITION
A coprocessor is a specialised processor that reduces the burden on the CPU by taking over repetitive and resource intensive tasks.
There are many different applications where coprocessors have proved to be useful.
Below is a table of coprocessors and the tasks which they perform:
Coprocessor | Application |
---|---|
Graphics Processing Unit (GPU) | Graphics rendering |
Floating Point Unit (FPU) | Floating point arithmetic operations |
Digital Signal Processors (DSP) | Signal processing |
A table showing 3 examples of coprocessors and their applications.
If you would like to report an error or request an edit, please contact us through email.
Contact us