Gyhguilger
Gyhguilger
Sudha 1
Learning Outcomes
Exit Skills / 1.Understand the role of the central processing unit (CPU) in a
computer. Understand what is meant by a microprocessor.
Learning 2.Understand the purpose of the components in a CPU, in a computer
Objective that has a Von Neumann architecture. Describe the role of each
component in the process of the fetch–decode–execute cycle.
Students 3.Understand what is meant by CPU core, cache and clock how they
can affect the performance of a CPU.
should be 4.Understand the purpose and use of a CPU instruction set.
able to: 5.Describe the purpose and characteristics of an embedded system
and identify devices in which they are commonly used.
Sudha 2
Terminologies
Central Processing Unit (CPU) → a component in a computer system that processes data and instructions.
Embedded system → a computer system which performs one function/ one specific task to
optimize efficiency. (Or) a computer system that performs a dedicated function.
Fetch-decode-execute cycle → the cycle through which data and instructions are processed.
Sudha 3
3.1 The role of CPU
Sudha 4
Computer Architecture
CPU is an
for executing
/ processing
Microprocessor Vs CPU
integrated all the data CPU processes complex instructions whereas
circuit (IC) on a and microprocessor process limited set of instructions( on
single instructions. a smaller scale)
microchip.
Sudha 5
Von Neumann Architecture
Early computers were fed data while running the machines. Computers were
built to carry out single specific task. E.g. breaking secret wartime codes.
In mid 1940s John Von Neumann developed the “stored program concept”. It
is the simplest form of architecture followed ever since.
Sudha 6
Features Of Stored Program Concept
Sudha 7
Stored Program Concept
Modern stored program concept is referred to keeping programming instructions and its data in
(read-write) random access memory.
A set of instructions called a program is read, processed to produce information. The program will
state what processing is required.
Sudha 10
Central Processing Unit – Components Of CPU
Arithmetic
Control
Logic Unit Register System Bus
Unit (CU)
(ALU)
Types Of Register
• Processor Registers – Program Counter (PC), Accumulator, Memory Address Register (MAR) à Registers
are part of CPU.
• Hardware Registers – Specific to different types of hardware, used to convey a signal. E.g. Robotic Arm
– Raise arm, open the grip and close the grip motor works via signal 1 for ON and 0 for OFF.
Sudha 13
Registers
Why computer Computer systems uses registers to hold values &
system uses
registers to
instructions for processing → It is used to increase the
hold values? speed at which they are processed.
SPECIAL PURPOSE
(CIR)
REGISTER
Index Register (IR)
REGISTERS
SPEED
CACHE Memory Address Register
(MAR)
Memory Data Register
(Memory Buffer Register) MDR
MAIN MEMORY – RAM (MBR)
Program Counter (PC)
Sudha 14
Special Purpose Registers
ABBREVIATION
REGISTER FUNCTION / PURPOSE
USED
Memory Data / Buffer Stores the data which has been read from memory
MDR
Register or written to memory.
What is a bus?
It is a communication A bus is a parallel
system(set of physical transmission
connections -cables, component where
printed circuits, etc.), multiple data bits are
that transfers data transferred over
between components multiple channels at
inside a computer, or the same time.
between computers.
Sudha 16
System Buses & Memory
• Input devices convert the external data into digital form that the
Input & Output computer can understand and process.
Devices • Output devices will show the results of computer processing in human
understandable form.
Address Bus
• Carries address of the memory location.
• It is unidirectional(bits care travel in one direction only) between CPU and
memory.
• As it is unidirectional, it prevents address being carried back to the CPU.
• The wider the address bus width, more memory can be directly accessed at a
given time.
• E.g. 16bits bus width carries 216 (65 536) memory location.
Sudha 19
System Buses in Detail
Data Bus
• Carries /allows data to be sent in both directions. It is bi-directional, means data can be
carried from CPU to memory and vice versa, and to and from input/output devices.
• Data can be an address, instruction or a numerical value.
• The wider the data bus width, the larger the word length can be transported.
• Word → is a group of bits considered as single unit. E.g. 16-bit, 63 bit word lengths. Larger
word lengths can improve the computer’s overall performance.
Control Bus
Sudha 21
The Machine Instruction Cycle
Three Stages
Fetch Decode Execute
THE FETCH – EXECUTE CYCLE
Fetch Instruction
• Fetch instruction from primary memory to control unit
• CPU is responsible to know which instruction to take from the primary memory.
• CPU sends appropriate address through memory address bus to primary memory.
• The instruction that resides in the memory address is then copied into the data bus
and then sent to the control unit (CU).
Decode Instruction
• Decode instructions means → CPU looks for any additional data that
are necessary to execute the instructions. Those data need to be loaded
from memory in order to execute the instruction. The addresses of
these data are placed in the address bus and the data in those address
bus in the data bus are received by the CPU.
Describe Machine Instruction Cycle
Computer programs are stored in the primary memory as series of machine code instructions. These
instructions and other additional data must be moved from primary memory into the CPU to execute it.
The following steps /functions are carried out by the CPU to run a computer program.
Execute Instruction
• CPU executes the instruction using all necessary data that were loaded to
calculate the result.
• Depending on the result, any additional data may be needed. Again these
data are fetched from the primary memory for further calculations.
Store Result
• Store result of execution and check for next instruction.
• After executing the instruction and computing the result the CPU
stores the result in the primary memory.
• It stores address of the result in the address bus and sends the data
through the data bus.
• CPU then checks for next instruction to be executed.
Exam Style Question
Explain how an instruction is fetched in Von Neumann model
computer.
• PC(Program Counter) holds the address of the next instruction.
• The address held in PC is sent to MAR(Memory Address Register) using
address bus.
• MAR goes to the memory location where the instruction is stored.
• Instruction is sent to MDR(Memory Data Register) using data bus.
• Instruction is then sent to CIR(Current Instruction Register).
• Control unit sends signals to manage the flow of data & process using
control bus.
3.5 Factors that can affect
the performance of a CPU
Sudha 27
Factors that affect the performance of a CPU
How quick the Important because higher
CPU CPU can CPU performance →
performance process an processes more
instruction. instructions in a second.
• CPU contains an internal clock which controls the speed at which instructions are
processed.
• Speed of the CPU measured in hertz.
• CPU with clock speed of 1 hertz → process 1 instruction per second.
CLOCK
SPEED • 1MHz clock speed → 1million clock pulse / instructions per second.
• 1 GHz clock speed → 1 billion clock pulse / instructions per second
• If a computer has two cores → each core can process 2 billion instructions per
second.
If data does not exist in cache→ data is first copied to cache, then
used. When CPU needs to write the data back to main memory it does
through cache memory.
Sudha 31
Input Devices
Input Devices
Manual Input Direct Data
Devices Entry Devices
Sudha Vaitheeswaran
Manual Input Devices Read through
Driving Wheel Remote Control Touch Screen Scanner Digital Camera Video Camera Microphone
Interactive
Sensors Graphics Tablet Webcams Light Pens
Whiteboards
Sudha Vaitheeswaran
Read through
Direct Data Entry Devices
Sudha Vaitheeswaran
Read through
Scanners
Soft Copy OCR Software
Image Format Editable Format
Sudha Vaitheeswaran
Read through
Lens focused image falls onto charge couple device(CCD). CCD consists
of integrated circuits fixed into silicon. It is made of thousands of light
sensitive elements /pixels.
Sudha Vaitheeswaran
Three-dimensional Scanner Read through
Sudha Vaitheeswaran
Application of 3D scanner – Computed Tomography
Scanners Read through
Barcode
• series of dark & light parallel lines of varying thickness. Numbers 0-9 are
represented by unique series of lines.
• a.k.a hand-held scanners / wands.
• Used in supermarkets, libraries etc..
• 12 digit barcode → local product
• 13 digit barcode → universal product
• Screen /monitor, speaker(beep sound when the barcode is read correctly), printer
Sudha Vaitheeswaran
Using Barcodes
Sudha Vaitheeswaran
Exam Style Question
Barcode is read by red laser / red LED (Light
Emitting Diode)
Sudha Vaitheeswaran
Quick Response (QR) Codes Read through
• Another type of barcode. Made up of matrix filled in • User no need to write the key /website
dark squares on a light background. address, it is done automatically by
scanning the QR code.
• A normal barcode holds 30 digits. QR hold over 7000
• QR codes can store website addresses
digits→ greater storage of information.
/ URLs that appears in the magazine,
• Smart phones with internet access →QR codes can be buses, trains, business cards, which
scanned anywhere. Using built-camera on the smart provides effective method of
phone, and by downloading the APP, it is possible to advertising.
read the QR code.
• The code may contain website link / some form of
advertisement, link to video etc..
the information Three large black squares are used to define the
alignment / used for alignment targets. (Or)
from the QR codes corners of code are used for orientation
Major Touch
Touch Screen Used In Advantages Disadvantages Screen
Technologies
Benefits
• Medium cost technology
• Good screen visibility in sunlight
• Durable / robust screen
Drawbacks
• Allows use of bare fingers only
• Special stylus used only for latest
screens
Sudha Vaitheeswaran
Infra-Red Touch Screen – Exam Style Question
Drawbacks
• Expensive technology
• Heat-sensitive system allows only
bare fingers.
• Screen visibility fairly good in sunlight
Sudha Vaitheeswaran
Resistive Touch Screen – Exam Style Question
Describe how the resistive touch screen registers the visitor’s touch
• Screen makes use of two layers → upper layer (polyester), bottom layer (glass)
• When the top polyester (plastic) layer is touched, the top layer is connected to bottom layer to
create a circuit.
• Signals are sent out, interpreted by the microprocessor.
• Calculation is carried out on the connected layers where the coordinates of the screen was
touched.
Sudha Vaitheeswaran
Resistive Touch Screen
Benefits
• Inexpensive technology
• Possible to use of bare fingers,
gloved fingers, stylus
Drawbacks
• No multi-touch capability
• Fair screen durability, vulnerable to
scratches & screen wears out
• Screen visibility is poor in sunlight
Sudha Vaitheeswaran
Exam Style Questions
Block current / charge from the Use capacitive gloves. This will allow the
finger/body/person charge to be distributed
Sudha Vaitheeswaran
Sensors
These physical quantities are
Device that inputs data into the analogue in nature, since the
Sensors are
computer. The data is a computers understands only
used in both
measurement of physical digital data (1s and 0s) the data
monitoring
quantity that is continuously from the sensors needs to be
and control
changing. Ex) temperature, light, converted to digital form using
applications.
moisture etc.. ADC (analogue to digital
converter).
Advantage Disadvantage
• More accurate readings compared to human operators. • Faulty sensors can give spurious(false) results.
• Computer wouldn’t forget to take readings. • Computer is unable to respond to unusual circumstances.
• Readings can be taken frequently. • Expensive to purchase and set up computer equipment &
• Computer’s response time, if some parameter is out of range, is much measuring software.
faster. • Student might rely on computer fully while doing an
• Sensors can monitor continuously 24/7. experiment and will not learn as much as using a computer
• Since it’s a continuous process the actions are taken by the control system.
systems and the warnings are given by the monitoring systems • Computer cannot be used during malfunctions / power cuts
appropriately. or other eventualities.
• Computers can produce graphs automatically for analysis of results.
• In hazardous environment, sensors can be used instead of human
intervention.
Sudha Vaitheeswaran
Analogue To Digital Conversion Read through
Sudha Vaitheeswaran
Analogue To Digital Conversion Read through
Sudha Vaitheeswaran
Types Of Sensors
Central Heating System • Temperature
• Temperature
Chemical Process • Acoustic /sound (liquid noise dripping in pipe)
• Temperature
• Moisture / Humidity (soil & air)
Greenhouse • Light
• Gas – Oxygen, Carbon dioxide
• pH (acidity, alkaline level in soil)
• Light
Vehicle / Car • Infra-red /motion (wind screen wipers)
• Magnetic field (anti-lock braking system)
• Infra-red / motion
Burglar Alarm • Pressure
• Acoustic /sound
• Pressure
Vehicle Weight • Infra-red / motion (count vehicle /people entering/leaving)
• Magnetic field (also in cell phone, CD player etc.)
• Gas – Oxygen
Monitoring Pollution (River) • Gas – Carbon dioxide (leaks in power station)
• pH Sudha Vaitheeswaran
TYPES OF SENSORS Read through
Sudha Vaitheeswaran
Read through
Microprocessor Applications • Monitoring patients vital sign
in a hospital
• Pulse rate, heart rate,
temperature, blood pressure,
Sensors send signal to μ𝜌 / respiration etc.
computer • Monitoring intruders in a
burglar alarm system
New data outside the preset Monitoring • Movement, footsteps,
/acceptable range → warning breaking glasses etc.
message on the screen / activates Applications • Checking temperature levels in
alarm – Examples the car
• Monitoring pollution levels in a
Analogue signal converted Monitoring System /
river
to digital signal (ADC) Application
• Oxygen levels, acidity levels
Sudha Vaitheeswaran
Output Devices
Sudha Vaitheeswaran
Read through
Output Devices
Control
Loud Speakers / Applications –
Multimedia / Printers
Monitor Headphones Actuators
Light Projectors
CRT Monitors Digital Light Laser Printers Motors
2D / 3D Cutters
Graph Plotter
Sudha Vaitheeswaran
Monitors Read through
CRT MONITORS – Cathode ray tube monitors make use of an electron gun
firing against a phosphor screen. The picture is made of tiny dots that are
colored red, green or blue.
• ADVANTAGES – angle of viewing better than TFT monitors. CRT monitors are used in LIGHT
PENS to create design on the screen in CAD/CAM applications.
• DISADVANTAGES – heavy, generate lot of heat radiation. Consume more power than TFT
monitors. Flickering causes head ache and eyesight problems.
TFT MONITORS – Thin film Transistors are used in laptop computers. The
screen is made up of thousand of tiny pixels(each pixel has 3 transistors-
red, green or blue), made up of transistors controlled by microprocessor.
• ADVANTAGES – lightweight, produce less glare than CRT monitors. Emits less radiation and less
power consumption. Don’t generate much heat.
• DISADVANTAGES – angle of viewing is critical (image isn’t clear when several people looking at
the screen at the same time).
Sudha Vaitheeswaran
Exam Style Question
Describe • Display is made of pixels that are arranged together
as a matrix behind the LCD screen.
how a LCD • Each pixel has 3 filters – red, green & blue.
• Shades of colors are achieved by mixing RGB.
screen • Screen uses backlight technology because LCD
doesn’t emit any light. (modern LCD monitors are
operates backlit using LED technology)
• Light is shone through the liquid crystals.
to display • The front layer of the monitor is made of liquid
crystals that can be made to turn solid or transparent
Sudha Vaitheeswaran
Monitors Read through
LCD MONITOR – liquid crystal display LED MONITOR – In light emitting diode Future - OLED – Organic Light Emitting
technology is a development of TFT a matrix of tiny LEDs are used behind Diode – uses organic materials made up
monitors. the LCD screen. of carbon compounds.
• Modern LCD monitors uses cold • Features – maximum brightness. • ADVANTAGES over LCD and LED
cathode fluorescent lamp(CCFL) as Sharpens images(due to white light). monitors - Thinner, lighter, brighter,
the backlighting technology. LCD Bright light improves color definition. no backlight required(use less power
monitors does not emit any light, its LED monitors are thinner than LCD than LCD screens)
uses backlight technology(some form monitors which uses CCFL technology.
of illumination) Consumes less power, produce less
heat and more reliable.
Sudha Vaitheeswaran
Types of Printers Read through
Non-impact printers -
Non-impact printers do
Impact printers - An Daisy-wheel not use a striking device
impact printer makes printers to produce characters on
contact with the paper. It the paper; and because
usually forms the print these printers do not Laser printers
image by pressing an hammer against the
inked ribbon against the paper they are much
quieter. Following are
paper using a hammer or some non-impacted
pins. Following are some printers.
examples of impact Line printers
printers.
Thermal printers
Drum printer
Sudha Vaitheeswaran
Laser Printer Inkjet Printer Dotmatrix Printer
how the • Stepper motor and belt moves the print head across the paper to
distribute the ink.
• Different color inks from the cartridges are mixed to create required
colors.
inkjet • Ink droplets are produced using two technologies – thermal bubble &
Piezoelectric
• Using thermal bubble → Ink is heated to form tiny bubble, when the
printer bubble expands the ink is pushed/ejected from print head through the
nozzle onto the paper.
prints an
• When the bubble collapses, vacuum is created, fresh ink is drawn to the
print head.
• Piezoelectric → Crystal located at the back of the ink reservoir is given
tiny electric charge which makes it to vibrate to force the ink to be
image pushed/ejected onto the paper through the nozzle
Sudha Vaitheeswaran
3D Printer Read through
Sudha Vaitheeswaran
How to create a solid object using a 3D printer
Solid object built layer by layer (often only 0.1 thick) → takes several
hours depending on the thickness, material and size of final object
Sudha Vaitheeswaran
• Prosthetic limbs
• Tissue engineering /
Reconstructive surgery
3D (face)
• Medical tools & equipment
Printing • Aerospace (make wings,
Uses other parts)
• Fashion & art
• Making parts no longer in
production
Sudha Vaitheeswaran
2D & 3D Cutters
Read through
2D cutter
• recognize an object with x-y direction
3D cutter
• recognize an object with x-y-z direction
• Can cut materials like → glass, crystal, metal, polymer, wood
• Cuts complex designs beyond surface of the material to produce
intricate designs,
• Not all 3D cutting materials can be used in 3D printing methods
Sudha Vaitheeswaran
Exam Style Question
Sudha Vaitheeswaran
3.7 Data Storage
Sudha 73
RAM (Random Access Memory)
• Internal memory where data is stored temporarily. Referred to
as volatile /temporary memory.
RAM Explanation
ROM (Read-only Memory)
• Internal memory where data is stored permanently. ROM
cannot be altered. Referred to as non-volatile / permanent
memory.
ROM Explanation
• This memory is used to store data and
information permanently. It contains
configuration data for a computer.
• Advantage – the information stored on the
ROM is not lost even when power is turned off
to the computer.
• ROM contains boot file (coding) which tells
the computer what to do when it starts up or
boots.
• This is referred to as the BIOS (basic
input/output system). When the computer
boots, the BIOS carries out
hardware/configuration check to determine if
all the devices are present and verify if they
are functional. Then it loads the OS into RAM.
• The BIOS stores the date, time and system
configuration in the non-volatile chip called
CMOS (Complementary metal oxide
semiconductor) which is battery powered.
DIFFERENCE BETWEEN RAM & ROM
ROM
RAM
Sudha 78
HARD DISK DRIVE – HDD
EXTERNAL STORAGE DEVICES
SOLID STATE DRIVES - SSD
• SSD drives are rapidly
replacing HDDs. They have no
moving parts and all data is
retrieved at the same rate no
matter where it is stored.
Exam Style Question
Sudha 82
The Memory System
Sudha 86
Virtual Memory (VM)
When programs / processes run out of RAM, then it is a memory management issue which may cause a
system crash.
We use hard disk drive (HDD) or solid-state drive (SSD) as a virtual memory which may be used as an
extension of RAM.
RAM → Physical memory / Virtual memory → RAM + swap space on HDD or SSD.
The data that is not frequently used is moved to the virtual memory. VM gives the illusion of
unlimited memory being available.
To execute a program, data is loaded into memory from HDD/SSD when required.
Paging (data blocks) → used by memory management to store and retrieve data from HDD /
SSD and copy it into RAM. A page is a fixed-length consecutive or contiguous block of data
utilized in virtual memory systems.
Sudha 87
Virtual Memory (VM)
• A type of memory that can be used as an extension to the RAM.
• This type of memory is created for temporary use.
Computer will need a lot of data to do this. It is created with a hard drive component.
Sudha 89
3.9 Cloud Storage
Sudha 90
A data storage method where
data is stored on remote servers.
Or
Public Cloud A storage environment where the client and cloud storage provider are different companies.
Private Cloud A dedicated storage environment behind company firewall where the client and cloud storage
provider integrate and operate as a single entity.
Combination of the above two environments. Some data resides on the private cloud. Less sensitive
Hybrid Cloud and less commercial data can be accessed from public cloud storage provider.
Sudha 91
Data security issues when using cloud storage
• Physical security of the building where the data is housed.
• Data protection and security in case of natural disasters / power cuts.
• data protection against illegal access of any personnel to confidential
data for monetary purpose.
Sudha 93
3.10 Network Hardware
Read through Pg 72 to 75 from Sarah Lawrey textbook
Sudha 94
Similarities between IP address and MAC address
• Both addresses can be represented in hexadecimal (IPv6 uses
hexadecimal).
• Bothe IP and MAC addresses are unique.
• Both addresses do not change if the IP address is static.
• Both addresses can be used to identify a computer/device on
a network.
Sudha 95
Differences between IP and MAC address
Internet Protocol(IP) Address Media Access Control(MAC) Address
IP address is assigned by the network / router / Define: The unique address is given to a
ISP. NIC(Network Interface Card) by the manufacturer.