The CPU
The CPU
[DATE]
[Company name]
[Company address]
The CPU & Microprocessor
What is the role of the central processing unit (CPU)
in a computer?
A computer system consists of hardware and software
The main hardware components of a computer system are input devices,
the central processing unit, primary memory, secondary
storage and output devices
Examples of input devices - keyboard, mouse, game controller, sensors,
microphone and webcam
Examples of output devices - monitor, phone screen, speakers, printer, and
motors
Data and commands are inputted by the user using an input device, the
central processing unit (CPU) processes data by executing
instructions and the results are outputted to an output device
Step Example
The Von Neumann computer architecture which most modern day computers
use, is based upon this concept
o The key feature of the stored program concept, and Von Neumann
architecture, is data and instructions are stored in the same
memory ( RAM ) as binary
o Another feature of Von Neumann architecture is a central processing
unit (CPU) fetches instructions from memory
and executes them one at a time (serially)
o The CPU then stores the results back into memory
Components of the Central Processing Unit
The main purpose of the CPU is to execute instructions and process data
The CPU has two main components - the Control Unit (CU) and
the Arithmetic Logic Unit ALU)
o The Control Unit controls the flow of data around the CPU
o The Control Unit also sends control signals to the different
components instructing them what to do e.g. read, write, add, subtract
o The Control Unit decodes instructions (into
an opcode and operand )
o The Control Unit controls the timings of operations (the clock speed)
o The Arithmetic Logic Unit(ALU) performs the calculations required to
execute the instructions, these include ADD and SUBTRACT
o The ALU also carries out logical operations such as COMPARE
o The ALU has a built-in register where it stores interim results of
calculations
o After calculations, the ALU sends data to the MDR
The CPU also contains a number of registers which are small memory
locations within the CPU, which temporarily store data needed to execute
an instruction
Special purpose registers have specific roles to play in the execution of an
instruction
Special purpose register Definition
Memory Data Register stores the data that has been fetched from memory
(MDR) or being written to memory
Data from MDR is sent to ALU to be executed
Buses
Components within the CPU and wider computer system are connected by
buses. These are wires down which electronic signals and data travel. The
different buses are collectively called the system bus
The system bus is made up of three different buses - the data
bus, the control bus and the address bus
o The data bus transmits data from the CPU to memory or input/output
controllers. It is bidirectional which means data can travel in both
directions
o The address bus transfers addresses from the CPU to memory. It
is unidirectional which mean addresses only go from the CPU to
memory
o The control bus transfers control signals from the control unit to
other components in the computer system such as memory or
input/output controllers. The control bus is bidirectional
A diagram showing how the different buses connect the components in a
computer system
Execute
CPU Performance
Central Processing Units can have multiple cores
o A dual-core processor has two cores
o A quad-core processor has four cores
o Each core runs separate fetch, decode,
execute cycles, independently from one another and at the same
time (simultaneously) meaning parallel processing can take place
o Multiple cores enables multitasking (running more than one program
at the same time)
o Some programs cannot be split between cores
o The more cores a computer has the more instructions that can be
executed per second resulting in better performance
Each core has a clock speed
o The clock speed is how many instructions the core can execute each
second
o The clock speed is measured in Hertz
o Modern cores can execute billions of instructions per second
o A gigahertz (GHz) is a billion instructions per second
o A megahertz (MHz) is a million instructions per second
o A CPU core with a clock speed of 3.4GHz can execute 3.4 billion
instructions per second
Cache is a small amount of memory situated within or close to the CPU with
very fast read/write speeds
o It is used for storing frequently used instructions/data, recently used
instructions, and instructions that are to be fetched and executed next
in a process.
o The impact of increasing the amount of cache is that more data can be
stored there and accessed faster than if it was in RAM …which
improves the performance of the CPU.
Double the number of cores does not necessarily mean double the number of
instructions executed a second. The cores might have different clock speeds
and cache sizes
Instruction Sets
An instruction set is a list of all the commands that can be processed by a
CPU
Each command has a unique binary code
The table below shows an example instruction set. Each instruction has
a mnemonic that indicates what the instruction does alongside a
corresponding binary code
After an instruction is decoded into an opcode and an operand, the CPU finds
the opcode in the processor’s instruction set. It then knows what operation to
perform when executing the instruction
Instruction lists are machine-specific
This means a program created using one computer’s instruction set would not
run on a computer containing a processor made by a different manufacturer
For example, a computer program created using Intel’s instruction set would
not run on a device containing an ARM processor
Embedded Systems
An embedded system is a computer systems with a either one function or
limited specific functions built within a larger mechanical device
Its purpose is to control the device and allow a user to interact with it
It runs on firmware and does not have additional peripherals
An embedded system is different to a general purpose computer system like a
laptop or desktop computer which can be used to perform many different
tasks
The vast majority of microprocessors manufactured are for use as embedded
systems
Some embedded systems are microcontrollers meaning they are part of an
integrated circuit with built in memory
Type of embedded system Description
Movement sensor
Lighting system Movement sensor Lights
Security system Keypad to enter alarm code Alarm
Camera
Movement sensor
Actuator controlling movement
Vending machine Keypad to make choice
of choice
Keypad to set temperature
Central Heating
Heat
system
Temperature sensor
Input Devices
Every computer system receives commands and data, from the real world,
via input devices
Input devices converts inputs into digital data which can be processed
For conventional computer systems, such as desktop computers and laptops,
the most common input devices are the mouse and the keyboard
There are a wide range of input devices used in more specialist computer
systems such as scanners and sensors
Barcode Scanner
Diagram of a barcode being scanned by a handheld barcode scanner
Barcodes are a series of black and white bars which represent a code
A barcode reader shines a red laser at the barcode to read the data it
represents
The light from the white lines is reflected back
Black lines absorb the light so less is reflected
The different levels of reflection are converted into a binary value which can
be processed by a microprocessor
A barcode reader can be handheld or built into a larger machine such as a
self-service checkout at a supermarket
Barcodes can be used in many ways such as identifying a product being
sold or tracking a package through the delivery process
Benefits include faster checkouts, automated stock control, less chance
of error due to manual entry of data, and more detailed tracking
information
Digital Camera
A digital camera works by capturing light and converting it into a digital
image
Light enters the camera through the lens, it reaches an image sensor where it
is split into millions of pixels (small squares). Each pixel measures light
intensity which is converted into binary and represents a colour.
Digital cameras are integrated into smartphones , used in security
systems and by professional photographers to create high quality digital
images
An advantage of digital cameras is they show a preview of the image
They also instantly create an image which can then be
easily duplicated and transmitted via bluetooth or WiFi
Software can be used to edit digital photos, for example applying a filter or
retouching a photo
Keyboard
A keyboard is the most common device used for text-based data input
They are connected either by a USB cable or wirelessly to the computer
system
They are built into laptops.
Smartphones and tablets have virtual keyboards
Each key on a keyboard has a peg underneath it which makes contact with a
conducting membrane. This is then converted into an electrical signal to
transmit a unique character code
Microphone
A computer microphone works by converting sound waves into electrical
signals that can be processed by the computer.
They can capture any real world sound and convert it into digital
data which can be stored, duplicated or modified
The microphone has a diaphragm that vibrates in response to sound waves.
These vibrations are then converted into electrical signals by a coil of wire
attached to the back of the diaphragm. Changes in the signal are recorded by
a microprocessor using a analogue to digital converter
Microphones are used to record music, telephone calls, communicate
online and dictation
Optical Mouse
A mouse use a laser to detect and track movement, this is then processed
by a microprocessor which interprets the movement and replicates it
when moving a virtual cursor on-screen
Items can be selected or moved using the left mouse button, whilst the right
button usually displays additional menus
They can be wired or wireless
They are used to control the cursor in a Graphical User Interface (GUIs)
They are simple to use and provide the user with an intuitive way to navigate
the computer
They are reliable due to no moving parts
QR code scanner
https://pixabay.com/vectors/qr-code-scanner-bar-code-156717/
Touchscreen
A touchscreen can be classed as both an input device and an output device
Barcode scanner
Faster checkout, less errors, detailed
Checkouts, parcel delivery
stock/tracking information
QR code scanner
Can hold more information than a
barcode
Advertising products, linking to
websites, e-tickets
Can be scanned using a camera on a
mobile device (smartphone)
2D and 3D scanners Converts 2D and 3D objects into
digital data which is easier and
Scan documents, photos and objects
quicker to transmit/duplicate or
manipulate
Digital camera
Smartphones, professional
Instant preview and image
photography, security systems
Keyboard Entering text Universal, easy to use
Mouse Navigating a GUI
Intuitive
Making selections and entering
commands
Microphone Recording real-world sound
Musical recordings
Telephone calls
Dictation
Touchscreen Entering text and commands on
mobile devices (tablet, smartphone)
Can be durable
Cash machines
Good image quality
Interactive advertisements
Intuitive/easy to use
Information screens
Output Devices
An output device shows the results of the processing in a way humans can
understand
In a general purpose computer system, the main output device is
the monitor/screen
Other output devices include projectors, printers, speakers and actuators
Actuators
Actuators are used in conjunction with a motor to translate energy (electrical,
air, hydraulic) into real-world movement of a physical object.
They come in a variety of sizes and have been made specifically for a
particular function.
Examples of use include turning a wheel, opening or closing a door,
controlling a conveyer belt, operating machinery, moving robotic arms,
vibrating a machine, starting or stopping a pump, opening or closing a
valve
They are often used with sensors. The input of the sensor is checked
against stored values. If the input is within a certain range an actuator is
used to provide movement of a physical object
Light projectors
Used to project computer outputs onto a large screen
Used to give presentations in both business and education settings
There are two types - Digital light processing (DLP) projectors and Liquid crystal
display (LCD) projectors.
DLP systems use millions of micro-mirrors arranged in a grid on a microprocessor
within the projector. Light is shone through colour filters and the mirrors. The
position of the mirrors can be altered to change the intensity of the light
LCD projectors use three mirror filters to separate an image into red, green and blue
wavelengths. The three images are then combined to produce the full colour image
which is passed through the lens on to the wall/screen
Digital light
Higher contrast ratios. Image tends to suffer from
projector (DLP)
“shadows” when showing a moving
Smooth video image
DLP do not have grey components
Higher reliability
in the image
Inkjet printers:
Laser printers:
3D printers
3D printers create 3D models of a digital model by depositing layers of material,
such as plastic or resin, on top of one another to slowly build up a 3D object
They allow for precision and can be used in medicine to create prosthetics and blood
vessels
3D printers can be used to create rapid prototypes
Models can be transmitted digitally and then models printed out all across the world
Liquid Crystal Display screens
LCD screens are made up of millions of tiny liquid crystals.
The display is made of pixels arranged in a matrix
The display requires backlighting
They are used for TVs, monitors, tablets and phones
They have low power consumption and run at a cool temperature
They do not suffer image burn or flicker issues
They provide bright images and colours
They are cheaper to produce than LED screens
Speakers
Speakers are used to take digital sounds or recordings and output them as
sound waves which can be heard by humans
The digital data is changed into a electric current using a digital to analogue
converter (DAC)
It is then passed through an amplifier to create a current large enough to
drive a loudspeaker
The loudspeaker converts the current into a sound wave
Typical uses include listening to music, listening to video sound, telephone
calls and alarms
Sensors
Sensors are input devices
They measure a physical property of their environment such as light levels,
temperature or movement
Sensors can be used for monitoring and controlling systems.
o A monitoring system tracks the state of a system, it gathers data and may
issue warning messages
o A control system will control the system based upon the input from sensors
o For example, if the water temperature in a fish tank fell below the acceptable
level, a control system would start up a heater. The system will then
continue to check the water temperature readings and when they are within the
acceptable range it will switch off the heater
This process of the outputs affecting the following set of input values
received from the sensors is called a feedback loop
Sensor type
What it measures Typical use
Primary Storage
Primary storage is directly accessible by the CPU , it includes RAM, Cache,
and ROM
The purpose of Random Access Memory (RAM) is to store data,
instructions and software (including parts of the OS) currently in use
o RAM is also called main memory
o RAM has faster read/write speeds than secondary storage
o RAM is volatile which means it is temporary memory and all data will
be lost when the computer is switched off
o The larger the main memory, the more data the computer access
quickly, which can improve the computer's performance
o A standard desktop computer has between 4GB and 16GB of RAM
The parts of the operating system currently in use will be stored in RAM
The purpose of cache is to store frequently/recently used instructions and
data
o Cache has faster read/write speeds than RAM
o There are different levels of cache
Level 1 cache is situated within the CPU
Level 2 and 3 cache are situated on the motherboard
o If you increase the amount of cache you can store more frequently
used data and increase the performance of your computer
If you have too much cache it will decrease the data access
speeds because the data requested will take longer to find
o Cache is volatile and all data will be lost when the computer
is switched off
A diagram showing the parts of a computer system which are classed as
primary storage
RAM ROM
Volatile Non-volatile
Can read and write data to RAM Read-only
Secondary Storage
Secondary storage is not directly accessed by the CPU
It is used for permanent storage of data
Secondary storage is non-volatile. This means data is stored even when
power is lost to the device
Secondary storage is needed as primary storage (such as RAM ) is volatile
and will not retain data when the computer is turned off
Unlike ROM, secondary storage can be read from and written to. ROM is
read only
Common examples of secondary storage include hard disk
drives (HDDs), solid-state drives (SSDs), external hard drives, USB flash
drives, CDs, DVDs, and Blu-ray discs. These can be used to store data to
transfer it to another computer
Data access speeds for secondary storage devices are typically slower than
primary storage (such as RAM)
Secondary storage devices often have large capacity (can store large
amounts of data)
Software such as the operating system is saved permanently on secondary
storage. The instructions and data that makes up the software then moves to
RAM when it is in use
Secondary storage devices can be internal (inside the computer) and external
(outside the computer)
Diagram showing different internal and external secondary storage devices
Can be directly accessed by the CPU Cannot be directly accessed by the CPU
Data access speeds faster than secondary storage Data access speeds slower than primary storage
Magnetic
Magnetic hard disk drives have been the main type of internal secondary
storage in personal computers for many years however solid state drives are
increasingly popular due to their durability, low power consumption and high
read/write speeds
A magnetic hard disk is made up of several metal discs coated with a
magnetic material
o These are called platters
o Iron particles on each platter are magnetised to represent a 0 or 1
The hard drive spins the metal disk(s) at a high speed (typically around
5400-7200 RPM) using a motor
A read/write arm, controlled by an actuator, moves the head over the
surface of the disc to the location of the data
The data is read/written using electromagnets
Solid State
Solid State secondary storage is made of transistors that are arranged in a
grid layout
It uses NAND and NOR gates in electrical circuits to persistently control the
flow of electrons
Current flowing is 1, no current is 0 - which is how electrical flow can
represent binary values
A NAND gate will take in two inputs and produce an output (1/electrical
current) as long as both inputs are not 1
0 0 1
0 1 1
1 0 1
1 1 0
A NOR gate will produce an output (1) only when both inputs are 0
0 0 1
0 1 0
1 0 0
1 1 0
Optical
Optical devices include CDs, DVDs and Blu-rays
o Blu-rays have the largest capacity
o CDs have the lowest capacity
o CD-R are read-only (you cannot save data on to them)
o CD-RW can be written to and read from
o DVD-RW can be written to and read from
All optical devices work by shining a laser at the disk and processing the
reflection
An arm moves the laser across the surface of the disk
In CD-Rs a laser burns the data, permanently on to the disk, by
creating pits and lands
The laser is also used to read the data from the pits and lands
When the laser light hits the point where the pit changes into a land or vice
versa the light scatters and is not reflected back as well. This is captured by a
sensor and can be interpreted as a change in the binary value
A diagram showing how data is burnt on to optical discs to create lands and
pits which can then be used
In CD-RW the chemical composition of the disk is changed to represent 0s
and 1s. This change can be overwritten
Virtual Memory
The purpose of RAM is to store current data and program instructions in use
The amount of physical RAM available is limited. The average modern
desktop computer has between 4GB and 16GB of RAM. Some programs
are larger than this
Virtual memory is part of secondary storage which acts as RAM when RAM
is full
It prevents the computer system crashing when RAM is full
Data that needs to be accessed by the CPU directly is switched by the
operating system from virtual memory into RAM and an inactive page from
RAM replaces it in virtual memory. This is called page switching
The table describes the steps that are taken when a program is opened on a
computer
Step Description
2 If RAM is full, the memory manager will move out the most
inactive pages of data and put them in virtual memory until
needed
Cloud Storage
Cloud storage is the concept of storing data on remote servers, that can be accessed
via the internet, instead of on a local storage device (such as an SSD or HDD)
The physical servers, where the data is stored, are owned and managed by a hosting
company
Benefit Explanation
Accessibility
Data can be accessed from anywhere
Data can be accessed by anyone with the relevant
permissions, making it quick to share files and
collaborate with others
Data can be accessed on any device with an internet
connection
Security
Cloud storage providers offer advanced security
features, such as data encryption and multi-factor
authentication multi-factor authentication, to protect
user data from unauthorised access
There is no need to hire specialist staff as IT services
being provided by the cloud storage provider
MAC Addresses
A Media Access Control/MAC address is used to identify a device on a
network
It is a unique code which consists of six pairs of hexadecimal codes
separated by a colon
Each pair of hex digits is a Byte of data. So in total a MAC address is 6
bytes or 48 bits long
An example MAC address is b4:71:ac:f3:21:a2
The MAC address is assigned to the NIC by its manufacturer
The first three pairs are the manufacturer ID number and the last three
pairs is the serial number of the NIC and identifies the device on the network
An example MAC address - the first part identifying the manufacturer and the
second part identify the device
IP Address
An IP (Internet Protocol) address is a unique numerical identifier assigned
to devices connected to the internet
o IP addresses are used to identify and locate devices on the internet
o This allows data to be sent and received between devices
An IPv4 address is four numbers separated by a full stop
o Each number is a byte and range between 0-255
o There are over 4 billion unique addresses using the IPv4 system
o For example, an IPv4 address might look like this: 192.164.3.1
A diagram showing how Private and Public IP addresses are used to identify
devices on the Internet and within a LAN
The IP4 system is running out of possible addresses due to the enormous
increase in networked devices
A new system called IPv6 has been developed. It provides enough unique
addresses for every networked device on the planet
o IPv6 uses a 128 bit address
o Digits are organised into eight groups
Each group is made up of four hexadecimal digits
For example bb43:ff3f:0000:549b:e43e:db84:1f1f:0b9e
IPv4 IPv6
An important role of the router is to analyse data packet and direct them on
to their destination
A diagram showing multiple networks connected by routers, represented by
the blue circular objects
Step Description
This process is repeated by every router the data packet passes through, until
it reaches its destination
In addition to routing data between networks, routers can also perform other
functions such as…
o assigning IP addresses to devices within the LAN
o filtering incoming traffic based on certain criteria, such as IP
address, port number, or protocol type