Chapter 2 Computer System Hardware
Chapter 2 Computer System Hardware
COMPUTER SYSTEM
HARDWARE
INTRODUCTION TO COMPUTERS AND
COMPUTER APPLICATIONS
Lecturer: Mr S. Nyamayauta
Email: [email protected]
What is a Computer
• The computer is an electronic device that accepts data, stores and processes it into
information
• It consists basically of hardware and software
• Cache memory is a very high speed semiconductor memory which can speed up the CPU. It acts
as a buffer between the CPU and the main memory. It is used to hold those parts of data and
program which are most frequently used by the CPU.
• The parts of data and programs are transferred from the disk to cache memory by the operating
system, from where the CPU can access them
1. Magnetic Disk
This is a storage device and uses magnetization process for data processing like read/write/access operations. A magnetic disk have circular platters coated with
magnetic material. Data is stored in form of tracks, spots and sectors. Examples of Magnetic disks are hard disk, floppy disks, magnetic tapes etc
Examples of Magnetic Disks
• Floppy / Stiff Disk (Diskettes)
Consists of a thin circular piece of Mylar plastic coated with ferric oxide enclosed in a protective jacket. An oval slot is cut in the envelope to give access to the
read / write head of the disk drive. Diskettes can be single or double sided and generally have a capacity of 1.44 MB.
• Hard Disks (HDD – Hard Disk Drives)
They are also called Winchester disks. They consist of one or more disk platters permanently sealed inside a casing. Each disk normally consist of
tracks which are invisible concentric circles formed on the surface of a magnetic disk on which data is recorded. The tracks are divided into arcs
called sectors each of which can be accessed directly and can be written to or read from by the read / write head.
The read/write heads don’t actually touch the disk but ‘float’ on a very thin cushion of air above the surface. Any tiny particle of dust on the surface of
the disk or accidental jolting of the disk which causes the head to come into contact with the surface of the disk surface ( a ‘head crush’) can cause
damage to the disk and loss of data. The time required to access and retrieve data depends on 3 factors:
Seek time – the it takes the to position the read/write head over the correct track
Latency – the it takes to rotate the disk until the correct sector is under the read/write head
Data transfer rate – time taken to transfer data from disk to main memory
Secondary / Auxiliary Devices
2. Magnetic Tape
Iron oxide and chromium oxide can be induced to hold a positive or negative magnetic field. This is
the basis of operation of magnetic core storage and data storage on tape depends on the
presence of patterns of magnetised areas. Data on tapes can be distorted if the tapes are brought
close to another magnet through the distortion of patterns of the magnetised areas. Data is written
in frames across the tape with one frame representing a byte. The frames form tracks across the
length of the tape
3. Data Cartridges
Are special magnetic tape contained in a sealed cartridge which is opened only when the cartridge
is in the tape drive. They are more robust than magnetic tape.
Secondary / Auxiliary Devices
Optic Storage Devices
1. COMPACT DISK (CD)
CD’s can be divided into 3 basic classes: read only CD’s, WORM, and erasable CD’s
a. CD-ROM (Compact Disk Read Only Memory)
It is a digital optical storage system that stores digital data by means of burning tiny holes in the surface
of the disk using a laser beam. The holes represent 1’s and 0’s. These are then read with a laser beam
in the optical disk reader.
b. Worm Disks
Once written the disk cannot be erased and re-written but can only be read. Hence, the name ‘write
once read many’. They are used for archiving large amounts of data.
c. Erasable Disks
This disk can be written to, erased and re-written again just like the floppy disk except that they have a
much bigger storage capacity than diskettes. The heat of a laser beam is used to change the magnetic
field of the disk so that billions of spaces can be created all with a + or – load which function like the
holes in the CD.
Other Storage Devices
1) RAMDISKS
This is an extra memory chip (not a disk), which the user can access in the same way as ordinary
disks i.e. it could be referred to as Drive D. It provides the advantage of faster access to
information stored on it. However, when the computer is switched off the information stored on it
will be lost and therefore it must be copied to a floppy disk or hard disk before the end of the
session if it needs to be retained.
2) FLASH MEMORY
These are memory sticks that are attached to the USB port of the computer to read the information
stored on them. The port in turn connects the memory stick to the CPU of the computer.
Storage Capacity
Storage capacity in computers is measured in kilobytes as follows:
1) General Purpose
These are manufactured for wide range of applications some of which may not be related e.g. the
PC (Personal Computer).They may lack in speed and efficiency.
2) Special Purpose
These are manufactured for a particular application and cannot perform any task other than that
for which it was manufactured e.g. calculator, artificial heart pump.
Classification By Size
1) Personal computers (PC)
These are small and portable. Generally, most PC’s can fit on top of desks (hence they are called desktops) and are very
affordable. A PC can only obey up to 1 million instructions per second. It makes use of a single user operating system; hence
one user operates it at a time. Secondary storage used besides the hard disc is floppy disk.
2) Miniframe
Are larger computers whose CPU reside in a box that may be the size of a chest of drawers. They can support up to 40 users
each at his own terminal (use multi-user operating system). They can obey up to 10 million instructions per second. Secondary
storage include reel-to-reel tapes, disk packs etc. They require considerable amount of power compared to PC’s. Storage
capacity is measured in gigabytes (Gigs)
3) Mainframes
These are very large computers that can take up space the size of an entire room. They can support up to 100 users at a time
and can obey up to 100 million instructions per second. They are very expensive to buy and energy overhead costs are very
high. Storage capacity is measured in terabytes.
NB: It is difficult to draw a line between a mainframe and a miniframe because one manufacturer’s least powerful mainframe is
another manufacturer’s most powerful miniframe.
Classification by Design Mode
1) Digital computers
These are computers that use logic gates, which respond to electronic pulses such that when they
are not charged they represent a 0 and a 1 when charged. Data is recorded and manipulated in
this format e.g. 15 in binary is 00001111 e.g. PC’s
2) Analogue computers
These computers measure physical quantities e.g. weight, humidity etc.
Examples are electronic thermometers, scale etc.
3) Hybrid computers
It is a computer capable of measuring physical quantities and representing and manipulating data
in binary notation.
Computer Architecture
• This refers to the combination of all the assorted elements which work together to enable data
to be processed and for the results of the data to be delivered to the computer user.
• The processing of data requires instructions which are basic building blocks of the computer
program to make hardware work in a particular way to meet the needs of the application.
• The word software is used to refer to the instructions and data required to control the
hardware.
CPU Registers and the Processing Cycle
• We have seen that the CPU contains an ALU and a CU, but we need to break down the
structure of a CPU into more detailed parts before we can really understand how it operates.
REGISTERS
• Within the CPU are a number of high speed , special-purpose memory units called registers
which are used to store data read from memory.
• Each CPU architecture has its own type and number of registers.
• Generally the larger the number of registers, the more sophisticated the computer
Registers
The basic types of registers are
1. Instruction Registers
• These are to store instructions from the memory
2. Data Registers
• To store data
6. Flags
• These indicates the outcome of operations , eg an arithmetic operation may cause overflow.
Process Cycles
• The computer program contains a series of instructions that are transferred to the instruction
register as needed.
• A program instruction that can be interpreted by a computer generally has at least two parts
• The first part is the OPERATION or COMMAND
• The second part is the ADDRESS that locates the data or the instructions to be manipulated.
Process Cycle Phases
The Fetch phase
• The address of the next instruction to be executed , held in the program counter register, is
fetched into the CU
• The Instruction held at that address is then fetched into the instruction register
• The contents of the program counter register are incremented by 1 to get ready for the next
instruction.
The Execute phase
• The Instruction In the instruction register is decoded
• The instruction is executed
Internal Communications
Each of the different components of a computer
requires a means of communicating with all the
other components of the computer to work as a
system.
There are two main elements of this
communication mechanism.
1. The System Bus
• These are the wires which signals and data
are sent between devices
2. Interrupts
• Is a signal from some device / source
seeking the attention of the processor.
System Bus Architecture
• The bus that connects together processor,
main memory and I/O controllers is called
the SYSTEM BUS
• A typical system bus contains between 50
and 100 separate lines.
• Each line is a pathway for conveying a
single bit.
• The number of lines is referred to as the
width of the bus.
• Bus lines are classified into three function
groups
• Control
• Data and
• Address
Control Bus
• The purpose of a control bus is to transmit command, timing information between system
componets.
• The control bus is bidirectional bus, meaning that signals can be carried in both directions
• The data and address buses are shared by all the components of the system
• Control lines must therefore be provided to ensure that access to and use of the data and
address buses by the different components of the system does not lead to conflict.
Control Lines
Memory write: To send data to memory
Memory read: to read data from memory
I/O write: to send data to be output or specific I/O port
I/O read: to read data from a specific I/O port
Transfer knowledge : to confirm that the data signals have been transferred either on or off the
data bus
Bus request: When a component is requesting control of the bus
Bus grant: when control of the system bus has been granted to a component
Interrupt Request: to indicate that an interrupt is pending
Interrupt acknowledgement: to confirm that an interrupt has been acknowledged
Clock : to synchronize operations
Reset: initializes all the components
Data Bus
• A typical Data bus consist of 8,16 or 32 separate lines. It provides a bidirectional path for
moving data and instructions between system components
• It is the width of a data bus that is a key factor in determining overall system performance.
• Eg: if the data bus is 16 bit wide and each instruction is 32 bits long, then the processor must
access the main memory twice during the instructions cycle.
Address Bus
• When a processor wishes to read a word of data from memory, it forst puts the address
of the required word on the address bus. The width of the address bus determines the
maximum possible memory capacity of the system
• Eg. If the bus consist of 8 lines, then the maximum address it could transmit would be
255- giving a maximum memory capacity of 256 (including the address 0 )
Interrupts
• Almost all computers provide a mechanism by which a program currently executing on the
processor may be interrupted by a device seeking the attention of the processor.
• The device generates a signal called an interrupt that is sent along a control line to the processor
• If interrupts are enabled, on receipt of an interrupt the currently executing program is suspended
in an orderly fashion and control is passed to an interrupt service routine.
• The currently executing program is suspended in such a way that its execution can be resumed
without error after servicing of the interrupting device has been carried out
• Interrupts often operate on priorities where a device with a high priority can interrupt a device or
process with a lower priority, but not the other way.
Most Common Types of Interrupts
1. Program
• Generated by some condition that occurs as a result of an instruction execution, such as
arithmetic overflow , division by zero or attempt to execute an illegal machine instruction.
2. Timer
• Generated by a timer within the processor to allow the operating system to perform certain
functions at regular intervals of time.
3. I/O
• Generated by I/O controller , to signal normal completion of an operation or to signal a variety
of error conditions.
4. Hardware failure
• Generated by failure such as power failure or memory parity error.