Hardware Notes
Hardware Notes
1
What is the role of the central processing unit (CPU) in a
computer?
3
• Below is an example of data being inputted, processed and the results
being outputted
Step Example
Input A keyboard is used to input a number
Process If the instruction being executed is ADD, the
inputted value is added to an existing value
Output The result of the calculation is outputted to the user
via the monitor
4
What is a microprocessor?
6
Components of the Central
Processing Unit
7
• 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)
• The Control Unit controls the flow of data around the CPU
• The Control Unit also sends control signals to the different components instructing
them what to do e.g. read, write, add, subtract
• The Control Unit decodes instructions (into an opcode and operand )
• The Control Unit controls the timings of operations (the clock speed)
• The Arithmetic Logic Unit(ALU) performs the calculations required to execute the
instructions, these include ADD and SUBTRACT
• The ALU also carries out logical operations such as COMPARE
• The ALU has a built-in register where it stores interim results of calculations
• After calculations, the ALU sends data to the MDR
8
• 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
9
Special purpose
Definition
register
Program Counter (PC) stores the address of the next instruction to
be fetched from memory
Memory Address stores the address of the instruction or data
Registers (MAR) to be fetched from or written to memory
Memory Data Register stores the data that has been fetched from
(MDR) memory or being written to memory
Data from MDR is sent to ALU to be executed
Current Instruction stores the instruction the CPU is currently
Register (CIR) decoding or executing
Accumulator Temporarily stores the results of the
calculations performed by the arithmetic and
logic unit
10
example
Qn.
What are the characteristics of Von Neumann
architecture?
• Both data and instructions are stored in the same
memory unit [1]
• Single Arithmetic and Logic Unit [1]
• Single Control Unit [1]
• Uses the FDE cycle to execute instructions serially [1]
11
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
• 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
• The address bus transfers addresses from the CPU to memory. It is unidirectional
which mean addresses only go from the CPU to memory
• 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
12
A diagram showing how the different buses
connect the components in a computer system
13
The Fetch, Decode, Execute
cycle
• The Central Processing Unit (CPU) executes instructions by performing
the Fetch Decode Execute cycle
• The CPU fetches an instruction from memory
• The instruction is then decoded ( by the Control Unit) into an opcode and an
operand
• The instruction is executed and the whole cycle is repeated with the next
instruction in the process
14
15
Step
Detailed Explanation
Fetch
Execute
The instruction is executed by the Arithmetic Logic Unit and the
opcode is performed upon the operand.
The result is stored in the accumulator or written to a memory location
within memory 16
Worked example
18
• Each core has a clock speed
• The clock speed is how many instructions the core can execute each second
• The clock speed is measured in Hertz
• Modern cores can execute billions of instructions per second
• A gigahertz (GHz) is a billion instructions per second
• A megahertz (MHz) is a million instructions per second
• A CPU core with a clock speed of 3.4GHz can execute 3.4 billion instructions
per second
19
• Cache is a small amount of memory situated within or close to the CPU
with very fast read/write speeds
•
• 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.
• 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
20
example
One computer has a single core processor and the other has a dual
core processor. Explain why having a dual core processor might
improve the performance of the computer
• The computer with the dual core processor has two
cores/double the amount of cores [1]
• Parallel processing can take place [1]
• Each core can execute a separate instruction at the
same time [1]
• Each core can process instructions independently of
each other [1]
21
Instruction Sets
22
Instruction Set
ADD 10100001
SUB (subtract) 00100010
LDA (load) 10111111
STR (store) 01100000
BRA (branch) 01011010
• 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
24
Type of
Description
embedded system
Integrated circuit containing a CPU
Microcontrollers and memory (RAM or ROM) built in
to the same chip
Integrated circuit containing only a
CPU on the chip
Microprocessor
RAM , ROM , peripherals need to be
added
25
• The microprocessor used in an embedded system is often custom designed
• Embedded systems often have firmware which is software built into the
system which cannot be reprogrammed by the user. The software may be
able to be updated e.g. GPS software in a car navigation system
• Embedded systems usually have some form of analog or digital input
• The microprocessor used in an embedded system is often custom designed
• Embedded systems often have firmware which is software built into the
system which cannot be reprogrammed by the user. The software may be
able to be updated e.g. GPS software in a car navigation system
• Embedded systems usually have some form of analog or digital input
26
Diagram of an embedded system
27
Embedded system
Possible input devices Possible Output
Buttons to set the Screen showing the time
Digital clock
time/mode/alarm Alarm
Pedestrian button
Traffic Lights Timer Lights
Movement sensor
Lighting system Movement sensor Lights
Keypad to enter alarm code
Security system Camera Alarm
Movement sensor
Actuator controlling movement
Vending machine Keypad to make choice
of choice
Central Heating Keypad to set temperature
Heat
system Temperature sensor
28
• There are many advantages of embedded systems
• low power consumption
• small physical size
• low cost to manufacturer
• they can be controlled remotely
• can operate in real time and respond to inputs very quickly
29
example
• 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
31
Barcode Scanner
32
• 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
33
Example
• 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
35
Keyboard
36
Microphone
37
Optical Mouse
39
• A QR code is a visual representation of data using black and white
squares
• QR codes can represent over 7000 digits whereas a barcode represents
up to 30 digits
• QR codes are scanned by a camera (often on a mobile device)
• A piece of software convert the squares into binary data
• QR codes often link to a website where more information can be found
• They can also be used to advertise products, share contact details,
provide promotional codes, train tickets, and event tickets
40
example
41
Touchscreen
42
Type
How it works Benefits/Drawbacks Uses
Resistive screen Resistive screens consist of two + Cheap to produce.
conductive layers. The top layer + Resistant to surface
is flexible. When the screen is Used in cash machines,
contaminants
touched the two layer connect, information kiosks, medical
completing a circuit + Can be activated with nearly equipment
every object (stylus, finger,
gloved hand)
Infra-red screens LEDs shine infrared light across a + Excellent image quality,
screen forming a matrix. When + high precision
the screen is touched the beams
are interrupted + durable
Tablets, laptops,
+ allows for multiple touches at smartphones
the same time
- Requires a bare finger or stylus
for activation
Capacitive Made up of a protective layer, a +Excellent image quality
screens transparent conductive layer Large scale commercial
+Unlimited touch-life displays
and a glass substrate. Touching
the screen changes the +Scale well Information kiosks
electrostatic field of the - Sensitive to interference from
conductive layer Medical equipment
light, water, snow
43
2D and 3D scanners
• A two-dimensional (or flat-bed) scanner shines a strip of light over a document. Reflected light is
measured for each pixel. This data is converted into binary data so the document can be digitally
recreated
• A three- dimensional laser scanner shines a light over an object. The geometry and dimensions are
recorded so the object can be recreated digitally
• The digital 3D model can be modified using specialist software
• A 3D printer could then print out the model
• 2D scanners can be used for creating digital versions of documents or photographs
• Reading passports at airports
• 3D scanners can be used to create 3D models for use with computer-aided design (CAD) software
• Creating replicas with 3D printers
• Typical uses of 3D scanners and printers are dentistry, product development, medical
• A cheap and quick way of creating a digital representation of both 2D and 3D objects so they can be
manipulated, stored, transmitted or copied
44
Summary of input device uses
and benefits
45
Device Example Uses Benefits
Barcode scanner Faster checkout, less errors, detailed stock/tracking
Checkouts, parcel delivery
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
Scan documents, photos and objects is easier and quicker to transmit/duplicate or
manipulate
Digital camera Smartphones, professional photography, security
Instant preview and image
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
46
Output Devices
47
Actuators
A theme park has a game where a player has to run from the start to the finish
without getting wet. The system for the game uses sensors and a microprocessor to
spray water at a player as they run past each sensor
Describe how the sensors and the microprocessor are used in this system
Better colour saturation and intensity than DLP projectors Have a limited life
LCD panels degrade
Use less power and generate less heat
over time.
Quieter running that DLP
51
Laser and Inkjet printers
53
3D printers
54
Liquid Crystal Display screens
55
Worked example
56
Light emitting diode (LED)
screen
• An LED screen is made up of tiny LEDs
• They do not need backlighting which makes them thinner and lighter to
hang on the wall
• LED screens are replacing LCD displays in TVs, monitors, laptops and
mobile devices
• They have better image quality and a longer life span
• They can be used to create very large screens that can be used to show
visual content at events such as football matches and music festivals
• They consume very little power making them suitable for being switched
on for many hours in the day
57
Organic light emitting diode
(OLED) screen
• Much thinner and lighter than traditional LCD screens
• Use organic light emitting diodes (OLEDS).
• They use organic carbon compound to create semiconductors
• No form of back lighting is required
• You can have very thin, flexible screens
58
Speakers
59
Sensors
61
Humidity Levels of water vapour Monitor humidity in
greenhouses
Infra-red Detecting motion or a heat Security systems detecting
source intruders who break the beam
Measures heat radiation of
objects - used by emergency
services to detect people
Level Liquid levels Detects levels of petrol in a car
tank
Detect levels of water in a water
tank
Detect a drop in water levels due
to a leak
Light Light levels Automatically switching on lights
when it gets dark (street lights,
headlights)
Magnetic field Presence and strength Anti-lock braking system
Monitoring rotating machinery
such as turbines
62
Moisture Presence and levels of moisture Monitoring moisture in soil
Monitoring damp in buildings
pH Acidity or alkaline Monitoring soil to ensure
optimum growing conditions
Monitor pHlevels in chemical
processes
Pressure Gas, liquid or physical pressure Monitoring tyre pressure
Monitoring pressure in pipes
during manufacturing process
Proximity Distance Monitoring position of objects in
robotics
Used in safety systems to prevent
objects colliding
Temperature Temperature in Celsius, Used to maintain temperature in
Fahrenheit or Kelvin swimming pools
Used to control temperature in
chemical processes
63
Data storage : Primary Storage
66
• The role of Read-only memory (ROM) is to store the computer’s boot-
up sequence
• The boot-up sequence is a set of instructions the computer executes when
then computer is initially switched on
• This sequence will run a series of checks to ensure all of the system hardware
is working
• It will then load the operating system which will move from secondary
storage to RAM
• ROM is non-volatile which means data will be stored when the
computer is switched off
• ROM is read-only which means data cannot be written to ROM
67
The difference between ROM
and RAM
RAM ROM
Volatile Non-volatile
Can read and write data to RAM Read-only
68
Secondary Storage
70
Diagram showing different internal and
external secondary storage devices
71
Comparison of primary and
secondary storage
Primary storage Secondary storage
Volatile / temporary Non-volatile /permanent
RAM and cache can be read from
and written to Secondary storage can be read from
and written to
ROM is read-only
Can be directly accessed by the Cannot be directly accessed by the
CPU CPU
Smaller capacity Larger capacity
Data access speeds faster than Data access speeds slower than
secondary storage primary storage
Stores data and instructions Stores data and instructions
72
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
• These are called platters
• Iron particles on each platter are magnetised to represent a 0 or 1
73
A diagram showing the structure of a magnetic
hard disk
75
• 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
76
Solid State
77
The truth table truth table for a
NAND gate
InputA InputB Output
0 0 1
0 1 1
1 0 1
1 1 0
78
The truth table for a NOR gate
A NOR gate will produce an output (1) only when both
inputs are 0
Input
InputB Output
A
0 0 1
0 1 0
1 0 0
1 1 0
79
Optical
83
• The table describes the steps that are taken when a program is
opened on a computer
Step Description
1 The memory manager software built into the Operating System
checks to see if there is sufficient space in RAM to move the new
program’s instructions into RAM, so that they can be directly
accessed by the CPU
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
3 The new program instructions are moved into RAM
84
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
• Cloud storage warehouses often have thousands of servers containing harddrives
• The hosting company provides services such backing up the data, managing access to the data
as well as general security
• The data can be accessed at any time, on any device, as long as there is an internet
connection
• The data is accessible using a web browser or dedicated software that connects to
the cloud storage service
• There is potentially limitless storage, although it does need to be paid for
• Online storage means it is easy to share data and collaborate with others
• If the internet connection is slow/lost the access to your data is affected
85
A diagram showing different devices
connecting to remote servers
86
Advantages of cloud storage
87
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
Scalability Cloud storage providers allow customers to increase or
decrease their storage capacity as needed
Reliability Cloud storage providers often use multiple servers to
store and backup data, reducing the risk of data loss due
to hardware failure
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
88
• You also do not need to purchase local secondary storage devices
• One cloud storage centre is more environmentally friendly than millions of individual
servers
• There are some drawbacks to using cloud storage
• If the user has a slow or unreliable internet connection they would have problems accessing
their files
• If you are storing a lot of data it can be expensive
• You have to pay the cloud storage provider
• You may need to commit to an annual subscription
• You may have to pay for high download and upload data transfer limits
• Data being sent over the internet has the potential to be intercepted
• Security is managed by the cloud storage provider which means the user does not have
complete control over it but is still legally responsible for ensuring any personal and sensitive
data is secure
89
Worked example
A school currently stores all of their data on local servers. They are considering upgrading their system
to utilise cloud storage.
Explain two disadvantages to the school of storing their data in the cloud.
• You need a constant internet connection [1]
• if the internet connection failed, teachers would not be able to access lesson files
[1]
• if the internet connection failed, teachers would not be able to access student
data/take electronic registers [1]
• if the internet connection failed, students would not be able to access their
work/coursework [1]
• Reliant on third party to carry out security procedures [1]
• but the school is still legally responsible if data is accessed by unauthorised
people [1]
• Data stored on the cloud could be hacked or intercepted [1]
90
Explain two advantages to the school of storing their data in the cloud.
• Additional storage can be purchased if needed [1]
• The cloud hosting company provides back up [1]
• The cloud hosting company provides security [1]
• Data can be accessed from anywhere and from any device
provided there is an internet connection [1]
• So teachers would be able to access data from home [1]
• So students would be able to access work from home [1]
91