0% found this document useful (0 votes)
25 views44 pages

Chapter 2 Computer System Hardware

This document provides an overview of computer hardware, detailing the components and functions of computers, including the roles of hardware and software, input and output devices, and memory types. It explains the structure of the central processing unit (CPU), the differences between primary and secondary storage, and the various types of memory such as RAM and ROM. Additionally, it outlines the evolution of computers through different generations, highlighting technological advancements that have led to smaller, more efficient devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views44 pages

Chapter 2 Computer System Hardware

This document provides an overview of computer hardware, detailing the components and functions of computers, including the roles of hardware and software, input and output devices, and memory types. It explains the structure of the central processing unit (CPU), the differences between primary and secondary storage, and the various types of memory such as RAM and ROM. Additionally, it outlines the evolution of computers through different generations, highlighting technological advancements that have led to smaller, more efficient devices.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 44

CHAPTER 2

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

• The computer is an electronic device that accepts


data, stores and processes it into information
• It consists basically of hardware and software
• Hardware refers to the physical, tangible
components of the computer system such as the
mouse, VDU, keyboard etc
• Software refers to the programs and their
associated files that direct and control the
operations of the computer such as operating
system software and applications software.
• A program is a set of instructions that direct the
operations of the computer system.
Block structure of a Computer
Computer Input
• Input operations on the computer are
carried out via the use of input
devices.
• An input device is any device that is
used to enter data into the computer
such as the keyboard, mouse etc.
• It is the process of capturing or
acquiring the information , or it is the
process of accepting data or
information
Computer Output
• Output, which is the result of a
processing activity, comes in 4
possible ways, i.e.
• softcopy,
• hardcopy,
• sound and
• movement.
• Softcopy is output that is intangible
in nature and it is displayed on the
visual display unit (VDU).
• Hardcopy output refers to printed
material, which is tangible.
• Sound can neither be seen nor
touched but can be heard.
Processor
• The processor is also called the
central processing unit (CPU)
and is responsible for
transforming data into
information.
• The CPU may sometimes be
referred to as the heart of the
computer in that it is responsible
for co-ordinating and
controlling the activities of all
computer peripherals.
• A peripheral device is any
device that is external to and is
connected to the processor.
• The CPU is also responsible for
monitoring the movement of
data throughout the computer
system as well as execution of
programs and instructions.
Processor …cnt
The CPU has the following 3 functional units:

Control Unit (CU)


• It co-ordinates and controls the flow of data and instructions throughout the computer system from input
to output devices via the processor itself.

Arithmetic and Logic Unit (ALU)


• It is responsible for making mathematical computations on data such as multiplying, dividing, adding
and subtracting. In situations where a decision has to be madethe logic unit does operations such as
comparing, selecting, matching, and merging of data based on the conditions given.

Memory Unit (MU) / Primary Memory


• It supports as a temporary store, holding data and instructions before, during and after processing but
does not take part in the actual processing itself. Hence, it is argued that it does not form part of the
processor. It should be noted that, conventionally, the memory unit is considered to be an integral
component of the processor.
• The primary store is volatile, meaning that it can only hold data for as long as there is a constant power
supply and will lose everything when power supply is cut off.
Memory Unit (MU) / Primary Memory
• This unit supplies information to other units of the computer when
needed. It is also known as internal storage unit or the main
memory or the primary storage or Random Access Memory
(RAM).
• Its size affects speed, power, and capability.
• It stores all the data and the instructions required for processing.
• It stores intermediate results of processing.
• It stores the final results of processing before these results are
released to an output device.
• All inputs and outputs are transmitted through the main memory.
• These are semiconductor memories.
• It is volatile memory, Data is lost in case power is switched off.
• It is the working memory of the computer.
• Faster than secondary memories.
• A computer cannot run without the primary memory.
Cache Memory

• 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

Advantages of Cache Memory


• Cache memory is faster than main memory.
• It consumes less access time as compared to main memory.
• It stores the program that can be executed within a short period of time.
• It stores data for temporary use.

Disadvantages of Cache Memory


• Cache memory has limited capacity.
• It is very expensive.
Secondary / Auxiliary storage
• This is non-volatile backing These are used for storing data/information permanently.
storage that provides long- CPU directly does not access these memories, instead
term storage of data that will they are accessed via input-output routines. The
need to be retrieved and used contents of secondary memories are first transferred to
later. the main memory, and then the CPU can access it.
• With main memory volatile as
it is, data can only be stored Characteristics of Secondary Memory
permanently on auxiliary • These are magnetic and optical memories.
storage devices, which are • It is known as the backup memory.
also called secondary • It is a non-volatile memory.
storage devices e.g. • Data is permanently stored even if power is switched
• hard disk, off.
• diskette, • It is used for storage of data in a computer.
• CDs etc • Computer may run without the secondary memory.
• Slower than primary memories.
Storage Devices
A storage device is any device that can store information that will subsequently be retrieved for
use later. Factors that may be considered when acquiring storage devices are:
• Storage capacity
• Durability
• Size
• Robustness
• Relative cost
Storage devices can broadly be classified into Primary storage and Secondary storage devices as
follows:
Primary Storage Devices
Memory chips are normally assembled
into electronic circuit boards which may
be fitted onto slots on the motherboard.
The memory chips in turn have slots for
the same purpose in case there is need to
expand memory further.

Primary memory exist in two main


categories namely RAM and ROM
RAM
RAM stands for Random Access Memory. Data store in RAM can be altered. It is the most common type
of semi-conductor memory and is volatile ( i.e data is not stored permanently in RAM and will be lost
when power is off..
Access time in RAM is independent of the address, that is, each storage location inside the
memory is as easy to reach as other locations and takes the same amount of time. Data in
the RAM can be accessed randomly but it is very expensive.
RAM has 2 types namely:
Static RAM (SRAM)
Static RAM, the memory retains its contents as long as power is being supplied.
However, data is lost when the power gets down due to volatile nature
Transistors do not require power to prevent leakage, so SRAM need not be refreshed on a
regular basis.
SRAM uses more chips than DRAM for the same amount of storage space,
SRAM is thus used as cache memory and has very fast access.
Characteristic of Static RAM
• Long life
• No need to refresh
• Faster
• Used as cache memory
• Large size
• Expensive
• High power consumption
Dynamic RAM (DRAM)
DRAM, unlike SRAM, must be continually refreshed in order to maintain the data
This is done by placing the memory on a refresh circuit that rewrites the data several hundred times per
second.
DRAM is used for most system memory as it is cheap and small
All DRAMs are made up of memory cells, which are composed of one capacitor and one transistor.

Characteristics of Dynamic RAM


• Short data lifetime
• Needs to be refreshed continuously
• Slower as compared to SRAM
• Used as RAM
• Smaller in size
• Less expensive
• Less power consumption
ROM
• Stands for Read Only Memory. The memory from
which we can only read but cannot write on it.
• This type of memory is non-volatile.
• The information is stored permanently in such
memories during manufacture.
• A ROM stores such instructions that are required to
start a computer.
• This operation is referred to as bootstrap.
• ROM chips are not only used in the computer but
also in other electronic items like washing machine
and microwave oven. Etc
• Following are the types of ROM..
Types of ROM
Types of ROM
MROM (Masked ROM)
The very first ROMs were hard-wired devices that contained a pre-programmed set of data or instructions.
These kind of ROMs are known as masked ROMs, which are inexpensive.
PROM (Programmable Read Only Memory)
PROM is Read-Only Memory that can be modified only once by a user. The user buys a blank PROM and
enters the desired contents using a PROM program. Inside the PROM chip, there are small fuses which
are burnt open during programming. It can be programmed only once and is not erasable.
EPROM (Erasable and Programmable Read Only Memory)
EPROM can be erased by exposing it to ultra-violet light for a duration of up to 40 minutes. Usually, an
EPROM eraser achieves this function. During programming, an electrical charge is trapped in an insulated
gate region. The charge is retained for more than 10 years because the charge has no leakage path. For
erasing this charge, ultra-violet light is passed through a quartz crystal window (lid). This exposure to ultra-
violet light dispels the charge. During normal use, the quartz lid is sealed with a sticker.
EEPROM (Electrically Erasable and Programmable Read Only Memory)
EEPROM is programmed and erased electrically. It can be erased and reprogrammed about ten thousand
times. Both erasing and programming take about 4 to 10 ms (millisecond). In EEPROM, any location can
be selectively erased and programmed. EEPROMs can be erased one byte at a time, rather than erasing
the entire chip. Hence, the process of reprogramming is flexible but slow.
Advantages of ROM
Advantages of ROM
• Non-volatile in nature
• Cannot be accidentally changed
• Cheaper than RAMs
• Easy to test
• More reliable than RAMs
• Static and do not require refreshing
• Contents are always known and can be verified
Secondary / Auxiliary Devices
Secondary storage devices can be broadly classified into magnetic and optic storage devices

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:

1KB = 1024 X 100 bytes


1MB = 1024 X 103 bytes
1GB = 1024 X 106 bytes
1TB = 1024 X 1012 bytes
Classification of Computers
Brief History of Computers
When the human race started doing some trade, it felt a need for a calculating device. The first
calculating device, which was used 2000 years ago was called abacus and the improvements in
the calculating device in that age were slow.
The next change came after about 1600 years. Following this, the changes were frequent and the
mechanical desk calculator was developed around 1800 A.D. In 1833, Prof. Charles Babbage,
the father of the computer, developed a machine called analytical engine, which was the vase
for the modern digital computer.
Generations of Computer
The history of computer development is often referred to in reference to the different generations
of computing devices.
A generation refers to the state of improvement in the development of a product. With each new
generation, the circuitry has gotten smaller and more advanced than the previous generation
before it.
As a result of the miniaturization, speed, power, and memory of computers have
proportionally increased.
Each generation of computer is characterized by a major technological development that
fundamentally changed the way computers operate, resulting in increasingly smaller, cheaper,
powerful and more efficient and reliable devices.
Generations of Computer
1st generation
The used electronic valves and relays and existed in the 1940’s. Coding of programs was done using machine code.
2nd generation
These computers existed in the 1950’s and they used transistors and resistors, thus, were more reliable. They were as
large as a room and made use of the stored program concept. They used semi-conductor cores for memory chips.
And were reduced in size and increased in processing power. Coding of programs was done using assembly
language/ low-level language. Assembly languages were developed to eliminate the need to use binary codes for
each instruction. They are mnemonic codes such as ADD for ‘add’, SUB for ‘subtract’ etc. It is used when a
programmer needs to write a program that will execute very quickly or use as little memory as possible.
3rd generation
These were evident in the 1960’s and 1970’s and were more compact and reliable and they used integrated circuits.
Programs were coded using high-level language.
4th generation
Existed in from the 1970’s onwards and used very large-scale integrated circuits and more sophisticated micro-electric
devices. Program coding was done using very high-level languages, query languages etc. A query language is a non-
procedural language where the programmer specifies WHAT needs to be done but not HOW.
5th generation
These reside in the realms of science fiction and are expected to be able to converse with humans, and mimic human
senses, manual skills, and intelligence.
Computer Classification
Computers can be classified by:
1. Purpose,
2. Size and
3. Design mode
Classification By Purpose
We have general purpose and special purpose computers.

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

3. Program Counter Register


• To enable the processor to perform the instructions in the correct order

4. General- Purpose Registers


• Available to the programmer and referenced in assembly language programs

5. Stack Pointer Register


• This points to a Last In First out (LIFO) stack holding return addresses and accessed when an interrupt occurs

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.

You might also like