Lecture Week 02
Lecture Week 02
Introduction to Computing
Lecture 2: Computer hardware
Dr Malcolm Clarke
1.0
Lecture Outline
4
Two categories of hardware
• Parts of the computer itself
– CPU
– Processor
– Motherboard
• Peripherals
– Keyboard
– VDU
– Mouse
– Printer
5
Internal Components of a
Computer System
• The way that data is moved from one place to
another is via a 'bus'.
• A 'bus' is a set of wires or copper tracks that are
built into the motherboard.
• So when data needs to move around the computer
it does so via a bus, for example:
– The CPU needs to move information in and out of memory
– Data needs to move between the hard disk and the CPU.
– Data needs to move between the graphics card and the
CPU
– Data needs to move between the CDROM / DVD and the
CPU
• External buses such as USB can transfer data in and
out of the computer.
6
The bus
• A bus usually contains between 1 to 64
wires (or more), the number of wires equals
the number of 'bits' that can be transferred
in one clock cycle.
• An 8 bit bus has 8 wires - it can transfer 8
bits in one go, with 1 bit on each wire.
• A 16 bit bus can transfer 16 bits in one cycle
- 1 bit per wire.
• The bus system determines the size of each
memory location and it also determines how
much memory can be installed in the
system.
7
The bus system
• A bus system will normally consist of three
buses:
– Data bus - transfers data
– Address bus - carries the addresses of the
system
– Control bus - carries signals that control the
operation of each device
For more information see
http://computer.howstuffworks.com/computer-
buses-channel.htm
8
Computer Motherboard
http://www.teach-ict.com/as_a2/topics/performance/computer_performance2/buses.htm
9
The Processor
• The part of the computer that
executes the program that is stored in
the memory. Sometimes called the
Central Processing Unit (CPU)
• Consists of 3 components:
– Controller
– Arithmetic Logic Unit (ALU)
– Registers
10
Control Unit
• This is the part of the central
processor unit (CPU) which manages
the execution of instructions.
• The control unit fetches each
instruction in sequence, decodes and
synchronises it before executing it by
sending control signals to other parts
of the computer.
11
Arithmetic and Logic Unit (ALU)
– This is the part of the CPU where data
is processed and manipulated. This
consists of arithmetic and logic
operations.
12
Registers
• A small number of read/write memory
cells that operate at very high speed.
• Now considered part of the ALU.
• Holds the operands of an operation
and on completion holds the result of
the operation.
• Addressed more quickly than regular
memory cells
13
More Information
• http://www.teach-
ict.com/as_a2_ict_new/ocr/AS_G061/
312_software_hardware/hardware_sof
tware_peripherals/miniweb/pg2.htm
• http://computer.howstuffworks.com/
computer-cpu-channel.htm
14
Memory
• Organised into memory locations
• Each with an address
• If the processor wishes to access a memory
location it places the address on the address
bus and sends appropriate control signals via
the control bus
• If a memory location contains 8 binary digits
(bits) it is known as a byte. If it contains more
than 8 bits it is known as a word.
• How many kinds of memories can you think of?
15
Read Only Memory (ROM)
• ROM cannot be changed by the processor,
but only read by it.
• When the computer is turned off the
contents of ROM are maintained - known as
non-volatile memory.
• ROM is used for:
– Storing the bootstrap program that starts the
computer
– Store fixed data associated with the computer
system
– Sometimes stores programs that remain in the
computer at all times.
16
Random Access Memory (RAM)
• Memory which holds data loaded from the
backing store – data that the computer is to
process, screen display etc.
• It can be written to i.e. read/write memory
• Lost when the computer is turned off -
known as volatile memory
• RAM is used for
– Storing programs that are being executed
– Store data required for immediate use
– As buffers for external storage devices
17
Cache Memory
• High speed memory
• Part of the processor or a special high speed cache
memory chip
• Used to speed up the execution of computer
programs
• Cache memory is faster than RAM and ROM but
slower to access than a register
• The following can be stored in a cache:
– Program instructions that are executed many times
– Regularly used data
– Virtual memory page tables
– Pipelining
18
Some links for extra reading
• For more information see
http://www.teach-
ict.com/glossary/M/memory.htm
http://www.teach-
ict.com/glossary/C/cache.htm
http://www.fatmax.org/AS2/207/Capabilities
ofhardware.swf
19
Machine Clock
• An electronic device that produces a pulse of electricity at
regular intervals.
• A computer runs on a clock – a 2.5 GHz machine is running at
2.5 thousand million cycles per second. Each cycle is a clock
pulse. The faster the clock, the more instructions per
second.
• Used to synchronise the computer system
• Normally connected to the processor passing on synchronising
signals through the control bus.
• The complexity of the instructions affects the speed of
processing.
• A program consisting of a larger number of simple instructions
drawn from a reduced instruction set (RISC) may run faster
than an equivalent program consisting of a smaller number of
complex instructions drawn from an extended instruction set
(CISC).
20
Factors that affect computer
performance: I
• Number of Processors
– A single processor can only run 1 instruction
at a time.
– To get beyond this you need an additional
processor.
– This allows more than one instruction to be
run and increases the speed of the
computer.
– Programs and computers have to be written
to make use of the second processor.
21
Factors that affect computer
performance: II
• Bus Speed
– The speed of the computer is also determined by
how fast the data can travel. Data travels down
buses
– Increasing the speed of the bus decreases the
waiting time and increases the speed. The
speed of the bus is determined by the clock
speed
22
Factors that affect computer
performance: III
• RAM
– The more RAM you have, the more instructions
you can store without having to access the disk
which is slow. It decreases disk thrashing
– Cache memory is even faster and with more of
it, the machine runs faster still
• Dedicated Processing Devices
– Instead of using the processor to do all the
processing you can use specialist processors to
take some of the load and thus speed up the
machine. These include sound and graphics
processors
23
Making a Machine Run Faster
Hardware Options
– Replace motherboard
• Increases BUS speed
– Processor
• Add second/subsequent processor
• Overclocking processor
– Dedicated device
• Dedicated processing device – sound
card/graphics card, etc
– RAM
• Increase RAM – holds larger swap files/more data
24
Making a Machine Run Faster
Software Options
– Memory Optimiser
• Better use of memory
– Replace programs with up-to-date ones
• Make better use of memory and resources
– Patch software / run anti virus / anti spyware
• Remove programs using resources
– Defragment Hard Drive
• Increases BUS speed
– Remove Unused Programs
• Frees up hard drive space
• Large swap file
25
Interfaces: I
• Interfaces are required to connect to external
devices e.g. keyboards, printers, etc.
• Able to communicate with the buses and external
devices as they use different protocols than the
rest of the computer
• Interfaces are required because:
– External devices operate at a much slower speed than the
buses
– External devices may use a different voltage
– You need to convert signals from one protocol to the other
– Provide electrical protection from a faulty device
26
Interfaces: II
• An interface consists of
– Electronics to connect to the system bus
– Electronics to connect to the cable that goes
into the device
– Data registers to hold the data being transferred
– Control register to allow commands to be passed
to the interface
– Status register to provide information about the
current state of the device
27
Input Devices
• Computer systems need information
usually from the user, but can be
automatic from a sensor.
• Can be text, pictures, video, sound,
etc.
• Input devices are chosen based on
quality, ease of use and type of data
to be input
28
Input devices: examples
• Examples of input devices are:
– Keyboards
– Touch screen
– Mouse
– Scanner
– Magnetic strip reader
– Camera
– Microphone
– Sensors
See
http://www.teach-ict.com/glossary/I/input_device.htm
http://www.billbuxton.com/InputSources.html
29
Output Devices
• A piece of hardware that communicates
processed data to the user or to another
machine e.g. a heating system
• Chosen according to the quality and style of
output required
• Examples include:
– Printers inkjet, dot matrix, laser
– Speakers
– Monitors VDUs, chosen according to the
requirements of the user(s)
30
Storage Devices
• They are examples of non-volatile storage
• Data is stored in files containing a number
of records
• Information about the files is stored in a
directory
• Data is transferred to and from storage
devices in blocks
• Data can be stored on the hard disk but
should always be duplicated on one or more
other storage device
31
Types of Storage Device
• Magnetic storage devices
– Create magnetised areas on magnetic media to represent
the data. Areas of magnetised and non-magnetised are
detected by the computer
– e.g.s are hard disks, floppy disks, magnetic tape
• Optical storage devices
– Uses lasers to burn spots on optical media
– A light is used to read the spots and interpret them as
data
– e.g.s CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-R and DVD-
RW
• Memory sticks
– Use semi-conductor memory called flash memory
– Similar to memory chips in the computer but hold data
permenantly
32
Some links of extra reading
• For more information:
• http://www.teach-
ict.com/as_a2/topics/hardware/stora
ge%20devices/storage/index.htm
• http://www.jegsworks.com/Lessons/l
esson6/lesson6-1.htm
• http://www.fatmax.org/AS2/207/Ch2
6StorageDevices.ppt
33
Next Lecture
• Next lecture:
Computer architecture
34