You are on page 1of 4

The CPU (Central Processing Unit) is the most important element of any computer system, we

often think of it as the brain of the computer. The CPU is a small chip that is located on the
motherboard of a computer system. A CPU is measured in Hertz (Hz). The higher the Hz, the
faster the CPU will be, and the more instructions that can be executed every second. Typically, a
CPU today is often measured in Gigahertz (GHz). This means, for example, a 2GHz CPU will be
able to execute 2,000,000,000 (2 billion) instructions every second.

The CPU is responsible for processing all instructions that are given to the computer by the user.
It processes each of these instructions individually. In order to process these instructions, it
follows a specific cycle. This is known as the Fetch, Decode, Execute Cycle:
 Fetch – In this stage, an instruction is fetched from the Main Memory (RAM). The
oldest instruction is always fetched
 Decode – In this stage, the instruction is broken down and converted into a language
that can be understood (binary)
 Execute – In this stage, the instruction is executed and carried out, and the user receives what they requested
As this is a cycle, once an instruction has been executed, the cycle begins again. A new instruction is fetched, and the process happens again.

For this cycle to work however, it requires different parts of the CPU to all work together. These are the CU (Control Unit),
ALU (Arithmetic Logic Unit), PC (Program Counter), MDR (Memory Data Register), MAR (Memory Address Register),
and Accumulator. If we now break the Fetch, Decode, Execute cycle down again, we can see where these different parts of
the CPU undertake their role:

Fetch: In order to fetch the correct instruction, the processor looks to the PC (Program Counter). This register records the
address of the next instruction to fetch. Once fetched, the data is stored in the MDR (Memory Data Register), which holds
the data of the current instruction being fetched. As well as this, the address of the data being fetched is also stored, in the
MAR (Memory Address Register). Once this above process is complete, the Program Counter will update so it now stores
the address of the next instruction to fetch, once the current instruction has been executed.

Decode: In order to execute an instruction, the CU (Control Unit)now has to determine what instruction it is. For example,
is it data from an input device? Is it data from an output device? Does the processor need to perform a mathematical or
logical operation on the data? In order to understand this, it breaks the instruction down and converts it into machine
language, or binary. If further instructions are required from memory in order to execute the instruction, the Control Unit
will control the flow of data here in and out the CPU, so the instruction can be executed.

Execute: Once the instruction has been decoded, the instruction is ready to be executed. The ALU (Arithmetic Logic Unit) may now be required, to
perform any arithmetic (addition, subtraction etc.) or logical (greater than, less than, equal to etc.) operations on the data. Whilst the Arithmetic Logic
Unit performs these operations, the Accumulator will store any data necessary whilst these operations are completed. As then mentioned before, the
cycle then repeats itself.

This process above, involving the Control Unit, Arithmetic Logic Unit, and different registers, is known as The Von Neumann Architecture. A
Computer Architecture is the internal, logical structure and organization of the computer hardware. It is how all the different pieces of the computer
fit together and work together efficiently John Von Neumann explained his architecture as how all devices follow a general rule when processing
information. All data and programs are stored in the computer’s memory and are stored as binary digits (0s and 1s).

Input Device – Here data is inputted into the computer via an input device e.g. Keyboard, Mouse, Microphone etc.
CPU – Instructions are processed by the CPU. The CPU contains the Arithmetic Logic Unit and Control Unit, both of which undertake separate roles
in the process
Memory Unit – Data is transferred between the CPU and the computer’s memory
Output Device – Here data is outputted by the computer via an output device e.g. Screen, Speakers, Printer etc.

Certain factors can affect how efficiently the CPU can perform. These factors can all affect how fast the CPU can process all the instructions given to
it by the user. There are three factors we need to be aware of. These are Clock Speed, Number of Cores, and Cache Memory.

Clock Speed: The Clock Speed is the number of Fetch, Decode, Execute cycles that can be completed every second and is measured in Hertz (Hz).
For example, a CPU with a 2GHz Clock Speed will be able to perform 2,000,000,000 (2 billion) Fetch, Decode, and Execute cycles every second.
The higher the Clock Speed is, the more instructions the CPU can process every second, and the less likely we are to experience the computer slowing
down.

Number of Cores: A core is a processor within the CPU. The more processors we have in the CPU, the more instructions that can be carried out at
once. Imagine we had 20 maths problems to solve. On the first team there were five students. On the second team there was only one student. Who
would complete the maths problems first? The first team would of course. This is because they could split up the tasks and complete multiple
problems at the same time, compared to the second team who would only complete one problem at a time. This is the same for the CPU. The more
cores we have, the more instructions that can be carried out at once. CPUs could be single core (1 processor), dual core (2 processors), or quad core (4
processors). The more cores we have, the better our CPU can perform.

Cache Memory: Cache Memory is a small amount of memory located on the CPU, that acts as memory between the CPU and RAM (Random Access
Memory). Frequently used instructions are stored here. It is quicker to access the instructions stored in Cache Memory as it is closer to the CPU than
RAM. However, it is only small. The bigger our Cache Memory is, the more instructions can be stored in here, improving the performance of the
CPU.

An Embedded System is a computer system with a dedicated function within a larger computer system. An Embedded System is dedicated to a single
task There are many different examples of embedded systems. These include:
 Washing Machines
 Dishwashers
 DVD Players
 MP3 Players
 Mobile Phones
 Games Consoles
 Microwaves
GENERAL PURPOSE COMPUTERS
A general-purpose computer is a computer that is designed to be able to carry out many different tasks. A PC is an example
of a general-purpose computer. Among other things, it can be used to:
 access the internet
 browse the world wide web
 use word processing
 software
 play games
 communicate via email and social media
 design and build web pages
 store and retrieve
 data
 play videos and music
Each of these tasks is called an application. Any computer that can have many
applications, such as those listed, is a general-purpose computer. Apart from PCs and
laptops, the following devices are also classed as general-purpose computers:
 tablets - like PCs, they can run a variety of applications
 smartphones - today's smartphones can also run a variety of applications
 games consoles - as well as games, modern consoles also allow users to
watch videos, play music and browse the internet
 media systems in cars - allow users to navigate, listen to music and connect
to a smartphone

HARDWARE AND SOFTWARE


General purpose computers consist of hardware and software. Hardware is the
physical components of the computer, such as the central processing unit (CPU),
hard disk, monitor, keyboard and mouse. Software is the programs that run on a computer.

THE GENERAL PURPOSE COMPUTER MODEL


All general-purpose computers follow the same basic model. The diagram illustrates the flow of data within a computer.
Data is input, processed and then either output or sent to secondary storage. It is held in primary memory while it is being
processed. The CPU receives instructions and data from an input or memory. The instructions and data are processed by
the CPU and the results are either sent to an output or transferred to secondary storage. Input is from an input device, such
as a keyboard, mouse, camera or scanner. Output is to an output device, such as a monitor, printer or speaker.

THE PURPOSE OF THE CPU


The CPU is the most important hardware component in a computer. It has two main functions:
 to process data and instructions
 to control the rest of the computer system
All programs and data processing are run in the CPU and all hardware components are, to some extent, controlled by it.

THE FETCH-DECODE-EXECUTE CYCLE


The fetch-decode-execute cycle is followed by a processor to process an instruction. The cycle consists of several stages.
1. The memory address held in the program counter is copied into the MAR.
2. The address in the program counter is then incremented (increased) by one. The program counter now holds the
address of the next instruction to be fetched.
3. The processor sends a signal along the address bus to the memory address held in the MAR.
4. The instruction/data held in that memory address is sent along the data bus to the MDR.
5. The instruction/data held in the MDR is copied into the CIR.
6. The instruction/data held in the CIR is decoded and then executed. The results of processing are stored in the
ACC.
7. The cycle then returns to step one.
Depending on the type of instruction, additional steps may be taken:
 If the instruction is to transfer data held in the ACC back to primary memory, the intended memory address is
copied into the MAR. The data to be transferred is copied into the MDR and then transferred to the specified
address using the address bus and data bus.
 The executed instruction may require the program to jump to a different place in the program. In this case, the
memory address of the new next instruction to be fetched is copied into the program counter. The process then
restarts at step one.

COMMON CPU COMPONENTS


The central processing unit (CPU) consists of six main components:
1. control unit (CU)
2. arithmetic logic unit (ALU)
3. registers
4. cache
5. buses
6. clock
All components work together to allow processing and system control.

CONTROL UNIT
The CU provides several functions:
 it fetches, decodes and executes instructions
 it issues control signals that control hardware
 it moves data around the system

ARITHMETIC LOGIC UNIT


The ALU has two main functions:
 It performs arithmetic and logical operations. The ALU is where calculations are done and decisions are made.
 It acts like a gateway between primary memory and secondary storage. Data transferred between passes through
the ALU.

REGISTERS
Registers are small amounts of high-speed memory contained within the CPU. They are used by the processor to store small
amounts of data that are needed during processing, such as:
 The address of the next instruction to be executed
 The current instruction being decoded
 The results of calculations
Different processors have different numbers of registers for different purposes:
 Program counter
 Memory address register (MAR)
 Memory data register (MDR)
 Current instruction register (CIR)
 Accumulator (ACC)

CACHE MEMORY
 A type of high-speed random access memory which is built into the processor.
 Data can be transferred to and from cache memory more quickly than from RAM.
 As a result, cache memory is used to temporarily hold data and instructions that the processor is likely to reuse. This
allows for faster processing as the processor does not have to wait for the data and instructions to be fetched from the
RAM.
 The more cache memory a computer has, the faster it runs. However, because of its high-speed performance, cache
memory is more expensive to build than RAM. Therefore, it is very small in size. To get around this issue, different
types of cache exist:
 L1 cache has extremely fast transfer rates but is very small in size. The processor uses L1 cache to hold the most
frequently used instructions and data.
 L2 cache is bigger in capacity, but slower in speed. It is used to hold data and instructions that are needed less
frequently.

VON NEUMANN ARCHITECTURE


 The design upon which many general purposes computers are based. The key elements are:
 Data and instructions are both stored as binary digits
 Data and instructions are both stored in primary memory
 Instructions are fetched from memory one at a time and in order (serially)
 The processor decodes and executes an instruction, before cycling around to fetch the next instruction
 The cycle continues until no more instructions are available
 A processor based on Von Neumann architecture has five special registers which it uses for processing:
 Program counter – hold the memory address of the next instruction to be fetched from primary memory
 Memory address register (MAR) – holds the address of the current instruction that is to be fetched from memory,
or the address in memory to which data is to be transferred
 Memory data register (MDR) – holds the contents found at the address held in the MAR, or data which is to be
transferred to primary memory
 Current instruction register (CIR) – holds the instruction that is currently being decoded and executed
 Accumulator (ACC) – holds the data being processed and the results of processing
FACTORS AFFECTING CPU PERFORMANCE
 Even though today’s processors are tremendously fast, their performance can be affected by several factors:
 Clock speed
 Cache speed
 Number of cores

CLOCK SPEED
 The CPU contains a clock which is used to coordinate all of the computer's components. The clock sends out a regular
electrical pulse which synchronises (keeps in time) all the components.
 The frequency of the pulses is known as the clock speed. Clock speed is measured in hertz. The higher the frequency,
the more instructions can be performed in any given moment of time.
 CPU clocks can sometimes be sped up slightly by the user. This process is known as overclocking. The more pulses per
second, the more fetch-decode-execute cycles that can be performed and the more instructions that are processed in
a given space of time. Overclocking can cause long-term damage to the CPU as it is working harder and producing
more heat.
 In the 1980s, processors commonly ran at a rate of between 3 megahertz (MHz) to 5 MHz, which is 3 million to 5
million pulses or cycles per second. Today, processors commonly run at a rate of 3 gigahertz (GHz) to 5 GHz, which is 3
billion to 5 billion pulses or cycles per second.

CACHE SIZE
 Cache is a small amount of high-speed random access memory (RAM) built directly within the processor. It is used to
temporarily hold data and instructions that the processor is likely to reuse.
 The bigger its cache, the less time a processor has to wait for instructions to be fetched.

NUMBER OF CORES
 A processing unit within a CPU is known as a core. Each core is capable of fetching, decoding and executing its own
instructions.
 The more cores a CPU has, the greater the number of instructions it can process in a given space of time. Many
modern CPUs are dual (two) or quad (four) core processors. This provides vastly superior processing power.

EMBEDDED SYSTEMS
 As well as general purpose computers, there are other types of computer systems. The most common of these are
known as embedded systems.
 An embedded system is a small computer that forms part of a larger system, device or machine. Its purpose is to
control the device and to allow a user to interact with it. They tend to have one, or a limited number of tasks that they
can perform.
 Examples of embedded systems include:
 central heating systems
 engine management systems in vehicles
 domestic appliances, such as dishwashers, TVs and digital phones
 digital watches
 electronic calculators
 GPS systems
 fitness trackers
 Embedded devices are not usually programmable by a user – the programming is usually done beforehand by the
manufacturer. However, it is often possible to upgrade the software on an embedded device. For example, fitness
trackers are embedded systems, but the software can often be upgraded by connecting the device to a PC and
installing the new software.
 Embedded systems can have advantages over general purpose computers in that:
 Their limited number of functions means they are cheaper to design and build.
 They tend to require less power. Some devices run on batteries.
 They do not need much processing power. They can be built using cheaper, less powerful processors.

You might also like