You are on page 1of 109

1

Introduction to
Computer Hardware
DCS201- Computer Science
By:
Dilum Bandara
Dilum Bandara - CSE
2
Outline
p Parts of a computer
p The Traditional view of a computer system
n Single User
n Multi User
p Von Neumann's architecture
p Components in detail
n CPU, Motherboard, Memory, Input/Output,
Storage
Dilum Bandara - CSE
3
What is a computer
p Its a machine
p Able to execute a finite set of Instructions.
p Able to process data according to those
instructions.
Dilum Bandara - CSE
4
Courtesy by Microsoft Encarta Encyclopaedia
Dilum Bandara - CSE
5
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
6
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
7
The Traditional View - Single User
Computer System
Printers
Printers
Keyboard
Keyboard
VDU
(Display)
VDU
(Display)
CPU
CPU
Disk Drive
Disk Drive
Tape
Drive
Tape
Drive
Input / Output Input / Output
Storage Storage
RAM ROM
Memory Memory
Communicates with
everyone & manage
the system
Dilum Bandara - CSE
8
TheTraditional View - Multi User
Computer System
Printers
Printers
Keyboard
Keyboard
VDU
VDU
Disk Drive
Disk Drive
Tape
Drive
Tape
Drive
Several terminals Several terminals
Keyboard
Keyboard
VDU
VDU
Keyboard
Keyboard
VDU
VDU
CPU
CPU
RAM ROM
Memory Memory
Dilum Bandara - CSE
9
Major components of a computer
system
p With the introduction of personal
computers & miniaturization, some of
these devices went inside a single box
Dilum Bandara - CSE
10
Evolution
Printers
Printers
Keyboard
Keyboard
VDU
(Display)
VDU
(Display)
CPU
CPU
Disk Drive
Disk Drive
Tape
Drive
Tape
Drive
Input / Output Input / Output
Storage Storage
RAM ROM
Memory Memory
Wh a t we u su a lly ca ll
a s th e C P U in a
p e rso n a l co m p u te r
Dilum Bandara - CSE
11
Types of computers
p Super computers
p Mainframes
p Personal computers
p Laptops
p PDAs - Personal Digital Assistants
Dilum Bandara - CSE
12
Main frames
Courtesy by IBM
Dilum Bandara - CSE
13
Super computers
Dilum Bandara - CSE
14
Dilum Bandara - CSE
15
Modern Computer Systems
p Include many more devices than
traditional computers
n Video sub-system (Graphic adapters)
n Multimedia devices
p Sound cards
p CD-ROM/DVD-ROM, etc.
n MODEMS
n NETWORK adaptors
n Communication port (Serial port)
n Printer interface (parallel port)
Dilum Bandara - CSE
16
System components
p Motherboard
p CPU
p Memory
p VGA card
p Display
p Hard disk
p Floppy drive
p CD-ROM Drive
p Case/Chassis
p Power supply
p Keyboard
p Mouse
p Sound card
p Speakers
p Modem
p Printer
p Scanner
Dilum Bandara - CSE
17
The Motherboard
p The most important component in a PC
p Also called the main board
p Is a large circuit board that the processor,
memory & other electronic components
are attached
p It provides the path through which the
processor communicates with memory,
disks, expansion cards, keyboard & other
components attached to the motherboard
Dilum Bandara - CSE
18
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
19
Dilum Bandara - CSE
20
Memory
p Memory is the workspace for the
processor
p Is a temporary storage area where
program & data being operated
p Consist of an array of consecutive
Memory locations
p Each location can store one piece of data
p Each location has a unique address
Dilum Bandara - CSE
21
0002
0001
0000
FFFF
FFFE
FFFD
12
01
04
Memory cont
Dilum Bandara - CSE
22
Memory cont
p The CPU uses memory to store Instructions
(programs) & Data (characters & digits)
p The CPU access (read or write) only a single
memory location at a time
p It is practically not possible to connect each
memory location directly to the CPU using a
separate set of electrical connections
p Therefore all memory locations are connected
using the same set of shared electrical
connections called the Memory Bus
Dilum Bandara - CSE
23
Buses in computers
Dilum Bandara - CSE
24
Buses
p Bus is a set of electrical connections
(parallel set of wires)
p 3 types
1. Address Bus
2. Control Bus
3. Data Bus
n All these 3 types of buses are enclosed
within the memory bus
Dilum Bandara - CSE
25
Communicating with memory
Memory
Memory
Ad d re ss B u s Ad d re ss B u s
C o n tro l B u s C o n tro l B u s
R D /WR sign a ls R D /WR sign a ls
D a ta B u s D a ta B u s
Dilum Bandara - CSE
26
Types of Memories
1. ROM Read only memory
2. PROM Programmable Read Only Memory
3. UVEPROM - UV Erasable PROM
4. EEPROM Electrical Erasable PROM
5. FLASH ROM
6. RWM (Read Write Memory)
7. SRAM (Static RAM)
8. DRAM (Dynamic RAM)
Dilum Bandara - CSE
27
Types of Memories cont..
1. ROM Read only memory
n Can only be read, cannot be written to..
n Contents are written at the time of
manufacture
n Stores initial start-up programs
n Not economical to produce in small quantities
Dilum Bandara - CSE
28
Types of Memories cont.
2. PROM Programmable Read Only
Memories
n Same as ROMS, but contents can be written
once, using special equipment.
3. UVEPROM - UV Erasable PROM
n Same as PROM but contents can be erased by
shining an UV light on the IC
n Require special equipment to program
Dilum Bandara - CSE
29
Types of Memories cont.
4. EEPROM Electrical Erasable PROM
n Same as UVEPROM except that contents can
be erased by applying a special high voltage
to some of the signals
5. FLASH ROM
n A special type of EEPROM that can be erased
or programmed while in the circuit.
n Once programmed the contents remains
unchanged even after a power failure
n Commonly used in modern PCs
Dilum Bandara - CSE
30
Types of Memories cont.
6. RWM (Read Write Memory)
n Traditionally known as RAM ( Random Access
Memory)
n Contents are erased when power is
disconnected.
n Two major types SRAM and DRAM
Dilum Bandara - CSE
31
Types of Memories cont.
7. SRAM (Static RAM)
n More reliable but expensive
n Typically used for cache memories.
n More expensive and consumes more electrical
power
8. DRAM (Dynamic RAM)
n Contents are stored as charges in a small
capacitor
n Capacitor must be re-charged from time to
type
n Bulk of the PC memory is made out of DRAM
Dilum Bandara - CSE
32
Memory Modules
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
33
Connecting memory & microprocessor
CPU
ROM
RAM 1
RAM 2
Memory
Controller
Dilum Bandara - CSE
34
Memory Hierarchy
p Modern CPUs are much faster than the
speed of memory
p The memory has to be organized in such a
way that its slowness does not reduce the
performance of the overall system
p Some memory types are fast but expensive
n Registers, SRAM
p Some other types are cheap but slow
n DRAM
Dilum Bandara - CSE
35
Memory Hierarchy cont
p The objective of having a memory
hierarchy is to have a memory system:
n with a sufficient speed
n with a sufficient capacity
n and as cheap as possible
p The main idea is to use:
n a limited capacity of the fast but expensive
memory types
n and a larger capacity of slow but cheap memory
types
Dilum Bandara - CSE
36
Traditional memory hierarchy
Secondary storage
Main
memory
Reg.
S
p
e
e
d
C
o
s
t
S
i
z
e
Dilum Bandara - CSE
37
Modern memory hierarchy
Secondary storage
Main
memory
Reg.
S
p
e
e
d
C
o
s
t
S
i
z
e
Cache
memory
Dilum Bandara - CSE
38
Cache Memory
p Consist of small amount of memory (few
KBs in size) which is faster than the main
memory
p Cache is used by the CPU to store
frequently used instructions & data
p Sometimes multiple levels of cache is used
n L1 Cache Very fast, usually within CPU itself
n L2 Cache Slower than L1, but faster than
main memory
Dilum Bandara - CSE
39
CPU - Central Processing Unit
p Also called the Microprocessor
p The brain or engine of the computer
p CPU performs both arithmetic operations
& logic operations plus controlling
p Is the most expensive single component
of a PC
Dilum Bandara - CSE
40
Type of processors
p 1
st
generation 8080/8086/8088
p 2
nd
generation 80286
p 3
rd
generation 80386 (DX/SX)
p 4
th
generation 80486 (SX/DX/DX2/DX4)
p 5
th
generation Pentium/AMD K5
p 6
th
generation Pentium Pro/AMD K6
p 7
th
generation Pentium IV/AMD Athlon
Dilum Bandara - CSE
41
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
42
Heating & Cooling
p Modern processors generate excessive
heat
p It is not just enough to have a heat sink
p Therefore cooling fans are used
p The size of heat sink & fan is getting
larger with each new microprocessor
Dilum Bandara - CSE
43
Passive heat sinks
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
44
Active Heat sinks
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
45
Components of the CPU
Registers
Control
unit
ALU
Dilum Bandara - CSE
46
Arithmetic & Logic Unit (ALU)
p is the data processing unit of the CPU
p Arithmetic unit is capable of performing
arithmetic operations
p Logic unit performs logical operations
ALU
Dilum Bandara - CSE
47
Control Unit
p This unit controls the operation of the CPU
Control Unit
Dilum Bandara - CSE
48
Registers
p Is a type of memory located inside the CPU
p Can hold a single piece of data
p This data is useful in both data processing
& control functionalities.
p Several types of CPU register
n Program counter (PC)
n Instruction register (IR)
n Accumulator
n Flag register
n General purpose register
Dilum Bandara - CSE
49
Internal Structure of the CPU
A
E
D
C
B
ALU
A
d
d
r
e
s
s

B
U
S
Control Unit
IR
FLAG
ALU
PC
+1
D
a
t
a

B
U
S
C
T
R
L

B
U
S
Dilum Bandara - CSE
50
Making the CPU faster
p Having an effective memory hierarchy.
p There are several other methods of
making the CPU faster:
1. Instruction pre-fetching
2. Instruction Pipelining
Dilum Bandara - CSE
51
Instruction pre-fetching
p When one instruction is in the execution
stage, the next instruction is fetched to
the CPU.
Dilum Bandara - CSE
52
Instruction pre-fetching
Fetch Execute
Fetch Execute
Fetch Execute
Instruction 1
Instruction 2
Instruction 3
time
Fetch Execute
Fetch Execute
Fetch Execute
Instruction 1
Instruction 2
Instruction 3
Dilum Bandara - CSE
53
Instruction Pipelining
p Extends the idea of instruction pre-
fetching
p The term pipelining is used because this
process is similar to an industrial
assembly line where output of one step is
fed to the next step as input
Dilum Bandara - CSE
54
Instruction Pipelining cont
p Pipelining divides the instruction cycle in to
a series of sub-operations & a separate
segment of the CPU is dedicated to one
sub-operation
p Therefore at any given moment, a number
of instructions are executed inside the CPU,
each in a different stage or a sub-operation
Dilum Bandara - CSE
55
Improving the overall performance
p Select a type of memory with compatible
speed with the CPU.
n A slower memory will keep the CPU idling
p Some CPUs (e.g. the Pentium) use
different speeds for its internal operations
and for communication with memory.
n FSB (Front Side Bus) speed is related to
memory access.
n Usual has the range from 133MHz to 533MHz
Dilum Bandara - CSE
56
CPU support chips
p CPU support chips are used in such
operations to improve overall performance
1. Direct Memory Access (DMA) controllers
2. Interrupt Controllers (PIC)
3. Real-Time Clock (RTC)
4. Other devices
n Disk controllers
n Communication controllers
n Display controllers
Dilum Bandara - CSE
57
Direct Memory Access (DMA)
p DMA controller
n Provide a way of bypassing the CPU when
transferring data between memory and IO
(Input/Output) devices.
Dilum Bandara - CSE
58
DMA controller cont
CPU
IO
device
Memory
DMA
Cont..
CPU
IO
device
Memory
Dilum Bandara - CSE
59
Enhancements in modern CPUs
p Hyper Threading (HT)
p Dual Core
Dilum Bandara - CSE
60
Hyper Threading (HT)
p Was introduced with the Intel Pentium 4
p Allows 2 threads to run at the same time
with limitations
n A single resource cant be used by the same
thread
n Example:
n While 1
st
thread is working with integers
(integer portion of ALU) 2
nd
thread can work
on floating point numbers (floating point unit
in ALU)
Dilum Bandara - CSE
61
Hyper Threading (HT) cont
p The operating Systems feels that there are
2 logical CPUs
p Achieved through
n a mix of shared, replicated & partitioned chip
resources, such as registers, maths units &
cache memory
Dilum Bandara - CSE
62
HT Technology requires a computer
system with:
p A processor that supports HT technology
p HT technology enabled chipset HT
p HI technology enabled BIOS
p HT technology enabled/optimized
operating system
Dilum Bandara - CSE
63
Dual Core
p Introduced by IBM Power4 how ever AMD
brought it to the consumer market
p Combines 2 independent processors &
their respective caches onto a single
silicon chip
p Provide better performance improvement
than HT
Dilum Bandara - CSE
64
Dual Core cont
Courtesy by www.gen-x-pc.com
Dilum Bandara - CSE
65
Commodity processor vendors &
Products
p Intel x86, Pentiums, Xeon, Itanium
p AMD K5/6, Athlon, Duron, Athlon XP,
Athlon Opteron
p Cyrix
p Apple G5
Dilum Bandara - CSE
66
Other CPUs
p SPARC
p Motorola
p Z80
p Northstar
p Etc.
Dilum Bandara - CSE
67
What is the best CPU?
p It depends on how you look at it
p Need to consider the use of the system
p Cannot purely depend on the Clock Speed
anymore
p Common CPUs
n Intel Pentium, AMD, Cyrix
Dilum Bandara - CSE
68
Processor packaging
p SIP Single Inline Package
p DIP Dual Inline package
p PGA Pin Grid Array
p SEG Single Edge Contact
Dilum Bandara - CSE
69
PGA
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
70
CPU sockets
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
71
More closer view
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
72
SEG
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
73
VGA Card
p Video Graphics Array
p is used to generate pictures & text that
you see on the displaying device.
p Either available as a separate expansion
card or integrated into the motherboard.
p Enhancements
n VGA, SVGA, VESA SVGA
n VESA - Video Electronic Standards Association
Dilum Bandara - CSE
74
Display (Video) Controller
Dilum Bandara - CSE
75
VGA card classifications
p based on:
n Video Processor
n Video memory
p Card type
n PCI Peripheral Component Interconnect
n AGP Accelerated Graphics port
n PCIE - Peripheral Component Interconnect
Express
Dilum Bandara - CSE
76
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
77
Display
p Produces the visible output
p Different types:
n CRT Cathode Ray Tube
n TFT Thin Film Transistor
n LCD - Liquid Crystal Display
p Categorized based on:
n Screen size
n Colour depth/Resolution
Dilum Bandara - CSE
78
Dilum Bandara - CSE
79
Power supply
pPower supply
n Primary source of power for the system
n Provide different voltages
p+12V, -12V, +5V, -5V, +3.3 V, -3.3V
Dilum Bandara - CSE
80
Dilum Bandara - CSE
81
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
82
UPS
p Stands for Uninterrupted Power Supply
p These devices would continue to provide
power in case of the power failure
p UPS can be find in different capacities &
types
p Capacity is give in VA
p 2 major types
n Standby UPS
n Online UPS
Dilum Bandara - CSE
83
Standby UPS
p Are the most common & used mainly with
PCs
p Are cheaper as well
Dilum Bandara - CSE
84
Online UPS
p Are use for high end applications
p These are much more robust &
can handle large capacity
Dilum Bandara - CSE
85
Secondary storage
p Includes Hard disks, floppy disks, CD-
ROMs, ZIP disks, etc.
p Hard Disk
n Contains a rigid, disk shaped platter
n Constructed using aluminium or glass
p Then a magnetic coating is applied
n High capacity & high speed
Dilum Bandara - CSE
86
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
87
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
88
Dilum Bandara - CSE
89
Types of hard disks connectors
p IDE Integrated Device Electronics
p SCSI Small Computer System Interface
p Serial ATA Serial AT Attachment
Interface
Dilum Bandara - CSE
90
IDE
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
91
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
92
SCSI
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
93
Platters, Tracks & Sectors
Dilum Bandara - CSE
94
Floppy Disk
Courtesy by www.exploratorium.edu
Dilum Bandara - CSE
95
Floppy Drive
Dilum Bandara - CSE
96
Optical Storage
p Make use of light instead of magnetism.
p Different forms of optical storage:
n CD-ROM
n CD-R Recordable
n CD-RW Rewritable
n DVD digital versatile/video disk
n DVD-R/DVD-RW
Dilum Bandara - CSE
97
Dilum Bandara - CSE
98
Dilum Bandara - CSE
99
Geometry of a CD
Pit
Land
0 1
Dilum Bandara - CSE
100
Components of a CD-ROM drive
Courtesy by Upgrading & Repairing a PC by Scott Mueller
Dilum Bandara - CSE
101
Other Input/ Output Devices
p Keyboard
p Mouse
p Barcode readers
p Printers
Dilum Bandara - CSE
102
Keyboard
Dilum Bandara - CSE
103
Mouse
Dilum Bandara - CSE
104
Other Readers
p Barcode Readers
p Optical Character Recognition (OCR)
p Magnetic Character Recognition (MCR)
Dilum Bandara - CSE
105
Barcode Readers
Dilum Bandara - CSE
106
Printer
pDifferent types
n Impact
pDot-matrix
pDaisy wheel
pTape/Ribbon
n Non impact
pBubble jet
pInk jet
pLaser
Dilum Bandara - CSE
107
Impact Printers
Dilum Bandara - CSE
108
Laser Printer concept
Dilum Bandara - CSE
109

You might also like