Kuc 112h Fundamental of Computing-1
Kuc 112h Fundamental of Computing-1
E-LEARNING PROGRAMME
CSC 110
FUNDAMENTALS OF COMPUTING
AUTHORS
ISBN 978-9966-59-019-0
KIBU is ISO 9001: 2015 Certified
Copyright@KIBABII UNIVERSITY, 2019
All Rights Reserved
About the Authors
2
Acknowledgements
We thank the almighty God giving us the gift of intelligence and the tenacity to apply this
gift. We thank the Kibabii University Management and Council for facilitating the writing
of this module. We also thank our families for their patience when we had to withdraw
from them to write the module. We also acknowledge the sources from which data was
collected and various Universities and Colleges that gave us an opportunity to teach
Fundamentals of Computing; from the teaching notes developed this module emerged.
3
Foreword
As the world becomes more digital there is need to develop alternative methods of
content delivery to diverse students, where space and time is not a limitation. It should
also be noted that there is an increasing trend for the working class to go back to school
without taking a break from their normal duties. It‘s in the consideration of such
students that Kibabii University in their performance contract, contracted to develop
modules that could be used for E-Learning or ODEL.
For students to successfully undertake any undergraduate course and also be able
to surf in this digital era, they require Fundamentals of Computing skills. This
module is meant to meet this need. The aim of module is to ensure that our
students are in position to apply basic computer knowledge in their day to day
lives and interact with other electronics with ease.
4
Welcome Note from Chair of Department
Welcome to the Department of Computer Science that is one of the Departments in
the School of Computing and Informatics. The Department houses this
Fundamentals of Computing module which is offered as a University wide course.
The Course is meant to enable students have basic knowledge and skills of
computers.
These skills will enable the students to: write course papers, interact with electronic
gadgets with ease, use the electronic library and write their project work. It will
empower the students to fit into this digital world where the concept of e-
government is now a reality and the Kenya Government is introducing laptop to
primary school students. The future is digital, please use these modules to acquire
basic skills required to prepare for your future.
5
Advanced Organizer
Course Description
Welcome t o this Module. The entire C S C 110 course will cover the a r e a s of:
Characteristics of computers, the evolution of computers, survey of computer
technologies and application; introduction to hardware, basic computer
organization, data representation, processor and memory, peripheral devices;
introduction to software, programming languages, operating systems, and
application software; introduction to data communication. We will explore these
areas using the topics below.
Section 1: The Basic Computer Organization, I/O, Processor, Memory and Buses
Section 2: Introduction to Computer hard ware
Section 3: Input Devices and Criteria for Selection
Section 4: Output Devices
Section 5: Processing Devices, CPU Functions and Components
Section 6: Primary Memory and Types
Section 7: Secondary Memory
Section 8: Storage Devices
6
Presentation
Section 4: Programming Languages
7
Introduction to the Module
This Module is called CSC 110: Fundamentals of Computing. This is a first year
first semester course housed in the Department of Computer Science but offered to
the entire first year students at the University.
Course Aim
The course introduces the learner to the computer as an electronic device, and helps
the learner to be familiar with the computer as a system besides equipping them
with computer literacy skills.
Course Objectives
By the end of the course, the learner should be able to:
8
Course Evaluation
Since this is not a practical course, this module will be assessed through Continuous
Assessment Tests (CATs) and a final examination. The CATs will account for 30% of
your final score while the final examination will account for 70% of your score. There
will be 2 assignments and 2 Sit in Continuous Assessment Tests (CATs). The Final
Examination is a Sit in. Note that as a student, you are expected to score a mark of 40%
and above for you to be considered as having passed this course.
9
TABLE OF CONTENTS
ABOUT THE AUTHORS .................................................................................................................. 2
ACKNOWLEDGEMENTS ............................................................................................................... 3
FOREWORD ....................................................................................................................................... 4
WELCOME NOTE FROM CHAIR OF DEPARTMENT ............................ 5
ADVANCED ORGANIZER ............................................................................................................. 6
COURSE DESCRIPTION ................................................................................................................. 6
INTRODUCTION TO THE MODULE ......................................................................................... 8
COURSE AIM ..................................................................................................................................... 8
COURSE OBJECTIVES ..................................................................................................................... 8
WORKING THROUGH THE MODULE ..................................................................................... 8
COURSE EVALUATION .................................................................................................................. 9
COURSE MATERIALS AND RESOURCES ................................................................................. 9
TABLE OF CONTENTS. ................................................................................................................ 10
TOPIC ONE ...................................................................................................................................... 13
INTRODUCTION TO COMPUTERS ......................................................................................... 13
1.1 INTRODUCTION ........................................................................................................................... 13
1.2 OBJECTIVES.................................................................................................................................. 13
1.3 INTRODUCTION TO COMPUTERS ............................................................................................... 14
1.4 DEFINING A COMPUTER? .......................................................................................................... 15
1.4.1 Definition Data, Information and Program ..................................................................16
1.5 EVOLUTION OF COMPUTERS .............................................................................................. 17
1.5.1 Abacus 500bc .....................................................................................................................17
1.5.2 Mechanical Calculator 1642 .............................................................................................18
1.5.3 Jacquards Automated Loom 1801 ...................................................................................19
1.5.4 Differential Engine 1800s .................................................................................................19
1.5.5 Electromechanical Punched Card Equipment 1880.................................................20
1.6 COMPUTER GENERATIONS ................................................................................................... 21
1.6.1 First Generation (1946-1956) .......................................................................................21
1.6.2 Second Generation (1957-1963) ...................................................................................23
1.6.3 Third Generation (1965-1974) ..........................................................................................24
1.6.4 Fourth Generation (1979-1989) .......................................................................................25
1.6.5 Fifth Generation (1990- Present) .................................................................................26
1.7.1 Classification According to Functionality ....................................................................28
1.7.2 Classification of Computers According to Size ............................................................30
1.7.3 Classification of Computers Based on Purpose ............................................................34
1.8 CHARACTERISTICS OF COMPUTERS .......................................................................................... 35
1.9 APPLICATION AREAS OF COMPUTERS...................................................................................... 36
1.10 ADVANTAGES OF COMPUTERS ............................................................................................... 40
10
TOPIC TWO ........................................................................................ 44
BASIC C O M P U T E R HARDWARE................................................... 44
2.1 INTRODUCTION ................................................................................................................. 44
2.2 OBJECTIVES ......................................................................................................................... 44
2.3 BASIC COMPUTER SYSTEM ......................................................................................... 46
2.3.1 Information Processing Cycle ..................................................... 46
2.4 COMPUTER HARDWARE ................................................................................................ 47
2.4.1 Input Devices ................................................................................ 48
2.4.2 Processing Devices ...................................................................... 58
2.4.2.1 Central Processing Unit (CPU)................................................ 59
2.4.2.2 Registers ..................................................................................... 64
2.4.2.3 Bubble Memory .......................................................................... 66
2.4.2.4 Holographic (Optical) Memory................................................ 66
2.4.2.5 Cache Memory ........................................................................... 66
2.4.2.6 Buses ........................................................................................... 67
2.4.2.6.1 Address Bus .......................................................................... 67
2.4.3 OUTPUT DEVICES ..................................................................................................................... 68
2.4.3.1 Printers ........................................................................................ 68
2.4.3.2 Plotters ........................................................................................ 74
2.4.3.3 Monitors ...................................................................................... 75
2.4.4 Storage Devices ............................................................................. 78
2.4.4.1 Backing Storage ......................................................................... 78
2.4.4.2 Solid State Storage Devices ................................................... 85
TOPIC THREE ..................................................................................... 88
THE BASIC COMPUTER SOFTWARE ................................................... 88
3.1 INTRODUCTION TO COMPUTER SOFTWARE ..................................................... 89
3.1.1 SYSTEM SOFTWARE .................................................................................................. 90
3.1.1.1 Operating System (OS) ............................................................ 91
3.1.1.2 Translators .................................................................................. 99
3.1.1.3 Assemblers ................................................................................ 99
3.1.1.4 Utility Programs: ..................................................................... 100
3.1.2 APPLICATION SOFTWARE ..................................................................................... 101
3.1.2.1 General/Ready-Made Software ......................................... 101
3.1.2.2 Custom/Bespoke Software Packages ................................. 103
3.2 PROGRAMMING LANGUAGES: ................................................................................ 105
TOPIC FOUR ..................................................................................... 109
DATA PROCESSING..................................................................... 109
4.1 DATA PROCESSING MODES..................................................................................... 110
4.2 BATCH PROCESSING .................................................................................................. 111
4.2.1 Advantages .................................................................................. 111
4.2.2 Disadvantages ............................................................................. 112
4.3 TIME SHARING SYSTEM ........................................................................................... 112
4.3.1 Advantages ................................................................................ 113
4.3.2 Disadvantages ............................................................................. 114
4.3.3 Desirable Features of Time Sharing ........................................ 114
4.4 MULTITASKING OR MULTIPROGRAMMING ..................................................... 114
4.4.1 Advantages .................................................................................. 114
11
4.4.2 Disadvantages................................................................................................................. 115
4.5 ONLINE PROCESSING SYSTEM ............................................................................................ 115
4.6 OFFLINE PROCESSING SYSTEMS........................................................................................... 115
4.7 DISTRIBUTED DATA PROCESSING (MULTI-PROCESSING) ................................................. 115
4.7.1 Benefits of DDP .............................................................................................................. 115
4.7.2 Disadvantages................................................................................................................. 116
4.8 C E N T R A L I Z E D AND DECENTRALIZED DATA PROCESSING
116
4.9 FACTORS TO CONSIDER WHEN SELECTING T H E DATA
PROCESSING MODE ........................................................................................................................ 116
TOPIC FIVE................................................................................................................................... 119
DATA COMMUNICATION ...................................................................................................... 119
5.1 INTRODUCTION TO DATA COMMUNICATION ....................................................................... 120
5.2 TRANSMISSION MEDIA. ............................................................................................................ 121
5.2.1 Guided Media. ................................................................................................................ 121
5.2.2 Un –Guided Media........................................................................................................ 124
5.3 BASIC ELEMENTS OF A COMMUNICATION SYSTEM .............................................................. 124
5.4 NETWORK.................................................................................................................................. 125
5.4.1 Important Terms Used in Networking ....................................................................... 126
5.4.2 Types of Networks ......................................................................................................... 128
5.4.3 Network Topologies ..................................................................................................... 128
CHAPTER SIX .............................................................................................................................. 139
DATA REPRESENTATION ....................................................................................................... 139
6.1 I N T R O D U C T I O N................................................................................................................ 140
6.1.1 BinaryNumbers………………………………………………....................................... 141
6.1.2 Octal Numbers...................................................................................................................... 143
6.1.3 Hexadecimal Numbers (HEXA) ..................................................................................... 143
6.2 Computer Arithmetic ................................................................................................. 159
6.2.1 Sign and Magnitude Codes .......................................................................................... 161
6.2.3 Ones and Twos Complementation .............................................................................. 162
6.2.4 The Subtraction Operation ............................................................................................ 167
6.2.5 Multiplication of Binary Number ................................................................................ 169
6.2.6 Binary Division ............................................................................................................... 170
6.3 BINARY CODES ........................................................................................................................ 171
6.3.1 Binary Coded Decimal (BCD)....................................................................................... 171
6.3.2 Excess-Three: Binary –Decimal-Code.......................................................................... 174
6.3.4 Alphanumeric Codes ..................................................................................................... 179
7.0 REFERENCES ......................................................................................................................... 182
8.0 SAMPLE PAPERS .................................................................................................................. 185
12
TOPIC ONE
INTRODUCTION TO COMPUTERS
1.1 Introduction
This topic introduces you to the computer, here you get to define what
a computer is. It also introduces you to the history of the evolution of
the computer as a machine. After which you will be walked through the
details of the classifications of computers their uses as well as
advantages and disadvantages. The topic has seven sections namely:
Introduction to Computers
Definition of terms
Evolution of Computers
Classification of Computers
Characteristics of Computers
Applications of Computers
Advantages and Disadvantages of Computers
1.2 Objectives
By the end of this topic, the learner should be able to:
1) Define a computer
2) Explain the evolution of computing technology and the technological
advancement in computer architecture to current technologies
3) Explain the characteristics of computers and how they are different from
humans.
4) Explain the different types of computers categorized based on size, price and
capabilities
13
Activity 1
a). What comes to your mind as a learner when you hear the mention of the word
computer?
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
Topic overview
You will notice that there are varied definitions of what a computer is. However, this
topic is designed to help you understand what a computer is and its application in real
life. We will then move to discuss the sections in this topic, welcome.
14
1.4 Defining a Computer?
Computer is an abbreviation that stands for Commonly Operated Machine Used in
Trade, Education and Research. This description actually tells us more about where
it was mainly first being used before it became a common place tool. A computer is
defined as an electronic device that receives data, stores it, processes it and
produces information with a high degree of accuracy and speed under a set of
instructions. It can perform activities that involve mathematical, logical and
graphical manipulations. Generally, the term is used to describe a collection of
devices that function together as a system.
A computer is thus a general-purpose machine that processes data according to a
set of instructions. The set of instructions is called a "program." When most people
talk about computers today, they are referring to electronic digital computers, such
as personal computers, laptops, handheld computers, or large business computers.
The term "digital" means that it uses computations based on binary digits. Binary is
a number notation system that uses the numbers "0" and "1" in various
combinations. Electronic circuits use "on" or "off‖ electrical conditions to represent
binary numbers ―1‖ or ―0‖ internally within a computer.
Almost all computers today are electronic digital computers. In fact, there are over
500 million electronic digital computers. However, not all computers are digital
and neither are all computers are electronic.
15
The devices that are used to provide the input to the computer are called input
devices. The part of the computer that performs the processing is called the central
processing unit or CPU. While the devices that display the results of the CPU are
called output devices.
Now, let us understand the definition of other terms used together with
the computer.
Data is represented with the help of characters like alphabets (A-Z, a-z), digits (0-9)
or special characters (+, -, /, *, <,>, =, etc.). Example: Names of students and their
marks in different subjects listed in random order.
16
Therefore, data processing consists of basic steps input, processing, output and
storage. These four steps that constitute the data processing cycle are as follows:
Input - In this step, the input data are prepared in some convenient form for
processing. The form will depend on the processing machine. For example, when
electronic computers are used, the input data could be recorded on any one of
several types of input mediums, such as magnetic disks, tapes and so on.
Processing - In this step, input data are changed to produce data in a more useful
form. For example, pay-checks may be calculated from the time cards or a
summary of sales for the month may be calculated from the sales orders.
Output -Here, the results of the proceeding processing step are collected. The
particular form of the output data depends on the use of the data. For example,
output data may be pay- checks for employees.
Storage –In this step the output is preserved for future reference and could be
retrieved for the same.
The abacus is one of the earliest known computational devices and can be traced to
ancient Babylonia. Although abacus is over 2,000 years it remains useful today in
certain business and elementary schools where students are leaning arithmetic. The
abacus is the most ancient calculating device known. It has endured over time and is
still in use in some countries. An abacus consists of a wooden frame, rods, and beads.
Each rod represents a different place value—ones, tens, hundreds, thousands, and so
on. Each bead represents a number, usually 1 or 5, and can be moved along the rods.
Addition and subtraction can easily be performed by moving beads along the wires
of the abacus.
17
The Abacus
It’s nice to note that each time technology becomes obsolete there is
advancement, so from the Abacus an improvement was discovered: the mechanical
calculator.
In 1642, the Frenchman Blasé Pascal invented a mechanical device that functioned
as an adding machine. Known as the machine Arithmetique, the device was
constructed of interlocking gears that represented the numbers 0 through 9. It
operates like an odometer, which records an automobiles mileage. About 30 years
later, Gottfriet Von Leibniz, a German mathematician, improved on Pascal‘s
invention by producing a machine which could add, subtracts, multiply, divide and
extract roots. However, no one knew how to manufacture such precision machines.
A mechanical calculator, or calculating machine, was a mechanical device used to
perform automatically the basic operations of arithmetic. Most mechanical
calculators were comparable in size to small desktop computers and have been
rendered obsolete by the advent of the electronic calculator.
18
A Mechanical Calculator
Next in line was, Joseph Marie Jacquard who perfected the automated loom. The
loom was controlled by a "chain of cards", a number of punched cards, laced
together into a continuous sequence. Multiple rows of holes were punched on each
card, with one complete card corresponding to one row of the design. Using holes
punched into this series of connected cards he was able to control the weaving of
fabrics. The loom used in this process sensed the pattern coded into the cards and
wove the fabric accordingly.
19
Analytical Engine
20
Activity 2
As we finish this section, try and think of local ways you used in your school for
computation and list them below
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………….……………………………………
Have there been any improvements through innovations, what are you using for
computation today?
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………….……………………………………
By now you should discover that there are various gadgets that are being used as
computers that do not compare with the early days. Due to this improvement we
now classify machines
21
many maintenance problems. Punched cards were used to input information; the
operating system had very limited capabilities. Machine language and low level
assemblers’ language were used in programming these computers. The major
users were Government, universities, and Major Corporation for financial and
statistical programs run in a batch processing.
Example;
ENIAC
EDVAC
UNIVAC
IBM-701
IBM-650
22
The first generation computers had their own disadvantages and these
Use of transistors
Reliable as compared to first generation computers
Smaller size as compared to first generation computers
Generate less heat as compared to first generation computers
Consumed less electricity as compared to first generation computers
Faster than first generation computers
Still very costly
A.C. needed
Support machine and assembly languages Some computers of this generation were:
IBM 1620
IBM 7094
CDC 1604
CDC 3600
UNIVAC 1108
23
This technology in the second generation did not hold for long and it did
not take time before it was upgraded to what was referred to as third generation
computers
IC used
More reliable
Smaller size
Generate less heat
Faster
Lesser maintenance
Still costly
IBM-360 series
24
Honeywell-6000 series
PDP (Personal Data Processor)
IBM-370/168
TDC-316
With time this machines were faced out and replaced with fourth
generation computers
25
Great developments in the fields of networks
Computers became easily available
Activity 3
What is distributed computing?
………………………………………………………………………………………………….
………………………………………………………………………………………………….
Robotics
Neural networks
Game playing
Development of expert systems to make decisions in real life situations.
Natural language understanding and generation.
ULSI technology
Development of true artificial intelligence
Development of natural language processing
Advancement in parallel Processing
Advancement in superconductor technology
More user friendly interfaces with multimedia features
Availability of very powerful and compact computers at cheaper rate
Research shows that the trend in computer technology revolution is that there is;
27
Attempt the questions below;
(a) Vacuum tubes (b) Capacitors (c) Transistors (d) Integrated circuits
3. The analytical engine was the vase for the modern digital computer in which
year was is developed?
Having known the various computer generations let us now look at the
types of computers available today and how do we classify them?
1.7 T y p e s of Computers
Here it will be important to know that manufacturers‘ offer many shapes and sizes
of computer systems, but the many models can be broadly classified using various
classification criteria. Computers are classified according to Functionality, Size and
power and Purpose.
Analogue Computers
Digital Computers
28
Hybrid Computers
29
Using a diagram differentiates between analog and digital signals?
The next subsection carries the major group of computers in use today
30
1.7.2.2 Mainframe Computers
A mainframe is another giant computer after the super computer and can also process
millions of instruction per second and capable of accessing billions of data. They are
physically very large in size with very high capacity of main memory. This computer is
commonly used in big hospitals, airline reservations companies, and many other huge
companies prefer mainframe because of its capability of retrieving data on a huge
basis. They can be linked to smaller computers and handle hundreds of users they are
also used in space exploitation. The term mainframe was mainly used for earliest
computers as they were big in size though today the term is used to refer to large
computers. A large number of peripherals can be attached to them. They are expensive
to install because they support a large number of terminals for use by a variety of users
simultaneously. They are known to have large storage and high computing speed (but
relatively lower than the super computers). What was prominent for these computers
was the ability to be linked into a network.
31
1.7.2.3 Mini Computers
This one is a medium sized computer with moderate cost, and used for large
volume applications. It can serve multi-users simultaneously. They are smaller than
the mainframe but bigger than mini computers. They support concurrent users.
They can be used as servers in companies. They are slower and less costly
compared to main frame computers but more powerful, reliable and expensive
than microcomputers.
32
O Laptop: A small portable computer light enough to carry comfortably, with a flat
screen and keyboard that fold together. Laptops are battery- operated, often have a
thin, backlit or side lit LCD display screen, and some models can even mate with a
docking station to perform as a full-sized desktop system back at the office.
Advances in battery technology allow laptop computers to run for many hours
between charges, and some models have a set of business applications built into
ROM. Today's high- end (Advanced) laptops provide all the capabilities of most
desktop computers.
O Palmtop: A small computer that literally fits in your palm. Compared to full-size
computers, palmtops are severely limited, but they are practical for certain
functions such as phonebooks and calendars. Palmtops that use a pen rather than a
keyboard for input are often called hand-held computers or PDAs. Because of their
small size, most palmtop computers do not include disk drives. However, many
contain PCMCIA slots i n which you can insert disk drives, modems, memory, and
other devices. Nowadays palmtops are being integrated into the mobile phones as
multipurpose devices.
These are self-contained units and usually developed for use by one person at a
time but can be linked to very large systems. They are cheap, easy to use even at
homes and can be read for variety of applications from small to medium range.
These are available in three models:
33
were developed and the first in the series is INTEL 8080. The other processors are
8088, 80286, 80386, 80486, Pentium I, II, III and Pentium 4. The Pentium 4 can
execute any piece of code that ran on the original 8088, but it does it about 5000
times faster. Clock Speed: This is speed with which an instruction is executed, or
the number of pulses per second. It is measured in terms of million pulses per
second (MHZs). The following table gives the differences among the different
processors that Intel has introduced over the years:
Now days we have fully 64 bits with 64-bit bus. With the number of
computers doubling if 18 months based on Moore’s law, the multi-core computers
are now the in thing.
34
1.7.3.1 General Purpose
These are computers built for a variety of processing jobs i.e. they are capable of a
variety of tasks. The computer can be put to different uses by changing the software
(program). General purpose computers are both used for scientific and industrial
application. They are developed to meet the requirements of several areas such as
simulation, solving mathematical equations, payroll and personnel database.
1.7.3.3 Dedicated
These are computers even though they can perform various tasks; they are
dedicated to specific application like word processing.
35
2. Accuracy – the computer accuracy is consistently high.
4. Versatility – a computer performs various tasks with ease. I.e. it can Search for
a letter, the next moment prepare an electricity bill, and write a report next
then do an arithmetic calculation all with ease.
5. Power of remembering–a computer can store and recall any information due
to its secondary storage capability.6. No intelligence Quotient (IQ) – a
computer cannot make its own decisions and has to be instructed on what to
do.
In y o u r o w n u n d e r s t a n d i n g h o w a r e c o m p u t e r s d i f f e r e n t
f r o m human beings.
Business
36
Payroll calculations
Budgeting sales analysis
Financial forecasting
Managing employees‘ database
Maintenance of stocks, etc.
Banking
Insurance
Insurance companies are keeping all records up-to-date with the help of
computers. The Insurance companies, Finance houses and Stock broking firms are
widely using computers for their concerns.
Insurance Companies are maintaining a database of all clients with information
showing:
Education
37
CBE involves control, delivery and evaluation of learning.
The computer education is very familiar and rapidly increasing the graph of
computer students.
There are number of methods in which educational institutions can use
computer to educate the students.
It is used for prepare a database about student performance and analyses are
carried out.
Marketing
b) Home shopping: Home shopping has been made possible through use of
computerized catalogues that provide access to product information and
permit direct entry of orders to be filled by the customers.
c) Health care: Computers have become important part in all Medical Systems.
The computers are being used in hospitals to keep the record of patients and
medicines. It is also used in scanning and diagnosing different diseases. ECG,
EEG, Ultrasounds and CT Scans, etc., are also done by computerized
machines. Some of major fields of health care in which computers are used:
38
Computers are also used in performing surgery.
Engineering
Computers are widely used in engineering purposes. One of major areas is CAD
(Computer Aided Design). CAD provides creation, edition, and modification of
image. Some fields are:
c) Architectural E n g i n e e r i n g : Computers h e l p i n p l a n n i n g t o w n s
, d e s i g n i n g b u i l d i n g s , determining a range of buildings on a site
using both 2D and 3D drawings.
Military
Computers are largely used in defense. Modern tanks, missiles, weapons, etc.,
employ computerized control systems. Some military areas where a computer has
been used are:
Missile control
Military communication
Military operation and planning
Smart weapons Communication
39
Budgets: Sales tax department Income tax department Male/Female ratio
Computerization of voters lists
Others are:
Computerization of Driving Licensing system
Computerization of PAN card
Weather Forecasting.
Handling errors easily.
Easy storage and retrieval of information.
Increased efficiency.
Higher quality work. Reducing cost.
Fast processing of information
Sharing information
Increased accuracy Improved moral of workers Reliability
Quick access and retrieval of data/ information
40
Dependency: It can perform function as instructed by user, so it is fully
dependent on human being.
Environment: The operating environment of computer should be dust -
free and suitable to it.
No Feeling: Computer has no feeling or emotions therefore it cannot make
judgment based on feeling, taste, experience and knowledge unlike a human
being.
Reasons why people may resist the introduction of computers at their place of work
are:
Computers may lead to lack of jobs.
Computers require skilled manpower.
Computers have adverse effect on our health.
Fear of change.
Fear of failure.
Lack of understanding.
Loss of control fear
Summary
In this topic you have learnt that a computer is an electronic device that converts
data into information. In defining the computer, we related it to data, information,
and program. We went further and looked at the evolution of computers. We were
able to classify the computer before exploring the characteristics of the computer as
well as the applications in daily lives.
In topic 2, we will discuss the Basic Computer hardware, that is, the physical
tangible parts of the computer. We will also look at each group of computer
hardware available, for example, the input devices, output devices, processing
devices and storage devices. But before you go topic 2, let us see how well you have
understood topic 1.
41
Self-check
1) Define the computer (3marks)
2) Briefly explain the characteristics of the computer (7marks)
3) Explain the various major advances in computing technology since 1946 to
the present. (10 marks)
4) Using size as a characteristic explain the various characteristics of
machines under this classification (10 marks)
Scoreboard
Marks Remarks
25–30 Excellent
20–25 Very Good
15–20 Good
10–15 Fair
0- 10 Go through the topic again
Further Reading
Learning Outcomes
You have now completed topic one, the learning outcomes are
listed below;
Check (√) the column which reflects your understanding of the various concepts
about writing.
42
S/No Learning Outcome Sure Not Sure
1 I can now explain what a computer is
If you have checked the ―not sure‖ column, please go back and study that section
in the topic before proceeding.
If you are ―sure‖ then you are ready for the next topic.
TOPIC TWO
BASIC C O M P U T E R HARDWARE
2.1 Introduction
Having learned about what a computer is in topic 1 and its history as well as the
various types of computers. It is now important for us to have a glimpse inside a
standard desktop computer. This topic introduces you the parts of a computer, also
called the computer system. It explores the computer hardware besides mentioning
the types. After which you will be walked through each type of hardware in details.
The topic has eight sections namely:
2.2 Objectives
At the end of the chapter the learner shall be able to;
1) Explain the different hardware units of a computer system such as
input, output, Central Processing Unit (CPU), main memory and secondary
storage.
2) Explain how the different units of a computer interact witch each other
to give the user output.
3) Explain how information is stored in a computer
4) Explain the different storage units of a computer such as byte, kilobyte,
megabyte, gigabyte and terabyte.
44
Activity 1
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
…………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
Topic Overview
You will notice that in order to respond to any of the above questions, you have to
have known what a computer is and its various parts. However, there are very
many parts of a computer and this topic is designed to help you understand them.
Let us now go through each section for better understanding.
45
2.3 Basic Computer System
As you saw in topic 1, computers come in many types, from the tiny computers built
into household appliances, to the astounding super computers that have helped
scientists map the human genome. But no matter how big it is or how it is used every
computer is part of a system. A complete computer system consists of four parts,
namely;
Hardware: These are the mechanical devices of a computer, identified as the physical
or tangible parts of a computer. Computers hardware consists of interconnected
electronic devices that you can use to control the computers operations, input and
output.
Software: This is a set of instructions that makes the computer to perform various
tasks, they are mainly the intangible parts of a computer.
The information processing cycle has four parts as shown above, and each part
involves one or more specific components of the computer:
Input: During this part of the cycle the computer accepts data from some source,
such as the user or program for processing.
Processing: During this part of the cycle, the computers processing components
perform actions on the data, based on instructions from the user or program.
46
Output: Here the computer may be required to display the results of its processing.
The computer also can send output to a printer or transfer the output to another
computer through a network or the internet. Output is an optional step in the
information processing cycle but may be ordered by the user or program.
Storage: In this step, the computer permanently stores the results of its processing
on a disk, tape, or some other kind of storage medium. As with output, storage is
optional and may not always be required by the user or program.
The physical parts of a computer system are called hardware and any device
connected to and under the control of the CPU is called peripheral device. The
computer hardware is divided into the input devices, output devices, processing
devices and storage devices.
Activity 1
Mention various parts of the computer that you think make up input devices.
47
2.4.1 Input Devices
A personal computer would be useless if you could not interact with it because the
machine could not receive instructions or deliver the results of its work. Devices can
be directly connected to a computer and under its control, in which case they are on-
line, or else separate from the computer, in which case they are off-line. Input
devices accept data and instructions from the user or from another computer
system. There are various types of input devices and these include:
2.4.1.1Keying Devices
These are devices that allow data entry into the computer by pressing a set of keys.
Keying devices are an indispensable accessory for a computer. One of the most basic
input devices is the keying devices, which are used in navigation, execution of
processes, programming and several other purposes. Several software based
application directly derive their existence from a keying device. For instance, social
networking websites, programming languages, navigation over the computer menus
etc. utilize a keying device.
It‘s used to type data into the computer. It has special keys for giving the computer
commands called command or function keys. Data are typically entered through
keyboards and displayed on the screens, VDT and PC users welcome improvements
in these interface components. Features that make keyboards easier to use and more
comfortable to use are:
Figure 1: Keyboard
48
Function keys
Some keyboards have less than 60 keys, while others add dozens more. Some of
these extra keys carry labels to indicate the types of function they perform. For
example, HOME and END keys allow users to move instantly to the beginning or
end of a stored document, ARROW keys move the screen pointer up, down, left,
and right, the PAGE UP and PAGE DOWN keys allows users to move through a
stored document a page at a time, the INSERT and DELETE keys permit users to
add and erase stored characters, and the PRINT SCREEN key can be used to
produce a printed copy of the information displayed on the screen. Other function
keys are merely stamped F1, F2, and F3 and so on, and are used in many different
ways by the programs being run. For example, a word processing program can use
the F8 key to underline text, and the F9 key to designate that the text should be
printed in bold typeface. As long as this word processing is being used, these keys
will always perform the same functions. But different software will program the
same keys to perform other functions.
Numeric keypads: A row of numeric keys appears near the top of almost all
keyboards. But many VDT and pc units also include a separate numeric keypad.
These keys are arranged like those on a calculator to permit rapid entry of numeric
data. Apart from digits, the numeric keypad has some mathematical symbols.
Special keys: These are a set of keys on the keyboard that perform specific functions.
Navigational keys: Also known as the arrow keys they enable the user to move
within the document they are working on.
Numeric Keys: These are keys marked with the digits 0 to 9 and are used to type
numeric data.
49
Examples include a bank cheque, a multiple choice question paper, and electricity
meter reader form. There are many types of documents readers which include:
Optical character recognition is also used in other fields. The New York State Motor
Vehicle Bureau uses OCR in its renewal of car registration and drivers‘ licenses. The
renewal of magazine subscriptions is selectively accomplished through the use of
OCR. One of the newer uses of OCR – supported devices is in Sales. Tags carry
OCR characters, and when an item is purchased, the sales tag is read by a device
called a point-of –sale (POS) terminal. The POS terminal serves as a cash register,
terminal, and OCR reading device.
Discuss areas in real life where we can use the OCR What are the advantages
and disadvantages of the OCR.
50
2.4.1.2.2 Optical Mark Reader (OMR)
Next we discuss the Optical Mark Reader; the OMR is a system of reading marks or
lines which have been made in exactly the right positions on a card or document. It
allows the direct transfer of data from source document to computer. Information is
collected on a pre- printed OMR form by marking predetermined positions with
a pencil or a pen to indicate each selected response. Large volumes of data can be
collected quickly and easily without the need for specially trained staff. A device
called an optical mark reader converts the marks into computer readable data. The
reader detects the presence (or absence) of a mark on a form by sensing reflected
infra-red light. The software in the reader interprets the marks into meaningful
characters which can be passed to the computer for storage and analysis.
Advantages
Sensitivity can be altered to allow for different surfaces and pencils and
inks.
Has a better recognition rate than OCR.
Can be prepared where the data originates, without machines.
Errors are easily corrected.
Disadvantages
Mark readers are relatively slow.
Verification of marked data is difficult.
Document reader will have to be reprogrammed for each new document
design.
Another well- known document reader is the MICR. This one recognizes characters
formed from magnetic ink. Characters are printed in ink containing iron oxide. When the
document is passed in the reader the ink is magnetized so that the magnetic pattern
formed by the characters can be identified. There are three MICR fonts:
51
E13b
CMC7
E13B
This font was developed in the United States for the America Banks Association,
and has been adopted by British banks. Each character is made as unique as
possible, in order to avoid misinterpretation. Magnetic ink characters can be
overwritten with ordinary ink without affecting their reliability for interpretation by
the reader/sorter. If any attempt is made to alter a magnetic ink character the
subsequent mutilation is detected when the character is being interpretation by the
reader/sorter. The E13B repertoire consists of ten numeric characters, 0- 9, and four
symbols to signify the meaning of fields.
This font is the continental standard, and although the characters are encoded in
magnetic ink their structure is altogether different from E13B. The characters are
formed from a ‗gapped font‘ code, consisting of seven vertical bars. Each character
is identified by the format of the bars, which create a six- bit code. Each bar is
separated by a gap; a wide gap equals 1 and a narrow gap equals 0. The magnetic
ink character reader recognizes each character by the variable distance between the
vertical bars.
52
The function of the MICR device is as noted to read and recognize the characters at
the bottom of the cheque. Once the details of the customers, branch and amount are
known they can be used by the computer to update the individual bank accounts.
The vast number of cheques which banks have to handle requires the use of some
sort of document reading device. MICR devices can read up to 2500 cheques per
minute.
Advantages of MICR
Cheques may be roughly handled, folded, smeared, and stamped, but they
can still be read with a high degree of accuracy.
Processing is speeded because checks can be fed directly
into
the input device.
People can easily read the magnetic ink character.
Disadvantages
Only the 10 digits and the 4 special characters needed for bank processing
are
used.
No alphabetic characters are available.
53
Activity 2
……………………………………………………………………………………………….
………………………………………………………………………………………………
……………………………………………………………………………………………….
The optical readers use ……………………….to sense the document content while the
magnetic readers use the ……………………………to sense the document characters
that have been written using……………………………………………………………….
As we finish with document readers the next set of devices will be quite different.
2.4.1.3.1 Mouse
54
Figure 2: Mouse
What is the difference between the mouse and the track ball?
2.4.1.3.4 Joysticks
Another pointing device that we discuss is the Joystick. This is a handheld device
used for playing computer games. A joystick is an alternative to a mouse. They have
proved more popular for computer games than they have for serious applications.
The joystick can be moved left, right, up or down to move the cursor and also has a
button used like that on the mouse. The movement of the joystick is detected by
cause electrical contacts to be made.
55
Figure 5: Joystick
2.4.1.3.6 T o u c h Screens
A touch screen is a screen through which data can be entered into a computer just
by touching it with a finger. Items are selected just as they would be with a mouse
pointer or light pen. The touch screen can display a series of menus and displays
through which options can be selected.
56
2.4.1.4 Voice Input Systems
A microphone or telephone is used to convert human speech into electric signals. The
signal patterns are then transmitted to a computer where they are compared to a
‗dictionary‘ of patterns that have been previously placed in storage. When a closed
match is found, a word is
‗recognized‘ and the computer then produces the appropriate output. Most voice
recognition system is speaker- dependent. That is, they can‘t be used until after the
speaker has repeated a word several times to ‗train‘ the system to recognize his or
her particular voice pattern. Recently, however, speaker-independent systems have
been developed that can recognize words spoken by anyone. In the meantime,
vocabularies of all current systems are limited, users must speak distinctly, and they
must pause between each word or each short phrase. In one experiment, the words
recognize speech‘ were interpreted as ‗wreck a nice beach‘ by the computer.
Although speech recognition is in its infancy, it is being used in situations where a
person‘s hands are busy, where a worker‘s eyes must remain fixed on a display or
measuring instrument, or when telephone input is desirable.
2.4.1.5 Digitizer
This is a device that can be moved over a drawing or images to convert the picture
to digital data, which can then be stored in a displayed on a CRT screen, or printed
out of paper.
Figure 7: Digitize
2.4.1.6 Scanners
Scanners consist of two components. First a data capturing subsystem illuminates
the documents so that the image can be recorded. Then an image processing
subsystem uses sophisticated software to convert the optical images into digital
form and store the data in a file. Unfortunately, scanners often make errors that
require manual correction. So the data files invaluably require some editing at a
CAD terminal.
57
Scanners are of two types:
Hand held device which is moved across the picture being scanned
Flatbed scanner where the picture is laid flat and the image captured
Figure 8: Scanner
Activity 3
58
Early Personal Computers were not much large than a thumbnail. Processors such
as Intel Pentium 4 are considerably large.
59
2.4.2.1.1 Control Unit
As we start this discussion we might say that the Control Unit is the major part of
the CPU. The control unit essentially governs all the computer activities and
monitors the execution of programs. It coordinates and controls the computer
system much as the brain directs the body. The control unit executes program
instruction to be fetched from main memory via the MDR and placed into the IR.
When main memory storage receives an appropriate signal from the control unit it
transfers the instruction, whose address is specified in the MAR, into the processor‘s
MDR via the data bus. The control unit interprets the instruction in the IR and
causes the instruction to be executed by sending command signals to the
appropriate hardware devices. E.g., it might cause main storage to transfer data in
the MDR or it might cause the ALU to perform some operation on data registers.
The cycle is then repeated with the next instruction being fetched.
It is responsible for performing all arithmetic, e.g., add, subtract, multiply and
divide etc. It performs all ‗logical‘ operations e.g. testing whether two data
items match.
Data items to be processed are taken from the main storage, as directed by the
control unit, and pass via the MDR into the data registers (accumulators) in the
ALU, where they are stored. This step is referred as ‗loading‘ data into the data
register from the main storage. It should be noted that at this point the location
address of this data will have been specified in the IR, from where they will have
been transferred to the MAR prior to loading the data. The ALU then performs the
required operation(s) on the data (e.g. adding) as directed by the control unit. The
ALU leaves the result in a data register. While the ALU is carrying out an operation
it may make use of other registers of its own such as the ‗OPERAND’ and ‘RESULT’
registers. For example, it may build up a result in the RESULT register before
sending the complete result to a designated data register. The results are taken from
data registers and placed in main memory, again under the direction of the control
unit. This step is referred as ‘storing’ data.
60
Memory of the Computer
Memory or storage capacity is one of the important components of a computer.
Any storage unit of a computer system is classified on the basis of the following
criteria:
Access time: This is the time required to locate and retrieve stored data from the
storage unit in response to program instructions.
Storage capacity: It is the amount of data that can be stored in the storage unit.
Cost per bit of storage.
Units of memory: The computer stores a character in the storage cells with binary
(0,1) mechanism. Thus the basic unit of memory is a bit (binary digit – 0,1). To store
a character, a computer requires 8 bits or 1 byte. This is called the ― word length‖ of
the storage unit. Hence the storage capacity of the computer is measured in the
number of words it can store and is expressed in terms of bytes. The different units
of measurement are:
1) 8 Bits = 1 Byte
2) 210 (or) 1024 Bytes = 1 Kilo Byte (KB)
3) 210 (or)1024 KB = 1 Mega Byte (MB)
4) 210 (or)1024 MB = 1 Giga Byte (GB)
The storage capacity of the CPU is called primary storage unit. Over the years, the
storage unit has been called main storage, internal storage, primary storage, or
memory. Primary storage provides the capacity to store software in the form of
operation system, application programs and utility routines, etc. in addition, the
data input for processing is stored in the memory as the results of processing until
they are output either to backing storage or to an output device such as a printer or
VDU. Next we discuss the types of primary storage.
They are:
Core storage
Semiconductor memory (MOS)
Core storage: We go back a little bit to understand the history of core storage. During
the 15 years between 1960 and 1975 the dominant computer design used tiny rings or
cores of magnetizable material in the primary storage section. Current
61
flowing in one direction produced a 0-bit state. Since the core permanently retained
its magnetic state in the absence of current, it was a non-volatile storage medium.
Core storage was popular for 15 years because it was safe, durable and reasonably
fast. But the new storage devices that appeared in the 1970‘s offered even faster
performance at a lower cost, and so the popularity of the cores quickly faded.
Semiconductor memory: Now this one is different. Virtually all computers made
today use semiconductor elements in their primary storage sections. It is produced
from silicon chips and is based on two types of technologies i.e. the faster and more
expensive bipolar semiconductors chip and slower and less expensive metal-oxide
semiconductor (MOS) chips. There are two types of semiconductor memory:
Random Access Memory (RAM): This is the first type of semiconductor memory. These
are referred as random access memory (RAM) chips because any of the locations on a
chip can be randomly selected and used to directly store and retrieve data and
instructions. This type of memory can be both read, to retrieve information, and written
into, to store information. RAM chips may be classified as dynamic or
static.
The storage cell circuit‘s dynamic RAM chips contain:
Transistor that acts in much the same way as a mechanical on-off switch.
Capacitor that‘s capable of storing an electric charge.
Depending on the switch action of the transistor, the capacitor either contains no
charge (0 bit) or does hold a charge (1 bit). Since the charge on the capacitor tends to
‗leak off‘ provision is made to periodically ‗regenerate‘ or refresh the storage charge.
A dynamic RAM thus provides volatile storage. That is, the data stored are lost in
the event of a power failure.
Static RAM chips are also volatile storage device but as they are supplied with
power, they require no special regenerator circuits to retain the stored data. In real
sense the contents of the static RAM remain stable forever, as long as power is
available.
62
Activity 4
In discussion groups of three learners list the differences between the Static and
Dynamic RAM.
A ROM is a read only memory that can only be produced by the manufacturer. The
contents of ROM are physically fixed and cannot be accessed to alter them as can be
done with RAM. Micro programs control instructions that cause the machine to
perform certain operations are usually stored in ROM. The contents of ROM are not
destroyed when the computer is switched off as ROM is non-volatile because its
contents have been burnt in during manufacturer ROM also stores the operating
system.
These are variations of ROM i.e. PROM stands for ‗programmable read-only
memory‘. Whereas ordinary ROM is pre-programmed at the factory, PROM can be
programmed by the user. A special device is required for putting the ‗bit‘ pattern
into a PROM chip; this is called a PROM programmer.
This is further variation of ROM, which stands for ‗erasable programmable read-
only memory‘. When data is recorded on this type of memory it is in effect the same
as ordinary ROM in its behaviour but if the user requires to change the contents of
the chip an ultraviolet light is used to revert all the cells to ‗1s‘. New data or
programs can be then be written on the chip.
63
EEPROM (electrically erasable programmable read-only memory) is user-modifiable
read- only memory (ROM) that can be erased and reprogrammed (written to)
repeatedly through the application of higher than normal electrical voltage. Unlike
EPROM chips, EEPROMs do not need to be removed from the computer to be modified.
However, an EEPROM chip has to be erased and reprogrammed in its entirety, not
selectively. It also has a limited life - that is, the number of times it can be
reprogrammed is limited to tens or hundreds of thousands of times. In an EEPROM that
is frequently reprogrammed while the computer is in use, the life of the EEPROM can be
an important design consideration.
2.4.2.2 Registers
To understand how the above components (i.e. control unit and ALU) of the CPU
works first we need to first understand registers which are special-purpose
temporary-storage locations within the processor or and other devices within the
computer system. They are quite separate from the location in main storage,
although they can be similar in structure.
64
Memory Address Register (MAR)
Prior to each transfer between the processor‘s MDR and main storage‘s MBR the
exact source or destination of the data in the main storage must be specified. This is
done by loading the appropriate location address into the MAR. Main memory
receives this address information through the address bus. It also receives control
signals from the processor via the control bus which is able to decode into commands
for it to save or retrieve data.
Another important register is the DBR on which I/O units connected to the
processor via a bus also have these registers which serve a similar purpose to the
MBR.
This are constructed so that the contents can be accessed and altered much faster
than the contents of locations of main memory.
This is the first register you encounter in the processor where the next executable
instruction is first taken from main memory via the MDR and placed. Once in the IR
the instruction can be rapidly decoded and executed.
Note: that the IR is also sometimes called the Current Instruction Register
(CIR).
65
Status Register (SR)
This is used by the control unit as a means of detecting conditions which have
occurred such as the ALU detecting the arithmetic error of diving by zero. Primary
components of the processor will now be considered in detail.
The data in the hologram is effectively ‗smeared‘ over the whole of the plate. A
degree of redundancy is built into the system so that dust and scratches on the
emulsion have little effect on the recorded information.
Data in the reconstructed image is arranged as an array of dots-one dot for each ‗bit‘.
Information may be read out by directing a laser beam on the hologram so that the
reconstructed image falls on to a photodiode array on a silicon chip. At present the
main limitations is that information on a holographic store is generally fixed and is
presently of value for storing large amounts of fixed information such as machine
instructions.
66
2.4.2.6 Buses
Let us now look at a different item used in processing called a computer bus. A
computer processor consists of four types of ‗bus‘: address, data, control and
peripheral. A bus is a channel or pathway for the processor to another, including
transferring data from the internal memory to the arithmetic unit. Buses also
provided the channels for:
After knowing these factors above it‘s important for us to discuss each bus on its
own and what it does.
67
2.4.2.6.4 Peripheral Channel
These facilitate the connection of the devices.
What is a computer bus? List three types of computer buses and explain their
function.
After dealing mainly with devices that concentrate on converting data into
information for ease of use let us now move further to a new section that will enable
the user to communicate with the computer by giving them results called the output
devices.
2.4.3.1 Printers
This is an important output device besides the monitor. Generally, the printers fall
into two categories. Printers can be classified by whether they print a character, a
line or a page at a time.
Character printers
Prints serially (one character at a time) much like a typewriter. As a result, speeds
are very slow (from 10 to 150 characters per second). They are relatively cheap and
are commonly found in small business systems. When a keyboard device has a
character printer attached it is called a teletype (or teletypewriter). The keyboard
acts as the input medium, the printer as the output device.
68
Line printers
Are much faster devices which print a line at a time. Some are capable of printing
up to 3000 lines per minutes. They are accordingly more expensive.
Page printers
Impact printers
Require the hitting of inked ribbon against paper (like ordinary typewriter), impact
printers are noisy in operation.
Such as laser printers use different technology such as ink spray, heat, xerography
or laser to form printed copy, i.e. characters are not formed by mechanical impact.
69
Printers can be classified by the quality of print they produce as below
These are impact character printers that provide character prints in terms of dots.
They print characters as in array of points or dots. The quality of print varies
according to the number of dots that make up a character. However, it is a slow
printer.
It‘s the oldest kind, of printer, which is an impact printer, works like a typewriter
where a piece of metal or plastic with a raised letter strikes an inked ribbon against
a sheet of paper leaving an image of the letter on the paper.
A printer offers NLQ is one that provides a quality of print that is near (but not
quite) as good as a typed letter. Additionally, printers can be classified in terms of
speed. The basic types of printers will now be explained in details.
There are two basic types of impact character printer: dot matrix and moving print
head (ball or wheel).
Dot matrix
Printers print pattern of dots in the shape of the desired character. Speed of up to
around 165 characters per second (C.P.S). Are possible but the print quality may
be low. However, some dot matrix printers have NLQ print.
70
Ball printer
Uses a rotating and / pivoting ball as a print head. The printing characters are on
the surface of the ball which strikes a ribbon to transfer the character on to the paper
(e.g. IBM golf-ball electric typewriter).
Use a wheel as a print head with the characters forming a band around the
circumference of the print wheel. To print a character, the wheel is rotated and a
hammer strikes the back side of the spoke and presses it against the paper.
Daisywheel
Some ball and wheel printers can print left to right on the next thus increasing the
effective print speed. They print at relatively slow speeds (typically 10-50 c.p.s.).
But produce good- quality print, i.e. ‗full‘ letter quality characters.
71
A dot matrix printer and a graph plotter could both be used by a shop that designs
and sells fitted kitchens t o produce t h e kitchen plans on different paper sizes and
using colour. Explain which one would be better in the situation.
These are printers that use other means to create an image. Ink-jet printers for
example use tiny nozzles to spray droplets of ink onto the page, while laser printers
work like photocopiers, using heat to bond microscopic particles of dry toner to
specific parts of the page. There are various types of non- impact printers;
Thermal printers
Creates print images on special heat sensitive paper by use heated wires in the
print head and they operate at speeds of 160 c.p.s.
Inkjet printers
These printers use the concept of spraying ink onto the paper. Fire ink on to paper
by using an electrostatic field. No special paper is needed and the print quality can
be good, but it is not possible to produce multiple copies and they can be unreliable.
72
Line printers
There are two main types of impact line printer: print characters are mounted on a
moving chain or belt or engraved on the face of a rotating drum. Typical line printer
speeds range from 200 to 3000 lines per minute. Multiple copies can easily be
produced and characters are of ‗letter-quality‘.
The main non- impact line printer is the electrostatic printer. This places electrostatic
charges in the shape of the required characters on a special sensitive paper. They are
not common in business operations.
Magnetic printer
A magnetic printer operates much like the electrostatic printer except that the
magnetic charges are placed on a belt rather than on a sensitized paper. Magnetic
printers are much slower than electrostatic printers (up to 200 lines per minute) but
do not require a special paper.
Page printers
Page printers are non-impact, very high speed printers capable of printing a page at
a time. They can be:
Is a printer that uses electrostatic charges? The characters are created using tiny dots
(200 to the inch) giving a high quality which does not look like matrix printing. The
document outline is coded and stored for printing with the data when ready.
Letterheads and logos can be created electro statically using chargeable metal
cylinders; pre-printed stationery can also be handled.
73
Xerographic printers
It‘s a printer that has an in-built processing power of production of multiple copies
is possible. These are an adaptation of the Xerox office copier. (Xerography is the
process of electrostatic printing or dry photography in which negatively charged
powder is sprinkled on an appositively charged surface.
Laser printers
These are probably the most advanced printers and use a laser beam to produce
character images on the surface of a rotating drum. A toner that adheres to the light
images is then transferred to paper. Some laser printers are running at speed
equivalent to 21000 1.p.m.so they are needed only in large volume applications e.g.
mailing shots, price lists in major companies.
2.4.3.2 Plotters
A plotter (or graph-plotter) is a device for producing graphical output on paper. It
converts digital computer output into illustrations such as graphs, bar charts, pie
charts, maps or technical drawings. A digital plotter works by converting digital
coordinates (rather like map reference) into pen movements. Alternatively, an
incremental plotter sends signals to tell the pen how far to move from its present
position.
Plotters are not always directly connected to the computer (they are off-+line)
because pen output is fairly slow, thus wasting computer time. Rather, a program
magnetic tape. The tape can then be run later by a small processor (reader) which
will control the specialized plotter system. There are two types of plotter:
74
Flatbed plotter
This is fixed, flat table or bed on which the writing pen can move over the paper: up (to
move without drawing), down (to draw) and in north, south, west, east directions.
A drum plotter
Here a roll of paper, mounted on a drum, can be moved back and forth whilst the
pen moves across the paper. A combination of drum and pen movements allows a
line3 to be drawn anywhere on the paper.
Having looked at the plotters that give output in hard copy let us now look at
output devices that give out softcopy as a form of output.
2.4.3.3 Monitors
Monitors, commonly called as Visual Display Unit VDU, are the main output device
of a computer. It forms images from tiny dots, called pixels that are arranged in a
rectangular form. The sharpness of the image depends upon the number of pixels. It
is similar to TV screen- either a monochrome (black & white) or color – and it
displays the output. It is also referred as Visual Display Unit (VDU). Several types of
monitors are in use. Some of them are Color Graphic Adapter (CGA), Enhanced
Graphics Adaptor (EGA), Video Graphics Adapter (VGA) and Super Video
Graphics Adapter (SVGA). The screen sizes differ from system to system. The
standard size is 24 lines
75
by 80 characters. Most systems have provision for scrolling which helps in moving
the text vertically or horizontally on the screen.
Large in size
High power consumption
76
The flat-panel display is divided into two categories:
Emissive Displays- The emissive displays are devices that convert electrical energy
into light . Example is plasma panel and LED Light – Emitting Diodes.
Activity 6
77
Hard copy and Soft copy
Having looked at output devices it’s important to have some form of storage for
the data and programs either temporarily when the program is running or long
term to preserve the programs and data using backing storage.
There is more room in storage than in memory, just as there is more room in a file
cabinet than there is on top of a table. Contents are retained in storage when the
computer is turned off, whereas programs or the data in memory disappear when
you shut down the computer. Storage devices operate much slower than memory
chips, but storage is cheaper than memory.
We now look at the types, there are two main types of computer storage: magnetic
and optical. They are covered in the following sections.
78
Advantages of backing storage
It is cheaper to store in secondary devices like magnetic media than in a filing
cabinet or in the main memory.
There is more capacity in secondary storage than in primary storage. You
people or from hazards.
Data stored in secondary storage is safe from tapering by unauthorized
people or from hazards.
They facilitate easy movement of data stored electronically.
Physical characteristics
Plastic base coated with metal oxide film, Data recorded as magnetized spots- each
one representing a binary digit, Standard width- 1.72cm. –though size varies
between0.86cm (cassette) and 2.54 (high capacity), Standard reel- 720m in length, but
again sizes vary.
Recording on tape
Data are recorded in binary coded decimal (BCD) format. The most common
forms of coding are:
7-track ASCII. The American Standard Code for Information Interchange which
consists of a 7-bit coded character plus a parity bit.
79
9-track EBCDIC. The extended Binary Coded Decimal Interchange Code has 8 bits
(four zone bits and four numeric bits) plus a parity bit. The tape width is divided
into series of Tracks (or channels) – usually 7 or 9.A character is recorded across the
tracks. In a row called a frame.
Rate of reading
The rate at which data can be read from tape is called the transfer rate which
depends on the recording density and tape speed. For example, a tape with 1600
bpcm density and speed of 125 centimeters per second has a transfer rate of:
1600*125= 200 000 bytes per second.
This is known as the instantaneous transfer rate- the actual average transfer rate
would be less because of the inter block gaps.
Speed –The transfer rate (typically) 50 000 -100 000 or more characters per second
is quite adequate for many applications.
Capacity- A standard reel can hold 10 million or more characters depending on the
blocking factor. Thus tapes can be used for large files or for dumping from disk
files.
80
Tape must be stored in a suitable environment where humidity, temperature
and dust are tightly controlled; otherwise read errors, etc. occur.
Tape has a limited shelf life (about 2 years) for reliable results and is therefore
not suitable for long – term storage of historical files.
Physical Characteristics
81
Data are recorded on surface in the form of magnetized spots. The presence
or absence of spot denotes binary 1 or 0.
The surface of the disk is divided into tracks; which is in turn
divided into sectors.
The recording density is greater towards the middle of the disk so that all
tracks contain the same amount of data.
The disk pack can be loaded into a disk drive for reading and writing The
capacity of a disk pack is of the order of several hundred gigabytes. Reading and
writing to disk
Data reading and writing is done by read/write heads similar to those
used in a tape recorder. There is usually one head for each disk surface.
Access arms position these heads in the desired locations. The heads do not
actually touch the surface of the disk- they ‗float‘ above it.
When the access arms are moved across all the read/ write heads are moved
together so that each is positioned over the same track of each recording surface.
The set of tracks under the heads form a vertical cylinder and if related
records are stored on the same cylinder, they can be accessed without moving the
access assembly. This is called the cylinder concept.
A record may be accessed directly by specifying the cylinder, track and
sector number.
Disk capacity
Disk capacity depends on:
82
Advantages
Data can be accessed directly- there is no need to search through
other records. Sequential processing is possible if needed.
Very high capacity at a low cost (per character stored). Disk packs are
convenient to handle and store. Currently the most popular storage method in
business.
Disadvantages
Disk drives and disks are more expensive than tape drives and
tapes,
respectively.
Slower than newer ‗forms‘ of storage, e.g. magnetic bubble.
Can be unreliable – susceptible to dust, static electricity, head crashes, etc. Uses
Most business situations particularly useful in on –line enquiry/response systems,
where direct access is essential e.g. reservation/booking systems.
All the other storage devices we have been discussing were using magnetic
technology, now we focus on devices that use light.
83
information in the form of microscopic pits. These are read by another laser which
converts the pattern of pits into a digital message. The storage capacity is vast- up to
1 gigabyte (1 GB, i.e. 1 billion characters) has been quoted. Tracks on an optical disk
can be packed very closely together. The latter is known as compact disk read only
memory (CD-ROM) and a typical storage capacity is 700 Mb of user data.
Advantages
Disadvantages
Costly hardware for reading: Expensive to produce master disk Little
software, often of poor quality
Late development of standard sizes and formats (but CD-ROMs have an
agreed standard).
Temporary read/record only. It is still problems to write to disks. Even
harder is erasing and re-recording (although storage capacity is so great that
erasing is not all that important).
For this reasons, optical disks will not be replacing existing storage media just yet.
The next step- making optical disks read and write – is still at the experimental
stage.
CDs have much higher recording density than conventional magnetic disks. CDs
come in two variations:
84
2.4.4.1.4.2 CD – R (Recordable)/ CD – WORM (Write once read many)
It holds data that is permanent (No overwriting). They hold data that is not likely
to change in the future. Once data is written onto the surface of the worm disk, it
cannot be changed.
In ‗bubble memories‘ data is stored as tiny magnetic domains (the bubbles) which
continually circulate past read- write heads. Some materials in natural form are
magnetized and Application of bias field results into magnet bubbles. The presence
of a bubble can represent a bit. Application of drive field, a bubble generator, bubble
detector, bubble annihilator constitutes the bubble memory.
85
continues to improve at such a pace that a solid state devices have not yet made a
breakthrough.
Flash drive: It is a small, portable device that can be used to store, access and
transfer data. Due to its small size, it is commonly called Pen drive. It is also called
USB drive. We can read, write, copy, delete, and move data from computer to pen
drive or pen drive to computer. It comes in various storage capacities of 2GB, 4GB,
8GB etc. It is popular because it is easy to use and small enough to be carried in a
pocket. This device is plugged into the USB port of the computer and the computer
automatically detects this device
Summary
In this topic you have learnt the computer system is. In defining the computer
system, we had to look at the four parts. We then followed this up by looking at the
computer hardware and classifying the various parts in details
In topic 3, we will discuss the computer software, that is, procedures or programs
that enable the user to use the computer hardware. We will also look at how the
various groups of computer software work to help the user work well on their tasks
on the computer. But before you go topic 3, let us see how well you have
understood topic 2.
86
Self-check
Scoreboard
Marks Remarks
25–30 Excellent
20–25 Very Good
15–20 Good
10–15 Fair
0- 10 Go through the topic again
Further Reading
87
TOPIC THREE
In the previous topic we learned about the computer system but put emphasis
on the computer hardware, it is now important for us to have an in depth look
at the other side of the computer system, that is the inside of the computer also
known as the computer software. This topic introduces you the programs or
procedures that coordinate the computer hardware to enable the user achieve
their objective or perform a task on the computer called the computer software.
The topic has four sections namely:
Objectives
88
• Explain Ready-made software versus tailor made software
Activity 1
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………
89
Classification of software
Software
Operating system
Translators
Assemblers
Utility programs
90
Now let us discuss each on its own and get to see what they entail:
GUI: The system can be operated with mouse and keyboard. Ex: Windows 95,
Windows XP, etc.
Operating systems provide a software platform on top of which other programs, called
application programs can run. The application programs must be written to run on top
of a particular operating system.
Application
Operating System
Hardware
91
The System Platform
Disk Operating System (DOS): It was developed as early as 1980 by Bill Gates
Microsoft. It is suited for personal computers. Dos are a single user and single task
operating system WINDOWS: It works with DOS and it supports single user and
multitask system. It requires a powerful PC with a minimum RAM of 8 MB for early
windows 3.1UNIX AND XENIX: It is suited for multi-user and multi-task system.
Mac OS: Macintosh, a product of apple, has its own operating system with GUI and
WIMP features.
UNIX/LINUX: these are operating systems that were originally created with a
command line interface, but recently added GUI enhancements.
The question that baffles many people is: is there need for an operating system? To
answer this question let us tackle the section below
The operating system is a suite of programs that takes over the operation of the
computer to the extent of being able to allow a number of programs run on the
computer without human intervention by an operator.
Over many years the increased processing speeds of the processor and its massive
problem solving. Capability brought about the need for more sophisticated modes of
operating computers Problems encountered on the early generations were:
Set –up time: Required as each job was put onto the machine and during which time
the computer was completely idle. For example, changing tape real on tape units,
changing stationery on a printer, etc.
Manual intervention: This was necessary in order to investigate error conditions and to
initiate corrective action. Again the machine would lie idle when this was being done.
92
Imbalance between processor and peripherals: This meant that the central processor
was lying idle for ―long‖ period for long period of time during the operations of
peripheral units
What is required is a super controller to ensure that facilities are used to optimum
advantage. It becomes clear that the job could only be under taken by some form of
internally stored program. This became known as an operating system.
Activity 3
What is the full meaning of the abbreviation GUI?
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
Armed with this knowledge on how the operating system evolved let us now discuss
the functions of the operating system.
All operating systems must have ability to load programmes (jobs) into the memory
and start them running; more complex operating systems have to allocate CPU time,
93
memory and I/O (input/output) resources to different processes
running concurrently.
The OS accepts commands from the operator and responds to them. This is usually via
the console keyboard. Apart from the operator‘s job loading and unloading
peripherals the operator also has the responsibility of dealing with errors missed by
operating systems, and in the event of operating system failure the operator must re-
establish it. The operator can key in responses to prompts from the system and also
key in commands available in the command language.
This is one function of the executive. When an interrupt occurs control is passed to the
executive, which determines the cause of the interrupt and transfers control to the
most appropriate error routines. Sources of some interrupts are listed here.
This has usually the highest priority. The OS saves vital information using the dying
power supply so that it can be restarted when power return.
When the arithmetic and logic unit detects that an error has taken place it generates a
signal that causes an interrupt, e.g., overflow or underflow may cause an error signal,
or output may be requested to a non-existent device. Control is passed to executive,
which initiates the appropriate error routines. Control will be returned to the program
once corrective action has been taken and error messages are printed, or in the case of
a fatal error that cannot be corrected the program will be suspended permanently.
94
(g) Hardware malfunction (e.g., parity errors)
The I/O control for each device and its associated hardware normally takes care of
parity checking. If a parity error is detected the executive is notified by an interrupt,
and so on.
This are caused by events such as the operator pressing an interrupt key in the console
or caused by signals from other processes in a multi-processor machine.
Little can be done about the errors in jobs that are the result of programming faults,
apart from providing information as to the type of fault. The operating system should
be able to handle errors that occur as part of normal operating activity however. For
example, if data is lost during transfer because of late service of an interrupt, a routine
should be available to recover the data by setting up the read process again.
‗Dumping‘ the contents of files from time in case of future loss, e.g. disk files may be
transferred to tape and then stored off-line.
95
Program A
Partition B
Program B
Partition C
Program C
Memory partitioning
The O/s supervises the loading and running of one program at a time, and the input
and output of data from and to peripheral devices.
Multiprocessing
In large systems, one computer system may have more than one processor, but may
still share or some of the same memory.
Multiprogramming
This means that two or more programs are being run concurrently. The O/s has to
allocate resources to each program, allowing each one a small amount of processor
time before moving on to the next one. There are many different types of
multiprogramming systems.
Multi-user system
96
Batch system
Where there are few facilities for a multi-user, interactive computing, but nevertheless
several batch jobs may be processed simultaneously in order to, optimize the computer
resources.
Multitasking
System which could be, for example, a single user stand-alone microcomputer running
an O/s such as UNIX, OS/2 or windows 3.1, which allows programs to be running
simultaneously. When the term is applied to mini or mainframe computers, it implies
the concurrent execution of two or more related tasks between which communication
is possible. put in another way, multitasking is taking place when a single job is broken
down into stages called tasks which can
be simultaneously executed.
The operating system defines the type of processing that a computer system is
able to perform, since it controls the allocation and use of the computer resources.
There are different types of operating systems according to the number of users it can
support, the number of tasks it can perform simultaneously and the user interface.
The majority of small microcomputer- based systems have monitors, which allow a
single user to operate the machine in an interactive conversational mode but normally
only allows one user program to be in main storage and processed at a time, ie, there is
no multiprogramming of user programs.
There are a number of well-established operating systems that fall into this category.
Apart from those operating systems are specific to particular manufacturers
machines there are some that are available on a wide range of different machines.
97
Examples: CP/M (control program for microcomputers) produced by digital
research and MSDOS produced by Microsoft.
These are systems that provide multiprogramming of batch programs but have few
facilities for interaction or multi-access. Many commercial computer systems in use
during the 1960s and early 1970s were of this type.
The majority of operating systems fall into this category, but there is a wide range of
complexity in such systems.
Real-time systems
The operating system has to cater for the type of real-time being used. The three types
are given here in order of increasingly fast response time.
A more complex multi-access time sharing system where each user has a largely
independent choice of system facilities, e.g. each using a different language.
Commercial real-time systems in which there is essentially one job, such as handling
booking, and multi-access user has clerical rather than programming function. These
systems often make use of extensive data bases.
98
used in microprocessor-based instruments and monitoring devices, e.g. the control
system in a service station petrol pump or in domestic washing machine.
3.1.1.2 Translators
Computers can understand instructions only when they are written in their own
language – the machine language. Therefore, a program written in any other language
should be translated into machine language. The software that ―translates‖ the
instructions of different languages is known as translators. There are two types of
translators; compilers and Interpreters
A Compiler checks the entire user – written program (known as the source program) and
if it is error free, produces a complete program in machine language (known as object
program). The source program is retained for possible modifications and corrections and
the object program is loaded into the computer for execution. If the source program
contains errors, the compilers produce a list of errors at the end of the execution of the
program. i.e. a compiler translates the whole program before execution.
An interpreter does a similar job but in a different style. The interpreter translates one
statement at a time and if it is error – free, executes. This continues till the last
statement. Thus an interpreter translates or executes the first instruction before it goes
to the second, while a compiler translates the whole program before execution.
The major difference between compiler and interpreter is, error correction is very much
simpler in the case of interpreter as it translates the statements in stages. The compiler
produces an error list of the entire program at the end. Interpreter takes more time for
the execution of the program compared to compilers as it translates one statement at a
time
3.1.1.3 Assemblers
An assembler is used to generate machines code (object code) from assembly language
source text (source code). The assembler normally needs to reed thee text twice in
order to accomplish this task. It is then known as a ‗two pass assembler‘
On the first pass, the assembler generates a symbol table which is stored in RAM. This
table is used to equate each symbolic address (label) with an absolute address (which
is usually not the address at which the program is finally loaded for execution) on the
99
second pass; the assembler generates the machine code (object code) for each
instruction.
Various assembler directives can be included within the source code. These pseudo-
mnemonics are not translated into object code but are recognized by the assembler
during the assembly process. Their purpose is to allow the user to modify, in some
way, the object code produced
3.1.1.4.1 Editors
An editor allows the user to create a text file in a form which may be easily modified.
Editors are available in two forms: simple line editors (which only permit operations on
a single line of text at a time), and full screen editors (which permit full cursor control
over the whole screen). There are two types of editors; Line editors and Screen editors
During compilation and assembly, symbolic labels are normally used to represent
address. Programs can thus be made locatable (i.e. they can be loaded anywhere in
unreserved RAM). The final stage in the process involves replacing all symbolic
100
address with the absolute addresses to be used for final execution. This is achieved
with the aid of a loader.
3.1.1.4.3 Debuggers
Debuggers provide a means of testing programs interactively during run time.
Common features include:
As we look at the other software it’s important to remember that there can be
software that is written to solve a specific problem. Such software is called
application software.
101
suit of programs performing a variety of tasks e.g. word processing for producing
documents, database for storing, retrieving and manipulating data and various
calculations on spreadsheets. General purpose programs are as discussed below;
102
graphics, sound, and movies can e a s i l y b e i n c l u d e d i n t h e p r e s e n t a t i o n .
An added feature is that the slide show may be enhanced by inclusion of handouts
with two to six slides printed on a page. The page maybe organized to provide space
for notes to be written in by the audience as the presentation ensues. An example of
this is Power Point. Preparation of the software is simplified by the use of 'wizards'
that w a l k the user through the creation of the presentation.
This software permits the user to prepare documents by using both word-processing
devices and graphics. Desktop publishing software uses word-processing software,
with all its ease of entering and revising data, and supplements it with sophisticated
visual features that stem from graphics software. For example, one can enhance a
printed message with virtually any kind of illustration, such as drawings, paintings,
and photographs. Examples of Desktop publishing software is Page Maker, Corel
Draw, and Ms Publisher
Multimedia applications: for creating video and music. It also allows users to create
image, audio, video etc. Example: Real Player, Media Player etc.
NB: Nowadays most of the general purpose software is being sold as complete
software suites such as Microsoft office or Lotus Smart Suite. These suites offer four
or more software products packaged together at a much lower price than buying the
packages separately.
103
compromises that are built into ‗Off the Shelf‘ software. The software can be
developed to do exactly what the client requires, no need to accept the compromises of
‗Off-the-Shelf‘ software applications. Bespoke software can be based on your current
working methods, thereby using terminology your staffs are already familiar with,
thereby reducing training times. They are developed for given purpose e.g. Payroll
system, stock control system etc.
The developed software solutions could validate user input, thereby ensuring the data
in your system is as accurate as possible and is able to produce reliable trusted
outputs. Bespoke software is adaptable, as your business evolves so can the software,
building on your original investment, rather than starting over from scratch.
This means you can start by developing a bespoke software application that covers
one area of your business, and expand this later to cover other areas.
Often there are Off-the-Shelf software solutions that achieve many of the requirements
of individual companies, however there will normally be areas of operation that
require the company to work differently, tailoring their business to the software
available, rather than tailoring the software to their real business requirements.
Sometimes a good compromise can be achieved w h e r e a b e s p o k e s o l u t i o n i s
u s e d to ‗glue‘ together different ‗Off-the-Shelf‘ applications, however this is never
the same as having a fully bespoke software solution developed from the ground up.
The Bespoke s office based applications could run on PCs powered by Microsoft
operating systems, such as Windows XP, Windows Vista and Windows 7. Web Based
Applications can be assessed by different types of computers such as Apple
computers, tablet devices, Smartphone‘s.
The office based applications, can be developed using many programming languages
and technologies. The database applications are usually based on Microsoft Access;
these applications are developed as information system so that you, as the end user do
104
not have to deal with any of the day to day operations of the underlying Access
database. Clear user interfaces are provided that offer basic functionality.
Assembly Languages: It uses mnemonic codes rather than numeric codes (as in
machine languages). Ex. Add or A is used as a symbol for addition. It requires
translators to convert into machine language. Like machine language, writing program
in assembly language is also time consuming. These are also machine dependent.
Referred to as second generation.
High Level Languages (HLL): These are referred as problem oriented languages (POL).
These are referred as third generation languages. The advantages of these languages are
the high level languages are convenient for writing programs as they can be written
without any codes. These languages follow rules like ―English‖ language. Because of their
English like nature, less time is required to write a program. They are machine
independent. A program written in any HLL can be run on computers of different types
without any modifications. Several High Level Languages which are in common use:
105
COBOL: Common Business Oriented Language
BASIC: Beginner‗s All-purpose Symbolic Instruction Code
PROLOG: PROgramming in LOGic
ALGOL: Algorithmic Language
JAVA
C
C++
In this topic you have learnt that the ingredient that enables a computer to perform
specific tasks is the computer software and that these are just sets of instructions that
tell the machines physical components what to do. In defining the computer
software, we saw that it falls into two major categories. In topic 4, we will discuss
data processing modes. But before you go topic 4, let us see how well you have
understood topic 3.
Self-check
(a) Stock Control (b) Word Processing ( c) Internet software (d) Presentation
106
(a) Ms Word (b) Ms Access (c) Outlook (d) Ms QuickBooks
4. Which of the software below would assist a secretary in preparing report for an
annual general meeting?
5. Whichofthesoftwarebelowwouldassistasalesmaninrecordingdailysales for
different items for which he needs totals among other analysis?
(a) Ms Word (b) Ms Access (c) Outlook (d) Ms Excel
6. State and explain any four functions of the operating system ( 8 marks)
7. Give any five distinguishing features between machine and assembly language
(5 Marks)
8. What factors would you consider when buying a computer software? (7 marks)
Scoreboard
Marks Remarks
25–30 Excellent
20–25 Very Good
15–20 Good
10–15 Fair
0- 10 Go through the topic again
107
Further Reading
Learning Outcomes
You have now completed topic Three, the learning outcomes are listed below;
Check (√) the column which reflects your understanding of the various concepts about
writing.
If you have checked the ―not sure‖ column, please go back and study that section in
the topic before proceeding.
If you are ―sure‖ then you are ready for the next topic.
108
TOPIC FOUR
DATA PROCESSING
Introduction
Having learned about what a computer software is as well as its classifications, it is now
important for us to have a glimpse how a computer carries out data processing. This
topic introduces you to data processing modes. The way data is collected and processed
depends on the processing mode it is subject to. This chapter will examine batch, online,
real-time, distributed, offline, timesharing, and multitasking data processing. The topic
has seven sections namely: Batch, online, real-time, distributed, offline, timesharing and
multitasking
Objectives
Activity 1
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
109
………....
Topic Overview
You will notice that in order to respond to the above question, you have to have known
what data and what processing are. However there a lot of modes of data processing
and in this topic we shall discuss each data processing modes mentioned above so as
to help you understand them.
Processing
110
Data processing cycle refers to the sequence of activities involved in data transformation
from its raw form to get information. After defining data processing let us look at the
data processing modes one by one:
Activity 2
…………………………………………………………………………………………………..
……………………………………………………………………………………………………
4.2.1 Advantages
The unit cost of processing is low
Does not require special hardware and software
Has enhanced system security because any time updating occurs
new files are created.
Simple to develop and maintain
111
Figure 4: Batch Processing
4.2.2 Disadvantages
Random inquires cannot be made to the system
Errors are reported late; this is because some time is taken before processing
Provides information that is always out of date at processing
It always produces either unwanted information orb not enough information.
112
Figure 5: Time Sharing
4.3.1 Advantages
It reduces the CPU idle time
Provides several high level languages for programming
Costs are spread to many users
Provides direct access to a computer file which is always held online
Supports many users
The information output is fast
113
4.3.2 Disadvantages
Require large storage capacity
It is expensive to install
Requires a powerful computer and a powerful operation system
Controlling such a system is difficult because the passwords can be stolen.
4.4.1 Advantages
Support many users
Provide direct access to the CPU Reduces the CPU idle time
114
4.4.2 Disadvantages
This is a method where two or more computers are linked together for various users
for the same organization. These computers are usually located in various regions,
departments, and sections etc. of an organization. The computer systems are
physically remote and access to each machine is capable of carrying out local
processing for its department, section or region of the organization. It‘s also nice to
look at the advantages and disadvantages.
System failure; if one element of a system fails, processed data in the department
is not affected.
115
Has enhanced security, most of the sensitive operations are done locally
Error can easily be corrected
Lower cost
Better reliability
4.7.2 Disadvantages
Requires that the user get involved in the system hence the users
have to be trained
There are programming problems with micro and mini Computers for Schools
Kenya standard is difficult to maintain and monitor
It encourages data duplication
Require extra costs for communication equipment
Mode
The response time: time taken before a desirable response is obtained
The cost of initial installation and operation
Type of processing system anticipated whether time driven or event driven
116
Ease of development: designers/ analyst always opt for systems easier to
develop as they most cheaply to maintain.
In this topic, you have learnt that there are various data processing modes. We
examined batch, online, real-time, distributed, offline, timesharing, and multitasking
data processing. In topic 5, we will discuss Data Communication; this is transfer of
data from point to another using electronics means. We will also look at networks
and network topologies. But before you go topic 5, let us see how well you have
understood topic 4.
Self-Check
Scoreboard
Marks Remarks
25–30 Excellent
20–25 Very Good
15–20 Good
10–15 Fair
0- 10 Go through the topic again
Further Reading
Mburu, S., & Chemwa, G. (2011). Computer studies Book 1. London: Longhorn Publishers
117
Learning Outcomes
You have now completed topic four, the learning outcomes are listed below;
Check (√) the column which reflects your understanding of the various concepts about
writing.
If you have checked the ―not sure‖ column, please go back and study that section in
the topic before proceeding.
If you are ―sure‖ then you are ready for the next topic.
DATA COMMUNICATION
Introduction
In the previous topic we learned about the data processing, we also went further and
discussed the various modes of data processing. This topic introduces you to the
process of data communication which entails the transfer of the data from one point to
another. We also look in depth at networks the arrangement of computers in these
networks as well as the types of networks. The topic has five sections namely:
Introduction to data
Communication data
Communication elements
Introduction to networks
Types of networks and network topologies
Objectives
119
Activity 1
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
Topic Overview
You will notice that in order to respond to any of the above questions, you have to
have known what communication is. However, there a lot of materials on data
communication and this tend to confuse learners. However, this topic is designed to
help you understand what data communication is by covering areas of computer
networks and network topologies. Hope you will enjoy
120
from point to another using electronics means. In any communication process we have
the source, encoder, transmitter, transmission media receiver, decoder and destination.
The source of data can be sensor or human being this data has to be coded into form
that other parts of the system may understand. The data must be transformed into a
form that can be transmitted this is work of the encoder. The transmitter receives this
code message and transmits it over the media.
121
Now let us discuss each of them for a better understanding
Activity 2
At your own free time read and make notes on the two most common types of twisted
pair cables
122
a shield making the cable more resistant to electromagnetic interference than the
twisted pair cable. At high frequencies current flow is concentrated on the skin of a
cable. This means that remove the material of a wire may not affect transmission. In co
– axial cable we have an inner conducted
123
5.2.2 Un –Guided Media
After discussing at length about guided media let us now shift and focus on unguided
or wireless media. Wireless or unguided media is a type of media that is used to
transmit data from one point to another without using physical connection. In this case
transmitting antenna and receiver aerial facilitate this. This makes use of radio waves
that are transmitted over antennae and transmitted over space. This can be either via
ground wave, sky wave or space wave transmission. Satellite transmission is a form of
space transmission. A radio wave as a form of electromagnetic wave that can is
radiated out of antennae. Generally if a antennae is excited by an alternating signal, the
magnetic field will be changing direction at 180 degrees. For a magnetic wave to
change direction it has to collapse back into the antennae and requires some time to do
this. At about 15 KHz the periodic time of wave become equal to the time for magnetic
field to collapse into the antennae. Any reduction in periodic time will mean that the
magnetic field will not have collapse before the wave changes. The will result in the
collapsing field being repelled into space. A changing magnetic field generates a
changing electric field which in turn generates a changing magnetic field. These self-
generating fields referred to as electromagnetic waves, moves through space at the
speed of light.
A characteristic of any transmission media is the data transfer rate. This is expressed as
number of bits transmitted per second. The high the data rate the high the bandwidth.
Examples of wireless transmission include: microwaves, satellite radio waves and
infra-red transmission.
After understanding the transmission media let us now shift our focus onto
the communication system.
124
2) A medium that carries the message
3) The receiver (sink) who receives the message
Receiver: This receives the data from the transmission media and passes it over to the
decoder.
Decoder: Changes the received signal to form to the form it was in before encoding
before applying it to the destination.
Transmitter: This transmits the encoded signal into the appropriate medium.
Activity 3
…………………………………………………………………………………………………
…………………………………………………………………………………………………
…………………………………………………………………………………………………
5.4 Network
A network is an interconnection of computers. This interconnection leads to several
classifications of computer networks. Let us start with familiarizing ourselves with
some important terms that are normally used in networking.
125
5.4.1 Important Terms Used in Networking
(a) Internet
(b) E-Mail
E-mail stands for electronic mail. This is one of the most widely used features of
Internet. Mails are regularly used today where without the help of postage stamp we
can transfer mails anywhere in the world. With electronic mail the service is similar.
But here data is transmitted through Internet and therefore within minutes the
message reaches the destination.
126
message to and from the digital form. The main advantage of voice mail over
electronic mail is that the sender does not have to type. Voice mail also makes it easy
to include people in the firm's environment in a communication network.
(d) E-Commerce
(f) Teleconferencing
It refers to electronic meetings that involve people who are at physically different sites.
Telecommunication technology allows participants to interact with one another
without travelling to the same location.
127
After knowing the common terms in networking let us now talk about the
types of networks available.
LAN – Local area network and is the interconnection of computer with a small area
such as a University campus. It has a higher data transfer rate and less error. It‘s
usually owned by one organization.
WAN – Wide are network an interconnection of computer globally. The speed a low
and it has a higher error rate.
Explain the three most common types of computer networks in use today.
After talking about the types of networks it’s good to focus our discussion on
a new area in networking called network topologies.
128
5.4.3.1 Bus Topology
In this topology, the computers are attached to a bus shown in diagram figure below.
The bus must be terminated at end to avoid reflections. The advantages are that it
easier to a computer to the network to system. A failure of any one computer does not
bring the system down. However, a failure of cable causes the whole system to fail. It
also required a complex communication protocols to arbitrate. Any computer can send
data of the bus but must include the destination address and at no time should to
computers transmit at the same time. Carrier sense multiple access with collision
detect (CSMA/CD) is the protocol used.
Advantages
In expensive to install.
Easy to add stations.
Use less cable compared to other topologies.
Works well for small networks.
Disadvantages
129
5.4.3.2 Ring Topology
Similar to a bus network is the ring topology, in this topology rings have nodes daisy
chained, but the end of the network in a ring topology comes back around to the first
node, creating a complete circuit. Each node takes a turn sending and receiving
information through the use of a token. The token along with any data is sent from the
first node to the second node which extracts the data addressed to it and adds any data
it wishes to send. Then second node passes the token and data to the third node, etc.
until it comes back around to the first node again. Only the node with the token is
allowed to send data. All other nodes must wait for the token to come to them.
Advantages
Data packets travel at great speed
No collisions
Easier to fault find
No terminators required
Disadvantages
Requires more cable than a bus
A break in the ring will bring it down
Not as common as the bus–less devices available
130
5.4.3.3 Star Topology
Another topology worth our discussion is the star topology. In a star network, each
node is connected to a central device called a hub. The hub takes a signal that comes
from any node and passes it along to all the other nodes in the network. A hub does
not perform any type of filtering or routing of the data. A hub is a junction that joins
all the different nodes together.
Advantages
As compared to Bus topology it gives far much better performance, signals don‘t
necessarily get transmitted to all the workstations.
A sent signal reaches the intended destination after passing through no more
than 3-4 devices and 2-3 links.
Performance of the network is dependent on the capacity of central hub.
Easy to connect new nodes or devices.
In star topology new nodes can be added easily without affecting rest of the
network.
Similarly, components can also be removed easily.
Centralized management. It helps in monitoring the network.
Failure of one node or link doesn‘t affect the rest of network.
At the same time, it is easy to detect the failure and troubleshoot it.
Disadvantages
Too much dependency on central device has its own drawbacks. If it fails whole
network goes down.
131
The use of hub, a router or a switch as central device increases the overall cost of
the network.
Activity 4
……………………………………………………………………………………………………
……………………………………………………………………………………………………
Give three examples of protocols used in networking
……………………………………………………………………………………………………
……………………………………………………………………………………………………
Another topology is the mesh topology. This is the most common type of topology
used in wide area network where there are many paths between different locations.
Each computer is connected to each other resulting in it being robust but uses are a lot
of cabling and the interconnection increases rapidly with increase in number of
computers. A network setup where each computer and network device is
interconnected with one another, allowing for most transmissions to be distributed,
even if one of the connections go down. This topology is not commonly used for most
computer networks as it is difficult and expensive to have redundant connection to
every computer. However, this topology is commonly used for wireless networks.
132
Advantages of Mesh topology
Data can be transmitted from different devices simultaneously. This topology
can withstand high traffic.
Even if one of the components fails there is always an alternative present. So
data transfer doesn‘t get affected.
Expansion and modification in topology can be done without
disrupting other nodes.
2) Overall cost of this network is way too high as compared to other network
topologies.
3) Set-up and maintenance of this topology is very difficult. Even administration of
the network is tough.
133
Advantages of Tree Topology
134
Advantages
135
Disadvantages
In this topic you have learnt what Data Communication is, we went ahead to discuss
the Data communication model as well as transmission media. After this discussion
we went ahead to explore networks as well as classified the networks according to the
physical arrangement of computers.
In topic 6, we will discuss data Representation, that is, the way the data we input into
the computer is represented. We will also look at how you can easily convert data
from one system to another. But before you go topic 6, let us see how well you have
understood topic 5.
Self-Check
136
Bus topology (4mks)
Ring topology (4mks)
c). Identify and briefly explain the five components of a data communications
system. 5mks)
d). For data communications to occur, the communicating devices must be part of a
communication system made up of a combination of hardware (physical equipment)
and software (programs). The effectiveness of a data communications system depends
on four fundamental characteristics. Describe these fundamental characteristics.
(8mks)
Scoreboard
Marks Remarks
25–30 Excellent
20–25 Very Good
15–20 Good
10–15 Fair
0- 10 Go through the topic again
Further Reading
137
Learning Outcomes
You have now completed topic Five, the learning outcomes are listed below;
Check (√) the column which reflects your understanding of the various concepts about
writing.
S/No Learning Outcome Sure Not Sure
1 I can now explain what data communication is
2. I can discuss the various transmission media
3. I can identify the different types of network topologies
4. I can now discuss the various factors being used
to select network devices
If you have checked the ―not sure‖ column, please go back and study that section in
the topic before proceeding.
If you are ―sure‖ then you are ready for the next topic.
138
CHAPTER SIX
DATA REPRESENTATION
Introduction
Objectives
139
Activity 1
In your own words define data representation
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
Now try and name some number systems you know about
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
……………………………………………………………………………………………………
Topic Overview
If you are able to answer the questions above, then you have some idea on what data
representation is. It is important however to have an in depth knowledge of the
number systems that the computer system uses to store information. In this topic we
will explore these systems to help you understand.
6.1 Introduction
Computers not only process numbers, letters and special symbols but also complex
types of data such as sound and pictures. However, these complex types of data take a
lot of memory and processor time when coded in binary form. This limitation
necessitates the need to develop better ways of handling long streams of binary digits.
Higher number systems are used in computing to reduce these streams of binary to
140
manageable form. This helps to improve the processing speed and optimize memory
usage. Armed with this introduction let us venture into the number systems used by
computers.
Representing numbers
The storage and processing elements of a computer are two-state (or bi stable)
electronic devices. They are used in computers because they are quick and reliable and
take up only small amounts of space and energy. For this reason, the base two or binary
number system which uses the two digits 0 and 1 (for off and on) is suited to
computers. The binary digits are known as BITS.
141
The magnitude of a number is evaluated using three parameters
Absolute value
Place value or positional value
Base value
The absolute value is magnitude of a digit. For example, the digit 5 in the number 7458
has an absolute value of 5 according to its value in the number line.
The positional/place value of a digit in a number refers to the position of that digit in
that number, that is whether ‗tens‘, ‗hundreds‘ or ‗thousands‘.
The total value of a number is the sum of the place value of each digit making the
number. For example, the total value of the digits in the table above can be worked as
shown N10 = (7*103) + (4*102) + (5*101) + (8*100)
= (7*1000) + (4*100) + (5*10) + (8*1)
= 7000+400+50+8
= 7458
The base number of a number also known as the radix is the type of number system that
is being used. The value of any number depends on the radix.
As we continue let us deal with more examples for better
understanding We count in base (or radix) 10
Tens Units
7
+ 9
6
This simple example illustrates the most important feature of a number system: that the
value of a figure depends on its position or place. For example, the decimal number 267
really means:
267= (2*102) + (6* 101) + (7*100)
142
E.g. 01012 = 0 * 23 +1*22+0*21+1*20
= 0+4+0+1
= 510 (subscript denotes base, i.e. 10)
A decimal number may be represented in a computer by using two state devices 9 such
as semiconductors) to represent its binary equivalent. For example, the decimal number
25 could be.
Device
Position 25 24 23 22 21 20
Value (32) (16)(8)(4)(2)(1)
Code device ‗on‘ (1bit)
Device‘ off‘ (0 bit)
143
2. Octal to
Decimal E.g.1148
Place values 82 81 80
(64) (8) (1)
Octal number 1 1 4
conversion (1*64) +(1*8) +(4*1)=7610
This is fairly straightforward because 8 is the cube of 2; just remember the binary
equivalents for eight octal symbols.
Conversion table
Octal- 0 1 2 3 4 5 6 7
Binary 000 001 010 011 100 101 110 111
There is another numbers system that is important known as the hexadecimal number
system. This is a number system with a radix of 16. It uses sixteen digits ranging from 0
– 9 and the letters A – F, where A is equivalent to 10 and F is equivalent to 15 in
sequence like that. The place value for hexadecimal numbers goes up in factors of
sixteen Digits for base 10 and Base 16.
Base 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
10
144
Base 0 1 2 3 4 5 6 7 8 9 A B C D E F
16
These follows the same pattern used for binary ant octal
(a) Decimal to Hex
Convert 9110 to hex
91/16=5 remainder 11
=B16
5/16=0 remainder 5 Thus;
9110=5B16
(b) Hex to decimal
Convert 6D16 to decimal
Places values 162 161 160
(256) (16) (1)
Hex 0 6 D
Conversion (0*256) +(6*16) +(13*1)
Hex number 5 B
Binary equivalent 0101 1011
Binary to Octal
Binary 001 011 011
Octal 1 3 3
Note
145
The change from 4 bit to 3-bit binary
Convert 11110010102 to hex
First group the bit into 4s from the right and then convert.
Grouped Binary 0011 1100 1010 digits
Hex 333 C A
d)Binary fractions
Examples of binary fractions are shown below
=(0*1/2)+(0*1/4)+0*1/8)+1*1/16) =1/16=0.0625
.0001
When converting a number which has both a whole number part and fractional
part, remember to do the two parts separately.
Activity 2
On your own suggest reasons why we use the octal and hexadecimal number systems
………………………………………………………………………………………………………
……………………………………………………………………………………………………..
Having gone through the number system lets get more involved in data
representation by talking about computer arithmetic
146
6.2 Computer Arithmetic
The arithmetic and logic unit of the central processor in a computer performs all its
arithmetic by addition and shifting rather than having different units for subtraction.
147
6.2.1 Sign and Magnitude Codes
Here one bit represents the sign of the number and the other bit represents the size
(magnitude) of the number. Conventionally 1 is negative and 0 is positive. The sign bit
can be at either end of the binary number.
Example (The sign bit is underlined);
1011=-3
01110=+14
Sign and magnitude fractions have the most significant bits as the sign bits also
Binary subtraction
This has more complicated rules
0-0=0
1-0=1
1-1=0
0-1=0, borrow 1
This could be difficult were it not for simple method of subtracting called
complementation.
148
=1110 001011
The overflow bit must be added to the unit column of the sum to give right answer. This
is known as end –round or wrap –around carry.
Two Complement
Signed number are stored within a micro computer using the twos complement
Using the two complement notation the most significant bit s of each binary number is used
to indicate the sign of the number. Thus with an 8bit system each number as follows
s 6 - - - - - 0
Ms
S=0 positive number and zero
S=1 for negative numbers
For positive numbers the remaining seven digits then indicate the magnitude of the
number for example
S 26 25 24 23 22 21 20 =weighting
0 0 0 1 0 1 0 1
=+21 decimal
0 1 0 0 1 0 1 0
0 1 1 0 0 0 0 1
For negative number the remaining seven digit represent the magnitude of the number
in twos complement form to obtain the two complement of a number the complete
binary number including the sign bit- is first inverted and the resulting binary value
incremented by 1
+21=00010101
Invert
11101010
+1 increment
Therefore +21=11101011
Similarly
+74=01001010
Invert
10110110
+1 increment
Therefore
+74=10110110
Note that after the complement process the most significant bit is automatically a 1.
hence for an 8-bit system the range of possible numbers is +127 and the maximum
negative number is-128
149
It is now possible to add two binary numbers e.g. the addition of two positive number A
&B to produce sum
A=00101011=+43(dec)
] B=00110010=+50(dec)
………………..
Carry in=01000100
Carry out=00100010
A+B=01011101=+39(dec)
Providing negative numbers can be represented in their twos complement format the
addition operation may be performed and the court two complement signed result to be
obtained. This is perhaps best explained by means of an example, the first example illustrate
the addition of a negative and positive number to produce a negative result the second the
addition of a negative & a negative and positive number to produce positive result in the
third the addition of two negatives number to produce a negative result.
A=00101011=+43
B=11001110=-50
___-_________
Carry in =00010100_Cin
Carry out =00001110
_________________
A+B =11111001=-7
________________
A=11010101=-43
B =00110010=+50
_______________
Carry in=11100000
Carry out = 11110000
________________
A + B= 00000111=+7
150
Addition of 2 bit and a carry in bit
bit1 bit2 bit3 SUM carry
out
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
A =11010101=-43
B =11001110=-50
_______________
Carrying =10111000
Carryout=11011100
_______________
A + B =10100011=-93
The decimal equivalent of the negative result can readily but confirmed by performing
the complement process on the binary result.
151
The subtraction of two binary digits and the possible borrow in is therefore shown in the
table above. Bit 2 and the borrow in are first added together and the sum is then
subtracted from bit 1. If this sum is greater than bit1 then a borrow is required. This is
equivalent to two bits in binary system and is in turn added to bit before the subtraction
operation Example
A=00110010=+50
B =00101011=+43
_______________
Borrow in 00011110
Borrow out 00001111
_______________-
A –B= 00000111=+7
_________________
0*0=0
0*1=0
1*0=0
1*1=1
If begin with the most significant bit of the multiplier. We multiply each bit of the
multiplicand one bit at a time and write this result in a line. The result is a partial
product. The process is repeated sequentially until all bits of the multiplier are used. The
partial product is then added to give the final product. Example
110 MULTIPLICAND
* 101 multiplier
_______________________________
110
000 } partial product
110
___________________
11110 products
Each partial product is either an exact duplicate of the multiplicand or a line of 0s
152
a quotient bit 0). Whether a divisor a group of bit depends on whether the divisor is
greater than or equal to dividend.
Since 110 is smaller than the value of the first 3bit of the divided (11), the first quotient
bit is 1. Subtracting 110 from 111 and bringing down the next 1 from the dividend gives
011 which is smaller than 110. We drop 0 and consequently the next quotient bit is 1.
DECIMAL 39 107
153
Decimal 8-4-2-1
Digit BCD Code
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
Note that each BCD digit is a weighted code, but multiple coding is not. BCD
representation of number is inefficient as far bit usage is concerned. The reason being
that six patter 1010, 1011,1100,1101,1110 & 1111 are never used i.e. they are redundant; if
they occur then an error has occurred. The advantage of BCD code is that it is easy to
convert to decimal. Another disadvantage is that BCD arithmetic is complex.
8-4-2-1- BCD arithmetic
To add two BCD numbers, we simply add the binary number corresponding to each digit
Example
24=001001000
+13=0000 0011
____________________
37=0011 0111
3 7
A difficult arises when the sum of the two decimal is greater than 9 for in that case one of
the invalid bit patterns is produced.
E.g. 25=00100101
+38=0011 1000
_____________________
63≠010101101
It is also possible that the sum of two 4bit numbers will produce a 5bit number. For
example, 8=1000
+9=1001
____________________
17=10001
5bit, not allowed
154
We recognize in both of these cases that decimal arithmetic required the propagation of
a carry to next higher digit. In the 8-4-2-1 BCD arithmetic, we require to propagate the
carry in, addition we must correct the bit pattern. Thus the rule for BCD addition is as
follows If the sum of two BCD digits is greater than 1001, add 0110 and propagate a
carry to the next most significant sun digit.
The carry is added to the sum bit of the next most significant digit of the sum. The carry
bit is always produced automatically: if the sum bits are 5 bits, the fifth bit is the carry;
otherwise. This bit result when the sum correction is performed. In either case the sum
correction is required. Adding the carry to the next higher order digit may itself produce
a sum greater than 9, requiring that the next correction be repeated.
Example;
a) 25 0010 0101
+17+0000 0111
42 0011 1100 1100>9base 10
+0110 add 6base10
10010
+1
Propagated carry
_________________________________
0100 0010 corrected sum
b) 38 0011 1000
+48 0100 1000
______________________________
86 0111 1000 5bit sum
+1 0110 propagated carry and add 6 base 10
011 0110 corrected sum
155
This code is formed by adding the binary equivalent of decimal three to the pure binary
number. It is referred to as the Xs3 code. It has number of advantages, thus it is easy to
calculate, simple to translate into pure binary, and no number is represented by four 0s.
A feature of the excess three codes is that it is self-complementary.
When the sum of two XS3 number is 9 base 10 or less, the uncorrected sum in the xs3
code is 3base 10 greater than it should be. This is illustrated below:
Decimal Xs3
3 0110
+3 +0110
________________________________________________
1100
(Uncorrected sum)
The uncorrected Xs3 result is equivalent to 9 base 10 in excess of the correct value. To
compensate for this 3 base 10 is subtracted from the uncorrected sum. When the sum of
the two number is greater than 9 base10, the uncorrected Xs3 sum is 3 base 10 less than
its output to be. To correct the Xs3 result, 3base10 is added to the result as shown below
Decimal Xs3
1011
+9 1100
17 10111
17 + 0011
11010
The simple rule for Xs3 addition is to add 0011 base2 when a carry is generated
otherwise subtract 0011 base 2.
156
The table below gives the fifteen member of the group.
It not possible to carry out arithmetic process in the gray code it must be converted into
pure binary before carrying out mathematical operation on the data. Unit distance code is
more appropriate for position sensing operation. This is because the error can only be one
step (unit) of system e.g. the binary code can cause a large error. Consider a typical
transistor sequence for pure binary coded plate. When change is from 7 base10 to 8 base10
157
Converting Binary to Gray Code
The algorithm any bit is given by gi=bi XOR bi (+1) where is the ith bit and (l+1) is the
next bit (msb).if l=5 then gi=bi XOR bi+1 go =bi XOR bi+1 go =b2 be, gi=bi XOR b2,
go=bi bi.
Convert BCD into Decimal
Take the BCD number and divide it into groups of 4digit each starting from the least
significant bit. If the last group isn‘t composed of four digits add 0 to the left, then write
the decimal equivalent.
In case you don‘t remember the exact decimal equivalent you may treat the BCD like a
pure gray number of the digit, but this is the only true for the group of four bit not for
the whole number
Converting A Decimal Number into Its Standard BCD
Remember that each decimal digit in BCD represented by four binary bits in BCD, hence
to convert into BCD, write each digit in its equivalent BCD number remembering the
order. For example, 4 5 9
0100 0101 1001
158
When converting a number which has both a whole number part and
Activity 2
On your own suggest reasons why we use the octal and hexadecimal number
systems
……………………………………………………………………………………………………..
……………………………………………………………………………………………………..
Having gone through the number system lets get more involved in data
representation by talking about computer arithmetic
The rules for adding binary numbers are quite simple. There are only four to
remember;
0+0=0
0+1=1
159
1+0=1
1+1=10(0carry 1)
1+1=11(1 carry 1)
0*0=0
0*1=0
1*0=0
1*1=1
Example
101=510 multiplicand
010=210
multiplier
000
101
000
01010 =1010
product
1
Steps
160
Start with the most significant digit (one with the highest place value-on the left) of the
multiplier
The move to the next digit in the multiplier copying the multiplicand row, or entering
0s and then shifting one place to the right
Do this for each digit of the multiplier copying the multiplicand, or entering 0s and
then shifting one place to the right
Binary division
Negative numbers
Sign and magnitude (sm) Ones compliment (1c) Twos compliment (2c)
1011=-3
161
01110=+14
Sign and magnitude fractions have the most significant bits as the sign bits also
Binary subtraction
0-0=0
1-0=1
1-1=0
0-1=0, borrow 1
This could be difficult were it not for simple method of subtracting called
complementation.
One Compliment
The one compliment (1c) of a binary number is found by simplify reversing the same bits
(NOT gates in logic circuit terms). In 1c the bits have the same place values as binary
numbers except that the most significant bits (the left most bits) represents a negative.
162
For example, using six bits
Place -31 16 8 4 2 1
values
-13 1 1 0 0 1 0
Example; 26-15
-31 16 8 4 2 1
Store 15 0 0 1 1 1 1
Reverse bits to 11 0 00 0
Give-15
Store 26 0 1 0 1 0
=1110 001011
The overflow bit must be added to the unit column of the sum to give right
answer. This is known as end –round or wrap –around carry.
163
Two Complement
Signed number are stored within a micro-computer using the twos complement
Using the two complement notation the most significant bit s of each binary number is
used to indicate the sign of the number. Thus with an 8bit system each number as
follows
s 6 - - - - - 0
Ms
For positive numbers the remaining seven digits then indicate the magnitude of the
number for example
S 26 25 24 23
22 21 20
=weighting
0 0 0 1 0 1 0 1
=+21 decimal
0 1 0 0 1 0 1 0
0 1 1 0 0 0 0 1
164
For negative number the remaining seven digit represent the magnitude of the number
in twos complement form to obtain the two complement of a number the complete
binary number including the sign bit- is first inverted and the resulting binary value
incremented by 1
+21=00010101
Invert
11101010
+1 increment
Therefore
+21=11101011
Similarly
+74=01001010
Invert
10110110
+1 increment
Therefore
+74=10110110
Note that after the complement process the most significant bit is automatically a 1,
hence for an 8 bit system the range of possible numbers is +127 and the maximum
negative number is-128.
It is now possible to add two binary numbers e.g. the addition of two positive number
A &B to produce sum
165
A=00101011=+43(dec)
] B=00110010=+50(dec)
A+B=01011101=+39(dec)
Providing negative numbers can be represented in their twos complement format the
addition operation may be performed and the court two complement signed result to
be obtained. This is perhaps best explained by means of an example the first example
illustrates the addition of a negative and positive number to produce a negative result
the second the addition of a negative & a negative and positive number to produce
positive result in the third the addition of two negatives number to produce a negative
result
A=00101011=+43
B=11001110=-50
Carry in =00010100_Cin
A+B =11111001=-7
A=11010101=-43
B =00110010=+50
Carry in=11100000
166
A + B= 00000111=+7
A =11010101=-43
B =11001110=-50
Carrying =10111000
Carryout=11011100
A + B =10100011=-93
The decimal equivalent of the negative result can readily but confirmed by
performing the complement process on the binary result.
The subtraction of two binary number digits is perhaps best explained by considering
the subtraction of two numbers the decimal system. Consider the following example
A=4
65
167
B=-
173
BORROW=1
00
A-
B=292
When the second digit is less than or equal to the first digit the subtraction can be
performed straight away and no borrow is required *(e.g. 5 minus3). When the second digit
is greater than the first however, (6 minus 7) it is necessary to borrow a digit from the next
higher position. This is called a borrow in and in the decimal system the borrow is equal to
ten times the magnitude of the other digits in that column. The subtraction operation in
that column become (10+6)-7 which is equal to a difference of 9 with a borrow to be carried
over to the next column. This is called a borrow out and in turn must be added to the
second digit before the latter is subtracted from the first digit.
The subtraction of two binary digits and the possible borrow in is therefore shown in
the table above. Bit 2 and the borrow in are first added together and the sum is then
subtracted from bit 1. If this sum is greater than bit1 then a borrow is required. This is
equivalent to two bits in binary system and is in turn added to bit before the
subtraction operation
Example,
A=00110010=+50
B =00101011=+43
Borrow in 00011110
168
Borrow out 00001111
A –B= 00000111=+7
0*0=0
0*1=0
1*0=0
1*1=1
If begin with the most significant bit of the multiplier. We multiply each bit of the
multiplicand one bit at a time and write this result in a line. The result is a partial
product. The process is repeated sequentially until all bits of the multiplier are used.
The partial product is then added to give the final product.
Example
110
MULTIPLIC AND
*
101
multiplier
110
169
0 } partial product
110
11110 products
Example;
Divided 11110 by110
Long division
110 11
11110
-110
110
110
000
Since 110 is smaller than the value of the first 3bit of the divided (11), the first quotient bit is
1. Subtracting 110 from 111 and bringing down the next 1 from the dividend gives 011
which is smaller than 110. We drop 0 and consequently the next quotient bit is 1
170
6.3 Binary Codes
Digital data is presented, stored and transmitted in groups of binary bits. To convey
information, it‘s important to code these bits so that they can also represent numbers,
alphabet and special characters. This codes are referred to as binary codes and can be
grouped into two:
DECIMAL 39 107
8-4-2-1 BCD 0011 1001 0001 0000 0111
Note that each BCD digit is a weighted code, but multiple coding is not. BCD
representation of number is inefficient as far bit usage is concerned. The reason being
that six patter 1010,
171
1011,1100,1101,1110 & 1111 are never used i.e. they are redundant; if they occur then an
error has occurred. The advantage of BCD code is that it is easy to convert to decimal.
Another disadvantage is that BCD arithmetic is complex.
To add two BCD numbers, we simply add the binary number corresponding to each
digit
Example,
24=001001000
+13=0000 0011
37=0011 0111
3 7
A difficult arises when the sum of the two decimal is greater than 9 for in that case
one of the invalid bit patterns is produced.
E.g. 25=00100101
+38=0011 1000
63≠010101101
It is also possible that the sum of two 4bit numbers will produce a 5bit number. For
example
8=1000
+9=1001
____________________
17=10001
172
5bit, not allowed
We recognize in both of these cases that decimal arithmetic required the propagation of
a carry to next higher digit. In the 8-4-2-1 BCD arithmetic, we require to propagate the
carry in, addition we must correct the bit pattern. Thus the rule for BCD addition is as
follows
If the sum of two BCD digits is greater than 1001, add 0110 and propagate a carry to the
next most significant sun digit
The carry is added to the sum bit of the next most significant digit of the sum. The carry
bit is always produced automatically: if the sum bits are 5 bits, the fifth bit is the carry;
otherwise. This bit result when the sum correction is performed. In either case the sum
correction is required. Adding the carry to the next higher order digit may itself
produce a sum greater than 9, requiring that the next correction be repeated.
Example,
a) 25 0010 0101
+17+0000 0111
42 0011 1 1 0 0 1100>9base 10
10010 +1
Propagated carry
_________________________________
173
b) 38 0011 1000
This code is formed by adding the binary equivalent of decimal three to the pure binary
number. It is referred to as the Xs3 code. It has number of advantages, thus it is easy to
calculate, simple to translate into pure binary, and no number is represented by four 0s.
A feature of the excess three codes is that it is self-complementary.
174
Addition in excess-three code
When the sum of two XS3 number is 9 base 10 or less, the uncorrected sum in the xs3
code is
3base 10 greater than it should be. This is illustrated below
Decimal Xs3
3 0110
+3 +0110
________________________________________________
1100
(Uncorrected sum)
The uncorrected Xs3 result is equivalent to 9 base 10 in excess of the correct value. To
compensate for this 3 base 10 is subtracted from the uncorrected sum. When the sum of the
two number is greater than 9 base10, the uncorrected Xs3 sum is 3 base 10 less than its
output to be. To correct the Xs3 result, 3base10 is added to the result as shown below
Decimal Xs3
10
11
+9 1100
17 10111
17 +0011
1101
0
175
The simple rule for Xs3 addition is to add 0011 base2 when a carry is generated
otherwise subtract 0011 base 2.
The first two numbers in the gray code are 0000 and 0001, representing 0 and unity
respectively. The next two numbers are obtained by reflecting the combination, shown
dotted below and adding a‘1‘ in the next higher digit.
00:00:
00:01
00:11
00:10
176
The table below gives the fifteen member of the group.
It not possible to carry out arithmetic process in the gray code it must be converted into
pure binary before carrying out mathematical operation on the data. Unit distance code
is more appropriate for position sensing operation. This is because the error can only be
one step (unit) of system e.g. the binary code can cause a large error. Consider a typical
transistor sequence for pure binary coded plate. When change is from 7 base10 to 8
base10
177
Hence if it was a position indicated instrument instead of changing from 7 bases 10 to
8base 10 it could have momentary change from 15 base10 a pronounced error. In gray
code only digit change and hence the error can be of only one digit.
The gray code conversion algorithm gives by bi=gibi+I where bi the ith bit. The
conversion proceeds from left (l=n) to the right (l=0) ex. convert 11101100 from gray to
binary
The algorithm any bit is given by gi=bi XOR bi (+1) where is the ith bit and (l+1) is the
next bit (msb).if l=5 then gi=bi XOR bi+1 go =bi XOR bi+1 go =b2 be, gi=bi XOR b2,
go=bi bi
Take the BCD number and divide it into groups of 4digit each starting from the least
significant bit. If the last group isn‘t composed of four digits add 0 to the left, then write
the decimal equivalent.
In case you don‘t remember the exact decimal equivalent you may treat the BCD like a
pure gray number of the digit, but this is the only true for the group of four bit not for
the whole number
Remember that each decimal digit in BCD represented by four binary bits in BCD, hence to
convert into BCD, write each digit in its equivalent BCD number remembering
the order. For example, 4 5 9
178
6.3.4 Alphanumeric Codes
Digital computers handle both alphabetical and numerical data, hence the need to have
code to represent these characters, numeral and special characters. In order to transmit
a complete text in the English language the letters to be translated could be:
Codes both capital and small letters of the alphabet (52 codes). Codes for digits 0-9(10
codes)
Codes for typewriter instruction (this required for the purposes of electronic type
writer to function properly, they include but not limited to instruction such as carriage
return, linefeed, and space (3 codes).
Code for any other special character such as division, addition, subtraction, (4
multiplication codes).
2n = 74
, n log22=log10 74
From the above it can be seen that if we have to print then we require more than 6 bits.
A range of codes have to been developed for the purpose of text transmission popular
one being the ASCII teleprompter code. It makes use of the seven bits to code the
character and hence the total number of codes is128 an extra bit is added for evenly
parity checking.
However, to take care of the Japanese and Chinese code as be adopted that makes use
of 16 bits with ASCII code being a subset of the UNICODE.
179
Summary
In this topic you have learnt about data representation methods and how to represent
the data using various number systems. We have also covered the steps of converting
from one number system to another. We then concluded this topic by practicing in
computer arithmetic.
As we finish this module, let us see how well you have understood topic 6.
Self-Check
c). Convert the following binary numbers to their decimal equivalents (6marks)
d). Convert the following decimal numbers to their binary equivalents (6 marks)
e). Convert the octal numbers 3218 and 14138 to its binary equivalent (6marks)
180
f). Convert the following hexadecimal numbers into their binary equivalent (6marks)
CDFF3116 24716
Scoreboard
Marks Remarks
25–30 Excellent
20–25 Very Good
15–20 Good
10–15 Fair
0- 10 Go through the topic again
Further Reading
Tanen –baum, A.S. (1996). Computer networks. New Delhi: Prentice Hall
Mburu, S., & Chemwa, G. (2010). Computer Studies: Book 3. London: Longhorn
publishers
Learning Outcomes
You have now completed topic six, the learning outcomes are listed below;
Check (√) the column which reflects your understanding of the various concepts about
writing.
181
S/No Learning Outcome Sure Not Sure
1 I can now explain what data
representation is
2. I can discuss the various number systems
for representing data
3. I can carry out conversions of data in various
number systems
7.0 References
Abou-Nasr, M. (Ed), Lessmann, S. (ed), Stahlbock, R. (ed), Weiss, G. M. (ed) (2015). Real
World Data Mining Applications.
Benbya, H. (2015). Exploring the Design and Effects of Internal Knowledge Markets.
Bongiorno, G. (Ed), Rizzo, D. (Ed) and Vaia, G. (Ed) (2016). CIOs and the Digital
Transformation.
Kassel, S. (Ed) and Wu, B. (Ed) (2016). Software Engineering Education Going Agile.
182
Kordha T, E., Sevrani, K. and Gorica, K. (2015). Information Society Developmentthrough
ICT Market Strategies.
Mancini, D. (Ed), Dameri, R. P. (Ed) and Bonollo, E. (Ed) (2016). Agile Software
Development Teams.
Mburu, S., and Chemwa, G. (2010). Computer Studies: Book 4. London: Longhorn
publishers
Shi, Y., Zhang, L., Tian, Y. and Li, X. (2015). Intelligent Knowledge
Strang, K. (Ed) (2015). The Palgrave Handbook of Research Design in Business and
Management.
Tanen –baum, A.S. (1996). Computer Networks. New Delhi: Prentice Hall.
183
Wang, W and Parker, R. C. (2002) Office 2000 for Windows. New York: Microsoft
184
43