You are on page 1of 731

Preface

Motivation

In today's information age, computers are being used in every walk of life. They are
being used by people of all age and profession in their work and in their leisure. This new
social revolution has changed the basic concept of 'Computing'. Computing in today's
information age is no more limited to computer programmers and computer engineers. It
has become an activity of a common man. Rather than knowing how to program a
computer, most computer users simply need to understand how a computer functions and
what all it can do. Even those who need to program a computer can do their job more
effectively with a better understanding of how computers function and the capabilities
and limitations of computers. As a result, almost all academic institutions have started
offering regular courses on foundations of computing at all levels. These courses deal
with the fundamental concepts of the organization, functions, and usage of modern
computer systems. Hence we realized that a good textbook that can cover these concepts
in an orderly manner would certainly be very useful for a very wide category of students
and all types of computer users.

Motivated by these factors, we decided to do research towards the preparation of a


textbook on foundations of computing. Our primary objective was to concisely present a
clear explanation of the current state of the art in computing so that after reading and
understanding the material in this text reader will be ready to play an active role in the
computer age.

Audience

This book is intended for anyone who is interested in knowing about computers. It is
designed to meet the needs of beginners as well as advanced learners who wish to deal
with computers. More specifically, different types of audience can benefit from this book
in the following manner:
• As knowledge of computers has become important for people from all disciplines,
this book can be used by students of computer science, all disciplines of engineering,
business administration, management, general science, commerce and arts as well.
• At the undergraduate level, where an introductory course on computers is included as
a part of the curriculum, this book can be used as a textbook.
• The book can also serve as a good course material for participants of short-term
courses conducted by various training organizations.
• As the book explains the computer jargons in a simple language, it can also be used
by various types of computer users as a self-study material for obtaining a basic
understanding of the various hardware and software components of computers.
• The coverage of many advanced topics and current state of the art in computing
makes the book very useful and informative for programmers and other computer
professionals as well.
In short, this book is for everyone who is either excited about computers or interested in
knowing about computers.

Knowledge of computers is not prerequisite to follow the contents of the book. It assumes
no background in computers or computer programming.

Overview

The layout and organization of the book and its content are designed to present the
fundamental concepts of computers in an interesting, logical, and informative manner.
The book does not concentrate on any particular computer system or hardware. Instead, it
discusses, in a general setting, the organization, functions, and usage principles that are
applicable to all types of modern computer systems.

Starting with an introductory chapter, the book goes on to cover all facets of computers.
It uses the simple-to-complex and easy-to-learn approach throughout. Special attention
has been paid to remove unwanted details and to make the material comprehensive,
concise and practical. Simple and plain English has been used throughout.

All the concepts presented in the book are illustrated with suitable examples as and when
required. The book also contains numerous diagrams for better illustration. These
features will enable the readers to grasp the presented concepts easily and to use the book
effectively for self-study.

Each chapter contains a section on 'Points to Remember' that highlights the important
points covered in the chapter.

Each chapter also contains a large number of carefully designed review questions that are
meant to test the understanding of the materials presented in the chapter.

To make the text easy to read and understand, the style of presentation used throughout
the book is motivational, non-mathematical and explanatory in nature.

Contents

The book begins with an introduction to computers. Chapter 1 explains what this versatile
tool is, why it is so powerful and useful, what its limitations are, and how it has evolved
from its early days to become a powerful and useful tool for all types of users in today's
society.

Chapter 2 presents the basic organization of a computer system. It briefly explains about
the five main units present in any computer system that correspond to the five basic
operations performed by all computer systems.

Chapter 3 introduces the basic fundamentals of number system and some of the number
systems commonly used by computer professionals. Chapter 4 describes how binary
numbers are coded to represent characters in computers and some of the most commonly
used computer codes. Chapter 5 describes how the basic arithmetic operations are
performed inside the computer using binary numbers.

Chapter 6 introduces Boolean algebra, which is algebra to deal with the binary number
system. This chapter also describes logic gates, which are used for building logic circuits
used by the processors of computer systems.

Chapter 7, 8 and 9 describe the internal structure and working of the various components
of a computer system. Chapter 7 deals with the structure and working of the Central
Processing Unit (popularly known as CPU or processor) and the primary storage
(popularly known as main memory or simply memory). Chapter 8 deals with the structure
and working of the various types of secondary storage devices, and Chapter 9 deals with
the structure and working of the various types of input/output devices.

Chapter 10 provides an introduction to the software of computers. It explains why both


hardware and software are necessary for a computer to do useful job, what are the various
types of software, and how to acquire or develop software.

Chapters 11, 12, and 13 describe the various types of commonly used tools and
techniques for planning, development, implementation, and operation of software
systems. Chapter 11 deals with the commonly used tools for planning computer programs
before starting to write them. These tools help in producing correct and effective
computer programs. Chapter 12 deals with the commonly used programming languages
for writing computer programs. It differentiates between high-level and low-level
programming languages and briefly describes a number of popular high-level languages.
It also explains how to select a programming language out of the many options available
for coding an application. Chapter13 deals with the main activities of the implementation
and operation phase, which include testing and debugging of programs, complete
documentation of the system, changeover from an existing system to the new system, and
system modification and maintenance.

Chapter 14 presents the important concepts of operating systems, which is a system


software present in all computer systems. It also briefly describes a number of popular
operating systems.

Chapter 15 describes some of the most commonly used application software packages.
They are word-processing package, spreadsheet package, graphics package, and personal
assistance package.

Chapter 16 deals with business data processing. It describes the basic concepts of
database systems, and the modern concepts in database technology.

Chapter 17 presents the important concepts of data communications, computer networks,


and distributed computing systems.
Chapter 18 presents a description of the Internet. It explain what it is, how it has evolved,
what are the basic services offered by it, what are the various types of tools available to
make effective use of the Internet, what are the common uses of the Internet and how to
get connected to the Internet.

Chapter 19 deals with multimedia computing. It describes the different types of data
(text, graphics, animation, audio, and video) that modern computer systems can process
and the issues involved in processing these data types.

Chapter 20 explains how computers are classified as notebook computers, personal


computers, workstations, mainframe systems, and supercomputers. It also describes
client-server computing and explains what is a client computer and a server computer.

Acknowledgement

A book of this type naturally gained a number of ideas from previous books dealing with
the subject matter presented in this book. The authors express their thanks to all these
authors, too numerous to acknowledge individually.

We are thankful to IEEE PRESS for granting us permission to use in this book some
material from the book entitled 'Distributed Operating Systems: Concepts and Design'
written by the first author and published by IEEE PRESS.

We are thankful to Mr. R. K. Arora, Executive Director, C-DAC for granting us


permission to use the photograph of PARAM Supercomputing system in the book. We
are also thankful to Mr. R. K. Arora and Mr. S. P. Dixit of C-DAC for their continuous
encouragement and support throughout the course of this project.

We would like to thank Ms. Sushma Pawar for her support activities. Her hard work and
cheerful devotion to the project has helped us in bringing out the book in a timely
manner.
We would also like to thank Mr. Rajeev Rudrakshi for his excellent design of the cover
page.

We are also thankful to Mr. Manish Jain and other members of BPB Publications for their
support and help in publishing the work.

Finally, we would like to thank our eight years old son, Deeptansu, for his loving support
and understanding during the entire period of this long project.

P. K. Sinha
Priti Sinha

August, 2002
List of Abbreviations
4GLs Fourth-Generation Languages C-DAC Centre for Development of
Advanced
A/D Analog-to-Digital Computing
ABC Atanasoff-Berry Computer CDC Control Data Corporation
AI Artificial Intelligence CDMA Code-Division-Multiple-Access
ALGOL ALGOorithmic Language CDPD Cellular Digital Packet Data
ALU Arithmetic Logic Unit CD-ROM Compact Disk-Read Only Memory
AM Amplitude Modulation CD-R CD-Recordable
ANSI American National Standards Institute CGA Color Graphics Adapter
AOL America OnLine CISC Complex Instruction Set Computer
ASCII American Standard Code for CL Command Language
Information Interchange CLV Constant Linear Velocity
ATM Automatic Teller Machine; COBOL COmmon Business
Asynchronous Transfer Mode Oriented Language
BARC Bhabha "Atomic Research Centre CODASYL Conference On DAta SYstems
BASIC Beginners All-purpose Symbolic Languages
Instruction Code COM Computer Output Microfilm;
BCD Binary Coded Decimal Component Object Model
BIOS Basic Input Output System CPS Characters Per Second
BIPS Billions of Instructions Per Second CPU Central Processing Unit
B-ISDN Broad-band ISDN CRT Cathode-Ray Tube
BLOBs Binary Large OBjects Cscw Computer Supported Cooperative
BNA Burroughs Network Architecture Working
BOT Beginning-Of-Tape D/A Digital-to-Analog
BPI Bytes Per Inch DAB Device Address Bus
BSD Berkeley Software Distributions DAT Digital Audio Tape
BSNL Bharat Sanchar Nigam Limited DBMS DataBase Management System
CAD Computer-Aided Design DCBR Dynamic Content Based Retrieval
CAE Computer-Aided Engineering DCT Discrete Cosine Transform
CAM Computer-Aided Manufacturing DDL Data Definition Language
CASE Computer-Aided Software DDS Digital Data Storage
Engineering DEC Digital Equipment Corporation
CAV Constant Angular Velocity DES Data Encryption Standard
CBR/CBQ Content-Based Retrieval/Querying DMA Direct Memory Access
CCITT Consultative Committee for DML Data Manipulation Language
International Telephony and DNA Digital Network Architecture
Telegraphy DoD U.S. Department of Defense
DRDO Defense Research and Development HD-MAC High Definition Multiple Analog
Organization Components
DSDD Double-Sided Double Density HDTV High Definition Television
DSHD Double-Sided High Density HP Hewlett Packard
DSN Distributed Systems Network HSCSD High-Speed-Circuit-Switched-Data
DVD Digital Versatile Disk HTML HypterText Markup Language
EBCDIC Extended Binary-Coded Decimal HTTP HyperText Transport Protocol
Interchange Code -• Hz Hertz
ECA-rule Event-Condition-Action-rule I/O Input and Output
EDGE Enhanced Data-rate for Global IBG Inter-Block Gap
Evolution IBM International Business Machines
EDSAC Electronic Delay Storage Automatic IC Integrated Circuit
Calculator IDE Integrated Drive Electronics
EDVAC Electronic Discrete Variable iDEN Integrated Digital Enhanced
Network
Automatic Computer IDN Integrated Digital Networks
EEPROM Electrically EPROM IEEE Institute of Electrical and
Electronics
EGA Extended Graphics Adapter Engineers
EISA Bus Extended Industry Standard IETF Internet Engineering Task Force
Architecture Bus IMT-2000 International Mobile
ELD Electro-Luminescent Display Telecommunications 2000
ENIAC Electronic Numerical Integrator And IP Internet Protocol
Calculator IPI-3 Intelligent Peripheral Interface-
EOT End-Of-Tape Level 3
EPIC Explicitly Parallel Instruction IPV4 Internet Protocol Version 4
Computing IPV6 Internet Protocol Version 6
EPROM Erasable Programmable Read-Only IRG Inter-Record Gap
Memory ISA Instruction Set Architecture
ERNET Education and Research NETwork ISA Bus Industry Standard Architecture Bus
ESDI Enhanced Small Device Interface ISAM Indexed Sequential Access Method
ESMR Extended Specialized Mobile Radio ISDN Integrated Services Digital Network
ETSI European Telecommunications ISO International Standards
Organization
Standard Institute ISP Internet Service Provider (ISP)
FAT File Allocation Table ITU International Telecommunication
FDM Frequency-Division Multiplexing Union
FEP Front-End Processor JCL Job Control Language
FLOPS Floating Point Operations Per Second JPEG Joint Photographic Experts Group
FM Frequency Modulation KB Kilo Bytes
FMS File Management System KDD Knowledge Discovery in Databases
FORTRA FORmula TRANslation LAN Local Area Network
N
FSK Frequency Shift Keying LCD Liquid Crystal Display
FTP File Transfer Protocol LED Light-Emitting Diode
GB Giga Bytes LEO Low-Earth-Orbit
GEO Geosynchronous-Earth-Orbit LISP LISt Processing
GFLOPS Giga FLOPS LMDS Local Multipoint Distribution
System
GIGO Garbage-In-Garbage-Out LPM Lines Per Minute
GIS Geographical Information System LQ Letter Quality
GPD Gas-Plasma Display LRU Least Recently Used
GPRS General Packet Radio Service LSB Linux Standard Base
GSM Global System for Mobile LSD T Least Significant Digit
communication
TCP Transport Control Protocol VTOC Volume Table Of Contents

TCP/IP Transmission Control WAE Wireless Application Environment


Protocol/Internet Protocol WAN Wide Area Network
TD- Time-Division CDMA WAP Wireless Application Protocol
CDMA
TDM Time-Division Multiplexing W-CDMA Wideband Code-Division Multiple
TDMA Time-Division-Multiple-Access Access
TQ Typeset Quality * *• WDP Wireless Datagram Protocol
UDP User Datagram Protocol WLAN Wireless Local Area Network
ULSI Ultra Large Scale Integration WLL Wireless Local Loop
UNIVAC UNIVersal Automatic Computer WML Wireless Markup Language
UPC Universal Product Code WORM Write-Once Read Many
URL Uniform Resource Locator WSP Wireless Session Protocol
UTP Unshielded Twisted-Pair WYSIWYG What You See Is What You Get
UVEPRO Ultra Violet EPROM WTLS Wireless Transport Layer Security
M
VAN Value Added Network WTP Wireless Transaction Protocol
VCR Video Cassette Recorder WWW Word Wide Web
VDT Video Display Terminal X.400 Electronic Mail Protocol
VGA Video Graphics Array X.500 Directory Server Protocol
VLSI Very Large Scale Integration XDR external Data Representation
VOD Video-On-Demand XHTML extensible HyperText Markup
VOIP Voice Over IP Language
VSAT Very Small Aperture Terminals XML extensible Markup Language
VSNL Videsh Sanchar Nigam Limited

Chapter 1

Introduction

The word "computer" comes from the word "compute" which means to calculate. So a
computer is normally considered to be a calculating device that can perform arithmetic
operations at enormous speed.

In fact, the original objective for inventing the computer was to create a fast calculating
machine. But more than 80% of the work done by computers today is of non-
mathematical or non-numerical nature. Hence, to define a computer merely as calculating
device is to ignore over 80% of its work.

More accurately, a computer may be defined as a device that operates upon data. Data
can be anything like bio-data of various applicants when the computer is used for
recruiting personnel, or the marks obtained by various students in various subjects when
the computer is used to prepare results, or the details (name, age, sex, etc.) of various
passengers when the computer is employed for making airline or railway reservations, or
numbers of different types in case of application of computers for scientific research
problems, etc.

Thus, data comes in various shapes and sizes depending upon the type of computer
application. A computer can store, process, and retrieve data as and when desired. The
fact that computers process data is so fundamental that many people have started calling
it a data processor.

The name data processor is more inclusive because modern computers not only compute
in the usual sense but also perform other functions with the data that flow to and from
them. For example, data processors may gather data from various incoming sources,
merge (process of mixing or putting together) them all, sort (process of arranging in some
sequence - ascending or descending) them in the desired order and finally print them in
the desired format. None of these operations involve the arithmetic operations normally
associated with the computing device but the term computer is often applied anyway.

The activity of processing data using a computer is called data processing. Data
processing consists of three sub-activities: capturing the input data, manipulating the
data, and managing the output results. As used in data processing, information is data
arranged in an order and form that is useful to the people who receive it. That is,
information is relevant knowledge, produced as the output of data processing operation
and acquired by people to enhance understanding and to achieve specific purposes. Thus
data is the raw material used as input to data processing and information is the processed
data obtained as the output of data processing.

CHARACTERISTICS OF COMPUTERS

The increasing popularity of computers has proved that it is a very powerful and useful
tool. The power and usefulness of this popular tool ate mainly due to its following
characteristics:
1. Automatic. A machine is said to be automatic if it works by itself without human
intervention. Computers are automatic machines because once started on a job, they carry
on until the job is finished, normally without any human assistance. However, computers
being machines, cannot start themselves. They cannot go out and find their own
problems and solutions. They have to be instructed. That is, a computer works from a
program of coded instructions that specify exactly how a particular job is to be done.
While the job is in progress, the program is stored in the computer, and the parts of the
instructions are obeyed. As soon as one instruction is completed, the next is obeyed
automatically. Some of the other characteristics of computers such as speed and accuracy
are due to the fact that they are automatic and work on a problem without any human
intervention.

2. Speed. A computer is a very fast device. It can perform in a few seconds the amount
of work that a human being can do in an entire year - if he worked day and night and did
nothing else. To put it in a different manner, a computer does in one minute what would
take a man his entire lifetime.

While talking about the speed of a computer, we do not talk in terms of seconds or even
milliseconds (10'3). Our units of speed are the microseconds (10'6), the nanoseconds
(10'9), and even the . picoseconds (10'12). A powerful computer is capable of
performing several billion (109) simple arithmetic operations per second.

3. Accuracy. In addition to being very fast, computers are very accurate. The accuracy
of a computer is consistently high and the degree of accuracy of a particular computer
depends upon its design. But for a particular computer, each and every calculation is
performed with the same accuracy.

The electronic circuits of a computer that perform computations have no mechanical parts
to wear and malfunction, resulting in errorless operation continuously. Hence, if the input
data entering the computer are correct and if the program of instructions is reliable, then
we can expect that the computer generally will produce accurate output. Errors can occur
in a computer, but these are mainly due to human rather than technological weaknesses,
that is, due to imprecise thinking by the programmer (a person who writes instructions for
a computer to solve a particular problem) or due to incorrect input data. Computer errors
caused due to incorrect input data or unreliable programs is often referred to as garbage-
in-garbage-out or GIGO.

4. Diligence. Unlike human beings, a computer is free from monotony, tiredness, lack
of concentration, etc., and hence can work for hours together without creating any error
and without grumbling. Due to this property, computers obviously score over human
beings in doing routine type of jobs, which require great accuracy. If ten million
calculations have to be performed, a computer will perform the ten millionth calculation
with exactly the same accuracy and speed as the first one.

5. Versatility. Versatility is one of the most wonderful things about the computer. One
moment, it is preparing the results of particular examination, the next moment it is busy
preparing electricity bills, and in between, it may be helping an office secretary to trace
an important letter in seconds. All that is required to change its talent is to slip in a new
program (a sequence of instructions for the computer) into it. Briefly, a computer is
capable of performing almost any task provided that the task can be reduced to a series of
logical steps.

6. Power of Remembering. As a human being acquires new knowledge, the brain


subconsciously selects what it feels to be important and worth retaining in its memory,
and relegates unimportant details to the back of the mind or just forgets them. With
computers, that is not the case. A computer can store and recall any amount of
information because of its secondary storage (a type of detachable memory) capability.
Every piece of information can be retained as long as desired by the user and can be
recalled as and when required. Even after several years, the information recalled would
be as accurate as on the day when it was fed to the computer. A computer forgets or
looses certain information only when it is asked to do so. So it is entirely up to the user to
make a computer retain or forget a particular information.

7. No I. Q. A computer is not a magical device. It can only perform tasks that a human
being can. The difference is that it performs these tasks with unthinkable speed and
accuracy. It possesses no intelligence of its own. Its I. Q. is zero, at least till today. It
has to be told what to do and in what sequence. Hence, only the user can determine what
tasks a computer will perform. A computer cannot take its own decision in this regard.

8. No Feelings. Computers are devoid of emotions. They have no feelings and no


instincts because they are machines. Although men have succeeded in building a
memory for the computer, but no computer possesses the equivalent of a human heart and
soul. Based on our feelings, taste, knowledge, and experience, we often make certain
judgements in our day-to-day life. But computers cannot make such judgements on their
own. Their judgement is based on the instructions-given to them in the form of
programs that are written by us. They are only as good as man makes and uses them.

THE EVOLUTION OF COMPUTERS

Necessity is the mother of invention. The saying holds true for computers also because
computers were invented as a result of man's search for fast and accurate calculating
devices.

The earliest device that qualifies as a digital computer is the "abacus" also known as
"soroban". This device (shown in Figure 1.1) permits the users to represent numbers by
the position of beads on a rack. Simple addition and subtraction can be carried out rapidly
and efficiently by positioning the beads appropriately. Although, the abacus was invented
around 600 B.C., it is interesting to note that it is still used in the Far East and its users
can calculate at amazing speeds.

Another manual calculating device was John Napier's bone or cardboard multiplication
calculator, designed in the early 17th century and its upgraded versions were in use even
around 1890.

The first mechanical adding machine was invented by Blaise Pascal in 1642. Later, in the
year 1671, Baron Gottfried Wilhelm von Leibniz of Germany invented the first calculator
for multiplication. Keyboard machines originated in the United States around 1880 and
are extensively used even today. Around this period only, Herman Hollerith came up
with the concept of punched cards, which were extensively used as input media in
computers even in late 1970s. Business machines and calculators made their appearance
in Europe and America towards the end of the nineteenth century.

Charles Babbage, a nineteenth century Professor at Cambridge University, is considered


to be the father of modern digital computers. During his period, mathematical and
statistical tables were prepared by a group of clerks. Even the utmost care and
precautions could not eliminate human errors. Babbage had to spend several hours
checking these tables. Soon he became dissatisfied and exasperated with this type of
monotonous job. The result was that he started thinking to build a machine, which could
compute tables guaranteed to be error-free. In this process, Babbage designed a
"Difference Engine" in the year 1822 which could produce reliable tables. In 1842,
Babbage came out with his new idea of Analytical Engine that was intended to be
completely automatic. It was to be capable of performing the basic arithmetic functions
for any mathematical problem and it was to do so at an average speed of 60 additions per
minute. Unfortunately, he was unable to produce a working model of this machine
mainly because the precision engineering required to manufacture the machine was not
available during that period. However, his efforts established a number of principles,
which have been shown to be fundamental to the design of any digital computer. In order
to have a better idea of the evolution of computers, let us now briefly discuss about some
of the well-known early computers. These are as follows:

1. The Mark I Computer (1937-44). Also known as Automatic Sequence Controlled


calculator, this was the first fully automatic calculating machine designed by Howard A.
Aiken of Harvard University in collaboration with IBM (International Business
Machines) Corporation. Its design was based on the techniques already developed for
punched card machinery.

Although this machine proved to be extremely reliable, it was very complex in design
and huge in size. It used over 3000 electrically actuated switches to control its operations
and was approximately 50 feet long and 8 feet high. It was capable of performing five
basic arithmetic operations: addition, subtraction, multiplication, division and table
reference. A number as big as 23 decimal digits could be used in this machine. It took
approximately 0.3 second to add two numbers and 4.5 seconds for multiplication of two
numbers. Hence, the machine was very slow as compared to today's computers.

It was basically an electro-mechanical device since both mechanical and electronic


components were used in its design. Although its operations were not controlled
electronically, Aiken's machine is often classified as computer because its instructions,
which were entered by means pf punched paper tape, could be altered.

2. The Atanasoff-Berry Computer (1939-42). This electronic machine w is


developed by Dr. John Atanasoff to solve certain mathematical equations. It was called
the Atanasoff-Berry Computer, or ABC, after its inventor's name and his assistant,
Clifford Berry. It used 45 vacuum tubes for internal logic and capacitors for storage.

3. The ENIAC (1943-46). The Electronic Numerical Integrator And Calculator


(ENIAC) was the first' all electronic computer. It was constructed at the Moore School of
Engineering of the University of Pennsylvania, U.S.A. by a design team led by Professors
J. Presper Eckert and John Mauchly.
ENIAC was developed as a result of military need. It took up the wall space in a 20 x 40
square feet room and used 18,000 vacuum tubes. The addition of two numbers was
achieved in 200 microseconds, and multiplication in 2000 microseconds.

Although, much faster in speed as compared to Mark I computer, ENIAC had two major
shortcomings: it could store and manipulate only a very limited amount of information,
and its programs were wired on boards. These limitations made it difficult to detect errors
and to change the programs. Hence, its use was limited. However, whatever be the
shortcomings of ENIAC, it represented an impressive feat of electronic engineering and
was used for many years to solve ballistic problems.

4. The EDVAC (1946-52). The operation of ENIAC was seriously handicapped by the
wiring board. This problem was later overcome by the new concept of "stored program"
developed by Dr. John Von Neumann. The basic idea behind the stored program concept
is that a sequence of instructions as well as data can be stored in the memory of the
computer for the purpose of automatically directing the flow of operations. The stored
program feature considerably influenced the development of modern digital computers
and because of this feature we often refer to modern digital computers as stored program
digital computers. The Electronic Discrete Variable Automatic Computer (EDVAC)
was designed on stored program concept. Von Neumann has also got a share of the credit
for introducing the idea of storing both instructions and data in the binary form (a system
that uses only two digits - 0 & 1 to represent all characters) instead of the decimal
numbers or human readable words.

5. The EDSAC (1947-49). Almost simultaneously with EDVAC of U.S.A., the


Britishers developed the Electronic Delay Storage Automatic Calculator (EDSAC). The
machine executed its first program in May 1949. In this machine, addition operation was
accomplished in 1500 microseconds, and multiplication operation in 4000 microseconds.
The machine was developed by a group of scientists headed by Professor Maurice
Wilkes at the Cambridge University Mathematical Laboratory.

6. Manchester Mark I (1948). This computer was a small experimental machine


based on the stored program concept. It was designed at Manchester University by a
group of scientists headed by Professor M. H. A. Newman. Its storage capacity was only
32 words, each of 31 binary digits. This was too limited to store data and instructions.
Hence, the Manchester Mark I was hardly of any practical use.

7. The UNIVAC I (1951). The Universal Automatic Computer (UNIVAC) was the
first digital computer, which was not "one of a kind". Many UNIVAC machines were
produced, the first of which was installed in the Census Bureau in 1951 and was used
continuously for 10 years. The first business use of a computer, a UNIVAC I, was by
General Electric Corporation in 1954.

In 1952, the International Business Machines (IBM) Corporation introduced the 701
commercial computer. In rapid succession, improved models of the UNIVAC I and other
700-series machines were introduced. In 1953, IBM produced the IBM-650 and sold over
1000 of these computers.

The commercially available digital computers, that could be used for business and
scientific applications, had arrived.

THE COMPUTER GENERATIONS

"Generation" in computer talk is a step in technology. It provides a framework for the


growth of the computer industry. Originally, the term "generation" was used to
distinguish between varying hardware technologies. But nowadays, it has been extended
to include both the hardware and the software, which together make up an entire
computer system.

The custom of referring to the computer era in terms of generations came into wide use
only after 1964. There are totally five computer generations known till today. Each
generation has been discussed below in detail along with their, identifying characteristics.
Although there is a certain amount of overlapping between the generations, the
approximate dates shown against each are normally accepted.

During the description of the various computer generations, you will come across several
terminologies and computer jargons, which you might not be aware of and may not be
able to understand properly. Please do not worry about it because the idea here is to just
give you an overview of the major developments and technologies during the five
generations of computers. These developments and technologies will be described in
greater detail in subsequent chapters. And remember that the objective of this book is
also the same - to introduce you to the various concepts about computers. Hence you will
have a better understanding of the terminologies introduced in this section only after you
have completed reading this entire book. The objective of this section is mainly to
provide an overview of what all you are going to learn in this entire book.

First Generation (1942-1955)

We have already discussed about some of the early computers - ENIAC, EDVAC,
EDSAC, UNIVAC I, and IBM 701. These machines and others of their time were built
by using thousands of vacuum tubes. A vacuum tube [see Figure 1.2(a)] was a fragile
glass device that used filaments as a source of electrons and could control and amplify
electronic signals. It was the only high-speed electronic switching device available in
those days. These vacuum tube computers could perform computations in milliseconds
and were referred to as first-generation computers.

We also saw that the concept of stored program and the idea of storing both instructions
and data in the binary form were introduced in 1946. Hence most of the first-generation
computers worked on the principle of storing program instructions along with the data in
the memory of the computer so that they could automatically execute a program without
human intervention. The memory of these computers was constructed using
electromagnetic relays and all data and instructions were fed into the system from
punched cards. Of course, the instructions were written in machine and assembly
languages because high-level programming languages were introduced much later
(computer languages are covered in Chapter 12). Even assembly language was invented
in early fifties, so the first-generation computers of 1940s were programmed in machine
language only. Only the first-generation computers introduced later such as UNIVAC I
and IBM 701 could be programmed in assembly language. Because machine and
assembly languages are very difficult to work with, only a few specialists understood
how to program these early computers. Moreover, the concept of operating system
(discussed in Chapter 14) was also not there during the era of first-generation computers.
Hence, the first-generation computers were largely usable only by good electronics
engineers who understood the logical structure of a computer in great detail and also
knew machine and assembly language programming.

The characteristic features of first-generation computers are as follows:


1. They were the fastest calculating devices of their time.
2. They were too bulky in size requiring large rooms for installation.
3. Thousands of vacuum tubes that were used emitted large amount of heat and burnt
out frequently. Hence the rooms/areas in which these computers were located had to be
properly airconditioned.
4. Each vacuum tube consumed about half a watt of power. Since a computer typically
used more than ten thousand vacuum tubes, the power consumption of these computers
was very high.
5. As vacuum tubes used filaments, they had a limited life. Since thousands of vacuum
tubes were used in making one computer, these computers were prone to frequent
hardware failures, their mean time between failures being as low as an hour.
6. Due to such low mean time between failures, these computers required almost
constant maintenance.
7. In these computers, thousands of individual components had to be assembled
manually by hand into functioning circuits. Hence commercial production of these
computers was difficult and costly.
8. Since these computers were difficult to program and use, they had limited
commercial use.

Second Generation (1955-1964)

A new electronic switching device called transistor [see Figure 1.2(b)] was invented at
Bell Laboratories in 1947 by John Bardeen, Willian Shockley, and Walter Brattain.
Transistors soon proved to be a much better electronic switching device than the vacuum
tubes due to their following properties:

1. They were more rugged and easier to handle than tubes since they were made of
germanium semiconductor material rather than glass.
2. They were highly reliable as compared to tubes since they had no part like a
filament, which could burn out.
3. They could switch much faster (almost ten times faster) than tubes. Hence switching
circuits made of transistors could operate much faster than their counterparts made of
tubes.
4. They consume almost one-tenth the power consumed by a tube.
5. They were much smaller in size than a tube.
6. They were less expensive to produce.
7. They dissipated much less heat as compared to vacuum tubes.

The second-generation computers were manufactured using transistors instead of vacuum


tubes. Due to the properties of transistors listed above, the second-generation computers
were more powerful, more reliable, less expensive, smaller, and cooler to operate than the
first-generation computers. The second generation also experienced a change in storage
technology. The memory of the second-generation computers was composed of magnetic
cores. Magnetic cores were small rings made of ferrite which could be magnetized in
either clockwise or anti-clockwise direction. Several magnetic cores were strung on a
mesh of wires to construct large random access memories having storage capacity of few
tens of kilo bytes.

In 1957, magnetic tape was introduced as a faster and more convenient secondary storage
medium. At that time, a single tape could hold the contents of approximately 1000
punched cards. Later magnetic disk storage was also developed, and magnetic disk and
magnetic tape were the main secondary storage media used in second-generation
computers, although punched" cards were still popular and widely used for preparing
programs and data to be fed to the computer.

On the software front, the second generation saw the emergence of high-level
programming languages and batch operating systems. High-level programming languages
like FORTRAN, COBOL, ALGOL and SNOBOL were developed during the second
generation period, which were much easier for people to understand and work with than
assembly or machine languages. Hence second-generation computers were easier to
program and use than first-generation computers. The introduction of batch operating
system allowed multiple jobs to be batched together and submitted at a time, and
automatic transition from one job to another as soon as the former job finished. This
concept helped in reducing human intervention while processing multiple jobs, resulting
in faster processing, enhanced thoughput, and easier operation of second-generation
computers.

The second generation also saw an increase in the type of computer applications. The
first-generation computers were mainly used for scientific computations. But in the
second generation an increasing usage of computers was seen in business and industry for
commercial data processing applications like payroll, inventory control, marketing, and
production planning.

The ease of use of second-generation computers also gave birth to the new profession of
programmers and systems analysts in computing, which is more oriented towards usage
rather than design of computers. This also triggered the introduction of computer science
related courses in several colleges and universities.

The characteristic features of second-generation computers are as follows:


1. They were more than ten times faster than the first-generation computers. They were
able to reduce computation times from milliseconds to microseconds.
2. They were much smaller in size than first-generation computers, requiring smaller
space for installation.
3. Although the heat dissipation was much less than first-generation computers, still the
rooms/areas in which the second-generation computers were located had to be properly
airconditioned.
4. They consumed much less power than the first-generation computers.
5. They were much more reliable and less prone to hardware failures than the first-
generation computers.
6. They had faster and larger primary and secondary storage devices as compared to
first-generation computers.
7. They were much easier to program and use than the first-generation computers.
Hence they had wider commercial use.
8. In these computers, thousands of individual transistors had to be assembled manually
by hand into functioning circuits. Hence commercial production of these computers was
difficult and costly.
(a) A Vacuum Tube
(b) A Transistor
(c) An lC Chip

Third Generation (1964-1975)


Advances in electronics technology continued and in 1958, Jack St. Clair Kilby and
Robert Noyce invented the first integrated circuit. Integrated circuits (called ICs) are
circuits consisting of several electronic components like transistors, resistors, and
capacitors grown on a single chip of silicon eliminating wired interconnection between
components. The IC technology was also known as "microelectronics" technology
because it made it possible to integrate larger number of circuit components into very
small (less than 5 mm square) surface of silicon known as "chip" [see Figure 1.2(c)].
Initially, the integrated circuits contained only about ten to twenty components. This
technology was named small scale integration (SSI). Later, with the advancement in
technology for manufacturing ICs, it became possible to integrate up to about hundred
components on a single chip. This technology came to be known as medium scale
integration (MSI). The third generation was characterized by computers built using
integrated circuits. The earlier ones used SSI technology and the later ones used MSI
technology. ICs were much smaller, less expensive to produce, more rugged and reliable,
faster in operation, dissipated less heat, and consumed much less power than circuits built
by wiring electronic components manually. The net result was that third-generation
computers were more powerful, more reliable, less expensive, smaller, and cooler to
operate than the second-generation computers.
Parallel advancements in storage technologies allowed the construction of larger
magnetic cores based random access memory, and larger capacity magnetic disks and
magnetic tapes. Hence the third-generation computers typically had few megabytes (less
than 5 Megabytes), of main memory and magnetic disks capable of storing few tens of
megabytes of data per disk drive.

On the software front, the third generation saw the emergence of standardization of high-
level programming languages, timesharing operating systems, unbundling of software
from hardware, and the creation of an independent software industry. During the third
generation, efforts were made to standardize some of the existing high-level
programming languages so that programs written for one computer can be easily ported
to and executed on another computer. This resulted in standardized FORTRAN and
COBOL languages known as FORTRAN IV and COBOL 68, which were standardized
by the American National Standards Institute (ANSI) in 1966 and 1968 repectively. They
were also referred to as ANSI FORTRAN and ANSI COBOL. The idea was that as long
as these standards are followed in program writing, a FORTRAN or a COBOL program
could be run on any computer with an ANSI FORTRAN or ANSI COBOL compiler (see
Chapter 12 for details). Additionally, some more high-level programming languages were
introduced during the third-generation period. Notable among these were PL/1, PASCAL
and BASIC. Unlike other high-level programming languages, which used compiler
technology, BASIC was designed to use interpreter technology (see Chapter 12 for
details).

We saw that in second-generation computers batch operating system was used. In these
systems, users had to prepare their data and programs and then submit them to the
computer centre for processing. The operator at the computer centre collected these user
jobs and fed them to the computer in batches at scheduled intervals. The output produced
for each job was then sent to the computer centre counter for being returned to the
respective users. The inevitable delay resulting from this batch processing approach was
very frustrating to some users, especially programmers because often they had to wait for
days to locate and correct a few program errors. To remedy this situation, John Kemeny
and Thomas Kurtz of Dartmouth College introduced the concept of timesharing operating
system. Timesharing operating system simultaneously allows a large number of users to
directly access and share the computing resources in such a way that each user gets the
illusion that no one else is using the computer. This is accomplished by having a large
number of independent, relatively low-speed, online terminals simultaneously connected
to the main computer. Each terminal can be used by a separate user providing him/her
direct access to the main computer. Timesharing operating system allocates CPU time in
such a way that all user programs have a brief share of the CPU time in turn. That is, each
user program is allocated a very short period of CPU time (known as a time slice) one by
one. The processing speed of the CPU allows the CPU to switch from one user job to
another in rapid succession and to execute a small portion of each job in the allocated
time slice until the job is completed. The processing speed of CPU is such that each user
gets the illusion that he/she alone is using the computer. The introduction of timesharing
concept helped in drastically improving the productivity of programmers, and also made
on-line systems feasible, resulting in new on-line applications like airline reservation
systems, interactive query systems, etc.

Till 1965, computer manufacturers sold their hardware along with all the associated
software, and did not charge separately for the software they provided to customers. For
example, buyers received language translators for all the languages that could run on the
computers they purchased. From the user's standpoint, all this software was free. But the
situation changed in 1969 when IBM and other computer manufacturers began to price
their hardware and software products separately. This unbundling of software from
hardware gave users an opportunity to invest only in software of their need and value. For
example, now buyers could purchase only the language translators they needed and not
all the language translators supported on the computers they purchased. This led to the
creation of many new software houses and the beginning of an independent software
industry.

Another important concept introduced during the third-generation period was that of
upward compatible family of computers. During this period, IBM introduced its System
360 which was conceived as a family of computers with upward compatibility. That is,
the 360s were different sizes of mainframe systems based on the same machine language.
This sharing of a single machine language enabled businesses to easily upgrade their
computers without the usual costs of replacing peripheral equipment and modifying
programs to run on new systems. That is, when a company outgrew one model it could
easily move up to the next model without worrying about converting all its existing
software.

The development and introduction of minicomputers also took place during the third-
generation period. The computers built till the early 1960s were mainframe systems,
which only very large companies could afford to purchase and use. Clearly, a need
existed for low-cost smaller computers to fill the gaps left by the bigger, faster, and
costlier mainframe systems. Several innovators recognized this need and formed new
firms in the 1960s to produce smaller computers. The first commercially available
minicomputer, the PDP-8 (Programmed Data Processor), was introduced in 1965 by
Digital Equipment Corporation (DEC). It could easily fit in the corner of a room and did
not require the attention of a full-time computer operator. It was based on timesharing
operating system and could be accessed simultaneously by a number of users from
different locations in the same building. Its cost was about one-fourth of the cost of a
traditional mainframe system, making it possible for smaller companies to afford
computers. It confirmed the tremendous demand for small computers for business and
scientific applications, and by 1971 there were more than 25 computer manufacturers
who had entered the minicomputer market.

The characteristic features of third-generation computers are as follows:


1. They were much more powerful than the second-generation computers. They were
capable of performing about l million instructions per second.
2. They were much smaller in size than second-generation computers, requiring smaller
space for installation.
3. Although the heat dissipation was much less than second-generation computers, still
the rooms/areas in which the third-generation computers were located had to be properly
air conditioned.
4. They consumed much less power than the second-generation computers.
5. They were much more reliable and less prone to hardware failures than the second-
generation computers. Hence the maintenance cost was much lower.
6. They had faster and larger primary memory and secondary storage devices as
compared to second-generation computers.
7. They were totally general-purpose machines suitable for both scientific and
commercial applications.
8. Their manufacturing did not require manual assembly of individual components into
electronic circuits, resulting in reduced human labor and cost involved at assembly stage.
Hence commercial production of these systems was easier and cheaper. However, highly
sophisticated technology and expensive setup was required for the manufacture of IC
chips.
9. Standardization of high-level programming languages allowed programs written for
one computer to be easily ported to and executed on another computer.
10. Timesharing operating system allowed interactive usage and simultaneous use of
these systems by a large number of users.
11. Timesharing operating system helped in drastically improving the productivity of
programmers cutting down the time and cost of program development by several fold.
12. Timesharing operating system also made on-line systems feasible, resulting in the
usage of these systems for new on-line applications.
13. Unbundling of software from hardware gave users of these systems an opportunity to
invest only in software of their need and value.
14. The concept of upward compatible family of computers allowed the users of these
systems to easily upgrade their system without worrying about converting all their
existing software.
15. The minicomputers of the third-generation made computers affordable even by
smaller companies.

Fourth Generation (1975-1989)

The average number of electronic components packed on a silicon chip doubled each
year after 1965. This progress soon led to the era of large scale integration (LSI) when it
was possible to integrate over 30,000 electronic components on a single chip, followed
by very large scale integration (VLSI) when it was possible to integrate about one million
electronic components on a single chip. This progress led to a dramatic development - the
creation of a microprocessor. A microprocessor contains all the circuits needed to
perform arithmetic logic and control functions, the core activities of all computers, on a
single chip. Hence it became possible to build a complete computer with a
microprocessor, a few additional primary storage chips, and other support circuitry. It
started a new social revolution - the personal computer (PC) revolution. Overnight
computers became incredibly compact. They became inexpensive 4o make and suddenly
it became possible for anyone and everyone to own a computer. During the fourth-
generation period a large number of personal computers were deployed in both offices
and homes, which changed the work culture of most organizations. By 1978, the
dominant personal computers were the Apple II from Apple Computer Inc. and the TRS-
80 model from the Radio Shack Division of Tandy Corporation. In 1980, IBM realized
that the personal computer market was too promising to ignore and came out with its own
PC in 1981, popularly known as IBM PC. Apple's and IBM's PCs became very popular
during the fourth generation. Several other manufacturers used IBM's specification and
designed their own PCs, which were popularly known as IBM compatible PCs or clones.
The IBM PC and its clones became a popular standard for the PC industry during the
fourth generation.

During the fourth generation, magnetic core memories were replaced by semiconductor
memories. This allowed computer manufacturers to provide large random access
memories with very fast access time. Typical memory sizes were of the order of 16
Megabytes with access time of 200 nano seconds. On the other hand, hard disks became
cheaper, smaller in size, and larger in capacity. Hence they became the standard in-built
secondary storage device for all types of computer systems. Typical hard disk storage
sizes in those days were of the order of few hundred of megabytes of data per disk drive.
Parallely, in addition to magnetic tapes, floppy disks became very popular as a portable
medium for porting programs and data from one computer system to another.

In addition to the proliferation of PCs, during the fourth generation, there were significant
advancements in the area of large-scale computer systems. In addition to improved
processing and storage capabilities of mainframe systems, the fourth-generation saw the
advent of supercomputers based on parallel vector processing and symmetric
multiprocessing technologies. A supercomputer based on parallel vector processing
technology contains a small number of custom-designed vector processors which are
connected to a number of high-speed data access shared memory modules through a
custom-designed, high-bandwidth crossbar switch network. On the other hand, a
supercomputer based on symmetric multiprocessing technology uses commodity
microprocessors, which are connected to a shared memory through a high-speed bus or a
crossbar switch network. Primary builders of the supercomputers of the former category
included Cray Research and ETA Systems, whereas of the latter category included IBM,
Silicon Graphics and Digital Equipment Corporation.

Another significant development during the fourth-generation period was the spread of
high-speed computer networking, which enabled multiple computers to be connected
together so that they could communicate and share data. Local area networks (LANs)
became popular for connecting several dozen or even several hundred computers within
an organization or within a campus, and wide area networks (WANs) became popular for
connecting computers located at larger distances. This gave rise to network of computers
and distributed systems.

On the software front, there were several new developments that emerged to match the
new technologies of the fourth generation. For example, several new operating systems
were developed for PCs. Notable among these were MS-DOS and MS-Windows, which
were, used on IBM PCs and its clones, and Apple's propriety OS, which was used on
Apple's PCs. Because PCs were to be used by individuals who were not computer
professionals, to make computers more user friendly (easier to use), companies
developed graphical user interfaces. A graphical user interface (GUI) provides icons
(pictures) and menus (list of choices) that users can select with a mouse. This enables
new computer users to learn to use a PC quickly. Several new PC-based applications
were also developed to make the PCs a powerful tool. Notable among these were
powerful word processing packages that allowed easy development of documents,
spreadsheet packages that allowed easy manipulation and analysis of data organized in
columns and rows, and graphics packages that allowed easy drawing of pictures and
diagrams. Another very useful concept that became popular during the fourth-generation
period was that of multiple windows on a single terminal screen. This feature allowed
users to simultaneously see the current status of several applications in separate windows
on the same terminal screen.

In the area of software for large-scale, computers, the key technologies that became
popular during the fourth-generation include multiprocessing operating systems, and
concurrent programming languages. The multiprocessing operating systems allowed
mainframe systems to be built of multiple processors (a main processor and several
subordinate processors) in such a manner that the subordinate processors could be used to
manage the user terminals and peripheral devices, allowing the main processor to
concentrate on processing the main program. This helped in improving the overall
performance of mainframe systems by several fold. The multiprocessing operating
systems were also used with the supercomputers to extract the best performance from the
large number of processors used in these systems. Concurrent programming languages
further helped in effectively using the multiprocessing capabilities of these systems by
allowing the programmers to write their applications in such a way that parts of the
application can be executed in parallel on different processors. The most ambitious
language of this type was ADA.

During the fourth-generation period, the UNIX operating system also became very
popular for use on large-scale systems. Additionally, due to the proliferation of computer
networks, several new features were included in existing operating systems to allow
multiple computers on the same network to communicate with each other and share
resources.

Some other software technologies that became popular during the fourth-generation
period are C programming language, object-oriented software design, and object-oriented
programming. C language combines the features of high-level programming languages
with the efficiency of an assembly language. It allows the programmers to directly
manipulate bits of data internal to the processor registers of the computer. As a result, C
programs run significantly faster than programs written in other high-level programming
languages, and C language can be effectively used for systems programming like design
of compilers and operating systems. The primary objectives of object-oriented software
design are to make programs generalized and to build software systems by combining
reusable pieces of program codes called objects. To facilitate object-oriented software
design, several object-oriented programming languages were introduced. Out of these,
C++ emerged as the most popular object-oriented language. It contains all the elements
of the basic C language, but has been expanded to include numerous object-oriented
programming features.

The characteristic features of fourth-generation computers are as follows:


1. The PCs were much more smaller and cheaper than the mainframes or
minicomputers of the third generation.
2. The mainframes and the supercomputers were much more powerful than the third-
generation systems.
3. Although the mainframes and the supercomputers required proper air conditioning of
the rooms/areas in which they were located, no air conditioning was required for the PCs.
4. They consumed much less power than the third-generation computers.
5. They were much more reliable and less prone to hardware failures than the third-
generation computers. Hence the maintenance cost was negligible.
6. They had faster and larger primary memory and secondary storage devices as
compared to third-generation computers.
7. They were totally general-purpose machines.
8. Their manufacturing did not require manual assembly of individual components into
electronic circuits, resulting m reduced human labor and cost involved at assembly stage.
Hence commercial production of these systems was easier and cheaper. However, highly
sophisticated technology and expensive setup was required for the manufacture of LSI
and VLSI chips.
9. Use of standard high-level programming languages allowed programs written for one
computer to be easily ported to and executed on another computer.
10. Graphical user interface (GUI) enabled new computer users to learn how to use
computers very quickly.
11. PC-based applications made the PCs a powerful tool for both office and home usage.
12. Multiprocessing coupled with concurrent programming languages allowed many new
types of complex problems to be solved on the large-scale computers within reasonable
time.
13. Network of computers enabled sharing of resources like disks, printers, etc. among
multiple computers and their users. They also enabled several new types of applications
involving interaction among computer users at geographically distant locations.
Computer Supported Cooperative Working (CSCW), or groupware is one such
application in which multiple members working on a single project and located at distant
locations cooperate with each other using a network of computers.
14. Availability of C programming language allowed these systems to be effectively
used for systems programming also like design of compilers and operating systems.
15. Object-oriented languages allowed development of reusable software modules,
which helped in rapid software development.
16. In addition to unbundled software, these systems also used unbundled or add-on
hardware feature which allowed users to invest only in the hardware configuration and
software of their need and value.
17. The PCs of the fourth-generation made computers affordable even by individuals for
their personal use at home.
Fifth Generation (1989-Present)

The trend of further miniaturization of electronic components, the dramatic increase in


the power of microprocessor chips, and the capacity of main memory and hard disk
continued in the fifth generation. The VLSI technology became ULSI (Ultra Large Scale
Integration) technology in the fifth generation resulting in the production of
microprocessor chips having ten million electronic components. In fact, the speed of
microprocessors and the size of main memory and hard disk doubled almost every
eighteen months. The result was that many of the features found in the CPUs of large
mainframe systems of the third and fourth generations became part of the microprocessor
architecture in the fifth generation. This ultimately resulted in the availability of very
powerful and compact computers becoming available at cheaper rates and the death of
traditional large mainframe systems.

Due to this fast pace of advancement in computer technology, we see more compact and
more powerful computers being introduced almost every year at more or less the same
price or even cheaper. Notable among these are portable notebook computers which give
the power of a PC to their users even while travelling, powerful desktop PCs and
workstations, powerful servers, and very powerful supercomputers (see Chapter 20 for a
detailed description of these types of computers).

Storage technology also advanced very fast making larger and larger main memory and
disk storage available in newly introduced systems. Currently, PCs having 256
Megabytes (MB) of main memory and 4 to 20 Gigabytes (GB) of hard disk capacity are
common. Similarly, workstations having 4 Gigabytes of main memory and few tens of
Gigabytes of hard disk capacity are common. Larger hard disk space (of the order of few
hundred Gigabytes) with better in-built reliability is now being supported with RAID
(Redundant Array of Inexpensive Disks) technology that allows a bunch of disks to be
configured as a single large disk. During the fifth generation, optical disks also emerged
as a popular portable mass storage media. They are more commonly known as CD-ROM
(Compact Disk - Read Only Memory) because they are mainly used for storing programs
and data that are only read (not written/modified).

In the area of large-scale systems, the fifth-generation period saw the emergence of more
powerful supercomputers based on parallel processing technology. That is, the same
multiprocessing concept of fourth generation was used to build shared memory and
distributed memory parallel computers. In a shared memory parallel computer, a number
of processors are connected to a common main memory by a high-speed bus or
communication network, whereas in a distributed memory parallel computer, a number of
processors, each with its own memory, are interconnected by a communication network.
Parallel programming technique is used in these systems to break a problem into smaller
problems and execute them parallely on the multiple processors of the system. While
working on a problem, the various processors of a shared memory parallel computer use
memory access mechanism for communication, whereas the various processors of a
distributed memory parallel computer use message passing mechanism for
communication. Distributed memory parallel computers have better scalability (can grow
larger in capability) than shared memory parallel computers, and are now also built by
clustering together powerful commodity workstations by using a high-speed commodity
switched network. This is also known as clustering technology.

During the fifth-generation period there was tremendous outgrowth of computer


networks. Communication technologies became faster day-by-day and more and more
computers got networked together. This trend resulted in the emergence and popularity of
the Internet and associated technologies and applications. The Internet made it possible
for computer users sitting across the globe to communicate with each other within
minutes by the use of electronic mail (known as e-mail) facility. A vast ocean of
information became readily available to the computer users through the World Wide Web
(known as WWW). And several new types of exciting applications like electronic
commerce, virtual libraries, virtual classrooms, distance education, etc. emerged during
the period.

The tremendous processing power and the massive storage capacity of the fifth-
generation computers also made them a very useful and popular tool for a wide range of
multimedia applications, which deal with information containing text, graphics,
animation, audio, and video data. In general, the data size for multimedia information is
much larger than plain text information because representation of graphics, animation,
audio, or video media in digital form requires much larger number of bits than that
required for representation of plain text. Because of this, multimedia computer systems
require faster processor (for more quickly processing large amount of data), larger
storage devices (for storing large data files), larger main memory (for running programs
with large data size), good graphics terminals (for displaying graphics, animation and
video), and input/output devices required to play any audio or video associated with a
multimedia application program. The availability of multimedia computer systems
resulted in a tremendous growth of multimedia applications during the fifth-generation
period.

In the area of operating systems, some of the concepts that gained popularity during the
fifth-generation period include microkernels, multithreading, and distributed operating
systems. Microkernel technology allows operating systems to be modeled and designed
in a modular fashion. This makes operating systems easier to design and implement,
easier to modify or add new services, and also allows those users who do not like a
particular service provided by the operating system to implement and use their own
service. Multhithreading technology is a popular way to improve application performance
through parallelism. In traditional operating systems the basic unit of CPU utilization is a
process, but in multithreading operating systems the basic unit of CPU utilization is a
thread- In these operating systems, a process consists of an address space containing its
instructions and data, and one or more thread sharing the same address space. Hence
creation of a new thread, switching the CPU between threads, and sharing of resources
between threads of the same process can be done more efficiently than between processes
resulting in faster execution of the process and better overall system performance. A
distributed operating system is an operating system for a set of computers networked
together whose goal is to make the multiple computers of the system appear as a single
large virtual system to its users instead of a collection of distinct machines.

Finally, in the area of programming languages, some of the concepts that gained
popularity during the fifth generation are JAVA programming language, and parallel
programming libraries like MPI (Message Passing Interface) and PVM (Parallel Virtual
Machine). JAVA is a new programming language that is primarily used on the World
Wide Web. It supports dynamic data types and dynamic protocols based on a concept
called Java-based applets. This feature of Java allows web pages to have dynamic
information and more interactivity with the users of web information. The MPI and PVM
libraries have basically been introduced to standardize message passing parallel programs
so that parallel programs developed for one message passing parallel computer can be
easily ported and executed on other message passing parallel computers.

The characteristic features of fifth-generation computers are as follows:


1. Portable PCs (called notebook computers) are much more smaller and handy than the
PCs of the fourth generation allowing users to use computing facility even while
travelling.
2. The desktop PCs and workstations are several times more powerful than the PCs of
the fourth generation.
3. The supercomputers are several times more powerful than the mainframe
systems and supercomputers of the fourth generation.
4. Although the supercomputers require proper airconditioning of the rooms/areas in
which they are located, no aidconditioning is normally required for the notebook
computers, desktop PCs, and workstations.
5. They consume much less power than their predecessors.
6. They are much more reliable and less prone to hardware failures than their
predecessors. Hence the maintenance cost is negligible.
7. Many of the large-scale systems of fifth generation have hot-pluggable feature so
that a failed component can be replaced with a new one without the need to shutdown the
system, allowing the uptime of the system to be very high.
8. They have faster and larger primary memory and secondary storage devices as
compared to their predecessors.
9. They are totally general-purpose machines.
10. Their manufacturing does not require manual assembly of individual components
into electronic circuits, resulting in reduced human labor and cost involved at assembly
stage. Hence commercial production of these systems is easier and cheaper. However,
highly sophisticated technology and expensive setup (affordable only by a few
organizations in the world) is required for the manufacture of ULSI chips.
11. Use of standard high-level programming languages and parallel programming
libraries allows programs written for one computer to be easily ported to and executed on
another computer.
12. More user-friendly interfaces with multimedia features make the systems easier to
learn and use by anyone including small children.
13. Newer and more powerful applications, including multimedia applications, make the
systems more useful in every walk of life.
14. More powerful supercomputers have allowed solving of many new types of complex
problems, which were not possible to be solved before.
15. The explosion in the size of the Internet coupled with Internet-based tools and
applications have made these systems influence the life of even common men and
women.
16. The new operating systems concepts used in building these systems have further
enhanced the performance and user-friendliness of these systems as compared to their
predecessors.
17. These systems also use the concept of unbundled software and add-on hardware,
allowing the users to invest only in the hardware configuration and software of their need
and value.
18. With so many types of computers in all price ranges, today we have a computer for
almost any type of user- whether the user is a small child or a scientist of world-fame.

Figure 1.3 summarizes the key technologies and features of the various generations of
computers discussed above.

We have looked at the history of computing divided into five generations, and we have
seen how quickly things have changed in the last few decades. But the rate of
technological progress outlined in the preceding pages is not slowing down at all. As we
enter into the 21st century, future generations of computers will evolve with higher
capability and user friendliness. In fact, the fastest-growth period in the history of
computing may be still ahead.18
1 Foundations of Computing

Generation Key hardware technologies Key software technologies Key characteristics


(Period)
First (1942- Vacuum tubes; electromagnetic
Machine and assembly Bulky in size; highly unre
1955) relay memory; punched cards
languages; stored program limited commercial
secondary storage concept; mostly scientific commercial production di
applications and costly; difficult to use
Second (1955- Transistors; magnetic cores Batch operating system; Faster, smaller, more reliabl
1964) memory; magnetic tapes and high-level programming easier to program than pre
disks secondary storage languages; scientific and generation systems; comm
commercial applications production was still difficu
costly
Third (1964- ICs with SSI and MSI Timesharing operating Faster, smaller, more re
1975) technologies; larger magnetic system; standardization of easier and cheaper to pr
cores memory; larger capacity high-level programming commercially, easier to use
disks and magnetic tapes languages; unbundling of easier to upgrade than pre
secondary storage; software from hardware generation systems; scie
minicomputers; upward commercial and interactive o
compatible family of computers applications
Fourth (1975- ICs with VLSI technology; Operating systems for PCs; Small, affordable, reliable,
1989) microprocessors; GUI; multiple windows on easy to use PCs; more pow
semiconductor memory; larger a single terminal screen; and reliable mainframe sy
capacity hard disks as in-built multiprocessing operating and supercomputers; totally g
secondary storage; magnetic systems; concurrent purpose machines; easie
tapes and floppy disks as programming languages; produce commercially; eas
portable storage media; UNIX operating system; C upgrade; rapid so
personal computers; programming language; development possible
supercomputers based on Object-oriented design and
parallel vector processing and programming; PC-based
symmetric multiprocessing applications; network-based
technologies; spread of high- applications;
speed computer networks supercomputing
applications

Generation Key hardware technologies Key software technologies Key


(Period) characteristics
Fifth (1989- ICs with ULSI technology; Microkernal-based Portable computers;
Present) larger capacity main operating systems; powerful, cheaper, reliable,
memory; larger capacity multithreading operating easier to use de
hard disks with RAID systems; distributed machines; very pow
support; optical disks as operating systems; supercomputers; very high up
portable read-only storage parallel programming due to hot-pluggable compon
media; notebook computers; libraries like MPI & PVM; totally general purpose mach
powerful desktop PCs and JAVA; World Wide Web; easier to produce commerc
workstations; powerful servers; multimedia applications; easier to upgrade; rapid soft
very powerful internet-based development possible
supercomputers; internet; applications; more complex S
cluster computing supercomputing
applications

Points to Remember

1. A computer is normally considered to be a calculative device that can perform


arithmetic operations at enormous speed. More accurately, it is defined as a device that
operates upon data. It is also known as a data processor since it not only computes in the
usual sense but also performs other functions with the data.
2. The activity of processing data using a computer is called data processing. Data is the
raw material used as input to data processing, and information is the processed data
obtained as the output of data processing. Thus, information is data afrangedln an order
and form that is useful to the people who receive it.
3. Computers are characterized by their being automatic, speed and accuracy of
computing, diligence, versatility, power of remembering, and lack of intelligence and
feelings.
4. The earliest device that qualifies as a digital computer is the "abacus" which was
invented around 600 B.C.
5. Charles Babbage is considered to be the father of modern digital computers.
6. Some of the well known early computers are the MARK I (1937-44), the
ATANASOFF-BERRY (1939-42), the ENIAC (1943-46), the ED VAC (1946-52), the
EDS AC (1947-49), the MANCHESTER MARK I (1948), and the UNIVACI (1951).
7. Dr. John Von Neumann introduced the "stored program" concept, which
considerably influenced the development of modern digital computers. Because of this
feature, we often refer to modern digital computers as stored program digital computers.
8. "Generation" in computer talk is a step in technology. It provides a framework for
the growth of the computer industry. Originally it was used to distinguish between
various hardware technologies, but now it has been extended to include both the
hardware and the software.
9. Till today, there are totally five computer generations, namely first, second, third,
fourth and fifth generation.
10. The key hardware and software technologies and the key characteristics of the
computers of the five different generations are summarized in Figure 1.3.
Questions
1. What is a computer? Why is it also known as a data processor?
2. What is data processing? What are its basic activities?
3. Differentiate between data and information. Which is more useful to the people and
why?
4. List out and explain some of the important characteristics of a computer.
5. What is meant by garbage-in-garbage-out?
6. Computers are automatic machines. Discuss.
7. Errors can occur in a computer, but these, are mainly due to human rather than
technological weaknesses. Discuss.
8. Unlike human beings, a computer is free from monotony, tiredness, and lack of
concentration. Discuss.
9. Versatility is one of the most wonderful things about the computer. Discuss.
10. Unlike human beings, a computer forgets or looses certain information only when it
is asked to do so. Discuss.
11. A computer has no intelligence of its own. Discuss.
12. Computers are devoid of emotions. Discuss.
13. Which is the earliest device that qualifies as a digital computer?
14. What is an abacus?
15. Who is known as the father of modern digital computers and why?
16. Who invented the concept of stored program? Why is this concept so important?
17. Name the first computer that was designed on the stored program concept.
18. Why are modern digital computers often referred to as stored program digital
computers?
19. Which was the first commercially produced computer? When and where was it first
installed?
20. Give the full form of the following abbreviations used in computer terminology:
IBM, ENIAC, EDVAC, EDSAC, UNIVAC.
21. What is meant by "generation" in computer terminology? How many computer
generations are there till now?
22. List out the various computer generations along with the key characteristics of the
computers of each generation.
23. List out the key hardware technologies used in building the computers of each of
the five generations.
24. List out the key software technologies used in building the computers of each of the
five generations.
25. What are the advantages of transistors over vacuum tubes?
26. What is an IC? How does it help in reducing the size of computers?
27. List out some of the advantages of IC technology over transistor technology.
28. Give the full form of the following abbreviations used in computer terminology:
GIGO, IC, SSI, MSI, LSI, VLSI, ULSI.
29. Why were first and second generation computers more difficult and costlier to
produce commercially than the computers of subsequent generations?
30. Name the technologies used for constructing main memory in the computers of
first, second, third, and fourth generations.
31. Name the secondary storage media popularly used in the computers of first, second,
third, fourth, and fifth generations.
32. Which key feature of third generation computers made them a highly productive
tool for programmers and why?
33. Why was it not possible to take a program written for one computer and run it on
some other computer in the first and second generation computers?
34. In what ways did the concept of unbundling of software from hardware affect the
computer manufacturers and the users of computers?
35. What were the new types of computer applications which emerged during each of
the following computer generations and what were the main driving technologies behind
each:
(a) Third generation
(b) Fourth generation
(c) Fifth generation
36. What is meant by upward compatible family of computers? How is this concept
useful for computer users?
37. What is a microprocessor? How did it revolutionize the computer industry?
38. Name two new types of computers which became popular during the following
computer generations:
(a) Fourth generation
(b) Fifth generation
39. Name some applications that emerged due to the emergence of computer networks.
40. What is hot-pluggable feature? How is it useful?
41. Write short notes on:
(a) First generation computers
(b) Second generation computers
(c) Third generation computers
(d) Fourth generation computers
(e) Fifth generation computers
42. Name some of the representative computer systems of each of the five computer
generations.
Chapter 2
Basic Computer Organization

Even though the size, shape, performance, reliability, and cost of computers have been
changing over the years, the basic logical structure (based on stored program concept) as
proposed by Von Neumann has not changed. No matter what shape and size of computers
we are talking about, all computer systems perform the following five basic operations
for converting raw input data into information useful to their users:

1. Inputting. The process of entering data and instructions into the computer system.

2. Storing. Saving data and instructions so that they are available for initial or for
additional processing as and when required.

3. Processing. Performing arithmetic operations (add, subtract, multiply, divide, etc.)


or logical operations (comparisons like equal to, less than, greater than, etc.) on data in
order to convert them into useful information.

4. Outputting. The process of producing useful information or results for the user,
such as a printed report or visual display.

5. Controlling. Directing the manner and sequence in which all of the above operations
are performed.

The goal of this chapter is to familiarize you with the computer system units that perform
these functions. This chapter will provide you with an overview of computer systems as
they are viewed by computer system architects.

The internal architectural design of computers differs from one system model to another.
However, the basic organization remains the same for all computer systems. A block
diagram of the basic computer organization is shown in Figure 2.1. In this figure, the
solid lines are used to indicate the flow of instruction and data, and the dotted lines
represent the control exercised by the control unit. It displays the five major building
blocks, or functional units of a digital computer system. These five units correspond to
the five basic operations performed by all computer systems. The function of each of
these units is described below.

INPUT UNIT

Data and instructions must enter the computer system before any computation can be
performed on the supplied data. This task is performed by the input unit that links the
external environment with the computer system. Data and instructions enter input units in
forms that depend upon the particular device used. For example, data are entered from a
keyboard in a manner similar to typing, and this differs from the way in which data are
entered through a scanner, which is another type of input device. However, regardless of
the form in which they receive their inputs, all input devices must provide a computer
with data that are transformed into the binary codes that the primary memory of a
computer is designed to accept. This transformation is accomplished by units called input
interfaces. Input interfaces are designed to match the unique physical or electrical
characteristics of input devices to the requirements of the computer system.

In short, the following functions are performed by an input unit:


1. It accepts (or reads) the list of instructions and data from the outside world.
2. It converts these instructions and data in computer acceptable form.
3. It supplies the converted instructions and data to the computer system for further
processing.

OUTPUT UNIT

The job of an output unit is just the reverse of that of an input unit. It supplies the
information obtained as a result of data processing to the outside world. Thus it links the
computer with the external environment. As computers work with binary code, the results
produced are also in the binary form. Hence, before supplying the results to the outside
world, it must be converted to human acceptable (readable) form. This task is
accomplished by units called output interfaces. Output interfaces are designed to match
the unique physical or electrical characteristics of output devices (terminals, printers, etc.)
to the requirements of the external environment.

In short, the following functions are performed by an output unit:


1. It accepts the results produced by the computer, which are in coded form and hence
cannot be easily understood by us.
2. It converts these coded results to human acceptable (readable) form.
3. It supplies the converted results to the outside world.
The data and instructions that are entered into the computer system through input units
have to be stored inside the computer before the actual processing starts. Similarly, the
results produced by the computer after processing must also be kept somewhere inside
the computer system before being passed on to the output units. Moreover, the
intermediate results produced by the computer must also be preserved for ongoing
processing. The storage unit of a computer system is designed to cater to all these needs.
It provides space for storing data and instructions, space for intermediate results, and also
space for the final results.

In short, the specific functions of the storage unit are to hold (store):
1. All the data to be processed and the instructions required for processing (received
from input devices).
2. Intermediate results of processing.
3. Final results of processing before these results are released to an output device.
The storage unit of all computers is comprised of the following two types of storage:

1. Primary storage. The primary storage, also known as main memory, is used to hold
pieces of program instructions and data, intermediate results of processing, and recently
produced results of processing of the job(s) that the computer system is currently working
on. These pieces of information are represented electronically in the main memory chip's
circuitry, and while it remains in the main memory, the central processing unit can access
it directly at a very fast speed. However, the primary storage can hold information only
while the computer system is on. As soon as the computer system is switched off or reset,
the information held in the primary storage disappears. Additionally, the primary storage
normally has limited storage capacity because it is very expensive. The primary storage
of modern computer systems is made up of semiconductor devices.

2. Secondary storage. The secondary storage, also known as auxiliary storage, is used to
take care of the limitations of the primary storage. That is, it is used to supplement the
limited storage capacity and the volatile characteristic of primary storage. This is because
secondary storage is much cheaper than primary storage and it can retain information
even when the computer system is switched off or reset. The secondary storage is
normally used to hold the program instructions, data, and information of those jobs on
which the computer system is not working on currently, but needs to hold them for
processing at a later time. The most commonly used secondary storage medium is the
magnetic disk.

ARITHMETIC LOGIC UNIT

The arithmetic logic unit (ALU) of a computer system is the place where the actual
execution of the instructions takes place during the processing operation. To be more
precise, calculations are performed and all comparisons (decisions) are made in the ALU.
The data and instructions, stored in the primary storage prior to processing, are
transferred as and when needed to the ALU where processing takes place. No processing
is done in the primary storage unit. Intermediate results generated in the ALU are
temporarily transferred back to the primary storage until needed at a later time. Data may
thus move from primary storage to ALU and back again to storage many times before the
processing is over. After the completion of processing, the final results, which are stored
in the storage unit, are released to an output device.

The type and number of arithmetic and logic operations that a computer can perform is
determined by the engineering design of the ALU. However, almost all ALUs are
designed to perform the four basic arithmetic operations (add, subtract, multiply, and
divide), and logic operations or comparisons such as less than, equal to, and greater than.

CONTROL UNIT

How does the input device know that it is time for it to feed data into the storage unit?
How does the ALU know what should be done with the data once they are received? And
how is it that only the final results are sent to the output device and not the intermediate
results? All this is possible because of the control unit of the computer system. By
selecting, interpreting, and seeing to the execution of the program instructions, the
control unit is able to maintain order and direct the operation of the entire system.
Although, it does not perform any actual processing on the data, the control unit acts as a
central nervous system for the other components of the computer system. It manages and
coordinates the entire computer system. It obtains instructions from the program stored in
main memory, interprets the instructions, and issues signals that cause other units of the
system to execute them.

CENTRAL PROCESSING UNIT

The control unit and the arithmetic logic unit of a computer system are jointly known as
the Central Processing Unit (CPU). The CPU is the brain of any computer system. In a
human body, all major decisions are taken by the brain and the other parts of the body
function as directed by the brain. Similarly, in a computer system, all major calculations
and comparisons are made inside the CPU and the CPU is also responsible for activating
and controlling the operations of other units of a computer system.

THE SYSTEM CONCEPT

You might have observed by now that we have been referring to a computer as a system
(computer system). What can be the reason behind this? To know the answer let us first
consider the definition of a system.

A system is a group of integrated parts that have the common purpose of achieving some
objective(s). So, the following three characteristics ape key tea system:

1. A system has more than one element.


2. All the elements of a system are logically related.
3. All the elements of a system are controlled in such a way that the system goal is
achieved.

Since a computer is made up of integrated components (input, output, storage, and CPU)
that work together to perform the steps called for in the program being executed, it is a
system. The input or output units cannot function until they receive signals from the
CPU. Similarly, the storage unit or the CPU alone is of no use. So the usefulness of each
unit depends on other units and can be realized only when all units are put together
(integrated) to form a system.

Points to Remember

1. All computer systems perform the following five basic operations for converting raw
input data into useful information - inputting, storing, processing, outputting, and
controlling.
2. The main components of any computer system are shown in Figure 2.1.
3. The input unit allows data and instructions to be fed to the computer system from the
outside world in computer acceptable form.
4. The input interfaces transform the input data and instructions fed to the computer
through its input devices into the binary codes acceptable to the computer.
5. The output unit allows the computer system to supply the information obtained as a
result of data processing to the outside world in human acceptable (readable) form.
6. The output interfaces transform the information obtained as a result of data
processing from binary form to human acceptable (readable) form.
7. The storage unit of a computer system holds the data and instructions to be
processed, and the intermediate and final results of processing.
8. The storage unit of all computers is comprised to two types of storage - primary and
secondary storage. The primary storage is used to hold pieces of program instructions and
data, intermediate results, and recently produced results of processing of the job(s) that
the computer system is currently working on. On the other hand, the secondary storage is
normally used to hold the program instructions, data, and information of those jobs on
which the computer system is not working on currently but needs to hold them for use at
a later time.
9. As compared to primary storage, the secondary storage is slower in operation, larger
in capacity, cheaper in price, and can retain information even when the computer system
is switched off or reset.
10. During data processing, the actual execution of the instructions takes place in the
Arithmetic Logic Unit (ALU) of a computer system.
11. The control unit of a computer system manages and coordinates the operations of all
the other components of the computer system.
12. The control unit and the arithmetic logic unit of a computer system are jointly known
as the Central Processing Unit (CPU), which serves as the brain of the computer system
and is responsible for controlling the operations of all other units of the system.
13. A computer is often referred to as a computer system because it is made up of
integrated components (input, output, storage, and CPU) that work together to perform
the steps called for in the program being executed.

Questions

1. What are the five basic operations performed by any computer system?
2. Draw a block diagram to illustrate the basic organization of a computer system and
explain the functions of the various units.
3. What is an input interface? How does it differ from an output interface?
4. How many types of storage are normally there in the storage unit of a computer
system? Justify the need for each storage type.
5. Differentiate between the characteristics of the primary storage and the secondary
storage of a computer system.
6. What are the basic components of the CPU of a computer system? Describe the
roles of each of the components in the functioning of a computer system. -_
7. List out the logical steps taken by a computer system along with the roles of the
main units of the computer system in each step while transforming an input data to useful
information for presentation to the user.
8. What is a system? Why is a computer often referred to as a computer system?
Chapter 3
Number Systems

We have already seen in the previous chapter that inside a computer system, data is
stored in a format that cannot be easily read by human beings. This is the reason why
input and output (I/O) interfaces are required. Every computer stores numbers, letters,
and other special characters in a coded form. Before going into the details of these codes,
it is essential to have a basic understanding of the number system. So the goal of this
chapter is to familiarize you with the basic fundamentals of number system. It also
introduces some of the commonly used number systems by computer professionals and
the relationship among them.

NON-POSITIONAL NUMBER SYSTEMS

Number systems are basically of two types: non-positional and positional. In early days,
human beings counted on fingers. When ten fingers were not adequate, stones, pebbles,
or sticks were used to indicate values. This method of counting uses an additive approach
or the non-positional number system. In this system, we have symbols such as I for 1, II
for 2, III for 3, IIII for 4, IIIII for 5, etc. Each symbol represents the same value
regardless of its position in the number and the symbols are simply added to find out the
value of a particular number. Since it is very difficult to perform an arithmetic with such
a number system, positional number systems were developed as the centuries passed.

POSITIONAL NUMBER SYSTEMS

In a positional number system, there are only a few symbols called digits, and these
symbols represent different values depending on the position they occupy in the number.
The value of each digit in such a number is determined by three considerations:

1. The digit itself,


2. The position of the digit in the number, and
3. The base of the number system (where base is defined as the total number of digits
available in the number system).

The number system that we use in our day-to-day life is called the decimal number
system. In this system, the base is equal to 10 because there are altogether ten symbols or
digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). You know that in the decimal system, the successive
positions to the left of the decimal point represent units, tens, hundreds, thousands, etc.
But you may not have given much attention to the fact that each position represents a
specific power of the base (10). For example, the decimal number 2586 (written as
258610) consists of the digit 6 in the units position, 8 in the tens position, 5 in the
hundreds position, and 2 in the thousands position, and its value can be written as:

(2x1000)+ (5x100)+ (8x10)+ (6xl), or


2000 + 500 + 80 + 6, or
2586
It may also be observed that the same digit signifies different values depending on the
position it occupies in the number. For example,

In 2586io the digit 6 signifies 6 x 10° = 6 In 2568io the digit 6 signifies 6 x 10 1 = 60 In


2658,o the digit 6 signifies 6 x 102 = 600 In 6258io the digit 6 signifies 6 x 103 = 6000
Thus any number can be represented by using the available digits and arranging them in
various positions.

The principles that apply to the decimal number system also apply to any other positional
number system. It is important only to keep track of the base of the number system in
which we are working.

The following two characteristics are suggested by the value of the base in all positional
number systems:

1. The value of the base determines the total number of different symbols or digits
available in the number system. The first of these choices is always zero.
2. The maximum value of a single digit is always equal to one less than the value of the
base.

Some of the positional number systems commonly used in computer design and by
computer professionals are discussed below.

Binary Number System

The binary number system is exactly like the decimal number system except that the base
is 2 instead of 10. We have only two symbols or digits (0 and 1) that can be used in this
number system. Note that the largest single digit is 1 (one less than the base). Again, each
position in a binary number represents a power of the base (2). As such, in this system,
the rightmost position is the units (2°) position, the second position from the right is the
2's (21) position and proceeding in this way we have 4's (2 2) position, 8's (23) position,
16's (24) position, and so on. Thus, the decimal equivalent of the binary number 10101
(written as IOIOI2) is:

(1 x 24) + (0 x 23) + (1 x 22) + (0 x 21) + (1 x 2°), or


16 + 0 + 4 + 0+1, or
21

In order to be specific about which system we are referring to, it is common practice to
indicate the base as a subscript. Thus we write:

101012 = 2110
"Binary digit" is often referred to by the common abbreviation bit. Thus, a "bit" in
computer terminology means either a 0 or a 1. A binary number consisting of 'n' bits is
called an n-bit number. Figure 3.1 lists all the 3-bit numbers along with their decimal
equivalent. Remember that we have only two digits, 0 and 1, in the binary system, and
hence the binary equivalent of the decimal number 2 has to be stated as 10 (read as one,
zero). Another important point to note is that with 3 bits (positions), only 8 (23) different
patterns of 0s and Is are possible and from Figure 3.1 it may be seen that a 3-bit number
can have one of the 8 values in the range 0 to 7. In fact, it can be shown that any decimal
number in the range 0 to 2""1 can be represented in the binary form as an n-bit number.
I
Biliary Decimal Equivalent

000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7

Figure 3.1. 3-bit numbers with their decimal values.

Every computer stores numbers, letters, and other special characters in binary form.
There are several occasions when computer professionals have to know the raw data
contained in a computer's memory. A common way of looking at the contents of a
computer's memory is to print out the memory contents on a line printer. This printout is
called a memory dump. If memory dumps were to be printed using binary numbers, the
computer professionals would be confronted with many pages of 0s and Is. Working with
these numbers would be very difficult and error prone.

Because of the quantity of printout that would be required in a memory dump of binary
digits and the lack of digit variety (0s and Is only), two number systems, octal and
hexadecimal, are used as shortcut notations for binary. These number systems and their
relationship with the binary number system are explained below.

Octal Number System

In the octal number system the base is 8. So in this system there are only eight symbols or
digits: 0, 1,2, 3, 4, 5, 6, and 7 (8 and 9 do not exist in this system). Here also the largest
single digit is 7 (one less than the base). Again, each position in an octal number
represents a power of the base (8). Thus the decimal equivalent of the octal number 2057
(written as 20578) is:

(2 x 83) + (0 x 82) + (5 x 81) + (7 x 8°), or


1024 + 0 + 40 + 7, or
1071
Hence, 20578= 107110
Observe that since there are only 8 digits in the octal number system, 3 bits (2 3 = 8) are
sufficient to represent any octal number in binary (see Figure 3.1).

Hexadecimal Number System

The hexadecimal number system is one with a base of 16. The base of 16 suggests
choices of 16 single-character digits or symbols. The first 10 digits are the digits of the
decimal number system - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. The remaining six digits are denoted
by the symbols A, B, C, D, E, and F representing the decimal values 10, 11, 12, 13, 14,
and 15 respectively. In the hexadecimal number system, therefore, the letters A through F
are number digits. The number A has a decimal equivalent value of 10 and the number F
has a decimal equivalent value of 15. Thus, the largest single digit is F or 15 (one less
than the base). Again, each position in the hexadecimal system represents a power of the
base (16). Thus the decimal equivalent of the hexadecimal number 1AF (written as
1AFI6) is:
(1 x 162) + (A x 161) + (F x 16°), or
(1x256)+ (10x16) 256+160+ 15, or 431
(15xl), or

Hence, 1AFI6 = 43110

Observe that since there are only 16 digits in the hexadecimal number system, 4 bits (24
=16) are sufficient to represent any hexadecimal number in binary.

CONVERTING FROM ONE NUMBER SYSTEM TO ANOTHER

Numbers expressed in decimal number system are much more meaningful to us than are
values expressed in any other number system. This is mainly because of the fact that we
have been using decimal numbers in our day-today life right from childhood. However,
any number value in one number system can be represented in any other number system.
Because the input and the final output values are to be in decimal, computer professionals
are often required to convert numbers in other number systems to decimal and vice-versa.
There are many methods or techniques that can be used to convert numbers from one
base to another. We will see one technique used in converting to base 10 from any other
base and a second technique to be used in converting from base 10 to any other base.

Converting to Decimal from Another Base

The following three steps are used to convert to a base 10 value from any other number
system:
Step 1: Determine the column (positional) value of each digit (this depends on the
position of the digit and the base of the number system).
Step 2: Multiply the obtained column values (in Step 1) by the digits in the
corresponding columns.
Step 3: Sum the products calculated in Step 2. The total is the equivalent value in
decimal.
Example 3.1. Example 3.2.
11OO12 = ?IO 47068 = ?,o
Solution: Solution:

Step 1: Determine column values Step 1: Determine Column values

Column Number (from Column Value Column Number (from right) Column Value
right)

1 2° = 2X- = 1 = 2 = 4 = 1 8° = 82 = = 1 = 8
2345 22 = 23 = 8 = 16 234 83 = = 64
4
2 = = 512

Step 2: Multiply column values by corresponding column digits


16 8 4 2 1 xl xl xO xO xl
16 8 0 0 1

Step 3: Sum the products


16 + 8 + 0 + 0+1 =25 Hence, 110012 = 2510

Step 2: Multiply column values by corresponding column digits


512 64 8 1 x4 x7 xO x6
2048 448 0 6

Step 3: Sum the products


2048 + 448 + 0 + 6 = 2502 Hence, 47068 = 250210

Solution:
1AC16 = 1 x 162 + A x 161 + C x 16°
= 1x256+10x16+12x1
= 256+ 160+ 12
= 42810

Example 3.4.
40527 = ?,
Solution:
40527 = 4x73 + 0x72 + 5x7' + 2x7°
= 4x 343+ 0x 49+ 5x7 + 2x1
= 1372 + 0 + 35+2
= 140910
Example 3.5.
40526 = ?10
Solution:
40526 = 4x63 + 0x62 + 5x61 + 2x6°
= 4x216 + 0x36 + 5x6 + 2x1
= 864 + 0 + 30 + 2
= 896,0 .

Comparing this result with the result obtained in Example 3.4, we find that although the
digits (4052) are same for both the numbers, but their decimal equivalent is different.
This is because of the fact that the number in Example 3.4 is represented in base 7
number system whereas the number in Example 3.5 is represented in base 6 number
system.

Example 3.6.
110014 = ?10
Solution:

Solution:
110014 =lx44+lx43 + Ox42 + Ox41 +
1x4°
= 1 x 256 + 1 x 64 + 0x16 + 0x4 +
lxl
= 256 + 64 + 0 + 0+1
= 32110
Compare the result with Example 3.1.

Example 3.7.

IAC13 = ?10
IAC13= 1 x 132 + A x 131 + C x 13U
= 1 x 169+ 10x13 + 12 x 1
= 31110
Compare the result with Example 3.3.

Converting from Decimal to Another Base (Division-Remainder Technique)

The following four steps are used to convert a number from decimal to another base:

Step 1: Divide the decimal number to be converted by the value of the new base.
Step 2: Record the remainder from Step 1 as the rightmost digit (least significant digit)
of the new base number.
Step 3: Divide the quotient of the previous divide by the new base.
Step 4: Record the remainder from Step 3 as the next digit (to the left) of the new base
number.
Repeat Steps 3 and 4, recording remainders from right to left, until the quotient becomes
zero in Step 3. Note that the last remainder thus obtained will be the most significant digit
(MSD) of the new base number.

Example 3.8.
2510 = ?2

Solution:
Steps 1 and 2: 25/2 = 12 ahd remainder 1
Steps 3 and 4: 12/2= 6 and remainder 0
Steps 3 and 4: 6/2 = 3 and remainder 0
Steps 3 and 4: 3/2 = 1 and remainder 1
Steps 3 and 4: 1/2= 0 and remainder 1

As mentioned in Steps 2 and 4, the remainders have to be arranged in the reverse order so
that the first remainder becomes the least significant digit (LSD) and the last remainder
becomes the most significant digit (MSD).

Hence, 2510= 110012


Compare the result with Example 3.1.

Converting from a Base Other Than 10 to a Base Other Than 10

The following two steps are used to convert a number from a base other than 10 to a base
other than 10:
Step 1: Convert the original number to a decimal number (base 10).
Step 2: Convert the decimal number so obtained to the new base number.

Example 3.15.
5455 = ?4
Solution:
Step 1: Convert from base 6 to base 10
545 = 5 x 62 + 4 x 61 + 5 x 6°
=5x36+4x6+5x1
= 180 + 24 + 5
= 20910

Example 3.16 illustrates the method of converting a number from binary to octal.
Similarly, Example 3.17 shows how to convert a number from binary to hexadecimal.
However, these are lengthy procedures and shortcut methods can be used when we desire
such conversions. These shortcut methods are described below.
Shortcut Method for Binary to Octal Conversion

The following steps are used in this method:

Step 1: Divide the binary digits into groups of three (starting from the right).
Step 2: Convert each group of three binary digits to one octal digit. Since there are only 8
digits (0 to 7) in the octal number system (refer to Figure 3.1), 3 bits (2 3 = 8) are
sufficient to represent any octal number in binary. Since decimal digits 0 to 7 are equal to
octal digits 0 to 7, binary to decimal conversion can be used in this step.

Example 3.18.
1011102 = ?8

Solution:
Step 1: Divide the binary digits into groups of 3 starting from right (LSD).
101 110

Step 2: Convert each group into one digit of octal (use binary-to-decimal conversion).
1012=lx22 + 0x21 + lx2°
=4+0+1
= 58
1102= Ix22+1 x2'+0x2°
=4+2+0 = 68
Hence, 1011102 = 568
Compare the result with the result of Example 3.16.

Example 3.19.

11010102 = ?8 Solution:
1101010a =001 101 010 (Group of 3 digits from right)
= 1528 (Convert each group to an octal digit) Hence, 11010102 = 1528

Shortcut Method for Octal to Binary Conversion

The following steps are used in this method:


Step 1: Convert each octal digit to a 3 digit binary number (the octal digits may be treated
as decimal for this conversion).
Step 2: Combine all the resulting binary groups (of 3 digits each) into a single binary
number.

Example 3.20.
5628 = ?2
Solution:
Step 1: Convert each octal digit to 3 binary digits.
58=1012 68
=1102 28
= 0102

Step 2: Combine the binary groups.


5628 = 101/5 110/6 010/2

Hence, 5628 = 1011100102

Shortcut Method for Binary to Hexadecimal Conversion

The following steps are used in this method:


Step 1: Divide the binary digits into groups of four (starting from the right).
Step 2: Convert each group of four binary digits to one hexadecimal digit. Remember that
hexadecimal digits 0 to 9 are equal to decimal digits 0 to 9, and hexadecimal digits A to F
are equal to decimal values 10* to 15. "Hence for this step, the binary to decimal
conversion procedure can be used, but the decimal values 10 to 15 must be represented as
hexadecimal A to F.

Example 3.23.
101101011002 = ?16
Solution:
Step 1 : Divide the binary digits into groups of 4.
1101 0011
Step 2: Convert each group of 4 binary digits to 1 hexadecimal digit.
11012 -=-1 x 23 + 1 x 22 + 0 x 21 + 1 x 2°
=8+4+0+1
= 1310
= D16

00112 = 0 x 23 + 0 x 22 + 1 x 21 + 1 x 2°
=0+0+2+1 = 316
Hence, 110100112
= D3,6
Compare the result with the result of Example 3.17.

Shortcut Method for Hexadecimal to Binary Conversion

The following steps are used in this method:


Step 1: Convert the decimal equivalent of each hexadecimal digit to 4 binary digits.
Step 2: Combine all the resulting binary groups (of 4 digits each) into a single binary
number.

Example 3.24.
2AB16 = ?2
Solution:
Step 1: Convert the decimal equivalent of each hexadecimal digit to 4 binary digits.
216 = 210 = 00102
A16=10I0 =10102
B16=ll10 =l0ll2

Step 2: Combine the binary groups.


2AB16 = 0010/2 1010/A 1011/B
Hence, 2AB16 = 0010101010112

Figure 3.2 summarizes the relationship between the decimal, binary, hexadecimal, and
octal number systems. Note that the maximum value for a single digit of octal (7) is equal
to the maximum value of three digits of binary. The value range of one digit of octal
duplicates the value range of three digits of binary. If octal digits are substituted for
binary digits, the substitution is on a one-to-three basis. Thus, computers that print octal
numbers instead of binary, while taking memory dump, save one-third of the printing
space and time.
Decimal Hexadecimal Binary Octal

0 0 0 0
1 1 1 1
2 2 10 2
3 3 11 3
4 4 100 4
5 5 101 5
6 6 110 6
7 7 111 7
8 8 1000 10
9 9 1001
10 A 1010
11 B 1011
12 C 1100
13 D 1101
14 E 1110
15 F Mi
16 10 10000

Figure 3.2. Relationship among Decimal, Binary, Hexadecimal and Octal number
systems.

Similarly, note that the maximum value of one digit in hexadecimal is equal to the
maximum value of four digits in binary. Thus, the value range of one digit of
hexadecimal is equivalent to the value range of four digits of binary. Therefore,
hexadecimal shortcut notation is a one-to-four reduction in the space and time required
for memory dump.

FRACTIONAL NUMBERS
In binary number system, fractional numbers are formed in the same general way as in
the decimal number system. For example, in the decimal number system,
0.235 = (2 x 10"') + (3 x 10"2) + (5 x 10"3) and
68.53 = (6 x 10') + (8x 10°) +(5 + (3 x 10"2)
Similarly, in the binary number system,
0.101 =(1 x2"') + (0x2"2) 10.01 =(1 x21) + <0x2°) + x2"3)and
10.01 = (1x21) + (0x20) + 0x1-1) + (1x2-2)
Thus, the binary point serves the same purpose as the decimal point. Some of the
positional values in the binary number system are given below.

Position 4 3 2 1 0 Binary Point -1 -2 -3


-4
Position Value 24 23 22 21 20 Binary Point 2-1 2-2 2-3
2-4
Quantity 16 8 4 2 1 Binary Point ½ ¼ 1/8
1/16
Represented

In general, a number in a number system with base b would be written as:


an an.i... ao. a.i a_2... a.m

and would be interpreted to mean

an x bn + an., x b"'1 + ... + ao x b° + a4 x b"1 + a.2 x b"2 + .;. + a.m x b"m

The symbols an, an.h ..., a.m used in the above representation should be one of the b
symbols allowed in the number system.

Thus, as per the above mentioned general rule,


46.328 = (4 x 81) + (6 x 8°) + (3 x 8'1) + (2 x 8"2) and
5A.3C16 = (5 x 161) + (A x 16°) + (3 x 16"1) + (C x 16"2)

Example 3.26.
Find the decimal equivalent of the binary number 110.101
Solution:
110.1012 = 1 x22+ 1 x2' + 0x2° + 1 x2" 0 x 2"1 +
0x2-2 + 1 x 2-3
= 4 + 2 + 0 + 0.5 + 0 + 0.125
= 6 + 0.5 + 0.125
= 6.62510

Points to Remember

1. Number systems are basically of two types: non-positional and positional.


2. In a non-positional number system, each symbol represents the same value regardless
of its position in the number and the symbols are simply added to find out the value of a
particular number. It is very difficult to perform arithmetic with such a number system.
3. In a positional number system, there are only a few symbols called digits, and these
symbols represent different values depending on the position they occupy in the number.
The value of each digit in such a number is determined by three considerations.
• The digit itself,
• The position of the digit in the number, and
• The base of the number system (where base is defined as the total number of digits
available in the number system).
4. The number system that we use in our day-to-day life is called the decimal number
system. In this system, the base is equal to 10 because there are altogether ten symbols or
digits (0, 1, 2, 3, 4, 5, 6, 7, 8, 9).
5. Some of the positional number systems commonly used in computer design and by
computer professionals are binary (for which base is 2), octal (for which base is 8), and
hexadecimal (for which base is 16).
6. The relationship among decimal, binary, hexadecimal and octal number systems are
given in Figure 3.2.44
I Foundations of Computing
7. Readers must know the techniques for the following types of conversions to convert
numbers from one base to another:
• Converting to decimal from another base
• Converting from decimal to another base
• Converting from a base other than 10 to a base other than 10
• Shortcut method for binary to octal conversion
• Shortcut method for octal to binary conversion
• Shortcut method for binary to hexadecimal conversion
• Shortcut method for hexadecimal to binary conversion
8. Fractional numbers are formed in the same way as in the decimal number system. In
general, a number in a number system with base b would be written as:
anan.1... ao. a.2... a.m
and would be interpreted to mean
an x b" + an., x b""1 + ... + ao x b° + a.! x b"1 + a.2 x b"2 + ... + a.m x b'm
The symbols an, an.i, ..., a.m used in the above representation should be one of the b
symbols allowed in the number system.

Questions

1. What is the difference between positional and non-positional number systems? Give
examples of both types of number systems.
2. What is meant by the base of a number system? Give examples to illustrate the role
of base in positional number systems.
3. What is the value of the base for decimal, hexadecimal, binary and octal number
systems?
4. Give an example for octal number system to show that the same digit may signify
different values depending on the position it occupies in the number.
5. What will be the total number of different symbols or digits and the maximum
value of a single digit for the following number systems:
(a) Number system with base 5
(b) Number system with base 20
(c) Number system with base 9
(d) Number system with base 12
6. What is a 'bit' in computer terminology? How many different patterns of bits are
possible with
(a) 6 bits
(b) 7 bits
(c) 8 bits
7. Explain the meaning of the term "memory dump".
8. Why are octal and/or hexadecimal number systems used as shortcut notation?
9. Find out the decimal equivalent of the following binary numbers:
(a) 1101011 (f) 1000
(b) 11010 (g) 10110001100
(c) 10110011 (h) 1010101100
(d) 11011101 (i) 110001
(e) 1110101 (j) 111
10. Find out the octal equivalent of the binary numbers of Question 9.
11. Find out the hexadecimal equivalent of the binary numbers of Question 9.
12. Convert the following numbers to decimal numbers:
(a) 1101102 (c) 2A3B16
(b) 25736 (d) 12349
13. Convert the following decimal numbers to binary numbers:
(a) 43510 (c) 3210
(b) 169410 (d) 135,o
14. Convert the decimal numbers of Question 13 to octal numbers.
15. Convert the decimal numbers of Question 13 to hexadecimal numbers.
16. Carry out the following conversions:
(a) 1256 = ?4
(b) 249 = ?3
(c) ABC16 = ?8
17. Convert the following numbers to their binary equivalent:
(a) 2AC16 (c) 26148
(b) FAB16 (d) 5628
18. Find the decimal equivalent of the following numbers:
(a) lll.Oh (c) 247.658
(b) 1001.0112 (d) A2B.D416
Chapter 4

Computer Codes
In the previous chapter we have discussed about true or "pure" binary numbers. In this
chapter we will see how these binary numbers are coded to represent characters in
computers. Thus the goal of this chapter is to present the formats used in computers to
record data. Although many coding schemes have been developed over the years, we will
be discussing only the most commonly used computer codes.

Numeric data is not the only form of data that is to be handled by a computer. We often
require to process alphanumeric data also. An alphanumeric data is a string of symbols
where a symbol may be one of the letters A, B, C, ..., Z or one of the digits 0, 1,2, ..., 9 or
a special character, such as+ -*/,.() = (space or blank) etc. An alphabetic data consists of
only the letters A, B, C, ..., Z and the blank character. Similarly, numeric data consists of
only numbers 0, 1,2, ..., 9. However, any data must be represented internally by the bits 0
and 1. As such, binary coding schemes are used in computers to represent data internally.
In binary coding, every symbol that appears in the data is represented by a group of bits.
The group of bits used to represent a symbol is called a byte. To indicate the number of
bits in a group, sometimes a byte is referred to as "n-bit byte" where the group contains n
bits. However, the term byte is commonly used to mean an 8-bit byte (a group of 8 bits)
because most of the modern computers use 8 bits to represent a symbol.

BCD CODE

The Binary Coded Decimal (BCD) code is one of the early memory codes. It is based on
the idea of converting each digit of a decimal number into its binary equivalent rather
than converting the entire decimal value into a pure binary form. This facilitates the
conversion process to a great extent.

The BCD equivalent of each decimal digit is shown in Figure 4.1. Since 8 and 9 require 4
bits, all decimal digits are represented in BCD by 4 bits. You have seen in Example 3.9
that 42i0 is equal to IOIOIO2 in a pure binary form. Converting 42i0 into BCD, however,
produces the following result:
4210 = 0100/4 0010/2 or 01000010 in BCD
Decimal Digits BCD Equivalent

0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
Figure 4.1. BCD equivalent of decimal digits.

Note that each decimal digit is independently converted to a 4 bit binary number and
hence, the conversion process is very easy. Also note that when 4 bits are used, altogether
16 (24) configurations are possible (refer to hexadecimal number system). But from
Figure 4.1 you can see that only the first 10 of these combinations are used to represent
decimal digits. The remaining 6 arrangements (1010, 1011, 1100, 1101, 1110 and 1111)
have decimal values from 10 to 15. These arrangements are not used in BCD coding.
That is, 1010 does not represent lO,o in BCD. Instead,

In the above discussion, we have used a group of 4 bits to represent a digit (character) in
BCD. 4-bit BCD coding system can be used to represent only decimal numbers because 4
bits are insufficient to represent the various characters used by a computer. Instead of
using 4 bits with only 16 possible characters, computer designers commonly use 6 bits to
represent characters in BCD code. In the 6-bit BCD code, the four BCD numeric place
positions are retained, but two additional zone positions are added. With 6 bits, it is
possible to represent 64 (26) different characters. This is a sufficient number to code the
decimal digits (10), alphabetic letters (26), and other special characters (28). Figure 4.2
illustrates the coding of alphabetic and numeric characters in BCD.

In Chapter 3 we have seen the use of octal and hexadecimal number systems as shortcut
notations for binary. Because BCD is a 6-bit code, it can be easily divided into two 3-bit
groups. Each of these 3-bit groups can be represented by 1 octal digit. Thus octal number
system is used as shortcut notation for memory dump by computers that use BCD code
for internal representation of characters. This results in a one-to-three reductions in the
volume of memory dump. Figure 4.2 also shows the octal equivalent of the alphabetic
and numerical characters coded in BCD.48
I Foundations of Computing
Character BCD Code Octal Equivalent

Zone Digit
A 11 0001 61
B 11 0010 62
C 11 0011 63
D 11 0100 64
E 11 0101 65
F 11 0110 66
G 11 0111 67
H 11 1000 70
I 11 1001 71

J 10 0001 41
K 10 0010 42
L 10 0011 43
M 10 0100 44
N 10 0101 45
O 10 0110 46
P 10 0111 47
Q 10 1000 50
R ' 10 1001 51

S 01 0010 22
T 01 0011 23
U 01 0100 24
V 01 0101 25
w 01 0110 26
X 01 0111 27
Y 01 1000 30
z 01 1001 31

1 00 0001 01
2 00 0010 02
3 00 0011 03
4 00 0100 04
5 00 0101 05
6 00 0110 06
7 00 0111 07
8 00 1000 10
9 00 1001 11
0 00 1010 12
Figure 4.2. Alphabetic and numeric characters in BCD along with their Octal
equivalent.Chapter 4 ■ Computer Codes

Example 4.1.

Show the binary digits used to record the word BASE in BCD.
Solution:
B = 110010 in BCD binary notation
A = 110001 in BCD binary notation
S = 010010 in BCD binary notation
E = 110101 in BCD binary notation

So the binary digits


110010/B 110001/A 010010/S 110101/E

will record the word BASE in BCD.

Example 4.2.
Using octal notation, show the BCD coding for the word DIGIT.

Solution:
D = 64 in BCD octal notation
I = 71 in BCD octal notation
G = 67 in BCD octal notation
I = 71 in BCD octal notation
T = 23 in BCD octal notation
So the BCD coding for the word DIGIT in octal notation will be
64/D
21/I
67/G
21/I
23/T

EBCDIC

The major problem with BCD code is that only 64 (26) different characters can be
represented in it. This is not sufficient for providing decimal numbers (10), lower-case
letters (26), capital letters (26), and a fairly large number of other special characters
(28+).
Hence, the BCD code was extended from a 6-bit code to an 8-bit code. The added 2 bits
are used as additional zone bits, expanding the zone to 4 bits. The resulting code is called
the Extended Binary-Coded Decimal Interchange Code (EBCDIC). In this code it is
possible to represent 256 (28) different characters instead of 64 (26). In addition to the
various character requirements mentioned above, this also allows a large variety of
printable characters and several nonprintable control characters. The control characters
are used to control such activities as printer vertical spacing, movement of cursor on the
terminal screen, etc. All of the 256 bit combinations have not yet been assigned
characters, so the code can still grow as new requirements develop.

Because EBCDIC is an 8-bit code, it can be easily divided into two 4-bit groups. Each of
these 4-bit groups can be represented by 1 hexadecimal digit (refer to Chapter 3). Thus,
hexadecimal number system is used as shortcut notation for memory dump by computers
that use EBCDIC for internal representation of characters. This results in a one-to-four
reduction in the volume of memory dump. Figure 4.3 shows the alphabetic and numerical
characters in EBCDIC along with their hexadecimal equivalent.

Developed by IBM, EBCDIC code is used in most IBM models and in many other
computers.
Character EBCDIC Code Hexadecimal Equivalent
Zone Digit
A 1100 0001 Cl
B 1100 0010 C2
C 1100 0011 C3
D 1100 0100 C4
E 1100 0101 C5
F 1100 0110 C6
G 1100 0111 C7
H 1100 1000 C8
I 1100 1001 C9

J 1101 0001 Dl
K 1101 0010 D2
L 1101 0011 D3
M 1101 0100 D4
N 1101 0101 D5
0 1101 0110 D6
P 1101 0111 D7
Q 1101 1000 D8
R 1101 1001 D9

S 1110 0010 E2
T 1110 0011 E3
U 1110 0100 E4
V 1110 0101 . E5
w 1110 0110 E6
X 1110 0111 E7
Y 1110 1000 E8
z 1110 1001 E9

0 mi 0000 F0
1 mi 0001 Fl
2 mi 0010 F2
3 mi 0011 F3
4 nil 0100 F4
5 mi 0101 F5
6 mi 0110 F6
7 nil 0111 F7
8 nil 1000 F8
9 mi 1001 F9
Figure 4.3. Alphabetic and numeric characters in EBCDIC along with their Hexadecimal
eauivalent.

Zoned and Packed Decimal Numbers

From Figure 4.3 it can be observed that in the EBCDIC code, the digit values are the
same as the numeric characters - 0 through 9 (0000 - 1001). But numeric values need
some special consideration because we must have a way of indicating whether the
number is positive, negative, or unsigned (implies positive). Thus, when a numeric value
is represented in EBCDIC, a sign indicator is used in the zone position of the rightmost
digit. A sign indicator of hexadecimal C is a plus sign, hexadecimal D is a minus sign,
and hexadecimal F means the number is unsigned. Figure 4.4 illustrates the
representation of numeric values in EBCDIC. Note that the only zone affected by the sign
is the* zone of the rightmost digit. All other zones remain as F, the zone value for
numeric characters in EBCDIC. Because each decimal digit has a zone with it, numbers
coded in EBCDIC are called zoned decimal numbers. Numeric data input into the
computer are usually zoned decimal numbers. Printers can print only those numeric
characters that are in a zoned-decimal format.

Numeric Value EBCDIC Sign Indicator

345 F3F4F5 F for unsigned


+345 F3F4C5 C for positive
-345 F3F4D5 D for negative

Figure 4.4. Numeric values in EBCDIC in Hexadecimal notation.

However, most computers cannot perform arithmetic operations on zoned-decimal data.


Thus, before any arithmetic operation can be performed, the data must be converted to a
format on which arithmetic operations are possible. One such acceptable format is the
packed decimal format. The following steps are used to convert a zoned decimal nunoer
to a packed decimal number:
Step 1: The zone half and the digit half of the rightmost byte are reversed. This moves
the sign to the extreme right of the number.
Step 2: All remaining zones are dropped out. Figure 4.5 illustrates the conversion process
of zoned decimal data to packed data.
Numeric Value Zoned Format Packed Format

345 F3F4F5 345F


+345 F3F4C5 345C
-345 F3F4D5 345D
3456 F3F4F5F6 03456F
Figure 4.5. Zoned and packed decimal numbers.

It may be observed that packed data requires fewer number of bytes (group of 8 bits) as
compared to zoned data. In the zoned format, there is only one digit per byte (each digit
along with the zone requires 8 bits). But there are two digits in each byte in the packed
format (each digit requires 4 bits). If the packing process does not completely fill a byte,
it is filled with a zero. For example, the zoned data F3F4F5F6 will convert to packed data
03456F. Observe that in this example, the zoned data requires 4 bytes and the packed
data requires only 3 bytes

Example 4.3.
Using binary notation, write the EBCDIC coding for the word BIT. How many bytes are
required for this representation?

Solution:
B = 1100 0010 in EBCDIC binary notation
I = 1100 1001 in EBCDIC binary notation
T = 1110 0011 in EBCDIC-binary notation

So the EBCDIC coding for the word BIT in binary notation will be
11000010/B 11001001/I 11100011/T

3 bytes will be required for this representation because each letter requires 1 byte (or 8
bits).

Example 4.4.
Write the EBCDIC coding for the word ZONE (use hexadecimal notation). How many
bytes will be required for this representation?

Solution:
Z = E9 in EBCDIC hexadecimal notation
O = D6 in EBCDIC hexadecimal notation
N = D5 in EBCDIC hexadecimal notation
E = C5 in EBCDIC hexadecimal notation

So the EBCDIC coding for the word ZONE in hexadecimal notation will be
E9/Z D6/O D5/N C5/E

Each hexadecimal digit requires 4 bits and there are altogether 8 hexadecimal digits. So
in all 8 x 4 = 32 bits or 4 bytes (8 bits = 1 byte) will be required for this representation.
. >

We may also write directly that since each letter requires 1 byte for its representation in
EBCDIC and there are 4 letters in the word ZONE, 4 bytes will be required for this
representation.

Example 4.5.
Write the EBCDIC zoned-decimal coding for the value +256 (use hexadecimal). How
many bytes will be required for this representation?
Solution:
+256 = F2F5C6 in EBCDIC
Each hexadecimal digit requires 4 bits and there are altogether 6 hexadecimal digits. So
in all 6 x 4 = 24 bits or 3 bytes (8 bits = 1 byte) will be required for this representation.
We may also write directly that since each digit requires 1 byte for its representation in
the EBCDIC zoned decimal coding and there are 3 digits in the given number, 3 bytes
will be required for this representation.

Example 4.6.

Write -128 as packed decimal number (use hexadecimal). How many bytes will be
required for this representation?
Solution:
-128 = F1F2D8 in EBCDIC
= 128D in packed format

Each hexadecimal digit requires 4 bits and there are altogether 4 hexadecimal digits. So
in all 4 x 4 = 16 bits or 2 bytes (1 byte = 8 bits) will be required for this representation.

ASCII

Another computer code that is very widely used is the American Standard Code for
Information Interchange (ASCII). ASCII has been adopted by several American
computer manufacturers as their computers' internal code. This code is popular in data
communications, is used almost exclusively to represent data internally in
microcomputers, and is frequently found in the larger computers produced by some
vendors.

ASCII is of two types - ASCII-7 and ASCII-8. ASCII-7 is a 7-bit code that allows 128
(27) different characters. The first 3 bits are used as zone bits and the last 4 bits indicate
the digit. Microcomputers using 8-bit byte (group of 8 bits for 1 byte) use the 7-bit ASCII
by leaving the leftmost first bit of each byte as a zero. Figure 4.6 shows the alphabetic
and numeric characters in ASCII-7 notation.

ASCII-8 is an extended version of ASCII-7. It is an 8-bit code that allows 256 (2 8)


different characters rather than 128. The additional bit is added to the zone bits. Figure
4.7 shows the alphabetic and numeric characters in ASCII-8 notation. Observe that other
than the zone-value differences, ASCII-7 and ASCII-8 are identical. ASCII also uses
hexadecimal as its four-to-one shortcut notation for memory dump. Figures 4.6 and 4.7
also show the hexadecimal equivalent of the ASCII notations.

Example 4.7.
Write the binary coding for the word BOY in ASCII-7. How many bytes are required for
this representation?

Character ASCII-7Code Hexadecimal Equivalent


Zone Digit
0 Oil 0000 30
1 Oil 0001 31
.2 Oil 0010 32
3 Oil 0011 33
4 on 0100 34
5 on 0101 35
6 on 0110 36
7* on 0111 37
8 on 1000 38
9 on 1001 39
A 100 0001 41
B 100 0010 42
C 100 0011 43
D 100 0100 44
E 100 0101 45
F 100 0110 46
G 100 0111 47
H foo 1000 48
I 100 1001 49
J 100 1010 4A
K 100 1011 4B
L 100 1100 4C
M 100 1101 4D
N 100 1110 4E
0 100 mi 4F

P 101 0000 50
Q 101 0001 51
R 101 - 0010 52
S 101 0011 53
T 101 0100 54
U 101 0101 55
V 101 0110 56
W 101 0111 57
X 101 1000 58
Y 101 1001 59
Z 101 1010 5A
0 0101 0000 50
1 0101 0001 51
2 0010 52
3 0101 0011 53
4 0101 0100 54
5 0101 0101 55
6 0101 0110 56
7 0101 0111 57
8 0101 1000 58
9 0101 1001 59

A 1010 0001 Al
B 1010 0010 A2
C 1010 0011 A3
D 1010 0100 A4
E 1010 0101 A5
F 1010 0110 A6
G 1010 0111 A7
H 1010 1000 A8
I 1010 1001 A9
J 1010 1010 AA
K 1010 1011 AB
L 1010 1100 AC
M 1010 1101 AD
N 1010 1110 AE
O 1010 mi AF

P 1011 0000 B0
Q 1011 0001 Bl
R 1011 0010 B2
S 1011 0011 B3
T 1011 0100 B4
U 1011 0101 B5
V 1011 0110 B6
W 1011 0111 B7
X 1011 1000 B8
Y 1011 1001 B9
Z 1011 1010 BA
Figure 4.7. Numeric and alphabetic characters in ASCII-8 notation along with their
Hexadecimal equivalent.

Solution:
B = 1000010 in ASCII-7 binary notation
O = 1001111 in ASCII-7 binary notation
Y = 1011001 in ASCII-7 binary notation
Hence, the binary coding for the word BOY in ASCII-7 will be
1000010/B 1001111/O 1011001/Y
Since each character in ASCII-7 requires one byte for its representation and there are 3
characters in the word BOY, 3 bytes will be required for this representation.

Example 4.8.
Write the hexadecimal coding for the word GIRL in ASCII-7. How many bytes are
required for this representation?
Solution:
G = 47 in ASCII-7 hexadecimal notation
I = 49 in ASCII-7 hexadecimal notation
R = 52 in ASCII-7 hexadecimal notation
L = 4C in ASCII-7 hexadecimal notation

Hence, the hexadecimal coding for the word GIRL in ASCII-7 will be
47/G 49/I 52/R 4C/L = GIRL
Since each character in ASCII-7 requires one byte for its representation and there are 4
characters in the word GIRL, 4 bytes will be required for this representation.
Example 4.9.
Write the binary coding for the word SKY in ASCII-8. How many bytes are required
for this representation?
Solution:
S = 10110011 in ASCII-8 binary notation
K = 10101011 in ASCII-8 binary notation
Y = 10111001 in ASCII-8 binary notation
Hence, the binary coding for the word SKY in ASCII-8 will be
10110011/S 10101011/K 10111001/Y = SKY

Since each character in ASCII-8 requires one byte for its representation and there are 3
characters in the word SKY, 3 bytes will be required for this representation.

Example 4.10.

Write the hexadecimal coding for The word STAR in ASCII-8. How many bytes are
required for this representation?
Solution:
S = B3 in ASCII-8 hexadecimal notation
T = B4 in ASCII-8 hexadecimal notation
A = Al in ASCII-8 hexadecimal notation
R = B2 in ASCII-8 hexadecimal notation
Hence, the hexadecimal coding for the word STAR in ASCII-8 will be
B3/S B4/T A1/A B2/R = STAR
Since each character in ASCII-8 requires one byte for its representation and there are 4
characters in the word STAR, 4 bytes will be required for this representation.

COLLATING SEQUENCE

The value of an alphanumeric or alphabetic data element is usually the name of some
object. Obviously one would not like to perform any arithmetic on such data but one may
like to compare them in order to arrange them in some desired sequence. Now, if we
compare the alphabetic values A and B, which one will be treated as greater by the
computer? For an answer to such questions, it is necessary to have some assigned
ordering among the characters used by the computer. This ordering is known as the
collating sequence.

Collating sequence may vary from one computer system to another depending on the type
of computer code used by a particular computer. To illustrate this, let us consider the
computer codes already discussed in this chapter. Observe from Figures 4.2 and 4.3 that
the zone values of the characters A through 9 decrease in BCD code from the equivalent
of decimal 3 down to 0, while the zone values of the characters A through 9 increases in
EBCDIC from the equivalent of decimal 12 to 15. This means that a computer, which
uses BCD code for its internal representation of characters will treat alphabetic characters
(A, B, ..., Z) to be greater than numeric characters (0, 1, ..., 9). On the other hand, a
computer, which uses EBCDIC for its internal representation of characters will treat
numeric characters to be greater than alphabetic characters. Similarly, observe from
Figure 4.6 and 4.7 that a computer, which uses ASCII for its internal representation of
characters will place numbers ahead of letters during a sort (ascending) because the
number characters have a zone value that is less than the zone value for letters.

However, whatever may be the type of computer code used, in most (not all - in BCD 0 >
9) collating sequences, the following rules are observed:

1. Letters are considered in alphabetic order (A < B < C < ... <Z)
2. Digits are considered in numeric order (0 < 1 < 2 < ... <9).

Example 4.11.
Suppose a computer uses EBCDIC as its internal representation of characters. In which
order will this computer sort the strings 23, Al, 1A?

Solution:
In EBCDIC, numeric characters are treated to be greater than alphabetic characters.
Hence, in the said computer, the numeric characters will be placed after the alphabetic
characters and the given string will be treated as:
Al <1A<23
Therefore, the sorted sequence will be: Al, 1A, 23.
Example 4.12
Suppose a computer uses ASCII for its internal representation of characters. In which
order will this computer sort the strings 23, Al, 1A?
Solution:
In ASCII, nuirieric characters are treated to be less than alphabetic characters. Hence, in
the said computer, the numeric characters will be placed before the alphabetic characters
and the given string will be treated as:
23<1A<A1 Therefore, the sorted sequence will be: 23, 1 A, Al.

Points To Remember

1. Binary coding schemes are used in computers to represent data internally. In binary
coding, every symbol that appears in the data is represented by a group of bits. The
group of bits used to represent a symbol is called a byte. Most modern computers use 8
bits to represent a symbol. Hence the term byte is commonly used to mean a group of 8
bits.
2. The commonly used computer codes for internal representation of data are BCD,
EBCDIC and ASCII.
3. BCD {Binary Coded Decimal) is a 6-bit code, which can represent 64 different
characters. Because BCD is a 6-bit code, it can be easily divided into two 3-bit groups.
Each of these 3-bit groups can be represented by 1 octal digit. Thus octal number system
is used as shortcut notation for memory dump by computers that use BCD code for
internal representation of characters.
4. EBCDIC {Extended Binary-Coded Decimal Interchange Code) is an 8-bit code,
which can represent 256 different characters. Because EBCDIC is an 8-bit code, it can
be easily divided into two 4-bit groups. Each of these 4-bit groups can be represented by
1 hexadecimal digit. Thus, hexadecimal number system is used as shortcut notation for
memory dump by computers that use EBCDIC for internal representation of characters.
5. ASCII (American Standard Code for Information Interchange) is one of the most
popular computer codes. It is of two types - ASCII-7 and ASCII-8. ASCII-7 is a 7-bit
code, which can represent 128 different characters and ASCII-8 is an 8-bit code, which
can represent 256 different characters. Computers, which use ASCII-7 and group of 8 bits
for a byte leave the leftmost first bit of each byte as a zero. ASCII also uses hexadecimal
as its four-to-one shortcut notation for memory dump.

Questions
1. Define the term 'byte'. What is the difference between a bit and a byte?
2. Write the 4-bit BCD code for the following numbers:
(a) 25,o (c) 128,0
(b) 64,o (d) 1024,0
3. Using binary notation, show the BCD coding for the following words:
(a) BIT (c) CODE
(b) BYTE (d) ZERO
4. Using the octal notation, show the BCD coding for the following words:
(a) COMPUTER (c) VIDEO
(b) INPUT (d) OUTPUT
5. Why was BCD code extended to EBCDIC?
6. How many different characters are possible for the following codes:
(a) BCD (c) ASCII-7
(b) EBCDIC (d) ASCII-8
7. Suppose a new computer code is designed that uses 9 bits. How many different
characters are possible in this code?
8. Why are octal and hexadecimal shortcut notations used? Identify the shortcut
notations used for each of these computer codes:
(a) BCD (c) ASCII-7
(b) EBCDIC (d) ASCII-8
9. Why do we have a packed decimal format? How does it differ from a zoned
decimal format?
10. Using binary notation, write the EBCDIC coding for the following words:
(a) SUN (c) CAT
(b) MOON (d) DOG
How many bytes are required for each of these representations?
11. Using hexadecimal notation, write the EBCDIC coding for the following words:
(a) PROGRAM (c) BYTE
(b) OUTPUT (d) OCTAL
How many bytes are required for each of these representations?
12. Using hexadecimal notation, write the zoned-decimal coding for the following
numbers:
(a) 1256 (c) -63
(b) +439 (d) -786
How many bytes are required for each of these representations?
13. Using hexadecimal notation, write the packed-decimal coding for the following
numbers:
(a) 12915 (c) 872
(b) +9876 (d) -256
How many bytes are required for each of these representations?
14. List out the similarities and differences between 7-bit and 8-bit ASCII.
15. Using binary notation, write the ASCII-7 and ASCII-8 codes for the following
words:
(a) DRY (c) DAMP
(b) WET (d) TERM
How many bytes are required for each of these representations?
16. Using hexadecimal notation, write the ASCII-7 and ASCII-8 codes for the
following words:
(a) PRINT (c) RUB
(b) TYPE (d) GIVE
How many bytes are required for each of these representations?
17. Explain the meaning of the term "collating sequence".
18. A computer uses EBCDIC as its internal representation of characters. In which
order will this computer sort the following strings?
(a) ABC (c) 245
(b) 123 (d) ADD
19. A computer uses ASCII. In which order will this computer sort the following
strings?
(a) BED (d) 128
(b) 512 (e) BAD .
(c) ADD
20. Give the full form of the following abbreviations:
(a) BCD
(b) EBCDIC
(c) ASCII
Chapter 5
Computer Arithmetic

In Chapter 4 you have seen that computers store numbers, letters, and other characters in
coded form that is related to the binary number system. In this chapter you will learn why
computers use binary numbers instead of decimal numbers and how the basic arithmetic
operations are performed inside the computer using binary numbers.

WHY BINARY?

You might have observed in Chapter 3 that the use of a smaller base often requires more
positions to represent a given value (recall the reason for using octal and hexadecimal
notations). For example, 9io = 10012. Here four positions are required instead of one to
represent the decimal number 9 in binary form. In spite of this fact, almost all computers
use binary numbers. Hence the obvious question that arises is 'Why do we go for binary
numbers instead of decimal numbers?' The reasons are as follows:
1. The first reason is that electronic and electrical components, by their very nature,
operate in a binary mode. Information is handled in the computer by electronic/electrical
components such as transistors, semiconductors, wires, etc. all of which can only indicate
two states or conditions - on(l) or 6ff(0). Transistors are either conducting( 1) or
nonconducting(O); magnetic materials are either magnetized( 1) or nonmagnetized(O) in
one direction or in the opposite direction; a pulse or voltage is present(l) or absent(O) in
wire. All information is represented within the computer by the presence or absence of
these various signals. The binary number system, which has only two digits (0 and 1), is
most suitable for expressing the two possible states. The concept of binary components
is illustrated in Figure 5.1.
2. The second reason is that computer circuits only have to handle two binary digits
rather than ten decimal digits. This greatly simplifies the internal circuit design of
computers, resulting in less expensive and more reliable circuits.

3. Finally, the binary system is used because everything that can be done in decimal
number system can also be done in binary number system. How this is achieved has been
discussed below.

Figure 5.1. Examples of devices that work in binary mode. These devices can only
represent two states - on or off, which can represent 1 (yes) or 0 (no).

BINARY ARITHMETIC

In this section you will see how the four basic arithmetic operations are performed inside
a computer using binary numbers. Actually, binary arithmetic is much simpler to learn
because binary number system deals with only two digits - 0 and 1. So all binary numbers
are made up of only O's and l's and when arithmetic operations are performed on these
numbers, the results are also in O's and 1 's only.
Addition
Binary addition is performed in the same manner as decimal addition. However, since
binary number system has only two digits, the addition table for binary arithmetic is very
simple consisting of only four entries. The complete table for binary addition is as
follows:
0+0=0
0+1=1
1+0=1
1 + 1=0 plus a carry of 1 to next higher column

Carry-overs are performed in the same manner as in decimal arithmetic. Since 1 is the
largest digit in the binary number system, any sum greater than 1 requires that a digit be
carried over. For instance, 10 plus 10 binary requires the addition of two 1 's in the
second position. Since 1 + 1=0 plus a carry-over of 1, the sum of 10 + 10 is 100 in binary.
By repeated use of the above rules, any two binary numbers can be added together by
adding two bits at a time. The exact procedure is illustrated with the examples given
below.

Example 5.1.

Add the binary numbers 101 and


10 in both decimal and binary form.

Solution:

Binary - Decimal
101 5
+10 +2
111 7

Add the binary numbers 10011and


1001 in both decimal and binary form.

Solution:
Binary - Decimal
Carry 11 Carry 1
10011 19
+1001 +9
11100 28

In this example of binary addition, a carry is generated for first and second columns.

Example 5.3.
Add the binary numbers 100111 and 11011 in both decimal and binary form. Solution:
Binary Decimal
Carry 11111 carry 1
100111 39
+11011 +27
1000010 66
In this example, we face a new situation (1 + 1 + 1) brought about by the carry-over of 1
in the second column. This can also be handled using the same four rules for binary
addition. The addition of three 1 's can be broken up into two steps. First we add only two
1 's giving 10(1 + 1 = 10). The third 1 is now added to this result to obtain 11 (a 1 sum
with a 1 carry). So we conclude that 1 + 1 + 1 = 1 plus a carry of 1 to next higher column.

Subtraction

The principles of decimal subtraction can as well be applied to subtraction of numbers in


other bases. It consists of two steps, which are repeated for each column of the numbers.
The first step is to determine if it is necessary to borrow. If the subtrahend (the lower
digit) is larger than the minuend (the upper digit), it is necessary to borrow from the
column to the left. It is important to note here that the value borrowed depends upon the
base of the number and is always the decimal equivalent of the base. Thus, in decimal, 10
is borrowed; in binary, 2 is borrowed; in octal, 8 is borrowed; in hexadecimal, 16 is
borrowed. The second step is simply to subtract the lower value from the upper value.
The complete table for binary subtraction is as follows:64

0-0=0
1-0=1
1-1=0 .
0 - 1 = 1 with a borrow from the next column

Observe that the only case in which it is necessary to borrow is when 1 is subtracted from
0. The exact procedure is illustrated with the examples given below.

Example 5.4.
Subtract 011102froml01012

Solution:

Borrow 12
0202
10101
-01110
00111

In the first column, 0 is subtracted from 1. No borrow is required in this case and the
result is 1. In the second column, we have to subtract 1 from 0. As seen in the table for
binary subtraction, a borrow is necessary to perform this subtraction. Hence, a 1 is
borrowed from the third column, which becomes 2 in the second column because the
base is 2. A 1 in the 4s column is equal to 2 in the 2s column. Now, in the second
column, we subtract 1 from 2 giving a result of 1. The borrow performed in the second
column reduces the 1 in the third column to 0. Hence, in the third column, once again we
have to subtract 1 from 0 for which borrow is required. The fourth column contains a 0
and thus has nothing to borrow. Therefore, we have to borrow from the fifth column.
Borrowing 1 from the fifth column gives 2 in the fourth column. A 1 in the 16s column
equals 2 in the 8s column. Now the fourth column has something to borrow. When 1 of
the 2 in the fourth column is borrowed, it becomes 2 in the third column. Now, in the
third column, we subtract 1 from 2 giving a result of 1. The borrow performed in the third
column reduces the 1 in the fifth column to 0 and the 2 in the fourth column to 1. Hence,
subtraction of the fourth column is now 1 from 1, giving 0 and in the fifth column,
subtraction is 0 from 0, giving 0. Thus the final result of subtraction is 001112. The result
may be verified by subtracting 14i0 (= 011102) from 21,o (101012) which gives 7,o (=
001112).

Example 5.5.

Subtract 01110002 from 10111002.


Solution:

Borrow 2
1011100
-0111000
0100100

The result may be verified by subtracting 5610 (= 01110002) from 9210 (= 10111002),
which gives 36,0 (= 01001002).

Additive Method of Subtraction

The direct method of subtraction using the-borrow concept seems to be easiest when we
perform subtraction with paper and pencil. However when subtraction is implemented by
means of digital components, this method is found to be less efficient than the additive
method of subtraction. It may sound surprising that even subtraction is performed using
an additive method. This method of subtraction by an additive approach is known as
complementary subtraction.

In order to understand complementary subtraction, it is necessary to know what is meant


by the complement of a number. For a number, which has n digits in it, a complement is
defined as the difference between the number and the base raised to the nth power minus
one. The definition is illustrated with the following examples:

Example 5.6.
Find the complement of 37
Solution:
Since the number has 2 digits and the
value of base is 10,
(Base)"-l = 102-1=99
Now 99 - 37 = 62
Hence, the complement of 3710 = 6210.

Example 5.7.
Find the complement of 6g. Solution:
Since the number has 1 digit and the
value of base is 8,
(Base)n - 1 = 81 - 1 = 710
Also 68 = 610
Now 710 - 610 = 110 =18 lg
Hence, the complement of 68 = l8.

Example 5.8.
Find the complement of IOIOI2.

Solution:
Since the number has 5 digits and the value of base is 2,
(Base)n-l=25-l=3110
Alsol01012 = 2110
Now 31io- 21io = lO10 = 10102
Hence, the complement of 101012= 010102.

Observe from Example 5.8 that in case of binary numbers, it is not necessary to go
through the usual process of obtaining complement. Instead, when dealing with binary
numbers, a quick way to obtain a number's complement is to transform all its 0's to l's,
and all its l's to 0's. For example, the complement of 1011010 is 0100101. Hence, the
circuit for obtaining complement of a number in binary system can be easily designed at
very less expense.

After having seen how to obtain the complement of a number, we will now see how
subtraction is performed using the complementary method.

Subtraction by the complementary-method involves the following three steps:


Step 1: Find the complement of the number you are subtracting (subtrahend); Step 2: Add
this to the number from which you are taking away (minuend);
Step 3: If there is a carry of 1, add it to obtain the result; if there is no carry,
recomplement the sum and attach a negative sign to obtain the result.

To illustrate the procedure, let us first consider few examples for decimal numbers.
Example 5.9.
Subtract 5610 from 9210 using complementary method.
Solution:
Step 1: Complement of 5610
= 102-1-56
= 99-56
= 4310

Step 2: 92
+43 (complement of 56)
135

Step 3: 1 (add the carry of 1)


Result = 36

The result may be verified using the method of normal subtraction:


92-56 = 36.

Example 5.10.
Subtract 3510 from 1810 using complementary method.
Solution:
Step 1: Complement of 3 510
= 102 -1 -35
= 99-35
= 6410

Step 2: 18
+64 (complement of 35)
82

Step 3: Since there is no carry, recomplement the sum and attach a negative sign to
obtain the result.
Result =-(99-82)
= -17
The result may be verified using the method of normal subtraction:
18 - 35 = -17

Let us re-work these examples using binary numbers.

Example 5.11.
Subtract 01110002 (5610) from 10111002
(9210) using complementary method.

Solution:
1011100
+1000111 (complement of 0111000)
10100011
1 (add the carry of 1)
0100100
Result = 01001002 = 3610

Verify the result with the results of Example 5.5 and Example 5.9.

Example 5.12.

Subtract 1000112(3510) from 0100102


(1810) using complementary method.

Solution:
010010
+011100 (complement of 100011)
101110

Since there is no carry, we have to complement the sum and attach a negative sign to it.
Hence,
Result = -0100012 (complement of 1011102)
= -1710

Multiplication

Multiplication in the binary number system also follows the same general rules as
decimal number system multiplication. However, learning the binary multiplication is a
trivial task because the table for binary multiplication is very short, with only four entries
instead of the 100 necessary for decimal multiplication. The complete table for binary
multiplication is as follows:

0x0=0
0x1=0
1x0=0
1x1=1

The method of binary multiplication is illustrated with the example given below. It is
only necessary to copy the multiplicand if the digit in the multiplier is 1, and to copy all
0s if the digit in the multiplier is a 0. The ease with which each step of the operation is
.performed is apparent.

Example 5.14.
Multiply the binary numbers 1010 and 1001.

Solution:
1010 Multiplicand
x1001 Multiplier
1010 Partial Product
0000 Partial Product
0000 Partial Product
1010 Partial Product
1011010 Final Product

Note that the multiplicand is simply copied when multiplier digit is 1 and when the
multiplier digit is 0, the partial product is only a string of zero's. As in decimal
multiplication, each partial product is shifted one place to the left from the previous
partial product. Finally, all the partial products obtained in this manner are added
according to the binary addition rules to obtain the final product.

In actual practice, whenever a 0 appears in the multiplier, a separate partial product


consisting of a string of zeros need not be generated. Instead, only a left shift will do. As
a result, Example 5.14 may be reduced to

1010
x l00l
1010
1010SS (S = left shift)
1011010

A computer would also follow this procedure in performing multiplication. The result of
this multiplication may be verified by multiplying 1010 (10102) by 910 (10012), which
produces a result of 9010 (10110102).

It may not be obvious how to handle the addition if the result of the multiplication gives
columns with more than two Is. They can be handled as pairs or by adjusting the column
to which the carry is placed, as shown by Example 5.15.

Example 5.15.
Multiply the binary numbers 1111 and 111. Solution:

1 1 1 1
X 1 1 1
1 1 1 1
1 1 1 1
1 1 1 1
1 1 0 1 0 0 1

As shown below, the addition in column 3 above can be handled in any one of the
following two ways: Addition handled as pairs (Column 3)
Additive Method of Multiplication

Most computers perform multiplication operation by the way of addition only. This can
be easily seen by considering an example, say 4x8. The result for this multiplication can
be determined by evaluating, with necessary carry overs, 8 + 8 + 8 + 8. That is, the result
is obtained simply by adding the digit 8 four times. Similarly, the computer performs all
multiplication operations in binary using the additive approach.

The idea of repeated addition may seem to be a longer way of doing things, but
remember that the computer is well suited to carry out the operations at great speed. The
internal circuit design of computer systems is also simplified to a great extent by using
this method of multiplication.

Division

Once again, division in binary number system is very simple. As in the decimal number
system (or in any other number system), division by zero is meaningless. Hence, the
complete table for binary division is as follows:

0÷1=0
1÷1=1

The division process is performed in a manner similar to decimal division. The rules for
binary division are:
1. Start from the left of the dividend.
2. Perform a series of subtractions in which the divisor is subtracted from the dividend.
3. If subtraction is possible, put a 1 in the quotient and subtract the divisor from the
corresponding digits of dividend.
4. If subtraction is not possible (divisor greater than remainder), record a 0 in the
quotient.
5. Bring down the next digit to add to the remainder digits. Proceed as before in a
manner similar to long division.
The method is illustrated by Example 5.16.

The result may be verified by dividing 3310 (1000012) by 610 (1102), which gives a
quotient of 510 (1012) and a remainder of 310 (112).

Additive Method of Division

Even division operation is performed inside most computers by the process of addition
only. This may again sound surprising, but it is true. The computer performs the division
operation essentially by repeating the complementary subtraction method. For example,
35 -f 5 may be thought of as:

35-5 = 30
30-5 = 25
25-5 = 20
20-5 = 15
15-5 = 10
10-5 = 5
5-5 = 0
That is, the divisor is subtracted repeatedly from the dividend until the result of
subtraction becomes less than or equal to zero. The total number of times subtraction was
performed gives the value of the quotient. In this case, the value of quotient is 7 because
the divisor (5) has been subtracted 7 times from the dividend (35) until the result of
subtraction becomes zero. If the result of last subtraction is zero, then there is no
remainder for the division. But, if it is less than zero, then the last subtraction is ignored
and the result of the previous subtraction is taken as the value of the remainder. In this
case, the last subtraction operation is not counted for evaluating the value of the quotient.
The process is illustrated below with an example.

Example 5.17.
Divide 3310 by 610 using the method of addition.
Solution:
33-6 = 27
27-6 = 21
21-6=15
15-6= 9
9-6= 3
3 - 6 = -3 •
Total number of subtractions = 6. Since the result of the last subtraction is less than zero,
Quotient = 6-1 (ignore last subtraction) = 5 Remainder = 3 (result of previous
subtraction)
Hence, 33 ÷ 6 = 5 with a remainder 3.

Note that it has been assumed here that all the subtraction operations are carried out using
the complementary subtraction method (additive method).
Once again, performing division inside a computer by the way of addition is desirable
because the addition and complementation operations are easily performed in a computer
and usually save the labour and expense of designing complicated circuits.

We have demonstrated how computer arithmetic is based on addition. Exactly how this
simplifies matter can only be understood in the context of binary (not in decimal). The
number of individual steps may indeed be increased because all computer arithmetic is
reduced to addition, but the computer can carry out binary additions at such great speed
that this is not a disadvantage.

Points to Remember

1. Almost all computers use binary numbers for internal computations because
electronic circuits for performing arithmetic operations in binary mode can be designed
and implemented more easily and reliably at a much lesser cost than those required for
performing arithmetic operations in decimal mode.
2. The rules for binary addition are as follows:
0+0=0
0+1=1
1+0=1
1 + 1 = 0 plus a carry of 1 to next higher column

3. The rules for binary subtraction are as follows:


0-0=0
1-0=1
1-1=0
0 - 1 = 1 with a borrow from the next column
4. For a number, which has n digits in it, a complement is defined as the difference
between the number and the base raised to the nth power minus one.
5. A quick way to obtain the complement of a binary number is to transform all its 0s to
Is, and all its Is to 0s.
6. Complementary subtraction is an additive approach of subtraction.
7. The rules for binary multiplication are as follows:
0x0=0
0x1=0
1x0=0
1x1=1
8. The rules for binary division are as follows:
0÷1=0
1÷1=1
9. Most computers use the additive approach for performing multiplication and division
operations.

Questions

1. Why have computers been designed to use the binary number system?
2. Add the binary numbers 1011 and 101 in both decimal and binary form.
3. Add the binary numbers 1010110 and 1011010.
4. Add the binary numbers 10111 and 1011.
5. Find the complement of the following numbers:
(a) 49510 (d) C16
(b) 2910 (e) 25
(c) 48 (f) 324
6. Find the complement of the following binary numbers:
(a) 10 (d) 011011
(b) 101 (e) 10110001
(c) 101101 (f) 001101001110
7. Subtract 01101112 from 11011102.
8. Subtract 010102 from 100002.
9. Subtract 0110112 from 1101112.
10. Subtract 2510 from 5010 using complementary method.
11. Subtract 2510 from 2010 using complementary method.
12. Subtract 23410 from 58810 using complementary method.
13. Subtract 21610 from 17210 using complementary method.
14. Subtract 010102 from 100002 using complementary method.
15. Subtract 1101112 from 1011102 using complementary method.
16. Subtract 0110112 from 1101112 using complementary method.
17. Subtract 11112 from 11002 using complementary method.
18. Multiply the binary numbers 1100 and 1010.
19. Multiply the binary numbers 01101 and 1001.
20. Multiply the binary numbers 101111 and 111.
21. Divide 110012 by 1012.
22. Divide 01101112 by 01112.
23. Briefly explain how multiplication and division operations are performed within a
computer using additive approach.
24. What is the primary advantage of performing subtraction by the complementary
method in digital computers?
25. Discuss the. advantages and disadvantages of performing the various arithmetic
operations by additive method in a diaital comouter.

Chapter 6

Boolean Algebra and Logic Circuits

Boolean algebra that deals with the binary number system, is very useful in designing
logic circuits used by the processors of computer systems. In this chapter you will learn
about this algebra and the elementary logic gates that are used to build,up circuits of
different types to perform the necessary arithmetic operations. These logic gates are the
building blocks of all the circuits in a computer. You will also learn how to use Boolean
algebra to design simple logic circuits, which are frequently used by the arithmetic logic
unit of almost all computers.

BOOLEAN ALGEBRA

In the mid-1800's, an algebra which simplified the representation and manipulation of


propositional logic was developed by the English mathematician, George Boole (1815-
1864). It became known as Boolean algebra after its developer's name. Later, in the year
1938, Claude E. Shannon, a research assistant in the Department of Electrical
Engineering at the Massachusetts Institute of Technology, published a thesis entitled, "A
Symbolic Analysis of Relay and Switching Circuits". In this thesis, he proposed the use
of Boolean algebra in the design of relay switching circuits. The basic techniques
described by Shannon were adopted almost universally for the design and analysis of
switching circuits. Because of the analogous relationship between the action of relays and
of modern electronic circuits, the same techniques, which were developed for the design
of relay circuits are still being used in the design of modern computers.
Boolean algebra provides an economical and straightforward approach to the design of
relay and other types of switching circuits. Just as an ordinary algebraic expression may
be simplified by means of the basic theorems, the expression describing a given
switching circuit network may also be reduced or simplified using Boolean algebra.
Boolean algebra is now being used extensively in designing the circuitry used in
computers.

Fundamental Concepts of Boolean Algebra

Boolean algebra is based on the fundamental concepts described below.

Use of Binary Digits

In a normal algebraic expression, a variable can take any numerical value. For example,
in the expression 3A + 7B = C, we assume that A, B, and C may range through the entire
field of real numbers. Since Boolean algebra deals with the binary number system, the
variables used in the Boolean equations may have only two possible values (0 and 1). If
an equation describing logical circuitry has several variables, it is still understood that
each of the variables can assume only the values 0 or 1. For example, in the equation A +
B = C, each of the variables A, B and C may have only the values 0 or 1.

Logical Addition

The symbol '+' is used for logical addition operator. It is also known as 'OR' operator. We
can define the + symbol (OR operator) by listing all possible combinations of A and B
and the resulting value of C in the equation A + B = C. It may be noted that since the
variables A and B can have only two possible values (0 or 1) so only four (22)
combinations of inputs, are possible as shown in Figure 6.1. The resulting output values
for each of the four input combinations are given in the table. Such a table is known as a
truth table. Thus, Figure 6.1 is the truth table for the logical OR operator.

Observe that the result is 0 only when the value of both the input variables is 0. The result
is 1 when any of the input variables is 1. Note that a result of 1 is also obtained when
both the inputs A and B are 1. This is the reason why the + symbol does not have the
"normal" meaning, but is a logical addition operator. This concept of logical addition
may be extended to any number of variables. For example, in the equation A + B + C + D
= E, even if A, B, C, and D all had the value of 1, the sum of the values (the result E)
would be 1 only. The equation A + B = C is normally read as "A or B equals C".

Inputs Output

A + B C
0 0 0
0 1 1
1 0 1
1 1 1
Figure 6.1. Truth table for logical OR (+) operator.

Logical Multiplication

The symbol '.' is used for logical multiplication operator. It is also known as 'AND'
operator. We can again define the • symbol (AND operator) by listing all possible
combinations of A and B and the resulting value of C in the equation A • B = C. The truth
table for logical AND operator is shown in Figure 6.2. Observe from the truth table that
the result C is equal to 1 only when both the input variables A and B are 1, otherwise it is
0. The equation A.B=C is normally read as “ A and B equals C”.

Inputs Output

A • B C
0 0 0
0 1 0
1 0 0
1 1 1
Figure 6.2. Truth table for logical AND (•) operator.

Complementation

The two operations defined so far (OR and AND) are binary operations because they
define an operation on two variables. The complementation operation is a unary
operation, which is defined on a single variable.

The symbol '-' is normally used for complementation operator. It is also known as 'NOT'
operator. Thus we write A, meaning "take the complement of A", or (A + B), meaning
"take the complement of A + B." The complementation of a variable is the reverse of its
value. Thus, if A = 0 then A = 1 and if A = 1 then A = 0.

The truth table for logical NOT (-) operator is shown in Figure 6.3. A is read as
"complement of A" or "not of A".

Tnput Output

A A
0 1
1 0

Figure 6.3. Truth table for logical NOT (-) operator.

Operator Precedence
Does A + B • C mean (A + B) • C or A + (B • C)? The two generate different values for
A = 1, B = 0, and C = 0, for then we have (1 + 0) • 0 = 0 and 1 + (0 ■ 0) = 1, which
differ. Hence it is necessary to define operator precedence in order to correctly evaluate
boolean expressions. The precedence of Boolean operators is as follows:

1. The expression is scanned from left to right.


2. Expressions enclosed within parentheses are evaluated first.
3. All complement (NOT) operations are performed next.
4. All '•' (AND) operations are performed after that.
5. Finally, all'+' (OR) operations are performed in the end.

So according to this precedence rule, A + B • C means A + (B • C). Similarly for the


expression A • B, the complement of A and B are both evaluated first and the results are
then ANDed. Again for the expression [A + BJ, the expression inside the parenthesis
(A + B) is evaluated first and the result so obtained is then complemented.

Postulates of Boolean Algebra

Postulate 1:
(a) A = 0 if and only if A is not equal to 1
(b) A = 1 if and only if A is not equal to 0
Postulate 2:
(a) x + 0 = x
(b) x . 1 = x
Postulate 3: Commutative Law
(a) x + y = y + x
(b) x • y = y • x
Postulate 4: Associative Law
(a) x + (y + z) = (x + y) + z
(b) x . (y • z) = (x • y) • z
Postulate 5: Distributive Law
(a) x • (y + z) = x • y + x • z
(b) x + y . z = (x + y) • (x + z)
Postulate 6:
(a) x + x = 1
(b) x • x = 0
The postulates listed above are the basic axioms of the algebraic structure and need no
proof. They are used to prove the theorems of Boolean algebra.

The Principle of Duality

In Boolean algebra, there is a precise duality between the operators • (AND) and + (OR),
and the digits 0 and 1. For instance, let us consider Figure 6.4. We can see that the second
row of the table is obtainable from the first row and vice-versa simply by interchanging
'+' with '•' and '0' with ' 1'. This important property is known as the principle of duality in
Boolean algebra.
Column 1 Column Column 3
2
Row 1 1 + 1 = 1 1 + 0 = 0+ = 1 0 + 0 = 0
= 1=
Row 2 00 = 0 0- 1 = 1 0 1-1 = 1
= -0 =
Figure 6.4. Illustrating the principle of duality in Boolean algebra.

The implication of this principle is that any theorem in Boolean algebra has its dual
obtainable by interchanging '+' with '•' and '0' with ' 1'. Thus if a particular theorem is
proved, its dual theorem automatically holds and need not be proved separately.

Theorems of Boolean Algebra

Some of the important theorems of Boolean algebra are stated below along with their
proof. Theorem 1 (Idempotent law)
(a) x + x = x
(b) x • x = x

Proofof(a) Proof of (b)

L.H.S. L.H.S.
=X+X =x•x
= (x + x) • 1 by postulate 2(b) =x-x+0 by postulate 2(a)
= (x + x) • (x + X) by postulate 6(a) =X■X+X• X by postulate 6(b)
=X+X• X by postulate 5(b) = x • (x + x ) by postulate 5(a)
=x+0 by postulate 6(b) =X•1 by postulate 6(a)
=x by postulate 2(a) =x by postulate 2(b)
= R.H.S. = R.H.S.

Note that Theorem l(b). is the dual of Theorem l(a) and that each step of the proof in part
(b) is the dual of part (a). Any dual theorem can be similarly derived from the proof of its
corresponding pair. Hence from now onwards, the proof of part (a) only will be given.
Interested readers can apply the principle of duality to the various steps of the proof of
part (a) to obtain the proof of part (b) for any theorem.
Theorem 3 (Absorption law)

(a) x + x . y = x
(b) x • (x + y) = x
Proof of (a)
Proof by the Method of Perfect Induction

The theorems of Boolean algebra can also be proved by means of truth tables. In a truth
table, both sides of the relation are checked to yield identical results for all possible
combinations of variables involved. In principle, it is possible to enumerate all possible
combinations of the variables involved because Boolean algebra deals with variables that
can have only two values. This method of proving theorems is called exhaustive
enumeration or perfect induction.

For example, Figure 6.5 is a truth table for proving Theorem 3(a) by the method of
perfect induction. Similarly, Figure 6.6 proves Theorem 3(b) by the method of perfect
induction.
X y x-y x+x■y

0 0 0 0
0 l 0 0
1 0 0 1
1 I 1 1

Figure 6.5. Truth table for proving Theorem 3(a) by the method of perfect-induction.

y x+y x ■ (x + y)
X
0 0 0 0
0 l 1 0
1 0 1 1
1 l 1 1

Figure 6.6. Truth table for proving Theorem 3(b) by the method of perfect induction.
Theorem 4 (Involution Law)
x=x
Proof

Figure 6.7 proves this theorem by the method of perfect induction.

X X X

0 1 0
1 i

Note that Theorem 4 has no dual since it deals with the NOT operator which is unary
operator.
Theorem 5
(a) x-(x +y) = x-y
(b) x + x-y = x + y
Proof of (a)
Figure 6.8 proves this theorem by the method of perfect induction.
X y X x+y x-(x + y) x-y

0 0 1 1 0 0
0 l 1 1 0 0
1 0 0 0 _j 0 0
1 1 0 1 1 1

Figure 6.8. Truth table for proving Theorem 5(a) by the method of perfect induction.

Proof of (b)

Figure 6.9 proves this theorem by the method of perfect induction.


X y X X- y x+ \ • y x+y

0 0 1 0 0 0
0 l 1 1 1 1
1 0 0 0 1 1
1 l 0 0 1 1

Figure 6.9. Truth table for proving Theorem 5(b) by the method of perfect induction.

Theorem 6 (De Morgan's Law)


(a) x+y = x • y
(b) x • y = x + y

Proof of (a) '


Figure 6.10 proves this theorem by the method of perfect induction.
X y x+y X X
x+y y y
0 0 0 1 1 l 1
0 l 1 0 1 0 0
1 0 1 0 0 l 0
1 l 1 0 0 0 0

Figure 6.10. Truth table for proving Theorem 6(a) by the method of perfect induction.
Proof of (b)

Figure 6.11 proves this theorem by the method of perfect induction.


X y x • y- X' y x+y
x-y '-y
0 0 0 1 1 l 1
0 I 0 1 1 0 1
1 0 0 1 0 l 1
1 I 1 0 0 0 0

Figure 6.11. Truth table for proving Theorem 6(b) by the method of perfect induction.

Theorems 6(a) and 6(b) are important and very useful. They are known as De Morgan's
laws. They can be extended to n variables as given below:

X1+X2+X3+... + Xn = X1-X2-X3-...-X11
x,.x2-x3.... xn=x1+x2

The basic Boolean identities are summarized in Figure 6.12. It is suggested that the
readers should become well conversant with the identities given in this table in order to
use the algebra effectively.

Sr. No. Identities Dual identities

1 A+0=A A- 1 =A
2 A+l = 1 A-0 = 0
3 A«+A = A A-A = A
4 A + A =1 A- A =0

5 A=A
6 A+B=B+A AB=B-A
7 (A + B) + C = A + (B + (A • B) • C = A • (B • C)
C)
8 A(B + C) = AB + A-C A + B ■ C = (A + B) • (A +
C)
9 A+A-B=A A- (A + B) = A
10 A+ A -B = A + B A-(A+B) = A-B
11 A + B= A•B AB= A + B

Figure 6.12. Summary of basic Boolean identities.

BOOLEAN FUNCTIONS
A Boolean function is an expression formed with binary variables, the two binary
operators OR and AND, the unary operator NOT, parentheses and equal sign. For a given
value of the variables, the value of the function can be either 0 or 1. For example,
consider the equation
W = X+ Y Z

Here the variable W is a function of X, Y and Z. This is written as W = f(X, Y, Z) and the
right hand side of the equation is called an expression. The symbols X, Y and Z are
referred to as literals of this function.

The above is an example of a Boolean function represented as an algebraic expression. A


Boolean function may also be represented in the form of a truth table. The number of
rows in the table will be equal to 2n, where n is the number of literals (binary variables)
used in the function. The combinations of 0s and Is for each row of this table is easily
obtained from the binary numbers by counting from 0 to 2" - 1. For each row of the table,
there is a value for the function equal to either 0 or 1, which is listed in a separate column
of the table. Such a truth table for the function W = X + Y • Z is shown in Figure 6.13.
Observe that there are eight (23) possible distinct combinations for assigning bits to three
variables. The column labeled W is either a 0 or a 1 for each of these combinations. The
table shows that out of eight, there are five different combinations for which W = 1.
X Y Z w

u 0 0 0
0 0 1 1
0 1 0 0
0 1 1 0
1 -"0 0 r
1 0 1 l
1 1 0 l
1 1 1 l

Figure 6.13. Truth table for the Boolean function W = X + Y • Z.

The question now arises - is an algebraic expression for a given Boolean function unique?
In other words, is it possible to find two algebraic expressions that specify the same
Boolean function? The answer to this question is yes. As a matter of fact, the
manipulation of Boolean algebra is applied mostly to the problem of finding simpler
expressions for a given expression. For example, let us consider the following two
functions:
F1= x-y-z+x-y-z+x-y
and
F2 = x . y+ x-z

The representation of these two functions in the form of truth table is shown in Figure
6.14. From the table we find that the function F2 is the same as the function Fi since both
have identical 0s and Is for each combination of values of the three binary variables x, y
and z. In general, two functions of n binary variables are said to be equal if they have the
same value for all possible 2n combinations of the n literals.

X y z F1 F2

0 0 0 0 0
0 0 1 1 1
0 l 0 0 0
0 l 1 1 1
1 0 0 1 .1
1 0 1 1 1
1 l 0 0 0
1 l 1 0 0

Figure 6.14. Truth table for the Boolean functions:

F1 = x -y z +x -y-z+x-y and F2 = xy + xz

Minimization of Boolean Functions

When a Boolean function is implemented with logic gates (discussed later in this
chapter), each literal in the function designates an input to a gate and each term is
implemented with a gate. Thus for a given Boolean function, the minimization of the
number of literals and the number of terms will result in a circuit with less components.
For example, since functions Fi and F2 of Figure 6.14 are equal Boolean functions, it is
more constitutes the best form of Boolean function depends on the particular application.
However, we will give consideration only to the criterion of component minimization,
which is achieved by literal minimization.

There are several methods used for minimizing the number of literals in a Boolean
function. However, a discussion of all these methods is beyond the scope of this book.
Hence here we will consider only the method of algebraic manipulations. Unfortunately,
in this method, there are no specific rules or guidelines to be followed that will guarantee
the final answer. The only method available is cut-and-try procedure employing the
postulates, the basic theorems, and any other manipulation method, which becomes
familiar with use. The following examples illustrate this procedure.

Example 6.1.

Simplify the following Boolean functions to a minimum number of literals,


(a) x + x • y (b)x-(x + y)
(c) x • y • z + x • y- z + x • y
(d) x • y + x • z + y- z
(e) (x + y)-(x+z)-(y + z)
(d)x-y+x-z + y-z
= x-y+x-z + y-z-l
= x-y+x-z + y-z-(x+x)
= xy+xz + yzx + yz- x
=x■y+x•z+x■y•z+x•y■z
= x-y-l + x-z + x-y-z+x-y-z
= x-y-1+x-y-z+x-z+x-y-z
= x-y-(l +z)+ x -z-(l +y)
= x-y-(z+ 1)+ x -z-(y+ 1)
=x•y•1+x•z■1
= x -y+ x ■ z
(e) (x + y)-(x +z)-( = (x + y)-(x + z)

Note that in Example 6.1, functions (a) and (b) are the dual of each other and use dual
expressions in corresponding minimization steps. Function (c) shows the equality of the
functions Fi and F2 of Figure 6.14. Function (d) illustrates the fact that an increase in the
number of literals sometimes leads to a final simpler expression. Observe that function
(e) is the dual of function (d). Hence it is not minimized directly and can be easily
derived from the dual of the steps used to derive function (d).

Complement of a Function

The complement of a Boolean function F is F and is obtained by interchanging O's for 1


's and 1 's for O's in the truth table that defines the function. For example, Figure 6.15
defines the function F = x y + x • z and its
complement F.

X y z F F

0 0 0 0 1
0 0 1 1 0
0 1 0 0 1
0 1 1 1 0
1 0 0 1 0
1 0 1 1 0
1 1 0 0 1
] 1 1 0 1
Figure 6.15. Truth table for the function F = x • y + X • z and its comolemont

Algebraically, the complement of a function may be derived through De Morgan's


theorems whose generalized forms are as follows:

A1+A2+A3+... + An = A1.A2.A3 ….An


A1 -A2 • A3 •... • An = A, + A2 + A3 +.. + An
These theorems state that the complement of a function is obtained by interchanging the
OR and the AND operators and complementing each literal. The method is illustrated
below through an example.

Example 6.2.

Find the complement of the following functions:


(a) F, = x • y • z + x • y • z
(b) F2=x-(y-z+yz)

Solution:
Applying De Morgan's theorems as many times as necessary, the complements are
obtained as follows:
(a) F, = x • y • z + x • y • z
=(x-y-z)-(x-y-z)
= (x + y + z) ■ (x + y + z)
(b) F2=x-(y-z + y
x + (y-z)-(y-z)
A simpler procedure for deriving the complement of a function is to take the dual of the
function and then complement each literal. This method follows from the generalized De
Morgan's theorems. Remember that the dual of a function is obtained by interchanging
OR and AND operators and O's and l's. The method is illustrated below with the help of
an example.

Example 6.3.

Find the complement of the functions Fj and F2 of Example 6.2 by taking their dual and
complementing each literal.

Solution:
(a) F, = xyz + xy-z
The dual of F1 is: (x + y + z;) ■ (x + y + z)
Complementing each literal we get
F2 = (x + y + z)-(x
(b) F2 = x-(y-z + y
Thedualof F2 is: x + (y + z)-(y + z)
Complementing each literal we get + z)-(y.(y+z)

Canonical Forms for Boolean Functions

Minterms and Maxterms

A binary variable may appear either in its normal form (x) or in its complement form (x).
Now consider two binary variables x and y combined with an AND operator. Since each
variable may appear in either form, there are four possible combinations:
x-y, x-y, x-y, x-y
Each of these four AND terms is called a minterm or a standard product.

In a similar manner, n variables can be combined to form 2n minterms. The 2n different


minterms may be determined by a method similar to the one shown in Figure 6.16 for
three variables. The binary numbers from 0 to 2n - 1 are listed under the n variables. Each
minterm is obtained from an AND term of the n variables, with each variable being
primed if the corresponding bit of the binary number is 0 and unprimed if it is a 1.

Variables Minterms Maxterms

X y z Term Designation Term Designation


0 0 0 x-y-z m0 x+y+z Mo
0 0 1 x-y-z m, x+y+z M,
0 1 1*1 x-y-z m2 x+y+z M2
0
0 1 1 x-y-z m3 - x+y+z M3
1 0 0 x-y-z m4 x+y+z M4
1 0 1 x-y-z m5 x+y+z M5
1 1 0 x-y-z m
6 x+y+z M6
1 1 1 x-y-z m7 x+y+z M7

Figure 6.16. Minterms and Maxterms for three variables.

A symbol for each minterm is also shown in the figure and is of the form nij, where j
denotes the decimal equivalent of the binary number of the minterm designated.

In a similar fashion, n variables forming an OR term, with each variable being primed or
unprimed, provide 2n possible combinations called maxterms or standard sums.

The eight maxterms for three variables, together with their symbolic designation, are
listed in Figure 6.16. Any 2n maxterms for n variables may be determined similarly. Each
maxterm is obtained from an OR term of the n variables, with each variable being
unprimed if the corresponding bit is a 0 and primed if it is a 1.

Note that each maxterm is the complement of its corresponding minterm and vice-versa.

Sum-of-Products

A sum-of-products expression is a product term (minterm) or several product terms


(minterms) logically added (ORed) together. For example, the expression x-y + x-y is a
sum-of-products expression. The following are all sum-of-products expressions:
x
x+y
x+y•z
x•y+z
x•y+x•y•z

The following steps are followed to express a Boolean function in its sum-of-products
form:
1. Construct a truth table for the given Boolean function.
2. Form a minterm for each combination of the variables which produces a 1 in the
function.
3. The desired expression is the sum (OR) of all the minterms obtained in step 2.
For example, in case of function Fi of Figure 6.17, the following three combinations of
the variables produce a 1:
001, 100, and 111
Their corresponding minterms are
x-y-z, x-y-z, and x-y-z
Hence, taking the sum (OR) of all these minterms, the function Fi can be expressed in its
sum-of-products form
as:
F1 = x-y-z + x-y-z + x-y-z or
F2 = m, + m4 + m7
Similarly, it may be easily verified that the function F2 of Figure 6.17 can be expressed in
its sum-of-products form as:

F2 = x-y-z + x-y-z + x-y-z+x-y-z or F2 = m3 + m5 + m6 + m7


X y z F1 F2

0 0 0 0 0
0 0 1 1 0
0 l 0 0 0
0 I 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1

Figure 6.17. Truth table for functions F1and F2.

It is sometimes convenient to express a Boolean function in its sum-of-products form. If


not in this form, it can be made so by first expanding the expression into a sum of AND
terms. Each term is then inspected to see if it contains all the variables. If it misses one or
more variables, it is ANDed with an expression of the form (x + x), where x is one of the
missing variables. The following example clarifies this procedure.

Example 6.4.
Express the Boolean function F = A+ B-C in the sum-of-minterms (products) form.

Solution:
The function has three variables A, B and C. The first term A is missing two variables,
therefore
A = A • (B + B) = AB + AB

This is still missing one variable, therefore

A = A • B • C+C) + A•B• (C+C)


=A•B•C•+A•B•C+A•C+A•B•C

The second term B • C is missing one variable, therefore

B • C = B • C • (A+A)
= A • B • C+ A • B • C
Hence by combining all the terms we get
F = A•B•C + A•B•C +A•B • C + A•B • C +A•B • C+A •B • C

But in the above expression, the term ABC appears twice and according to theorem l(a)
we have x + x = x. Hence it is possible to remove one of them. Rearranging the minterms
in ascending order, we finally obtain:
F=A•B•C+A•B•C+A•B•C+A•B•C
= m1 m4 + m5 + m6 + m7

It is sometimes convenient to express the Boolean function, when in its sum-of-minterms,


in the following short notation:

F(A,B,C) = Z(1,4,5,6,7)

The summation symbol 'Z' stands for the ORing of terms. The numbers following it are
the minterms of the function. Finally, the letters in parentheses with F form a list of the
variables in the order taken when the minterm is converted to an AND term.

Product-of-Sums

A product-of-sums expression is a sum term (maxterm) or several sum terms (maxterms)


logically multiplied (ANDed) together. For example, the expression (x +y)-(x+ y) is a
product of sums expression. The following are all product-of-sums expressions:
x
(X+y)
(x + y)-z
(x+ y)-(x+y)-(x + y)
(x + y)-(x+y + z)
The following steps are followed to express a Boolean function in its product-of-sums
form:
1. Construct a truth table for the given Boolean function.
2. Form a maxterm for each combination of the varibles which produce a 0 in the
function.
3. The desired expression is the product (AND) of all the maxterms obtained in step 2.
For example in case of function Fi of Figure 6.17, the following five combinations of the
variables produce a 0:
000, 010,011, 101, and 110
Their corresponding maxterms are:
(x + y + z), (x + y + z), (x + y + z), (x + y + z), and (x + y + z)

Hence, taking the product (AND) of all these maxterms, the function Fi can be expressed
in its product-of-sums form as:
F1 = (x + y + z) • (x + y + z) • (x + y + z) • (x + y + z) • (x + y + z) or
F1 =M0-M2-M3-M5-M6
Similarly, it may be easily verified that the function F2 of Figure 6.17 can be expressed in
its product-of-sums form as:
F2 = (x + y + z)-(x + y + z) • (x + y + z) • (x + y + z) or
F2 = M0 • M, • M2 • M4

In order to express a Boolean function in its product-of-sums form, it must first be


brought into a form of OR terms. This may be done by using the distributive laws:

x + y • z = (x + y) • (x + z)
Then any missing variable (say x) in each OR term is ORed with the form x • x. This
procedure is explained with the following example.

Example 6.5.

Express the Boolean function F = x • y + x • z in the product-of-maxterms (sums) form.

Solution:
At first we convert the function into OR terms using the distributive law:
F=x•y+x•z
= (x • y + x) • (x • y + z)
= (x+x) • (y+x) • (x + z) • (y + z) = (x+y) • (x + z) • (y + z)

The function has three variables x, y and z. Each OR term is missing one variable,
therefore:

x +y = x +y + Z • Z = (x +y + Z) • (X +y+ Z)
x + z = x + z +"-y • y =(x + z + y) • (x + z+ y) = (x +y + z)-(x + y +z) y + z
= x • +y + z = (x + y + z)-(x+y + z)

Combining all the terms and removing those that appear more than once, we finally
obtain:
F = (x + y + z) • (x + y + z) • (x + y + z) • (x + y+ z)
= M0 • M2 • M4 • M5
A convenient way to express this function is as follows:
F (x, y, z) = II (0, 2, 4, 5)

The product symbol FI denotes the ANDing of maxterms. The numbers following it are
the maxterms of the function.

The sum-of-products and the product-of-sums form of Boolean expressions are known as
standard forms. One prime reason for liking the sum-of-products or the product-of-sums
expressions is their straightforward conversion to very nice gating networks which are
more desirable from most implementation points of view. In their purest, nicest form they
go into two-level networks, which are networks for which the longest path through which
the signal must pass from input to output is two gates.

Conversion Between Canonical Forms

The complement of a function expressed as the sum-of-minterms equals the sum-of-


minterms missing from the original function. This is because the original function is
expressed by those minterms that make the function equal to 1, while its complement is a
1 for those minterms for which the function is a 0. For example, the function

F (A, B, C) = (1,4, 5,6, 7) = nij +m4 +m5+m6 +m7

has a complement that can be expressed asf

F (A, B, C) = (0, 2, 3) = m0 +m2 +m3

Now, if we take the complement of F, by De Morgan's theorem we obtain F back in a


different form:

F = m0 +m2 +m3
= m0 • m2 • m3
= M0-M2-M3
= II (0, 2, 3)

The last conversion follows from the definition of minterms and maxterms as shown in
Figure 6.16. From the figure, it is clear that the following relation holds true:
That is, the maxterm with subscript/ is a complement of the minterm with the same
subscript/, and vice-versa.

The last example has demonstrated the conversion between a function expressed in sum-
of-minterms and its equivalent in product-of-maxterms. A similar argument will show
that the conversion between the product-of-maxterms and the sum-of-minterms is similar.
We now state a general conversion procedure:
"To convert from one canonical form to another, interchange the symbol and list those
numbers missing from the original form."

For example, the function


F (x, y, z) = TI (0, 2, 4, 5)
is expressed in the product-of-maxterms form. Its conversion to sum-of-minterms is:
F(x,y,z) = I(l,3,6,7)
Note that in order to find the missing terms, one must realize that the total number of
minterms or maxterms is always 2n, where n is the number of binary variables in the
function.

LOGIC GATES

All operations within a computer are carried out by means of combinations of signals
passing through standard blocks of built-in circuits that are known as logic gates. In other
words, a logic gate is an electronic circuit which operates on one or more input signals to
produce standard output signals. These logic gates are the building blocks of all the
circuits in a computer.

Computer circuits are built up using combinations of different types of logic gates to
perform the necessary operation. There are several types^of gates, but we shall consider
here only some of the most important ones. These are sufficient to introduce the concept
of circuit design using logic gates.

AND Gate

An AND gate is the physical realization of the logical multiplication (AND) operation.
That is, it is an electronic circuit that generates an output signal of 1 only if all input
signals are also 1.

To have a conceptual idea, let us consider the case of Figure 6.18. Here two switches A
and B are connected in series. It is obvious that the input current will reach the output
point only when both the switches are in the on(l) state. There will be no output (output =
0) if either one or both the switches are in the off(0) state. Hence, two or more switches
connected in series behave as an AND gate.

Input
Output

The behaviour of a logic gate, that is the state of its output signal depending on the
various combinations of input signals, is conveniently described by means of a truth
table. The truth table and the block diagram symbol for an AND gate for two input
signals are shown in Figure 6.19. Since there are only two inputs (A and B), only four
(22) combinations of inputs are possible. Also observe from the truth table that an output
of 1 is obtained only when both the inputs are in 1 state, otherwise it is 0.
Inputs Output

A B C = AB
0 0 0
0 1 0
1 0 0
1 1 1

Figure 6.19. Block diagram symbol and truth table for an AND gate.

OR Gate

An OR gate is the physical realization of the logical addition (OR) operation. That is, it is
an electronic circuit that generates an output signal of 1 if any of the input signals is also
1.

Two or more switches connected in parallel behave as an OR gate. It can be seen from
Figure 6.20 that the input current will reach the output point when any one of the two
switches are in the on(l) state. There will be no output only when both the switches»(A
andJB) are in the off(0) state.

The truth table and the block diagram symbol for an OR gate for two input signals are
shown in Figure 6.21. Observe that an output of 1 is obtained when any of the input
signals is 1. Output is 0 only when both the inputs are 0.
Inputs Output

A 8 C = A +B
0 0 0
0 1 1
1 0 1
1 1 1

Figure 6.21. Block diagram symbol and truth table for an OR gate.

Just as the + and ■ operations could be extended to several variables using the associative
law, AND gates and OR gates can have more than two inputs. Figure 6.22 shows three
input AND and OR gates and the table of all input combinations for each. As might be
hoped, the output of the AND gate with inputs A, B and C is a 1 only if A and B and C
are 1, i.e., when all three of the inputs are 1, so that we write the output as A • B • C.
Similarly, the OR gate with inputs A, B, and C has a 1 output if A or B or C is a 1, so that
we can write A + B + C for its output.
The above argument can be extended. A four-input AND gate has a 1 output only when
all four inputs are 1, and a four-input OR gate has a 1 output when any of its inputs is a 1.

ABC
D = ABC
Inputs Output

A B C D = ABC
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 0
1 0 0 0
1 0 1 0
1 1 0 0
1 1 1 1
(a) Three input AND gate.

D=A+B+C
Inputs Output

A B c D=A+B+C
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
(b) Three input OR gate.

Figure 6.22. Block diagram symbol and truth table for

(a) Three input AND gate


(b) Three input OR gate.

NOT Gate

A NOT gate is the physical realization of the complementation operation. That is, it is an
electronic circuit that generates an output signal, which is the reverse of the input signal.
A NOT gate is also known as an inverter because it inverts the input.

The truth table and the block diagram symbol for a NOT gate are shown in Figure 6.23.
Recall that the complementation operation is unary operation, which is defined on a
single variable. Hence a NOT gate always has a single input. Figure 6.23 also shows that
connecting two NOT gates in series gives an output equal to the input, and this is the
gating counterpart to the law of the double complementation, A = A.
Input Output

A A
0 1
1 0
Figure 6.23. Block diagram symbol and truth table for

(a) A NOT gate, and (b) Two NOT gates in series.

NAND Gate

A NAND gate is a complemented AND gate. That is, the output of NAND gate will be a
1 if any one of the inputs is a 0 and will be a 0 only when all the inputs are 1.

The truth table and the block diagram symbol for a NAND gate are shown in Figure 6.24.
The symbol ' T ' is usually used to represent a NAND operation in boolean expressions.
Thus,
A ↑ B= A • B = A + B

Inputs Output

A B C=A+B
0 0 1
0 1 1
1 0 1
1 1 0
Figure 6.24. Block diagram symbol and truth table for a NAND gate.

The operation of a NAND gate can be analysed using the equivalent block diagram
circuit shown in Figure 6.25, which has an AND gate followd by a NOT gate . For inputs
A and B, the output of the AND gate will be A • B, which is fed as input to the NOT gate.
Hence the complement of A • B will be A • B, which is equal to A + B or A t B. In fact,
the small circle on the output of the NAND gate.

Multiple-input NAND gates can be analyzed similarly. A three-input NAND gate with
inputs A, B, and C will have an output equal to ABC or A + B + C, which says that the
output will be a 1 if any of the inputs is a 0 and will be a 0 only when all three inputs are
1.

NOR Gate
A NOR gate is a complemented OR gate. That is, the output of a NOR gate will be a 1
only when all inputs are 0 and it will be a 0 if any input represents a 1.

The truth table and the block diagram symbol for a NOR gate are shown in Figure 6.26.
The symbol '↓' is usually used to represent a NOR operation in Boolean expressions.

Thus, A ↓ B = A + B = A .B
Inputs Output

A B C = A-B
0 0 1
0 1 0
1 0 0
1 1 0

Figure 6.26. Block diagram symbol and the truth table for a NOR gate.

The operation of a NOR gate can be analyzed using the equivalent block diagram circuit
shown in Figure 6.27, which has an OR gate followed by a NOT gate. For inputs A and
B, the output of the OR gate will be A + B, which is fed as input to the NOT gate. Hence
the complement of A + B will be A + B, which is equal to A • B
or A * B . In fact, the small circle on the output of the NOR gate (see Figure 6.26)
represents complementation. The NOR gate can then be seen to be an OR gate followed
by a NOT gate.
Multiple input NOR gates can be analyzed similarly. A three-input NOR gate with inputs
A, B, and C will have an output equal to A + B + C or A-B-C, which says that the output
will be a 1 only when all the three inputs are 0 and it will be a 0 if any of the three inputs
is a 1.

LOGIC CIRCUITS

The logic gates described in the previous section are seldom used by themselves but are
used in combinations. They are interconnected to form gating/logic networks, which are
known as combinational logic circuits. For these logic circuits, the Boolean algebra
expression can be derived by systematically progressing from input to output on the
gates. Few examples are given below.

Find the Boolean expression for the output of the logic circuit given below.

Solution:
Input A is fed to the.NOT gate whose output will be A.
Inputs B and C are fed to the OR gate whose output will be B + C.
Now these two outputs (A and B + C) are fed as input to the AND gate. The output
produced by the AND gate will be A • (B + C).
Hence, D = A • (B + C), which is the required Boolean expression for the output of the
given logic circuit.
Example 6.7.
Find the logic equation for the output produced by the logic circuit given below.

Solution:
The output of the OR gate is
A + B -------------- (a)
The output of the first AND gate is
A • B --------------- (b)
Since the expression (b) is fed as input to the NOT gate, the output of the NOT gate is
A • B -------------- (c)
Now expressions (a) and (c) are fed as input to the second AND gate, whose output will
be (A + B) • (A•B)
Hence, C = (A + B) • (A-B), which is the desired logic equation for the output produced
by the given logic circuit.

Example 6.8.
Find the Boolean expression for the output of the logic circuit given below.

Solution:
At point 1, the output of the OR gate is
A + B __________ (a)
At point 2, the output of the NOT gate is
C _________ (b)
At point 3, the output of the NOT gate is
D ________ (c)

The inputs to the AND gate at point 4 are (A + B), C, and D. Hence at point 4, the output
of the AND gate is
(A+B) • C • D ____ (d)

The inputs to the AND gate at point 5 are (A + B), C, and D. Hence at point 5, the output
of the AND gate is
(A + B) •C •D ------------ (e)
Finally, the inputs to the OR gate at point 6 are (d) and (e). Hence at point 6, the output of
the OR gate is
(A+B) • C • D+(A + B) • C • D
Hence, E = (A + B) • C • D+(A + B) • C • D,
which is the required Boolean expression for the output of the given logic circuit.

Converting Expressions to Logic Circuits

We have just now considered few examples that illustrate the method of deriving
Boolean expression for a given logic circuit. The reverse problem of constructing a logic
circuit for a given Boolean expression is also not difficult. The three logic gates - AND,
OR, and NOT are said to be logically complete because any Boolean expression may be
realized using only these three gates. The method of constructing logic circuits for
Boolean expressions using only these three gates is illustrated below with the help of
some examples.

The Universal NAND Gate

We have seen that AND, OR, and NOT gates are logically complete in the sense that any
Boolean function may be realized using these three gates. However, the NAND gate,
which was introduced in the previous section, is said to be an universal gate because it is
alone sufficient to implement any Boolean function.

To show that any Boolean function can be implemented with the sole use of NAND
gates, we need to only show that the logical operations AND, OR, and NOT can be
implemented with NAND gates. This is shown in Figure 6.28 below.

A NOT operation is obtained from a one-input NAND gate. Hence, a single-input NAND
gate behaves as an inverter.

The AND operation requires two NAND gates. The first one produces the inverted AND
and the second one being a single input NAND gate, acts as an inverter to obtain the
normal AND output.

For the OR operation, the normal inputs A and B are first complemented using two single
input NAND gates. Now the complemented variables are fed as input to another NAND
gate, which produces the normal ORed output.

The implementation of Boolean functions with NAND gates may be obtained by means
of a simple block diagram manipulation technique. The method requires that two other
logic diagrams be drawn prior to obtaining the NAND logic diagram. The following steps
are to be carried out in sequence:

Step 1: From the given algebraic expression, draw the logic diagram with AND, OR,
and NOT gates. Assume that both the normal (A) and complement (A) inputs are
available.
Step 2: Draw a second logic diagram with the equivalent NAND logic substituted for
each AND, OR, and NOT gate.
Step 3: Remove any two cascaded inverters from the diagram since double inversion does
not perform any logical function. Also remove inverters connected to single external
inputs and complement the corresponding input variable. The new logic diagram so
obtained is the required NAND gate implementation of the Boolean function.
Example 6.13.
Construct a logic circuit for the Boolean expression A • B + C • (A + B • D) using only
NAND gates.
Solution:
The AND/OR implementation for the given Boolean expression is drawn in Figure
6.29(a). Now each AND gate is substituted by a NAND gate followed by an inverter and
each OR gate is substituted by two input inverters followed by a NAND gate. Thus each
AND gate is substituted by two NAND gates and each OR gate is substituted by three
NAND gates. The logic diagram so obtained is shown in Figure 6.29(b). Note that Figure
6.29(b) has seven inverters (single input NAND gates) and five two-input NAND gates.
Each two-input NAND gate has a number inside the gate symbol for identification
purpose. Pairs of inverters connected in cascade (from each AND box to each OR box)
are removed since they form double inversion, which has no meaning. The inverter
connected to input A is removed and the input variable is changed from A to A . The
result is the NAND logic diagram shown in Figure 6.29(c), with the number inside each
NAND gate identifying the gate from Figure 6.29(b).

This example demonstrates that the number of NAND gates required to implement the
Boolean function is equal to the number of AND/OR gates, provided both the normal and
complement inputs are available. Otherwise inverters must be used to generate any
required complemented inputs.

Example 6.14.
Construct a logic circuit for the Boolean expression (A + E) • (B + C • D) using only
NAND gates.

Solution:
The AND/OR implementation for the given Boolean expression is drawn in Figure
6.30(a). Now the NAND equivalent of each AND and each OR gate is substituted
resulting in Figure 6.30(b). Note that Figure 6.30(b) has six inverters (single input NAND
gates) and four two-input NAND gates. One pair of cascaded inverters may be removed.
Also the three external inputs A, B, and E, which go directly to inverters, are
complemented and the corresponding inverters are removed. The final NAND gate
implementation so obtained is shown in Figure 6.30(c). The number inside each NAND
gate of Figure 6.30(c) corresponds to the NAND gate of Figure 6.30(b) having the same
number.

For this example, the number of NAND gates required is equal to the number of
AND/OR gates plus an additional inverter at the output (NAND gate number 5). In
general, the number of NAND gates required to implement a Boolean function equals the
number of AND/OR gates, except for an occasional inverter. This is true only when both
normal and complemented inputs are available because the conversion forces certain
input variables to be complemented.

The Universal NOR Gate


The NOR function is the dual of the NAND function. For this reason, all procedures and
rules for NOR logic form a dual of the corresponding procedures and rules developed
from NAND logic. Like the NAND gate; the NOR gate is also universal because it is
alone sufficient to implement any Boolean function.
To show that any Boolean function can be implemented with the sole use of NOR gates,
we need to only show that the logical operations AND, OR, and NOT can be
implemented with NOR gates. This is shown in Figure 6.31 below.

The NOT operation is obtained from a one-input NOR gate. Hence, a single input NOR
gate is yet another inverter circuit.

The OR operation requires two NOR gates. The first one produces the inverted OR and
the second one being a single input NOT gate, acts as an inverter to obtain the normal OR
output.

The AND operation is achieved through a NOR gate with additional inverters in each
input.

Similar to the NAND logic diagram, the implementation of Boolean functions with NOR
gates may be obtained by carrying out the following steps in sequence:

Step 1: For the given algebraic expression, draw the logic diagram with AND, OR, and
NOT gates. Assume that both the normal (A) and complement (Aj inputs are available.

Steo 2: Draw a second logic diagram with equivalent NOR logic substituted for each
AND, OR, and NOT gate.

Step 3: Remove any two cascaded inverters from the diagram since double inversion does
not perform any logical function. Also remove inverters connected to single external
inputs and complement the corresponding input variable. The new logic diagram so
obtained is the required NOR gate implementation of the given Boolean function.
Example 6.15.
Construct a logic diagram for the Boolean expression A • B + C • (A + B • D) using only
NOR gates. Solution:
The AND/OR implementation for the given Boolean expression is shown in Figure
6.32(a). Now each OR gate is substituted by a NOR gate followed by an inverter and
each AND gate is substituted by two input inverters followed by a NOR gate. Thus each
OR gate is substituted by two NOR gates and each AND gate is substituted by three NOR
gates. The logic diagram so obtained is shown in Figure 6.32(b). Note that Figure 6.32(b)
has eight inverters (single input NOR gates) and five two-input NOR gates. One pair of
cascaded inverters (from the OR box to the AND box) may be removed. Also the five
external inputs A, B, B, D and C, which go directly to inverters, are complemented and
the corresponding inverters are removed.
The final NOR gate implementation so obtained is shown in Figure 6.32(c). The number
inside each NOR gate of Figure 6.32(c) corresponds to the NOR gate of Figure 6.32(b)
having the same number.

The number of NOR gates in this example equals the number of AND/OR gates plus an
additional inverter in the-output (NOR gate number 6). In general, the number of NOR
gates required to implement a Boolean function equals the number of AND/OR gates,
except for an occasional inverter. This is true only if both normal and complement inputs
are available because the conversion forces certain input variables to be complemented.
Combinational circuits are more frequently constructed with NAND or NOR gates than
with AND, OR and NOT gates. NAND and NOR gates are more popular than the AND
and OR gates because NAND and NOR gates are easily constructed with transistor
circuits and Boolean functions can be easily implemented with them. Moreover, NAND
and NOR gates are superior to AND and OR gates from the hardware point of view, as
they supply outputs that maintain the signal value without loss of amplitude. OR and
AND gates sometimes need amplitude restoration after the signal travels through a few
levels of gates.

Exclusive-OR and Equivalence Functions


Exclusive-OR and equivalence, denoted by (c) and (c) respectively, are binary operations
that perform the following Boolean functions:

A+B=A•B+A•B
A•B=A•B+A•B

The truth table and the block diagram symbol for the exclusive-OR and the equivalence
operations are shown in Figure 6.33 and Figure 6.34 respectively. Observe that the two
operations are the complement of each other. Each is commutative and associative.
Because of these two properties, a function of three or more variables can be expressed
without parentheses as follows:
Inputs Output

A B C=A©B
0 0 0
0 1 1
1 0 1
1 1 0
(b) Truth table for Exclusive-OR.
Figure 6.33. Block diagram symbols and truth table for Exclusive-OR operation.
A a C = AOB

0 0 1
0 l 0
1 0 0
1 l 1
The exclusive-OR and equivalence operations have many excellent characteristics as
candidates for logic gates but are expensive to construct with physical components. They
are available as standard logic gates in IC packages but are usually constructed internally
with other standard gates. For example, Figure 6.3 5(a) shows the implementation of a
two-input exclusive-OR function with AND, OR and NOT gates. Figure 6.35(b) shows
its implementation with NAND gates.
Only a limited number of Boolean functions can be expressed exclusively in terms of
exclusive-OR or equivalence operations. Nevertheless, these functions emerge quite often
during the design of digital systems. The two functions are particularly useful in
arithmetic operations and error detection and correction.

DESIGN OF COMBINATIONAL CIRCUITS

The design of combinational circuits starts from the verbal outline of the problem and
ends in a logic circuit diagram. The procedure involves the following steps:
1. State the given problem completely and exactly.
2. Interpret the problem and determine the available input variables and required output
variables.
3. Assign a letter symbol to each input and output variables.
4. Design the truth table that defines the required relations between inputs and outputs.
5. Obtain the simplified Boolean function for each output.
6. Draw the logic circuit diagram to implement the Boolean function.
The design procedure is illustrated below with the design of adder circuits because
addition is the most basic arithmetic operation for any computer system.
Addition in binary system can be summarized by the following four rules:
0+0=0
0+1=1
1 + 0 =1
1 + 1 = 10 -
The first three operations produce a sum whose length is one digit, but when both augend
and addend bits are equal to 1, the binary sum consists of two digits. The higher
significant bit of this result is called a carry. When the augend and addend numbers
contain more significant digits, the carry obtained from the addition of two bits is added
to the next higher order pair of significant bits. A combinational circuit that performs the
addition of two bits is called a half-adder. One that performs the addition of three bits
(two significant bits and previous carry) is called a full-adder. The name of the former
stems from the fact that two half-adders can be employed to implement a full-adder.

Design of Half-Adder

From the definition of a half-adder, we find that this circuit needs two binary inputs and
two binary outputs. The input variables designate the augend and addend bits whereas the
output variables produce the sum and carry bits. Let A and B be the two inputs and S (for
sum) and C (for carry) be the two outputs. The truth table of Figure 6.36 exactly defines
the function of the half-adder.
Inputs Outputs

A B C •s
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Figure 6.36. Truth table for a half-adder.

The simplified Boolean functions for the two outputs, directly obtained from the truth
table, are:

The logic circuit diagram to implement this is shown in Figure 6.37.

The half-adder is limited in the sense that it can add only two single bits. Although it
generates a carry for the next higher pair of significant bits, it cannot accept a carry
generated from the previous pair of lower significant bits. A full-adder solves this
problem.

Design of Full-Adder

A full-adder forms the arithmetic sum of three input bits. Hence it consists of three inputs
and two outputs. Two of the input variables (A and B) represent the augend and the
addend bits and the third input variable (D) represents the carry from the previous lower
significant position. Two outputs are necessary because the sum of three binary digits
ranges in value from 0 to 3, and binary 2 and 3 need two digits. These two outputs are
designated by the symbols S (for sum) and C (for carry). The truth-table of Figure 6.38
exactly defines the function of full-adder. The l's and O's for the output variables are
determined from the arithmetic sum of the three input variables. When all input variables
are 0, the output is 0 for both C and S. The S output is equal to 1 when only one input is
equal to 1 or when all three inputs are equal to 1. The C output is 1 if two or three inputs
are equal to 1.
Inputs Outputs

A B D C s
0 0 0 0 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
Figure 6.38. Truth table for a full-adder.
The sum-of-products expressions for the two outputs can be directly obtained from the
truth table and is given below:

Although the expression fcjr S cannot be simplified, it is possible to simplify the


expression for C as follows:

The S output from the second half-adder is the exclusive-OR of D and the output of the
first half-adder giving:
S=(A-B+A-B]-D+(A-B+A-B)-D
= AB AB D + ABD+ABD

= A + B • A + B D+ABD+ABD
=(A+B)-(A+B)-D+A-B-D+A-B-D
= (AA+AB+AB + BB)-D+AB D+AB D
=(AB+ABJD+ABD+AB D = ABD+A§;D+AB D+AB D
= ABD+A-BD+ABD+ABD
And we have the carry output

C = lA-B + AB -D + A-B
= ABD+ABD+A-B(D+D)
This can be simplified as before to C = AB + AD + BD

A Parallel Binary Adder

Parallel binary adders are used to add two binary numbers. For example, if we want to
add two four-bit numbers, we need to construct a parallel four-bit binary adder as shown
in Figure 6.41. Such an adder requires one half-adder (denoted by HA) and three full-
adders (denoted by FA). The binary numbers being added are A4 A3 A2 A! and B4 B3 B2
Bi and the answer is:

A4 A3 A2 A1,
+ B4 B3 B2B1,
S5 S4 S3 S2 S1

The first column requires only a half-adder. For any column above the first, there may be
a carry from the preceding column. Therefore, we must use a full adder for each column
above the first.

To illustrate how the adder of Figure 6.41 works, let us see how it will add two numbers
say, 9 and 11. The binary equivalent of decimal 9 is 1001, and that of decimal 11 is 1011.
Figure 6.42 shows the binary adder with these inputs.

As shown in the figure, the half-adder adds 1 + 1 to give a sum of 0 and a carry 1. The
carry goes into the first full-adder, which adds 0 + 1 + 1 to get a sum of 0 and a carry of
1. This carry goes into the next full-adder, which adds 0 + 0 + 1 to get a sum of 1 and a
carry of 0. The last full-adder adds 1 + 1 + 0 to get a sum of 0 and a carry of 1. The final
output of the system is 10100. The decimal equivalent of binary 10100 is 20 which is the
correct decimal sum of 9 and 11.

The parallel binary adder of Figure 6.41 has limited capacity. The largest binary numbers
that can be added using it are 1111 and 1111. Hence its maximum capacity is:
15
+15
30
1111
+ 1111
11110

In order to increase the capacity, more full-adders can be connected to the left end of the
system. For instance, to add six bit numbers, two more full-adders must be connected and
for adding eight bit numbers, four more full-adders must be connected to the left end of
the full-adder of Figure 6.41.

Points to Remember

1. Boolean algebra deals with the binary number system. That is, the variables used in
the Boolean equations may have only two possible values (0 and 1).
2. In Boolean algebra, the 'OR' operator used for logical addition is represented by the
symbol '+'; the 'AND' operator used for logical multiplication is represented by the
symbol ' • '; and the 'NOT' operator used for complementation is represented by the
symbol'-'.
3. As regards precedence of Boolean operators, 'NOT' operator takes precedence over
'AND' and 'OR' operators, and 'AND' operator takes precedence over 'OR' operator.
4. The postulates of Boolean algebra are
(a) A = 0 if and only if A is not equal to 1
(b) A = 1 if and only if A is not equal to 0
(c) x + 0 = x
(d) x • 1 = x
(e) x + y = y + x
(f) x-y = y-x
(g) x + (y + z) = (x + y) + z
(h)x(yz) = (xy)-z
(i) x • (y + z) = x • y + x • z
(j) x + y-z = (x + y)-(x + z)
(k) x + x = 1
(1) x • x = 0

5. In Boolean algebra, there is a precise duality between the operators • (AND) and +
(OR) and the digits 0 and 1. This property is known as the principle of duality.
6. The basic Boolean identities are summarized in Figure 6.12. They are very helpful
while dealing with Boolean algebra.
7. A Boolean function is an expression formed with binary variables, the two binary
operators OR and AND, the unary operator NOT, parentheses and equal sign.
8. The complement of a Boolean function F is F and is obtained by interchanging O's
for l's and l's for O's in the truth table that defines the function.
9. A sum-of-products expression is a product term (minterm) or several product terms
(minterms) logically added (ORed) together. For example, the expression x • y + x • y is
a sum-of-products expression.
10. A product-of-sums expression is a sum term (maxterm) or several sum terms
(maxterms) logically multiplied (ANDed) together. For example, the expression (x + y) •
(x + y) is a product of sums expression.
11. The sum-of-products and the product-of-sums form of Boolean expressions are
known as standard forms. One prime reason for liking the sum-of-products or the
product-of-sums expressions is their straightforward conversion to very nice gating
networks.
12. A logic gate is an electronic circuit which operates on one or more input signals to
produce standard output signals. These logic gates are the building blocks of all the
circuits in a computer.
13. An AND gate is the physical realization of the logical multiplication (AND)
operation. That is, it is an electronic circuit that generates an output signal of 1 only if
all input signals are also 1.
14. An OR gate is the physical realization of the logical addition (OR) operation. That
is, it is an electronic circuit that generates an output signal of 1 if any of the input signals
is also 1.
15. A NOT gate is the physical realization of the complementation operation. That is, it
is an electronic circuit that generates an output signal which is the reverse of the input
signal. A NOT gate is also known as an inverter because it inverts the input.
16. A NAND gate is a complemented AND gate. That is, the output of NAND gate will
be a 1 if any one of the inputs is a 0 and will be a 0 only when all the inputs are 1.
17. A NOR gate is a complemented OR gate. That is, the output of a NOR gate will be a
1 only when all inputs are 0 and it will be a 0 if any input represents a 1.
18. The logic gates are interconnected to form gating, or logic, networks which are
known as combinational logic circuits.
19. The AND, OR, and NOT gates are logically complete in the sense that any Boolean
function may be realizec using these three gates.
20. The NAND gate is said to be an universal gate because it is alone sufficient to
implement any Booleai function. Similarly, the NOR gate is also an universal gate.
21. Exclusive-OR and equivalence, denoted by © and O respectively, are binary
operations that perform the following Boolean functions: A©B=AB+AB
22. The design of combinational circuits starts from the verbal outline of the problem and
ends in a logic circuit diagram. The procedure involves the following steps:
(a) State the given problem completely and exactly.
(b) Interpret the problem and determine the available input variables and required output
variables.
(c) Assign a letter symbol to each input and output variables.
(d) Design the truth table that defines the required relations between inputs and outputs.
(e) Obtain the simplified Boolean function for each output.
(f) Draw the logic circuit diagram to implement the Boolean function.

Questions
1. Explain the principle of duality in Boolean algebra. How is it useful?
2. Give the dual of the following Boolean expressions:
(a) A + B
(b)A + B + C
(c) A •B + A-B
(d) A + B
(e) A • (A + B)
(f) A + A • B
3. Give the dual of the rule
A+A •B = A + B
4. Prepare truth tables for the following Boolean expressions:
(a) AB + AB (e) ABC
(b) ABC + BC (f) AB • C + AB • C
(c) A + B (g) (A + B) • (A + C) • (B
(d) A + B + C (h) A • C + A •C
5. State and prove the two basic De Morgan's theorems.
6. Prove the following rules by the method of perfect induction:
7. Simplify the following Boolean expressions and draw logic circuit diagrams for
your simplified expressions using AND, OR and NOT gates:
13. "AND, OR and NOT gates are logically complete". Discuss.
14. Why are NAND and NOR gates called universal122
I Foundations of Computing
15. Show the implementation of the logical operations AND, OR and NOT with only
NAND gates and with only NOR gates.
16. Construct logic circuit diagrams for the Boolean expressions of Question 12 using
only NAND gates.
17. Construct logic circuit diagrams for the Boolean expressions of Question 12 using
only NOR gates.
18. Construct logic circuit diagram for a half-adder using only NAND gates.
19. Construct logic citcuit diagram for a half-adder using only NOR gates.
20. Why are combinational circuits more frequently constructed with NAND or NOR
gates than with AND, OR and NOT gates?
22. Construct a logic circuit diagram for the exclusive-OR function using only NOR
gates.
23. Construct a logic circuit diagram for the equivalence function using only NAND
gates.
24. A logic circuit has three inputs, A, B and C. It generates an output of 1 only when
A = 0, B = 1, C = 0 or when A = 1, B = 1, C = 0. Design a combinational circuit for this
system.
25. A logic circuit has three inputs, A, B and C. It generates an output of 1 only under
the following conditions:
A = 0, B = 0, C = 0
A = 0,B=l,C=l
A=l,B = 0,C=l
A=1,B=1,C=1
Design a combinational circuit for this system.
26. Design a gating network which will have outputs 0 only when A = 0, B = 0, C = 0;
A = 1, B = 0, C = 0;A = 1, B = 1, C = 0. The outputs are to be 1 for all other cases.
27. A three bit message is to be transmitted with an odd parity. An odd parity generator
generates a parity bit (say P) so as to make the total number of Is odd (including P). That
is, P = 1 only when the number of Is in the input string is even. Design a combinational
logic circuit for such a parity generator.
28. Design a combinational logic circuit to generate an even parity for hexadecimal
digits.
Chapter 7

Processor and Memory

We saw in Chapter 2 that the main components of a computer system are input, output,
storage, and CPU. We also saw that storage units are basically of two types - primary and
secondary. With this background knowledge, I we are now ready to learn more about the
internal structure and working of the various components of a computer system. This and
the next two chapters have been devoted to this learning. In this chapter we will learn
about the structure and working of the CPU (also known as processor) and the primary
storage (also known as main memory or simply memory). Subsequently, the structure
and working of secondary storage devices and [input/output devices will be presented in
Chapters 8 and 9 respectively.

This chapter introduces the basic concepts related to the processor and the main memory
of a computer system. In this chapter you will learn about:
1. How processors are internally structured?
2. How memory is structured?
3. How to determine the speed of a processor?
4. What are the different types of processors available?
5. How to determine the capacity of a memory?
6. What are the different types of memory available?
7. What are the main factors related to processor and memory that affect the processing
speed of a computer system?
8. And several other terms related to the processor
The basic processor and memory architecture of a computer system is shown in Figure
7.1. The details of the various components of this figure will be presented in this
chapter.
ROM PROM Flash
Main Memory
(RAM)
V
Cache Memory
------
Decoder p. Accumulator
register

Program control General-purpose


register register

Instruction General-purpose
register register
•••
Memory address
register

Memory buffer
register

Input/Output
register

General-purpose General-purpose
register register

Control Unit
Arithmetic Logic Unit
Central Processing Unit
I/O
DEVICES
Figure 7.1. Processor and memory architecture of a computer system.

THE CENTRAL PROCESSING UNIT (CPU)

The CPU is the brain of a computer system. All major calculations and comparisons
performed by a computer are carried out inside its CPU. The CPU is also responsible for
activating and controlling the operations of other units of the computer system. Hence no
other single component of a computer determines its overall performance as much as the
CPU. In order to be able to quickly evaluate any computer's capabilities, it is important to
know how CPUs are internally structured, how different CPUs differ from each other,
and how CPU speed is evaluated. These and other related concepts about CPU are
described below in subsequent subsections.

The Control Unit

We saw in Chapter 2 (see Figure 2.1) that the two basic components of a CPU are the
control unit and the arithmetic logic unit. The control unit of the CPU selects and
interprets program instructions and then sees that they are executed. As shown in Figure
7.1, it has some special purpose registers (whose functions are described in a later
subsection) and a decoder to perform these activities. The special purpose registers,
namely the instruction register and the program control register respectively hold the
current instruction and the next instruction to be executed and in this way help the control
unit in instruction selection. On the other hand, the decoder has the necessary circuitry to
decode and interpret the meaning of each and every instruction supported by the CPU.
Each instruction is accompanied by microcode - very basic directions that tell the CPU
how to execute the instruction.

Although, the control unit does not perform any actual processing on the data, it acts as a
central nervous system for the other components of the computer. It manages and
coordinates the entire computer system including the input and output units. It obtains
instructions from the program stored in the main memory, interprets the instructions, and
issues signals that cause other units of the system to execute them.

The Arithmetic Logic Unit (ALU)

The ALU of the CPU is the place where the actual execution of the instructions takes
place during the data processing operation. That is, when the control unit encounters an
instruction that involves an arithmetic operation (such as, add, subtract, multiply, divide)
or a logic operation (such as less than, equal to, greater than), it passes control to the
ALU. As shown in Figure 7.1, the ALU has some special purpose registers (whose
functions are described in a later subsection) and the necessary circuitry to carry out all
the arithmetic and logic operations included in the instructions supported by the CPU. For
example, the control unit might load two numbers into the registers in the ALU. Then, it
might tell the ALU to add the two numbers (an arithmetic operation), or to check if the
two numbers are equal (a logical operation).

In case of a microcomputer, the entire CPU (both the control unit and the ALU) is
contained on a single tiny silicon chip called a microprocessor.

Instruction Set

Every CPU has the built-in ability to execute a particular set of machine instructions,
called its instruction set. Most CPUs have 200 or more instructions (such as add, subtract,
and compare) in their instruction set. The machine language designed for a specific CPU
is based on the list of specific instructions supported by the CPU in its instruction set.
Because each processor has a unique instruction set, machine language programs written
for one computer will generally not run on another computer with a different CPU.

CPUs made by different manufacturers have different instruction sets. In fact, different
CPU models of the same manufacturer also often have different instruction sets.
However, manufacturers tend to group their CPUs into "families" that have similar
instruction sets. When a new CPU is developed, it is ensured that its instruction set
includes all the instructions in the instruction set of its predecessor CPU, plus some new
ones. This manufacturing strategy is known as upward compatibility, and the new CPU is
said to be upward compatible with its predecessor. This feature allows software written
for a computer with a particular CPU to work on computers with newer processors of the
same family. In turn, it allows the users of these computer systems to easily upgrade their
system without worrying about converting all their existing software.

Registers

As the instructions are interpreted and executed by the CPU, there is a movement of
information between the various units of the computer system. In order to handle this
process satisfactorily and to speed up the rate of information transfer, the computer uses a
number of special memory units called registers. These registers are used to hold
information on a temporary basis and are part of the CPU (not main memory).
The length of a register equals the number of bits it can store. Thus a register that can
store 8 bits is normally referred to as an 8-bit register. Most CPUs sold today have 32-bit
or 64-bit registers. The size of the registers, which is sometimes called the word size,
indicates the amount of data, which the computer can process in a given period. The
bigger the word size, the faster the computer can process a set of data. With all other
parameters being same, a CPU with 32-bit registers can process data twice as fast as one
with 16-bit registers.

The number of registers varies among computers as does the data-flow pattern. Most
computers use several types of registers, each designed to perform a specific function.
Each of these registers possesses the ability to receive information, to hold it temporarily,
and to pass it on as directed by the control unit. Although the number of registers varies
from computer to computer, there are some registers that are common to all computers.
The function of these registers is described below.

1. Memory Address Register (MAR). It holds the address of the active memory
location. It is loaded from the program control register when an instruction is read from
memory.
2. Memory Buffer Register (MBR). It holds the contents of the memory word read
from, or written in, memory. An instruction word placed in this register is transferred to
the instruction register. A data word placed in this register is accessible for operation
with the accumulator register or for transfer to-the I/O register. A word to be stored in a
memory location must first be transferred to the MBR, from where it is written in
memory.
3. Program Control Register (PC). It holds the address of the next instruction to be
executed. This register goes through a step-by-step counting sequence and causes the
computer to read successive instructions previously stored in memory. It is assumed
that instruction words are stored in consecutive memory locations and read and executed
in sequence unless a branch instruction is encountered. A branch instruction is an
operation that calls for a transfer to a non-consecutive instruction. The address part of a
branch instruction is transferred to the PC register to become the address of the next
instruction. To read an instruction, the contents of the PC register are transferred to the
MAR and a memory read cycle is initiated. The instruction placed in the MBR is then
transferred to the instruction register.
4. Accumulator Register (A). This register holds the initial data to be operated upon, the
intermediate results, and also the final results of processing operations. It is used during
the execution of most instructions. The results of arithmetic operations are returned to the
accumulator register for transfer to main memory through the memory buffer register. In
many computers there are more than one accumulator registers.
5. Instruction Register (I). It holds the current instruction that is being executed. As
soon as the instruction is stored in this register, the operation part and the address part of
the instruction (see Chapter 12) are separated. The address part of the instruction is sent
to the MAR while its operation part is sent to the control section where it is decoded and
interpreted_and ultimately command signals are generated to carry out the task specified
by the instruction.
6. Input/Output Register (I/O). This register is used to communicate with the input/output
devices. All input information such as instructions and data are transferred to this register
by an input device. Similarly, all output information to be transferred to an output device
is found in this register.

Figure 7.2 summarizes the functions of each of these registers.


SI. Name of Register Function
No.
1 Memory Address (MAR) Holds the address of the active memory location
2 Memory Buffer (MBR) Holds information on its way to and from
memory
3 Program Control (PC) Holds the address of the next instruction to be
executed
4 Accumulator (A) Accumulates results and data to be operated
upon
5 Instruction (I) Holds an instruction while it is being executed
6 Input/Output (I/O) Communicates with the I/O devices
Figure 7.2. Functions of various registers.

The execution of an instruction by the CPU during program execution normally involves
the following steps:
1. The control unit takes the address of the next program instruction to be executed
from the program control register and reads the instruction from the corresponding
memory address into the instruction register of the control unit.
2. The control unit then sends the operation part and the address part of the instruction
to the decoder and the memory address register respectively.
3. The decoder interprets the instruction and accordingly the control unit sends signals
to the appropriate unit that needs to be involved in carrying out the task specified in the
instruction. For example, if it is an arithmetic or logic operation, the signal is sent to the
ALU. In this case the control unit also ensures that the data corresponding to the address
part of the instruction is loaded in a suitable register in the ALU before the signal is sent
to the ALU. The ALU performs the necessary operation on the data and signals the
control unit as soon as it has finished.
4. As each instruction is executed, the address of the next instruction to be executed
automatically gets loaded into the program control register, and steps 1 to 4 get repeated.

Processor Speed

The operations of the ALU and the control unit are performed with incredible speed.
These operations are usually synchronized by a built-in electronic clock (known as
system clock) that emits millions of regularly spaced electric pulses per second (known
as clock cycles). Commands are interpreted and then executed at proper intervals, and the
intervals are timed by a specific number of clock cycles. One cycle is the time it takes to
perform one operation, such as moving a byte of data from one memory location to
another. Normally several clock cycles are required to fetch, decode, and execute a single
program instruction. The shorter the clock cycle, the faster the processor. Thus, the speed
with which an instruction is executed is directly related to the computer's built-in clock
speed, which is the number of pulses, produced each second. This clock speed is
measured in megahertz (or MHz), where mega means million and hertz means cycles per
second. Over the years, clock speeds of processors have increased steadily. Most of
today's popular personal computers have clock speeds in the 100- to 1000-MHz range.
But microprocessors are now being built with even faster ratings. With all other
parameters being equal (although they never are), a CPU operating at 500 MHz can
process data 5 times as fast as one operating at 100 MHz.

The number of operations performed per clock cycle also affects CPU performance. Most
CPUs perform one operation per cycle. However, the new Pentium processors use a
superscalar architecture that permits more than one instruction to be executed each clock
cycle. This is achieved by having multiple ALUs on a single CPU chip so that two or
more instructions can be executed simultaneously.

Although the processing speed of personal computers is generally measured in MHz, the
processing speed of workstations, mini computers, and mainframe systems is often
measured in MIPS (Millions of Instructions Per Second) or BIPS (Billions of Instructions
Per Second), and that of supercomputers is measured in MFLOPS (Millions of Floating
Point Operations Per Second) or GFLOPS (gigaflops which refers to a billion FLOPS).
This is because personal computers generally employ a single microprocessor chip as
their CPU, but the other classes of computers often employ multiple processors to speed
up their overall performance. Thus a workstation, minicomputer, or mainframe having a
speed of 500-MIPS can execute 500 million instructions per second. Similarly, a
supercomputer having a speed of 100-GFLOPS.can execute 100 billion floating point
operations per second. The speed of supercomputers is measured in terms of FLOPS
because supercomputer applications, which are often scientific, frequently involve
floating point operations. Floating point operations deal with very small or very large
numbers, which require very high precision data processing.

CISC and RISC Processors

The CPUs of earlier computers had small instruction sets, as it was difficult and
expensive to build complex hardware circuits. However, the scenario changed with the
advent of integrated circuits when it became inexpensive and easy to build complex
hardware circuits. One of the earlier goals of CPU designers was to provide more and
more instructions in the instruction set of a CPU to ensure that the CPU directly supports
more features making it easier to translate high-level language programs to machine
language and to ensure that the machine language programs run more effectively. Of
course, every additional instruction in the instruction set of a CPU requires the necessary
hardware circuitry to handle that instruction, adding more complexity to the CPU's
hardware circuitry. Another goal of CPU designers was to optimize the usage of
expensive memory. To achieve this, the designers tried to pack more instructions in
memory by introducing the concept of variable length instructions such as half word, one
and half word, etc. For example, an operand in an immediate instruction needs fewer bits
and can be designed as a half word instruction. Additionally, CPUs were designed to
support a variety of addressing modes (discussed later in this chapter during the
discussion of memory). CPUs with large instruction set, variable-length instructions, and
a variety of addressing modes are said to employ CISC (Complex Instruction Set
Computer) architecture. Since CISC processors possess so many processing features, they
make the job of machine language programmers easier. However, they are complex and
expensive to produce. Most of the personal computers of today use CISC processors.

In early 1980s, some CPU designers discovered that several of the instructions supported
by a CISC-based CPU are rarely used. Hence they came out with an idea that the
complexity of CPU design can be greatly reduced by implementing only a bare minimum
basic set of instructions plus some of the more frequently used instructions in the
hardware circuitry of the CPU. Other complex instructions need not be supported in the
instruction set of the CPU because they can always be implemented in software by using
the basic set of instructions. While working on simpler CPU design, these designers also
came up with the idea of making all the instructions of uniform length so that the
decoding and execution of all instructions becomes simple and fast. Furthermore, to
speed up computation and to reduce the complexity of handling a number of addressing
modes, they decided to design al the instructions in such a way that they retrieve
operands stored in registers in CPU rather than from memory These design ideas resulted
in producing faster and less expensive processors. CPUs with a small instruction set
fixed-length instructions, and reduced references to memory to retrieve operands are said
to employ RISC (Reduced Instruction Set Computer) architecture. Since RISC processors
have a small instruction set, they place extra demand on programmers, who must
consider how to implement complex computations by combining simple instructions.
However, due to simpler design, RISC processors are faster for most applications, less
complex, and less expensive to produce than CISC processors.

RISC processors are used extensively in medium size computers such as the IBM
RS/6000 and high-end unix workstations. Popular RISC processors used in workstations
are ALPHA (used in DEC-ALPHA workstations), RIOS (used in IBM workstations),
SPARC used in SUN workstations), and PA-RISC (used in HP workstations). RISC
processors are also used extensively in printers and other intelligent devices that have
their own internal processors.

Whether CISC or RISC technology will be the basis of most future processors has yet to
be determined. Supporters of RISC technology claim that the limitations of a reduced
instruction set are easily offset by the increased processing speed and the lower cost of
RISC processors. But critics of RISC technology are of the opinion that more of these
simple programmed instructions must be processed to complete a task, and an additional
burden is thus placed on system software. The debate is still on and there seems to be no
clear cut answer as to which technology is better. The answer may be that each
technology lends itself best to certain applications, and so both technologies will coexist
and be used where they are most efficient.

EPIC Processors
The Explicitly Parallel Instruction Computing (EPIC) technology is fast emerging as the
technology for next-generation processors. Hewlett-Packard and Intel Corporation have
already adopted it in defining their new 64-bit Instruction Set Architecture (ISA),
popularly known as IA-64. Processors based on IA-64 design will be simpler and more
powerful than traditional CISC or RISC processors. These processors are mainly targeted
to next-generation 64-bit high-end server and workstation market (not for personal
computer market). The first processor based on IA-64, code-named Itanium (previously
Merced), is an Intel product. It is believed that IA-64 based processors will surpass the
performance of today's conventional RISC processors, but will protect customers'
software investments by remaining backward compatible with IA-32 based processors
(processors based on 32-bit Instruction Set Architecture).

The three key features of EPIC technology targeted towards improved performance as
compared to today's processors are explicit parallelism, predication and speculation.
These terminologies are explained below.

1. Explicit Parallelism. EPIC technology breaks through the sequential nature of today's
conventional processor architectures by allowing the software to communicate explicitly
to the processor when operations can be done in parallel. For this it uses tighter coupling
between the compiler and the processor, and enables the compiler to extract maximum
parallelism in the original code and explicitly describe it to the processor. For example
in case of IA-64, all instructions are of 32-bit fixed length. At compile time, the
compiler detects which of the instructions can be executed in parallel. It then reorders
them and groups them in such a way that instructions belonging to separate groups can be
executed in parallel. At runtime, this explicit parallelism information provided by the
compiler is exploited by the processor to execute the instructions faster.

2. Predication. Predication is a technique for obtaining improved performance by


reducing the number of branches and branch mispredicts. Once again the help of
compiler is first taken to reorder the instructions to reduce the number of branches as
much as possible at compile time. The conventional processors use "branch prediction"
technique in which the processor predicts which way a branch will fork and speculatively
executes instructions along the predicted path. At the time of execution of the branch
instruction, if the prediction is found to be found to be correct, the processor gains
performance improvement because the instructions lying in the path to be executed now
have already been executed and their results can be directly used now by the processor.

However, if the prediction is found to be wrong, the results of execution of the predicted
path are discarded and the instructions of the correct path are now taken up for execution.
However, the EPIC technology uses "branch predication" instead of "branch prediction".
In this technique, instead of predicting and executing one of the paths of a branch, the
processor executes the instructions of all the paths of the branch exploiting as much
parallelism as possible. Now when the processor discovers the actual branch outcome, it
retains the valid results and discards other results. Thus branch predication effectively
removes the negative impact of branch prediction technique in cases of branch4
mispredict.
3. Speculation. Speculation is a technique used to obtain improved performance by
reducing the effect of memory-to-processor speed mismatch. The memory access speed
being much slower than the processor speed, it is desirable that data required during the
course of execution is loaded and kept ready before it is actually required by the
processor. Speculative data loading technique is designed to take care of this requirement.
Its main goal is to separate the loading of data from its actual use. It not only allows the
processor to load a piece of data from memory before a program actually needs it, but it
also postpones the reporting of exceptions if the loaded data is illegal.

Speculation technique is also implemented by taking help of the compiler. For this, the
compiler analyses the program at compile time, looking for any instructions that will
need data from memory. It inserts speculative load instructions in the instructions stream
of the program well ahead of the instructions that need data from memory. It also inserts
a matching speculative check instruction immediately before the instructions that need
data from memory. It now reorders the surrounding instructions so that the processor can
dispatch them in parallel. Now when the processor encounters a speculative load
instruction at runtime, it retrieves and loads the data from the memory. When the
processor encounters the speculative check instruction, it verifies the load before
allowing the program to use the loaded data in the next instruction. If the load is invalid,
the processor does not immediately report an exception. It postpones the exception
reporting until it encounters a check instruction that matches the speculative load. If the
load is valid, the system behaves as if the exception never happened.

Speculation technique combined with predication technique gives the compiler more
flexibility to reorder instructions and increase parallelism.

Notice that all the three techniques are based on the availability of an intelligent compiler
and closed coupling between the compiler and the processor. Hence the performance of
processors based on EPIC technology comes from both hardware and software.

THE MAIN MEMORY

We saw in the discussion above that the CPU contains the necessary circuitry for data
processing and controlling the other components of a computer system. However, one
thing it does not have built into it is the place to store programs and data that are needed
during data processing. We also saw that the CPU does contain several registers for
storing data and instructions, but these are very small areas that can hold only a few bytes
at a time and are just sufficient to hold only one or two instructions and the corresponding
data. If the instructions and data of a program being executed by the CPU were to reside
in secondary storage like a disk and fetched and loaded one by one into the registers of
the CPU as the program execution proceeded, this would lead to the CPU being idle most
of the time because there is a large speed mismatch between the rate at which CPU can
process data and the rate at which data can be transferred from disk to CPU registers. For
example, a CPU can process data at a rate of about 5 nanosecond/byte and a disk reader
can read data at a speed of around 5 microsecond/byte. Thus, within the time in which the
disk can supply one byte of data, the CPU can process 1000 bytes. This would lead to a
very slow overall performance even if the computer system used a very fast CPU. To
overcome this problem, there is a need to have a reasonably large storage space, which
can hold the instructions and data of the program(s) the CPU is currently woi*king on?
The time to fetch and load data from this storage space into the CPU registers must also
be very small as compared to that for disk storage to reduce the speed mismatch problem
with the CPU speed. Every computer has such a storage space, which is known as
primary storage, main memory, or simply memory. It is a temporary storage area that is
built into the computer hardware and in which instructions and data of a program reside
mainly when the program is being executed by the CPU. Physically, this memory
consists of some chips either on the motherboard or on a small circuit board attached to
the motherboard of a computer system. This built-in memory allows the CPU to store and
retrieve data very quickly. The rate of fetching data from this memory is typically of the
order of 50 nanosecond/byte. Hence the rate of data fetching from the main memory is
about 100 times faster than that from a high-speed secondary storage like disk.

Storage Evaluation Criteria

Any storage unit of a computer system is characterized and evaluated based on the
following properties:
1. Storage capacity. It is the amount of data that can be stored in the storage unit. A
large capacity is desired. As compared to secondary storage units, primary storage units
have less storage capacity.
2. Access time. This is the time required to locate and retrieve stored data from the
storage unit in response to a program instruction. A fast access time is preferred. As
compared to secondary storage units, primary storage units have faster access time.
3. Cost per bit of storage. This refers to the cost of a storage unit for a given storage
capacity. Obviously, a lower cost is desirable. As compared to secondary storage units,
primary storage units have higher cost per bit of storage.
4. Volatile. If the storage unit can retain the data stored in it even when the power is
turned off or interrupted, it is called non-volatile storage. On the other hand, if the data
stored are lost when the power is turned off or interrupted, it is called volatile storage.
Obviously, a non-volatile storage is desirable. In almost all computer systems, the
primary storage units are volatile and the secondary storage units are non-volatile.
5. Random access. If the time taken to access a piece of data from the storage unit is
independent of the location of the data in the storage unit, it is called a random access
storage or random access memory (RAM). Each separate location of a RAM is as easy to
access as any other location, and takes the same amount of time. In almost all computer
systems, the primary storage units have random access property and the secondary
storage units have either pseudo-random access (access time is nearly same for all
locations but not exactly same) or sequential access (access time directly depends on the
location of the data) property.

Main Memory Organization


A primary storage or main memory of a computer system is made up of several small
storage areas called locations or cells. Each of these locations can store a fixed number of
bits called word length of that particular memory. Thus, as shown in Figure 7.3, a given
memory is divided into N words, where N generally is some power of 2. Each word or
"location has a built-in and unique number assigned to it. This number is called the
address of the location and is used to identify the location. Each location can hold either a
data item or an instruction, and its address remains the same regardless of its contents.
The addresses normally start at 0 and the highest address equals the number of words that
can be stored in the memory minus 1. For example, if a memory has 1024 locations, then
th (c) address ranges between 0 and 1023. Thus, at address 0 we find a word, at address 1
a second word, at address 2 a third word, and so on up to the final word at the largest
address.

There is an important difference between the address number and the contents of the
address. A memory is like a large cabinet containing as many drawers as there are
addresses in memory. Each drawer contains a word and the address of each word is
written on the outside of the drawer. If we write or store a word say 10101010 at address
125, it is like placing the word 10101010 in the drawer labeled 125. Later, reading from
address 125 is like looking in that drawer to see its contents which is now 10101010. We
do not remove the word at an address when we read, but change the contents at an
address only when we store or write a new word. Thus, entering data into a storage
location is destructive of previous contents, but retrieving data from a location is non-
destructive. The act of entering data into a storage location is called memory write
operation, and the act of retrieving data from a storage location is called memory read
operation. Hence read is a non-destructive operation and write is a destructive operation.

Why More Bits?

You might have heard about 8-bit computers, 16-bit computers, 32-bit computers, etc.
This refers to the word length of the memory of a particular computer in terms of total
number of bits per memory word. Word length is an important architectural factor. Small
machines have word lengths of 8, 16, or 32 bits; large machine word lengths are 64 bits
or more. The obvious question that arises to ones mind is that what is the advantage of
having more number of bits per word instead of having more words of smaller size
(length)?

For an answer to the above question, imagine a highway with eight lanes, and a heavy
flow of traffic. If it is expanded to sixteen lanes, the flow of traffic speeds up
considerably. "8 bits" refers to the number of "lanes" on a microchip. More bits means a
more rapid flow of electronic signals. In other words, a faster computer. Thus, what an 8-
bit computer takes one miriute to db, a 32-bit computer may do in few seconds.

Data and instructions are moved to and from memory in bunches of word length.
Therefore, even if the electronic circuits used are comparable in speed, machines having
smaller word-length will be slower in operation than machines having larger word-length.
This difference is analogous to providing the user of a machine having smaller word
length with a small data shovel and the user of a machine having larger word length with
a large data shovel. Even though they both may be shoveling at comparable speeds, the
user with the smaller shovel will be slower because more shovelfuls are needed to move
the same amount of data.

Fixed and Variable Word-length Memory

The main memory of some computers is designed to store a fixed number of characters
(equal to its word-length in bytes) in each numbered address location. Such computers
are said to be word-addressable, and they employ a fixed-word-length memory approach.
In these computers, storage space is always allocated in multiples of word-length. So if a
word addressable computer has a fixed word-length of 4 bytes (4 characters) then this
computer will require one word (4 bytes) to store the word "CAT" and two words (8
bytes) to store the word "BOMBAY".

In many computers, the main memory is also designed in such a way that each numbered
address can only store a single character (A, B, 1,2, +, -, etc.). Computers designed in this
manner are said to be character-addressable and they employ a variable-word-length
memory approach. Thus in these machines, only 3 bytes will be required to store the
word "CAT" and only 6 bytes will be required to store the word "BOMBAY". Figure 7.4
summarizes the difference between the fixed-word-length and variable-word-length
memory approaches.

Both the fixed and the variable word-length memory systems have their own merits and
demerits. The fixed-word-length memory approach is normally used in large scientific
computers for gaining speed of calculation. On the other hand, the variable-word-length
approach is used in small business computers for optimizing the use of storage space. For
example, let us consider a fixed-word-length machine with a word size of eight
characters. If most of the data words to be stored are of less than five characters then
more than half of the storage space will remain unused. This will not happen in case of a
machine with variable-word-length memory because a character can be placed in every
storage cell of this machine. However, word-addressable computers possess faster
calculating capability because they can add two data words in a single operation. If the
fixed-length word is eight characters, two eight digit numbers can be added in single
operation. On the other hand, with a character-addressable machine only one digit in each
number is added during a single operation and eight steps would thus be needed to add
two eight digit numbers.

A computer may be designed to employ either a fixed-word-length or a variable-word-


length memory organization. The set of instructions available with these computers allow
them to be operated as either variable-or fixed-word-length memory computers.
However, with the memory becoming cheaper and larger day-by-day, most modern
computers employ fixed-word-length memory organization.
Main Memory Capacity

The main memory capacity of large computer systems is normally more than small
systems. This capacity is defined in terms of the number of bytes a computer system can
store.

Memory capacity of a computer system is normally stated in terms of kilobytes (KB)


which is equal to 1024 (2 ) bytes of storage, or in terms of megabytes (MB) which is
equal to 1,048,576 (220) bytes of storage, or in terms of gigabytes (GB) which is equal to
1,073,741,824 (230) bytes of storage. Notice that 1 KB is about 103 bytes, 1 MB is about
106 bytes, and 1 GB is about 109 bytes, thus the origin of the prefixes kilo (thousand),
mega (million) and giga (billion). Few years ago, memory capacities were stated only in
terms of KB. With the rapidly increasing capacity of memory, today memory capacity of
small computer systems is stated in terms of MB and that of large computer systems is
stated in terms of GB. The memory capacity continues to increase rapidly and it is only a
matter of time before we start stating memory capacity in terms of terabytes (TB), which
is about one trillion (1012) bytes. Today, GB and TB are frequently used to refer to the
capacity of secondary storage of computer systems. Thus a computer having 32 MB of
memory is capable of storing 32 x 1048576 = 33,554,432 bytes or characters.

Sometimes the memory capacity of a computer system is also stated in terms of number
of words. However, if the memory capacity is stated in terms of words, it is necessary to
know the word size in bits or bytes in order to determine the actual memory capacity of
the computer. Thus, while specifying the memory capacity in terms of words, it is
customary to specify the total number of bits per word along with the total number of
words. So a memory with 4096 locations each with a different address and with each
location storing 16 bits is called a "16-bit 4096-word memory, or, in the vernacular of the
computer trade, a "4 K 16-bit memory". Similarly, a memory having 215 words with each
word of 16 bits is called a "32 K 16-bit memory". If the word size of a memory is 8 bits
(equal to a byte) then it becomes immaterial whether the memory capacity is expressed in
terms of bytes or words. Thus a memory having 216 words with each word of 8 bits is
simply referred to as 64 K memory (word size of 8-bits is implicit here).

Static and Dynamic RAM

When people talk about computer memory, they usually mean the volatile RAM memory.
Physically, this memory consists of some integrated circuit chips (IC chips shown in
Figure 1.2) either on the motherboard or on a small circuit board attached to the
motherboard. A computer's motherboard is designed so that its memory capacity can be
easily enhanced by adding more memory chips. Hence, if you decide to have more
memory than your computer currently has, you can buy more memory chips, open up
your computer, and plug it in the empty memory slots on the motherboard. This job is
normally done by the service engineers. The additional RAM chips, which plug
into'special sockets on the motherboard are also known as single in-line memory modules
{SIMMs).
RAM chips are of two types - dynamic and static. A dynamic RAM (DRAM), uses an
external circuitry to periodically "regenerate" or refresh the storage charge to retain the
stored data. On the other hand, a static RAM (SRAM) does not need any special
regenerator circuits to retain the stored data. Since it takes more transistors and other
devices to store a bit in a static RAM, these chips are more complicated and take up more
space for a given storage capacity than do dynamic RAMs. Moreover, a static RAM is
faster, costlier, and consumes more power than dynamic RAM. Due to these reasons,
large memories use dynamic RAM, and static RAM is used mainly for specialized
applications. The main memory of most computers uses dynamic RAM.

Read-Only Memory

A special type of RAM, called read-only memory (ROM) is a non-volatile memory chip
in which data is stored permanently and cannot be altered by the programmer. In fact,
storing data permanently into this kind of memory is called "burning in the data", because
data in such memory is stored by using fuse-links. Once a fuse-link is burnt it is
permanent. The data stored in a ROM chip can only be read and used - they cannot be
changed. This is the reason why it is called read-only memory (ROM). Since ROM chips
are non-volatile, the data stored inside a ROM are not lost when the power supply is
switched off, unlike the case of a volatile RAM chip. ROMs are also known as field
stores, permanent stores, or dead stores.

ROMs are mainly used to store programs and data which do not change and are
frequently used. For example, the most basic computer operations are carried out by
wired electronic circuits. However, there are several higher level operations that are very
frequently used but will require very complicated electronic circuits for their
implementations. Hence instead of building electronic circuits for these operations,
special programs are written to perform these operations. These programs are called
microprograms because they deal with low-level machine functions and are essentially
substitutes for additional hardware.

Microprograms are written to aid the control unit in directing all the operations of the
computer system. ROMs are mainly used by computer manufacturers for storing these
microprograms so that they cannot be modified by the users.

A good example of a microprogram that is stored in a ROM chip of a computer is the set
of instructions that is needed to make the computer system ready for use when its power
is switched on. This microprogram called "system boot program", contains a set of start-
up instructions to check if the system hardware like memory, I/O devices, etc. are
functioning properly, and looks for an operating system and loads its core part in the
volatile RAM of the system to produce the initial display-screen prompt. Note that this
microprogram is used every time the computer is switched on and needs to be retained
when the computer is switched off. Hence ROM is an ideal storage for this
microprogram.
There are two types of read-only memory (ROM) - manufacturer-programmed and user-
programmed. A manufacturer-programmed ROM is one in which data is burnt in by the
manufacturer of the electronic equipment in which it is used. For example, a personal
computer manufacturer may store the system boot program permanently in the ROM chip
used on the motherboard of all the PCs manufactured by it. Similarly, a printer
manufacturer may store the printer controller software in the ROM chip used on the
circuit board of all the printers manufactured by it. Manufacturer-programmed ROMs are
mainly used in those cases where the demand for such programmed ROMs is large. Note
that manufacturer-programmed ROM chips are supplied by the manufacturers of
electronic equipment, and it is not possible for a user to modify the programs or data
stored inside the ROM chip. On the other hand, a user-programmed ROM is one in which
the user can load and store "read-only" programs and data. That is, it is possible for a user
to "customize" a system by converting his/her own programs to microprograms and
storing them in a user-programmed ROM chip. Such a ROM is commonly known as
Programmable Read-Only Memory (PROM) because a user can program it. Once the
user programs are stored in a PROM chip, they can usually be executed in a fraction of
the time previously required. PROMs are; programmed to record information using a
special device known as PROM-programmer. However, once the chip has been
programmed, the recorded information cannot be changed, i.e., the PROM becomes a
ROM and it/Is only possible to read the stored information. PROM is also non-volatile
storage, i.e., the stored information remains intact even if power is switched off.

Once information is stored in a ROM chip or a PROM chip it cannot be altered.


However, there is another type of memory chip called Erasable Programmable Read-
Only Memory (EPROM) that overcomes this problem. As the name implies, it is possible
to erase information stored in an EPROM chip and the chip can be reprogrammed to store
new information. EPROMs are often used by R&D personnel (experimenters) who
frequently change the microprograms to test the efficiency of the computer system with
new programs. EPROMs are also useful in case of those applications where one may like
to store a program in a ROM, which would normally not change, but under some
unforeseen conditions one may like to alter it. When an EPROM is in use, information
stored in it can only be "read" and the information remains in the chip until it is erased.

EPROM chips are of two types - one in which the stored information is erased by
exposing the chip for some time to ultraviolet light, and the other one in which the stored
information is erased by using high voltage electric pulses. The former is known as Ultra
Voilet EPROM (UVEPROM) and the latter is known as Electrically EPROM
(EEPROM). It is easier to alter information stored in an EEPROM chip as compared to
an UVEPROM chip. This is because to alter information stored in an UVEPROM chip,
the chip has to be removed from the computer, erased using a special ultra-violet rays
emitting device, and then reprogrammed. On the other hand in case of an EEPROM chip,
stored programs can be altered electrically by using special programs, without the chip
being removed from the computer. Due to the ease with which stored programs can be
altered, EEPROM is also known as flash memory. Flash memory is used in many new
I/O and storage devices. The intelligence of these devices can be upgraded by simply
down-loading new software from a vendor-supplied disk to flash memory. Upgrades to
early peripheral devices required the user to replace the old circuit board or chip with a
new one.
The various types of random-access memories are summarized in Figure 7.5. Regardless
of the type cf ROM chip used, they all serve to increase the efficiency of a CPU by
controlling the performance of a few specialized tasks. A generalized CPU can be made
to meet the unique needs of different users merely by changing microprograms.

Random Access Memory (RAM)


Volatile and Writable
Non-volatile and Read-Only
Static (SRAM)
Dynamic (DRAM)
Manufacturer-programmed (ROM)
User-programmed
PROM
EPROM
UVEPROM
EEPROM

Minimizing Memory-Processor Speed Mismatch

We saw that the use of main memory helps in minimizing the disk-processor speed
mismatch to a large extent because the rate of data fetching by the CPU from the main
memory is about 100 times faster than that from a high-speed secondary storage like disk.
However even with the use of main memory, the memory-processor speed mismatch
becomes a bottleneck in the speed with which the CPU can process instructions because
there is a 1 to 10 speed mismatch between the processor and the memory. That is, the rate
at which data can be fetched from memory is about 10 times slower than the rate at which
CPU can process data. Hence in many situations the performance of the processors gets
limited due to the slow speed of the main memory. Obviously, the overall performance of
a processor can be greatly improved by minimizing the memory-processor speed
mismatch. The two commonly used approaches for minimizing the memory-processor
speed mismatch are the use of cache memory (pronounced "cash" memory) and memory
interleaving. These techniques are described below.

Cache Memory

Cache memory is an extremely fast, small memory between CPU and main memory
whose access time is closer to the processing speed of the CPU. It acts as a high-speed
buffer between CPU and main memory and is used to temporarily store very active data
and instructions during processing. Since the cache memory is faster than main memory,
the processing speed is increased by making data and instructions needed in present
processing available in the cache.,

The obvious question that arises is how can the system know in advance which data and
instructions are needed in present processing so as to make it available beforehand in the
£ache. The answer to this question comes from a principle known as locality of reference.
According to this principle, during the course of execution of most programs, memory
references by the processor, for both instructions and data, tend to cluster. That is, if an
instruction is executed, there is a likelihood of the same instruction being executed again
soon. This is true because most programs typically contain a number of iterative loops
(such as while and for loops). Once a loop is entered during the execution of a program,
there are repeated references to a small set of instructions (i.e., the instructions in the loop
are executed again and again several times). A branch instruction (such as a go to
statement) upsets the locality of reference to instructions, but such instructions do not
occur frequently in well written programs. Locality of reference is true not only for
references to program instructions but also for references to data. For example, operations
on tables, arrays, and records in a file involve access to a clustered set of data words.
Over a long period, the instructions or data clusters in use change, but over a short period,
the processor primarily work's with fixed clusters of instructions and data resulting in
clustered memory references.

Based on the feature of locality of reference, the effective use of a cache is made in the
following manner. As shown in Figure 7.6, the cache memory acts as a small, fast-speed
buffer between the processor and main memory. It contains a copy of a portion of main
memory contents. When a program is running and the CPU attempts to read a word of
memory (instruction or data), a check is made to determine if the word is in the cache. If
so, the word is delivered to the CPU from the cache. If not, a block of main memory,
consisting of some fixed number of words including the requested word, is read into the
cache and then the requested word is delivered to the CPU. Because of the feature of
locality of reference, when a block of memory words is fetched into the cache to satisfy a
single memory reference, it is likely that there will soon be references to other words in
that block. That is, the next time the CPU attempts to read a word, it is very likely that it
finds it in the cache and saves the time needed to read the word from main memory. You
might think that the odds of the CPU finding the word it needs in the cache are small, but
it actually does find the word it needs there often enough to improve perceptibly the
performance of a processor. In fact, it has been found in practice that more than 90% of
time, the needed word is available in the cache.

Main Memory
(Slower in speed and larger in size than cache memory)
Block of words including the accessed word
Address of accessed word when the word is not found in the cache
Cache Memory
Accessed word
Address of accessed word
CPU

As the name implies, cache memory is a memory in hiding (the word "cache" literally
means a hiding place for treasure or stores) and is not addressable by the normal users of
the computer system. Needed instructions/data are transferred automatically between the
cache and main memory by the hardware without any programmer intervention. In fact,
the application programmers are unaware of its presence and use.

Figure 7.6 illustrates the general concept of cache memory usage. Actual systems may be
designed to have some variations. For example, many computer systems are designed to
have two separate cache memories called instruction cache and data cache. The
instruction cache is used for storing program instructions and the data cache is used for
storing data. This allows faster identification of availability of accessed word in the cache
memory and helps in further improving the processor speed. Many computer systems are
also designed to have multiple levels of caches (such as level one and level two caches,
often referred to as LI and L2 caches). LI cache is smaller than L2 cache and is used to
store more frequently accessed instructions/data as compared to those in the L2 cache.

The use of cache memory requires several design issues to be addressed. A detailed
discussion of cache design is beyond the scope of this book. Key design issues are briefly
summarized below.

1. Cache size. Cache memory is very expensive as compared to the main memory and
hence its size is normally kept very small. It has been found through statistical studies
that reasonably small caches can have a significant impact on processor performance.
Hence cache memory size is usually decided based on statistical studies of program
behavior and is chosen so that the probability of the needed instruction/data being in the
cache is more than 90%. As a typical example of cache size, a system having 1 GB of
main memory may have about 1 MB of cache memory. Many of today's personal
computers have 64 KB, 128 KB, 256 KB, 512 KB, or 1 MB of cache memory.

2. Block size. Block size refers to the unit of data (few memory words) exchanged
between cache and main memory. As the block size increases from very small to larger
sizes, the hit ratio (fraction of time that referenced instruction/data is found in cache) will
at first increase because of the principle of locality since more and more useful words are
brought into the cache. However, the hit ratio will begin to decrease as the block size
further increases because the probability of using the newly fetched words becomes less
than the probability of reusing the words that must be moved out of the cache to make
room for the new block. Based on this fact, the block size is suitably chosen to
maximize the hit ratio.

3. Replacement policy. When a new block is to be fetched into the cache, another may
have to be replaced to make room for the new block. The replacement policy decides
which block to replace in such situation. Obviously, it will be best to replace a block that
is least likely to be needed again in the near future. Although it is impossible to identify
such a block, a reasonably effective strategy is to replace the block that has been in the
cache longest with no reference to it. This policy is referred to as the least recently used
(LRU) algorithm. Hardware mechanisms are needed to identify the least recently used
block.
4. Write policy. If the contents of a block in the cache are altered, then it is necessary to
write it back to main memory before replacing it. The write policy decides when the
altered words of a block are written back to main memory. At one extreme, an updated
word of a block is written to the main memory as soon as such updates occur in the
block. At the other extreme, all updated words of the block are written to the main
memory only when the block is replaced from the cache. The latter policy minimizes
memory write operations but temporarily leaves main memory in an inconsistent
(obsolete) state. This can interfere with multiple-processor operation when multiple
processors share a common memory and cache. It can also interfere with direct memory
access by input/output modules. Several other write policies that are somewhere in
between these two extremes are also in use. The choice of a suitable write policy for a
particular computer architecture is normally left to the designer.

Memory Interleaving

In this method, the main memory is divided into n equal size modules and the CPU has
separate MAR and MBR registers for each memory module. In addition, the CPU has n
instruction registers and a memory access system. When a program is loaded into the
main memory, its successive instructions are stored in successive memory modules. For
example, if n = 4 and the four memory modules are Mi, M2, M3 and M4, the 1st instruction
will be stored in Mi, 2nd in M2, 3td in M3,"4th in M4, 5th in Mi, 6th in M2, and so on. Now
during the execution of the program, when the processor issues a memory fetch
command, the memory access system creates n consecutive memory addresses and places
them in the n MARs in the right order. A memory read command reads all the n memory
modules simultaneously, retrieves the n consecutive instructions, and loads them into the
n instruction registers. Thus each fetch for a new instruction results in the loading of n
consecutive instructions in the n instruction registers of the CPU. Since the instructions
are normally executed in the sequence in which they are written, the availability of n
successive instructions in the CPU avoids memory access after each instruction
execution, and the total execution time speeds up. Obviously, the fetched successive
instructions are not useful when a branch instruction is encountered during the course of
execution. This is because the new set of n successive instructions starting from the
location of the instruction to which the control branches will be loaded into the n
instruction registers, overwriting the previously stored instructions which were loaded but
some of which were not executed. However, the method is quite effective in minimizing
the memory-processor speed mismatch because branch instructions do not occur
frequently in a program.

Hybrid Approach

This method uses both cache memory and memory interleaving. Cache memory is used
to reduce the speed mismatch between the CPU and the main memory, and memory
interleaving is used to reduce the speed mismatch between the CPU and the cache
memory. This approach further helps in speeding up the total execution time.

MEMORYBUSES
We saw in the discussion above that the data and instructions of a program being
executed are stored in the memory and are fetched and loaded into the CPU registers as
the program execution proceeds. That is, the interaction between the CPU and memory
takes place very frequently. To enable this interaction, some type of connectivity is
needed between the two units of a computer system. This connectivity channel is known
as a bus. Physically, a bus is a set of wires, which carries a group of bits in parallel and
has an associated control scheme. The bus width is defined as the number of parallel lines
(wires) in the bus. Every computer system has the following three types of buses for
interconnecting the CPU and memory:

1. Data Bus. The data bus is used to transfer data between the CPU and memory. The
one that you hear the most about is the data bus. Hence when people refer to the bus of a
computer system, they usually mean the data bus.
The bus width of the data bus is an important parameter that affects the overall speed of a
computer system. This is because each wire of a bus can transfer one bit at a time. Hence
an 8-bit bus (one having 8 parallel wires) can move 8 bits (one byte) at a time, a 16-bit
bus can transfer two bytes, and a 32-bit bus can transfer four bytes at a time. This is
similar to a multi-lane highway. The wider the highway, the more traffic can flow
simultaneously. Similarly, a wider data bus enables more bits of data to travel
simultaneously resulting in faster exchange of data.
2. Address Bus. We saw that every storage location in the memory has a unique
address. The address of a location does not change, but the data stored in it can change. In
order to retrieve some data from memory, it is necessary to specify the address of the
location where the data is stored. The address bus is used to carry the address of a
memory location whenever data is to be transferred to or from memory.
Obviously, the width of the address bus must be equal to the number of bits in the
memory address register (MAR) of the system. The width of the address bus is an
important parameter for a computer system because it determines the maximum number
of memory locations that the computer system can have. For example, if the address bus
was only 8 bits wide, the CPU could address only 256 bytes of memory. Most of early
personal computers had 20-bit wide address buses, so the CPU could address 2 20 bytes, or
1 MB, of memory. Today, most systems have 32-bit wide address buses that can address
232 bytes (over 4 billion bytes), or 4 GB, of memory.
3. Control Bus. In addition to sending addresses and exchanging data with the memory,
the CPU also needs to send control signals to the memory to specify whether the data is
to be read from or written to the specified address location. Such signals, which are in
the form of READ/WRITE commands, are carried by the control bus.

Thus a memory access by the CPU involves all the three buses - the memory access
command is carried by the control bus, the memory address is carried by the address bus,
and the data to be transferred is carried by the data bus. Figure 7.8 shows the three buses
used for interconnecting the CPU and main memory for enabling this.
CPU
Data Bus
Address Bus
Control Bus
Main Memory

Figure 7.8. The three types of buses used between the CPU and main memory.
I/O BUSES

We saw in Chapter 2 that in addition to the flow of data between the CPU and memory,
data also flows between the CPU and I/O devices in a computer system. Hence just like
the buses between the CPU and memory, every computer system also uses buses for
interconnecting the CPU with I/O devices. The same three types of buses used for
interconnecting the CPU and memory are also used for interconnecting the CPU with I/O
devices. Their roles in context of I/O devices are described below.

1. Data Bus. The data bus is used to transfer data between the CPU and I/O devices. As
discussed before, a wider data bus will enable faster exchange of data between the CPU
and I/O devices. The commonly used, industry standard data buses are as follows:
- ISA Bus. ISA stands for Industry Standard Architecture. It is a 16-bit bus but that
can transmit data along either 8 or 16 data lines, depending on what kind of adapter card
is used in an expansion slot. That is, ISA expansion slots can accept both 8-bit and 16-bit
adapter cards.
- MCA Bus. MCA stands for Micro Channel Architecture. It is a 32-bit bus that
transmits data along 32 data lines. Due to its wider bus width, it is significantly faster
than the ISA bus. However, MCA expansion slots cannot accept 8-bit or 16-bit adapter
cards and require specifically designed 32-bit adapter cards.
- EISA Bus. EISA stands for Extended Industry Standard Architecture. Since the
expansion slots that fit into an ISA bus could not work with the MCA bus, the MCA bus
had the problem of upward compatibility. EISA bus was designed to solve this problem.
Hence like MCA, EISA is also a 32-bit bus. However, unlike MCA, it was designed to
accept and use the old ISA expansion slots. The EISA is faster than the ISA, but not as
fast as the MCA -the price of its compatibility with the older 16-bit expansion slots.
2. Address Bus. A computer system normally has multiple I/O devices like disk, tape,
network, etc. simultaneously connected to it. Each I/O device has a unique identifier (or
address) associated with it. The address bus is used to carry the address of the I/O device
to be accessed by the CPU.
3. Control Bus. The control bus is used to carry commands such as START, READ,
WRITE, REWIND TAPE, etc., from the CPU to I/O devices. It is also used to carry the
status information of the I/O devices to the CPU.

Thus an I/O device access by the CPU involves all the three buses - the device access
command is carried by the control bus, the device address is carried by the address bus,
and the data to be transferred is carried by the data bus. Figure 7.9 shows the three buses
used for interconnecting the CPU and I/O devices for enabling this. Each device has a
controller, which controls the operation of the device. It also temporarily stores the data
transferred between the CPU and the device in a local data register.

INTERCONNECTION ARCHITECTURES
In the discussion above, we saw the use of buses in interconnecting the CPU with
memory and I/O devices. The interconnection architecture defines how exactly these
functional units of a computer system are connected to each other. The accessing
mechanism and the flow of data from one unit to another depends on the interconnection
architecture. The three commonly used interconnection architectures are described below.

Unibus Architecture

As shown in Figure 7.10, in the unibus architecture there is a single data bus, a single
address bus, and a single control bus used to interconnect the CPU with both the memory
and I/O devices. That is, the buses are shared for data transfer between the CPU and
memory, as well as between the CPU and I/O devices. As a result, data transfer can take
place at a time only between CPU and memory, or between CPU and an I/O device.
Obviously, this architecture leads to a very slow data transfer. Hence it is used mostly in
small computers where performance is not an issue. The main advantage of this
architecture is its simple design and ease of programming of I/O device accesses. In this
case, I/O devices do not require any special I/O instructions because they use the same
memory address space. Hence a WRITE instruction with an address corresponding to an
output device will write information to that device. Another advantage of this architecture
is that it allows new I/O devices to be easily added to the system, as no new instructions
specific to the device are required.

Dual Bus Architecture

As shown in Figure 7.11, in the dual bus architecture, there are separate set of buses for
interconnecting the CPU with memory and with I/O devices. Hence data transfer between
the CPU and main memory is carried out by using the buses which interconnect the CPU
and main memory, while data transfer between the CPU and I/O devices is carried out by
using the buses which interconnect the CPU and I/O devices. In this case, one of the
following two mechanisms are used for data transfer between the CPU and an I/O device:

1. Busy Wait. In this method, the CPU sends the I/O request (say a data READ request)
to the device via the buses. As already described, the command and the device address
associated with the READ request are sent across by using the control bus and the
address bus respectively. As soon as the device controller receives the request, it first sets
ON a "device busy" indicator so that no further I/O requests for the device will be
accepted. It then executes the request and stores the data to be transferred in its local data
register. As soon as it cgmpletes the request processing, it sets ON another indicator
called "data ready" indicator. After issuing the READ request, the CPU continuously
keeps checking the "data ready" indicator of the device and waits until this indicator is set
to ON. As soon as the CPU finds this indicator to be ON, it reads the data from the data
register of the device controller into its own register. It then sends a data received
acknowledgment signal to the device. On receiving this signal, the device controller
resets its "device busy" and "data ready" indicators to OFF which indicates that it is now
ready to accept new I/O requests.
2. Interrupt. In the busy wait method, we saw that after issuing an I/O request, the CPU
remains busy in checking for the completion of the request until the request processing is
over. That is, from the time of issuing an I/O request till the completion of the request,
the CPU does not do anything else. This is very inefficient use of the CPU because I/O
devices are about 1000 times slower than the CPU. The interrupt mechanism has been
devised to overcome this problem.
In this method, after issuing the READ request to the I/O device, the CPU does not wait
for the "data ready" indicator of the device to be set ON. Rather, it suspends the job that
made the READ request and takes up another job that is ready for execution and starts
executing this job while the device controller is busy processing the READ request.
When the device controller completes processing the request and the data to be
transferred is ready in its local data register, it sends an interrupt signal to the CPU. When
the CPU receives the interrupt signal, it knows that the data it requested is now ready.
Hence it suspends the job that it is currently executing, transfers the data from the data
register of the device controller to its own register and resumes execution of the job that
had made the I/O request.
Notice that the interrupt mechanism is more difficult to implement than the busy wait
mechanism because it requires a mechanism to suspend a currently executing job and
resume it at a later time. How this is done will be discussed in Chapter 14. Moreover, in
case of multiple I/O devices, it also requires a mechanism to distinguish among the
interrupt signals of different devices and to attend to them based on some priority rules
because various devices can initiate interrupt signals independent of each other.

DMA Architecture

I/O devices are used to input data to or output data from a computer system. Most of the
time, this involves either reading data from an input device and storing it in the main
memory, or reading data stored in the main memory and outputting it to an output device.
That is, data transfer takes, place between the main memory and I/O devices. We saw that
in the previous two interconnection architectures, every data transfer to or from an I/O
device is carried out by the CPU. Hence the CPU is fully involved in every data
transferred between the main memory and I/O devices. This leads to inefficient usage of
the CPU. Thus another interconnection architecture, called Direct Memory Access
(DMA) architecture, which minimizes the CPU participation in I/O data transfer is often
used.

As shown in Figure 7.12, in this method an additional hardware called DMA controller
[also known as Peripheral Processing Unit (PPU)] is used. All the I/O devices are
connected to the DMA controller. A set of buses is used to connect the CPU and memory.
Another set of buses is used to directly connect the DMA controller with both the CPU
and memory so that data transfer to or from I/O devices can be directly carried out either
with the CPU or with the memory. An additional address bus is used between the CPU
and the DMA controller. Out of the two address buses, one is used to carry the memory
address and the other one is used to carry the device address. Hence in the figure, they
have been specifically named as Memory Address Bus (MAB) and Device Address Bus
(DAB). The DMA controller has a data register to temporarily store the data being
transferred, a memory address register to keep track of the memory location from/to
where data is transferred, a counter to keep track of how many memory words have to be
transferred, a "busy" indicator to indicate that it is currently busy and cannot accept any
new I/O requests now, and a "data ready" indicator to indicate to the CPU that the
requested data is ready in its data register for transfer.
The data transfer in this case takes place in the following manner:
1. The CPU sends the I/O request (say a data READ request) to the DMA controller.
The device address of the device from which data is to be read, the memory location at
which data is to be stored, and the READ command along with the number of memory
words to be read are sent across by using the device address bus, the memory address
bus, and the control bus respectively. After sending the request, the CPU continues with
its normal course of execution since it has no further direct role in this I/O request
processing.
2. On receiving the request, the DMA controller sets its "busy" indicator to ON and
stores the received
memory address and number of memory words to be read in its memory address register
and the counter respectively.
3. It then reads the first memory word to be transferred from the specified I/O device
into its data register and sets the "data ready" indicator to ON.
4. It now sends an interrupt signal to the CPU.
5. On receiving the interrupt signal, the CPU completes the execution of the instruction
that it is currently executing, and then yields the memory address and data buses to the
DMA controller for one memory cycle.
6. The DMA controller transfers the data in its data register to the memory location
specified" by the contents of its memory address register. It then decrements the value
of the counter by one and increments the value stored in its memory address register by
one.
7. The DMA controller then reads the next word from the I/O device and stores it in its
data register. It then interrupts the CPU, which yields a memory cycle and the memory
address and data buses to the DMA controller to enable it to transfer the word from its
data register to the appropriate memory location. The DMA controller then decrements
the counter value and increments the value stored in its memory address register. This
procedure is repeated till the counter value becomes zero.
This procedure, where a memory cycle is taken by the DMA controller from the CPU to
enable it to transfer data directly to memory is known as cycle stealing.
Note that the DMA architecture leads to more efficient CPU utilization because the I/O
request is largely processed by the DMA controller without direct participation of the
CPU. However, this advantage is gained by providing an extra hardware (the DMA
controller) and an additional bus (the device address bus).

Points to Remember

1. The CPU is the brain of a computer system. All major calculations and comparisons
performed by a computer are carried out inside its CPU. The CPU is also responsible for
activating and controlling the operations of other units of the computer system. Hence no
other single component of a computer determines its overall performance as much as the
CPU.
2. The two basic components of a CPU are the control unit and the arithmetic logic
unit.
3. The control unit of the CPU acts as a central nervous system for the other
components of the computer. It manages and coordinates the entire computer system
including the input and output units. It obtains instructions from the program stored in
the main memory, interprets the instructions, and issues signals that cause other units of
the system to execute them.
4. The Arithmetic Logic Unit (ALU) of the CPU is the place where the actual execution
of the instructions takes place during the data processing operation.
5. Every CPU has the built-in ability to execute a particular set of machine instructions,
called its instruction set.
6. As the instructions are interpreted and executed by the CPU, there is a movement of
information between the various units of the computer system. In order to handle this
process satisfactorily and to speed up the rate of information transfer, the computer uses a
number of special memory units called registers. These registers are used to hold
information on a temporary basis and are part of the CPU (not main memory).148
I Foundations of Computing
7. The speed of a processor is directly related to the computer's clock speed, which is
the number of pulses, produced each second by the built-in electronic clock. This clock
speed is measured in megahertz (or MHz.).
8. Although the processing speed of personal computers is generally measured in MHz,
the processing speed of workstations, mini computers, and mainframe systems is often
measured in MIPS (Millions of Instructions Per Second) or BIPS (Billions of Instructions
Per Second), and that of supercomputers is measured in MFLOPS (Millions of Floating
Point Operations Per Second) or GFLOPS (gigaflops which refers to a billion FLOPS).
9. CPUs with large instruction set, variable-length instructions, and a variety of
addressing modes are said to employ CISC (Complex Instruction Set Computer)
architecture.
10. CPUs with a small instruction set, fixed-length instructions, and reduced references
to memory to retrieve operands are said to employ RISC (Reduced Instruction Set
Computer) architecture.
11. The Explicitly Parallel Instruction Computing (EPIC) technology is fast emerging as
the technology for next-generation processors. The three key features of EPIC technology
targeted towards improved performance as compared to today's processors are explicit
parallelism, predication and speculation.
12. Every computer has a temporary storage area that is built into the computer hardware
and in which instructions and data of a program reside mainly when the program is being
executed by the CPU. This storage space is known as primary storage, main memory, or
simply memory.
13. Any storage unit of a computer system i,s characterized and evaluated based on the
following properties -storage capacity, access time, cost per bit of storage, volatile,
random access.
14. A primary storage or main memory of a computer system is made up of several small
storage areas called locations or cells. Each of these locations can store a fixed number
of bits called word length of that particular memory. Each location can hold either a data
item or an instruction, and its address remains the same regardless of its contents. The
addresses normally start at 0 and the highest address equals the number of words that can
be stored in the memory minus 1.
15. Data and instructions are moved to and from memory in bunches of word length.
Therefore, even if the electronic circuits used are comparable in speed, machines having
smaller word-length will be slower in operation than machines having larger word-length.
16. The main memory of some computers is designed to store a fixed number of
characters (equal to its word length in bytes) in each numbered address location. Such
computers are said to be word-addressable, and they employ a fixed-word-length memory
approach. In these computers, storage space is always allocated in multiples of word-
length. In many computers, the main memory is also designed in such a way that each
numbered address can only store a single character (A, B, 1, 2, +, -, etc.) Computers
designed in this manner are said to be character-addressable and they employ a variable-
word-length memory approach.
17. The main memory capacity of large computer systems is normally more than small
systems. This capacity is defined in terms of the number of bytes a computer system can
store. Memory capacity of a computer system is normally stated in terms of kilobytes
(KB) which is equal to 1024 (210) bytes of storage, or in terms of megabytes (MB) which
is equal to 1,048,576 (220) bytes of storage, or in terms of gigabytes (GB) which is equal
to 1,073,741,824 (230) bytes of storage.
18. A computer's main memory is built of volatile RAM chips. RAM chips are of two
types - dynamic and static. A dynamic RAM {DRAM), uses an external circuitry to
periodically "regenerate" or refresh the storage charge to retain the stored data.
19. A special type of RAM, called read-only memory (ROM) is a non-volatile memory
chip in which data are stored permanently and cannot be altered by the programmer.
There are two types of read-only memory (ROM) - manufacturer-programmed and user-
programmed. The latter is commonly known as Programmable Read-Only Memory
(PROM) because a user can program it.
20. Once information is stored in a ROM chip or a PROM chip it cannot be altered.
However, Erasable Programmable Read-Only Memory (EPROM) chips can be
reprogrammed to store new information. EPROM chips are of two types - Ultra Voilet
EPROM(UVEPROM) and Electrically EPROM(EEPROM). EEPROM is also known as
flash memory.
21. The overall performance of a processor can be greatly improved by minimizing the
memory-processor speed mismatch. The two commonly used approaches for
minimizing the memory-processor speed mismatch are the use of cache memory and
memory interleaving.
22. Cache memory is an extremely fast, small memory between CPU and main memory
whose access time is closer to the processing speed of the CPU. It acts as a high-speed
buffer between CPU and main memory and is used to temporarily store very active data
and instructions during processing.
23. The connectivity channel used for interaction between the CPU and memory is
known as a bus. Physically, a bus is a set of wires, which carries a group of bits in
parallel and has an associated control scheme. The bus width is defined as the number of
parallel lines (wires) in the bus. Every computer system has the following
three types of buses - data bus, address bus and control bus.
l
24. Just like the buses between the CPU and memory, every computer system also uses
buses for interconnecting the CPU (with I/O devices. The same three types of buses (data
bus, address bus and control bus) are also used for intercdnnecting the CPU with I/O
devices.
25. The interconnection architecture of a computer system defines how exactly its CPU,
memory and I/O devices are connected to each other. The accessing mechanism and the
flow of data from one unit to another depends on the interconnection architecture. The
three commonly used interconnection architectures are unibus architecture, dual bus
architecture and DMA (Direct Memory Access) architecture.

Questions

1. No other single component of a computer determines its overall performance as


much as the CPU. Discuss.
2. List out the main functions of the CPU in a computer system.
3. What are the two main components of the CPU of a computer system? List out the
main functions of each of these components.
4. The control unit acts as a central nervous system for the other components of a
computer system. Discuss.
5. Describe the role of the decoder of the control unit of a CPU.
6. What is a microprocessor?
7. What is an instruction set of a computer system? Do computers made by different
manufacturers generally have the same or different instruction sets?
8. Machine language programs written for one computer will generally not run on
another computer with a different CPU. Explain why?
9. What is meant by a family of CPUs? When do two CPUs belong to the same family?
10. When is a computer said to be upward compatible with another computer? How is
this feature useful for the users of these computers?
11. What are registers? Name some of the commonly used registers and briefly
describe the function of each.
12. What is meant by the length of a register? What are the commonly used register-
lengths in modern computer systems? Why is a larger register length more desirable?
13. List out the main steps involved in the execution of an instruction by the CPU of a
computer system.
14. What is meant by the clock speed of a computer system? How does it influence
the overall speed of a computer system?
15. How is the clock speed of a computer system determined?
16. Differentiate between the terms "clock cycle" and "clock speed".
17. What is a superscalar CPU architecture? How does it lead to a better performance
of a computer system?
18. The processing speed of personal computers is generally measured in MHz (Mega
Hertz), but that of workstations, mini computers, and mainframe systems is measured in
MFLOPS (Millions of Floating Point Operations Per Second). Explain why.
19. Why is the speed of supercomputers generally measured in FLOPS?
20. Name two important design parameters that influence the performance of a CPU.
Explain how each parameter influences the speed with which a CPU can execute
instructions.
21. List out the key features of CISC processors.
22. List out the key features of RISC processors.
23. Differentiate between CISC and RISC processors.
24. List out the relative advantages and disadvantages of CISC and RISC processors.
25. Explain how RISC architecture leads to the design of faster and less expensive
processors as compared to CISC architecture.
26. What is EPIC technology? What are its key features?
27. What is IA-64 architecture?
28. How do EPIC processors have better performance than CISC or RISC processors?
29. What is explicit parallelism? How does it help in improved processor performance?
30. What is predication? How does it help in improved processor performance?
31. Explain the difference between "branch prediction" and "branch predication"
techniques.
32. What is load speculation? How does it help in improved processor performance?
33. The performance of EPIC processors comes from both hardware and software.
Discuss.
34. Imagine a computer system, which has no primary memory. Explain how would
computations be carried out in this system. What would be the major drawback of such a
system? Based on this, explain the need for primary memory in a computer system.
35. A fast processor alone is not sufficient for good performance of a computer system.
Discuss.
36. List out the key properties used to characterize and evaluate storage units of
computer systems.
37. Explain the difference between volatile and non-volatile memory. Give an
example of each type of memory.
38. Explain the difference among random access, pseudo-random access, and sequential
access storage units. Give an example of each type of storage unit.
39. Differentiate between a bit, a byte, and a word.
40. What is a memory address? Describe with an example.
41. Explain the difference between an address and the contents of an address.
42. Explain the key difference between memory read and write operations.
43. Explain why is it advantageous to have more number of bits per word instead of
having more words of shorter length in the memory architecture of a computer system?
44. Distinguish between word-addressable and character-addressable computers.
Discuss their relative advantages and disadvantages.
45. How many bytes will be required to store the. word 'MEMORY' in (a) a character-
addressable computer, (b) a word-addressable computer having word-length of 64 bits?
46. Name some of the commonly used units for stating memory capacity. Also state
the total number of characters each unit is roughly equivalent to.
47. A computer has 512 MB of memory. How many characters can be stored in its
memory at a time?
48. Is it possible to enhance the existing memory capacity of a computer system? If no,
explain why. If yes, explain how.
49. Differentiate between static and dynamic RAMs. Which one is commonly used for
the main memory of most computers?
50. What is a ROM? Why is it so called? Give few typical uses of ROM.
51. What is a microprogram? Give an example of a microprogram that is a good
candidate for storage in the ROM of a computer system.
52. Differentiate between manufacturer-programmed and user-programmed ROMs.
53. Differentiate between PROM and EPROM.
54. Differentiate between UVEPROM and EEPROM. In which case is it easier to alter
stored information and why?
55. What is a flash memory? Why is it so called? Give its few typical uses.
56. Differentiate among RAM, ROM, PROM and EPROM.
57. Write short notes on:
(a) CISC architecture (f) EPROM
(b) RISC architecture (g) Memory capacity
(c) RAM (h) Instruction set
(d) Processor speed (i) EPIC technology
(e) ROM
58. The rate at which data can be fetched from memory is about ten times slower than
the rate at which CPU can process data. Name two methods that may be used to
minimize this speed mismatch. Give the details of one of the two methods and explain
how it helps in minimizing the speed mismatch.
59. What is a cache memory? How is it different from a primary memory?
60. Explain how a cache memory helps in improving the overall processing speed of a
computer system.
61. The effective use of cache memory requires that the data and instructions needed
for processing by the CPU are made available beforehand in the cache. Explain how is
this ensured in the system.
62. What is the principle of locality of reference? How is it related to the speed of
execution of a program? In what manner do branch statements affect the locality of
reference?
63. Many computer systems use separate data and instruction caches. Explain why.
64. Explain the concept of multi-level cache design in a computer system. What are its
advantages and disadvantages as compared to a single-level cache design?
65. What are the key design issues involved in the use of cache memory in a computer
system? Describe the commonly used mechanisms to handle each of these issues.
66. What is cache size? How is it normally decided?
67. What is meant by block size in the context of cache design? How is it normally
decided?
68. What is hit ratio? How can a programmer help in improving the hit ratio of a
computer system?
69. What is meant by replacement policy in the context of cache design? Name a
commonly used cache replacement policy.
70. Explain how the least recently used (LRU) replacement policy leads to effective
cache usage.
71. What is meant by write policy in the context of cache design? Describe two write
policies and list their relative advantages and disadvantages.
72. What is memory interleaving? Explain how it helps in improving the overall
processing speed of a computer system.
73. Explain how instructions are distributed in different modules of an interleaved
memory system.
74. Explain how cache memory and interleaved memory mechanisms can be used
together to improve the overall processing speed of a computer system.
75. What is a bus? Why is it required in a computer system?
76. What is meant by bus width? How does it affect the overall speed of a computer
system?
77. What are memory buses? How many types of memory buses are there? Describe
the role of each type.
78. A wider bus enables faster exchange of data. Discuss.
79. Why is the width of the memory address bus an important parameter for a
computer system?
80. How are the width of the memory address bus and the number of memory locations
of a computer system co-related?
81. What are I/O buses? How many types of I/O buses are there? Describe the role of
each type.
82. List out the similarities and differences among the ISA, EISA and MCA buses.
83. What is an I/O device controller? Explain its role in I/O data transfer.
84. What is meant by the interconnection architecture of a computer system? List out
some of the commonly used interconnection architectures.
85. Describe how data transfer takes place in case of unibus interconnection
architecture. List out some of the advantages and limitations of this architecture.
86. Describe the busy wait mechanism of data transfer between the CPU and an I/O
device in case of dual bus architecture. List out the advantages and limitations of this
mechanism.
87. Describe the interrupt mechanism of data transfer between the CPU and an I/O
device in case of dual bus architecture. List out the advantages and limitations of this
mechanism.
88. Draw the schematic diagram of the DMA interconnection architecture. Describe
how data transfer takes place in this case. Explain how this architecture minimizes the
CPU participation in I/O data transfer.
89. List out the advantages and limitations of DMA data transfer mechanism.154
I Foundations of Computing
90. What is cycle stealing?
91. Write short notes on:
(a) Central Processing Unit (CPU)
(b) Arithmetic Logic Unit (ALU)
(c) Registers
(d) Storage evaluation criteria
(e) I/O buses
(f) Static and Dynamic RAM
(g) Cache memory
(h) Locality of reference
(i) Cache replacement policy
(j) Interleaved memory
(k) Memory buses
(1) Volatile and Non-volatile storage
(m) Interconnection architectures
(n) DMA data transfer
(o) Fixed and Variable word-length memory
92. Write the full form of the following abbreviations:
(a) KB (n) PROM
(b) RAM (o) EPROM
(c) ROM (p) MAR
(d) MBR (q) GFLOPS
(e) MB (r) FLOPS (0 GB
(s) SIMM (g) CISC
(t) LRU (h) RISC
(u) ISA bus (i) SRAM
(v) EISA bus (j) DRAM
(w) MCA bus (k) UVEPROM
(x) PPU (1) EEPROM
(y) DMA (m) MFLOPS
(z) EPIC
Chapter 8

Secondary Storage Devices

It is desirable that the operating speed of the primary storage of a computer system be as
fast as possible because most of the data transfer to and from the processing unit is via
the main memory. For this reason, storage devices with very fast access times, such as
semiconductors, are generally chosen for the design of primary storage. These high-speed
storage devices are expensive and hence the cost per bit of storage is also high for a
primary storage. Moreover, these storage devices are volatile. That is, the data stored in
them are lost when the power is turned off or interrupted. Hence the primary storage of a
computer system has the following limitations:

1. Limited Capacity. The storage capacity of the primary storage is limited. Often, it is
necessary to store many millions, sometimes billions, of bytes of data. Unfortunately, the
storage capacity of the primary storage of today's computers is not sufficient to store the
large volume of data handled by most data processing centres.

2. Volatile. The primary storage is volatile and the data stored in it is lost when the
electric power is turned off or interrupted. However computer systems need to store data
on a permanent basis for several days, several months, or even several years.

As a result, additional memory, called auxiliary memory or secondary storage, is used


with most computer systems. This section of the computer's memory is non-volatile and
has low cost per bit stored, but it generally has an operating speed far slower than that of
the primary storage. This section of the memory is used to store large volume of data on a
permanent basis which can be partially transferred to the primary storage as and when
required for processing. Data is stored in secondary storage in the same binary codes as in
main storage and is made available to main storage as needed.

Over the years, a wide range of devices and media have been developed for use as
secondary storage in computer systems. Many of them, such as punched paper tape and
punched cards, have become obsolete. As shown in Figure 8.1, the popular ones used in
today’s computer systems are magnetic tape, floppy disk, zip disk, disk pack, Winchester
disk, CD-ROM, WORM disk and magneto-optical disk. In this chapter you will learn
about the terminologies, principles of operation, uses, and trade-offs of many different
types of secondary storage devices.

SEQUENTIAL AND DIRECT-ACCESS DEVICES

Several different devices can be used as a secondary storage device, but the one selected
for a particular application mainly depends upon how the stored information needs to be
accessed. Basically, there are two methods of accessing information - sequential or serial
access and direct or random access. A sequential-access storage device is one in which
the arrival at the location desired may be preceded by sequencing through other locations,
so that access time varies according to location. In other words, information on a
sequential-access device can only be retrieved in the same sequence in which it is stored.
Sequential processing is quite suitable for such applications like preparation of monthly
pay slips, or monthly electricity bills, etc., where most, if not all, of the data records need
to be processed one after another. In these applications, data records for each and every
employee or customer needs to be processed at scheduled intervals (in this case monthly).
However, while working with a sequential-access device, if an address is required out of
order, it can only be reached by searching through all those addresses which are stored
before it. For instance, data stored at the last few locations cannot be accessed until all
preceding locations in the sequence have been traversed. This is analogous to a music
tape cassette. If 10 songs are recorded on a music tape and if you want to listen to (or
access) the 8th song, you must listen to the 7 songs that come before your favorite song
before you can hear it. Although your player may "fast forward" the tape quickly past the
first 7 songs, the first 7 songs are still accessed although not fully played. In the same
way, to access the 28th data record stored on a sequential-access device, the computer
must first access (although not process) the first 27 data records. Magnetic tape is a
typical example of a sequential-access storage device.

In many applications, we need to access information in a more direct manner than


sequential-access devices allow. For example, in a computerized bank, at any instance it
is required to determine the exact balance in the savings account of a particular customer.
Similarly, in a computerized airline ticket booking system, immediate access may be
required to reservation system records to find out if seats are currently available on a
particular flight. In such applications, if we use a sequential-access device for data
storage, the time taken to access the desired information may be enormous which will
cause frustration to the customer. Secondary storage devices exist which permit access to
individual information in a more direct or immediate manner. These direct-access devices
are also called random-access devices because the information is literally available at
random, i.e., it is available in any order. Thus a random-access storage device is one in
which any location in the device may be selected at random, access to the information
stored is direct, and approximately equal access time is required for each location. This is
analogous to a music CD. If 10 songs are recorded on a music CD and if you want to
listen to (or access) the 6th song, you need not listen to or fast forward the 5 songs that
come before your favorite song. All you have to do is select track number 6 on the player
and the player directly moves the pickup arm across the CD to the groove where the 6 th
song begins and starts playing. Magnetic, optical and magneto-optical disks of various
types are typical examples of direct-access storage devices.

MAGNETIC TAPE

Magnetic tape is one of the oldest forms of secondary storage device. It is one of the most
popular storage medium for large data that are sequentially accessed and processed or
that are not used very often and need to be stored off-line (not directly accessible to the
computer system). It is also used as a backup storage (additional copy of data kept away
from the computer system) for data stored on on-line storage devices such as a hard disk.
The magnetic tape medium is a plastic ribbon usually XA inch or % inch wide and 50 to
2400 feet long. It is coated with a magnetizable recording material such as iron-oxide or
chromium dioxide. Data are recorded on the tape in the form of tiny invisible magnetized
and non-magnetized spots (representing Is and 0s) on the coated surface of the tape. The
tape ribbon is itself stored in reels or a small cartridge or cassette.

Basic Principles of Operation

Storage Organization

The tape of a magnetic tape storage is divided into vertical columns called frames and
horizontal rows called channels or tracks. As shown in Figure 8.2, older tapes had 7
tracks and they used the 6-bit BCD code format for data recording. As in BCD code, the
letter A is represented on this tape by the code 110001. The first six tracks are used for
recording the 6 bits of the BCD code. The seventh track is used for recording the parity
bit.

A parity bit or check bit is used to detect errors that may occur due to the loss of a bit
from a string of 6 or 8 bits during data input or output operations. If the basic code for a
character requires an odd number of 1 bits (such as the characters 1, 2, or A in BCD) an
additional 1 bit is added to the check bit location so that there will always be an even
number of 1 bits. This is an example of even-parity. Similarly, in odd-parity, the check
bit is used to always produce an odd number of 1 bits. That is, the check bit will be 1 if
the total number of 1 bits for representing a particular character is even and it will be 0
otherwise. The tape shown in Figure 8.2 uses the parity bit for an even parity.

Most of the modern magnetic tapes have 9 tracks and they use the 8-bit EBCDIC code
format for data recording. As shown in Figure 8.3, in this case the fourth track is used for
parity bit, which produces an odd parity in this example. Notice that the letter A is
represented here by the code 11000001 as in the 8-bit EBCDIC code format.

A magnetic tape is a continuous medium in which data are recorded serially. There is no
addressing. In this situation, how can different pieces of data (known as records) be
identified on a tape? The answer is that records may be separated by blank spaces on the
tape called inter-record gaps (IRG). These gaps are automatically created when data are
written on the tape. Each gap is of the order of 0.5 inches. When data are read from a
moving tape, the tape movement stops when a gap is reached. The tape remains
motionless until the record is processed and then moves again to read the next record.
This procedure is repeated until all the records in a file are processed.

Records stored on tapes can be of varying lengths. If a tape contains a large number of
very short records with an IRG after each record, then more than half of the tape could be
unused (occupied with IRGs), and the tape I/O operation would also be very slow due to
very frequent interruption in tape movement during I/O operation. To overcome these
problems of inefficient usage of tape storage space and inefficient I/O operation, records
are usually grouped in blocks of two or more, separated by an inter-block gap {IBG). The
process of grouping two or more records together to form a block of data is known as
blocking and the number of records put together in each block is called blocking factor.
The blocking factor generally depends on the record length. The rule of thumb for
deciding blocking factor is that the block should be at least ten times as long as the IBG
to reduce wastage of tape storage space.

Blocking also helps in faster tape I/O operation because it permits additional records to
be transmitted with each "read" or "write" operation. For each tape "read" operation, all
data records between adjacent IBGs are read at a time into the main memory of the
computer system for processing. The next "read" operation transmits the next block of
records to the main memory. For a "write" operation on a tape, an entire block of records
are transmitted from the main memory to the tape drive. Then a block of data and an IBG
are written on the tape.

Figure 8.4 illustrates the concept of blocking. Figure 8.4 (a) shows an unblocked tape
(one which does not use blocking), Figure 8.4 (b) shows a tape which uses a blocking
factor of two, and Figure 8.4 (c) shows a tape which uses a blocking factor of three.
Notice how the tape usage increases as the blocking factor increases. However, the
blocking factor should not be too large otherwise in case of data loss due to some parts of
the tape becoming bad, all the records in a block will become irretrievable.

A group of records form a block, and a set of blocks constitute a file. A single tape is
normally used to store several files. In this case we face the problem of uniquely
identifying the files stored on a tape and separating one file from the other when they are
sequentially stored one after another on the tape. To take care of this problem, the
computer adds a file header label and a file trailer label respectively at the beginning and
at the end of a particular tape file. The file header label identifies the beginning of a file
and contains the file's attributes such as the name of the file (file identifier), the date it
was created, etc. The file trailer label signifies the end of a file and contains the total
number of records in the file. The data organization on a magnetic tape along with file
header and file trailer labels is shown in Figure 8.5.

A tape is wound on a spool and during tape I/O operation it moves from a supply spool to
a take-up spool. To allow for threading on the take-up and supply spools, the first and the
last several feet of tape are unused (not used for any type of information recording). After
the unused length towards the beginning of tape, a reflective metal foil known as the
beginning of tape (BOT) marker is used to indicate to the equipment the beginning of
usable tape. Similarly, before the unused length towards the end of tape, another
reflective metal foil known as the end of tape (EOT) marker is used to indicate to the
equipment the end of usable tape. These two markers are placed on opposite edges of the
tape for machine identification purposes. Between the BOT marker and the first file
header label is a tape header label, which contains the tape's attributes such as the tape
identifier, the number of files it contains, the date it was last used, and other control
information that helps to prevent an important tape from accidentally being erased. The
data organization on a magnetic tape along with BOT and EOT markers and tape header
label is shown in Figure 8.6.
Storage Capacity
The storage capacity of a tape depends on the following:
1. Data recording density, and
2. Tape length

It is a multiple of the above two parameters. That is,


Storage capacity of a tape - Data recording density * Length
Data recording density refers to the amount of data that can be stored on a given length of
tape. It is measured in bytes per inch (bpi), or the number of bytes (characters) that can be
stored per linear inch of tape. Tape density varies from 800 bpi in older systems to 77,000
bpi in some of the most modern systems. Hence if a 2400 feet tape has a data recording
density of 800 bpi, then its storage capacity will be 2400 * 12 inches x 800 bpi = 23 x 106
bytes = 23 Giga bytes. Note that this is the total storage capacity of the tape. Its actual
storage capacity (storage available for storing user data) is much less due to the use of
IBGs, file header labels, file trailer labels, BOT and EOT markers. In fact, the actual
storage capacity of a tape may be anywhere from 35% to 70% of its total storage
capacity, depending on the storage organization.

Data Transfer Rate

Data transfer rate refers to the number of characters per second that can be transmitted to
the primary storage from the tape. It is measured in bytes per second (bps). Its value
depends on the data recording density and the speed with which the tape travels under the
read/write head. Tape speed is typically of the order of 100 inches per second. Therefore,
a tape having data recording density of 77,000 bpi and its drive having a tape speed of
100 inches per second, will have a data transfer rate of 77,000 x 100 = 77,00,000 bytes or
7.7 MB per second.

Tape Drive

A magnetic tape drive is used for storage and retrieval of data stored on magnetic tape
medium. The tape drive is different for tape reels, tape cartridges, and tape cassettes.
However, all of them work on a similar mechanism like the audio tape recorders or video
cassette recorders (VCR) found in our homes. That is, the tape drive has read/write heads
and as the tape ribbon passes under the read/write heads, the data can be either read and
transmitted to primary storage, or transmitted from primary storage and written to the
tape by giving suitable commands to the tape drive. Instead of play and record, read and
write commands are used with the tape drive. Just as in the case of an audio tape recorder
or video cassette recorder, a magnetic tape reel or cartridge or cassette has to be first
loaded to a tape drive for processing. Once loaded to a tape drive, the magnetic tape is
said to be on-line; that is, it can now be used for storage or retrieval of data by the
computer system. When processing is complete, the tape is removed from the tape drive
for off-line storage; that is, it is stored away from the computer system and data on it are
not accessible to the computer system until it is loaded again on the tape drive for
processing.
Like audio or video tape, the magnetic tape, used in computer systems can also be erased
and reused indefinitely. Old data on a tape are automatically erased as new data are
recorded in the same area.

Tape Controller

A magnetic tape has to be mounted on a tape drive before it can be used for reading or
writing of information. A tape drive is connected to and controlled by a tape controller
which interprets the commands for operating the tape drive. A typical set of commands
supported by a tape controller are:
Read reads one block of data
Write writes one block of data
Write tape header label used to update the contents of tape header label
Erase tape erases the data recorded on a tape
Back space one block rewinds the tape to the beginning of previous block
Forward space one block forwards the tape to the beginning of next block
Back space one file rewinds the tape to the beginning of previous file
Forward space one file forwards the tape to the beginning of next file
Rewind fully rewinds the tape
Unload releases the tape drive's grip so that the tape spool can be
unmounted from the tape drive

Types of Magnetic Tapes

The data recording density and data transfer rate of magnetic tapes depend to a large
extent on the data organization and principles of operation of various types of magnetic
tapes and their tape drives. The commonly used ones are:
1. ½ - inch tape reel
2. ½ -inch tape cartridge
3. ¼ inch streamer tape
4. 4-mm digital audio tape (DAT)
They are described below.

Half-inch Tape Reel

A magnetic tape reel uses 14 inch tape ribbon stored on a tape reel (see Figure 8.7). The
magnetic tape drive of a tape reel is shown in Figure 8.8. The tape on a reel moves
through a tape drive in much the same way as a video tape moves through a movie
projector. During processing, the tape moves from a supply reel to a take-up reel via two
vacuum channels and through a read/write head assembly. The read/write head assembly
either reads data, or writes data on the tape. It is a single unit having one read/write head
for each tape track. Therefore, the read/write head assembly of a 9-track tape drive will
have a set of nine heads. Each head operates independently and stores information on
nine parallel tracks, parallel to the edge of the tape. This method of storing data in
adjacent bit configurations is known as, parallel representation. In parallel representation,
data are read or written a byte at a time.
The two vacuum channels of the tape drive are designed to take up slack tape, acting as
buffers to prevent the tapes from snapping or stretching when starting from a stationary
position or slowing down from full speed. Several methods are used to prevent tape
damage from sudden bursts of speed and different tape drives may use different
mechanisms for this purpose.

Magnetic tape reels are commonly used as archival storage for off-line storage of data
and for exchange of data and programs between organizations. They are mainly used in
organizations having large computing systems such as mainframe systems because the
tape controller and tape drives used for magnetic tape reels are bulky and expensive.
Many medium-sized business organizations have vaults containing several thousands of
these tape reels. For example, a large insurance company may have a storage area
containing over 50,000 magnetic tape reels. However, the magnetic tape reels are fast
getting replaced by tape cartridge, streamer tape, and digital audio tape because these
new magnetic tape storage devices are more compact, cheaper, and easier to handle and
use.

Half-inch Tape Cartridge

Magnetic tape reels are suitable for use only with large and medium size computers. The
same magnetic tape is used in smaller computer systems in the form of tape cartridges.
As shown in Figure 8.9, these tape cartridges look very similar to the video cassettes used
in the familiar home VCRs (video cassette recorders). The tape drives of these tape
cartridges are also very similar in look and mechanical operation to the familiar home
VCRs. A tape cartridge can be pushed inside or ejected from the tape drive just as a video
tape cassette is pushed inside or ejected from a VCR unit.

These tape cartridges provide a more convenient way to package tape, and greatly
simplify the mounting of tape which is normally a problem with magnetic tape reels that
have to be manually mounted on the tape drive. Moreover, tape cartridges also provide
protection against dirt and contamination, since the tape is sealed inside the cartridge.

Aside from the above mentioned differences in the mechanical shape and size of half-
inch tape reels and half-inch tape cartridges, and the mechanical operation of their tape
drives, there are two main differences in their data organization and data
recording/reading:

1. The half-inch tape cartridge has 36 tracks, as opposed to 9 tracks for most half-inch
tape reels. Like tape reels, tape cartridges also store data using parallel representation.
Hence, 4 bytes of data are stacked across the width of the tape in case of tape cartridges,
as opposed to a single byte of data in case of tape reels. This enables more bytes of data
to be stored on the same length of tape.

2. Tape cartridges record/read on the top half of the tape in one direction and on the
bottom half in the other direction. That is, out of 4 bytes (36 tracks) of data stacked
across the width of the tape, 2 bytes (18 tracks) of data are read in each direction. Recall
that in case of tape reels, data are recorded/read only in one direction.

Other principles of data organization on half-inch tape cartridges are same as that for
half-inch tape reels. That is, in case of half-inch tape cartridges also the concepts of
blocking of records, IBG, file header label, file trailer label, tape header label, BOT
marker, EOT marker, etc., are used for their respective purposes.

Quarter-inch Streamer Tape

In addition to the storage of data of those applications which process data sequentially,
one of the primary uses of magnetic tapes is to serve as a backup storage medium for data
stored on on-line devices such as a disk. During backup or recovery process, backup
tapes are normally processed continuously from beginning to end because there is seldom
a need for selective access of records. Hence there is no need to start and stop the backup
tape after every few records. Based on these observations, researchers came out with a
special type of quarter-inch streamer tapes that eliminate the need for the start/stop
operation of traditional tape drives for half-inch tape reels or tape cartridges. These tapes
are J4 inch wide and are sealed in a cartridge. Their tape drives are very similar in look
and mechanical operation to the tape drives of half-inch tape cartridges.

Unlike the half-inch tapes, which use parallel representation for data recording, these
tapes use serial representation for data recording. That is, the data bits are aligned in a
row, one after another in tracks. A streamer tape can have from 4 to 30 tracks, depending
on the tape drive. Depending on the tape drive, the read/write head reads or writes data on
one, two, or four tracks at a time. Figure 8.10 shows a streamer tape having 8 tracks on
which data are recorded two tracks at a time. That is, data are first written on the top two
tacks for the entire length of the tape or until the data are exhausted. If the end of the tape
is reached while data recording, the tape is rewound, the read/write head is positioned on
the next two tracks, and data recording continues in a similar manner.

As there is no start/stop mechanism, streamer tape drives can read/write data more
efficiently than the traditional tape drives that stop and restart the tape movement at each
IBG. Moreover, streamer tape drives also make more efficient utilization of tape storage
area. Typically, streamer tapes use 97% of the tape for data storage, whereas traditional
start/stop tapes use only 35% to 70%, depending on the blocking factor. Typical
capacities of streamer tape drives used in personal computers varies from 50 MB to 500
MB.

Streamer tapes are so called because they read/write data serially as streams of bits. The
data format used in these tapes has been standardized by the industry and is known as the
QIC standard. This helps in easy use of these tapes for exchanging data between different
computers. That is, data recorded on a streamer tape by one computer can be read by
another computer if both of them use the common QIC standard data format. QIC stands
for Quarter Inch Cartridge.
4mm Digital Audio Tape (DAT)

This is the most recent type of magnetic tape storage device which provides a very high
data density per inch of tape. It uses a tape ribbon of 4mm width enclosed in a cartridge.
The tape length is either 60 meters or 90 meters. Very high data recording density is
obtained by using a tape drive that uses helical scan technique for data recording. As
shown in Figure 8.11, the helical scan has two read heads and two write heads built into a
small wheel (or cylinder) that spins near the tape at about 2000 rpm. At the same time,
the tape also moves past the wheel at a relatively slow speed of about ⅓. inch per second.
The write heads on the spinning wheel each write data with opposite magnetic polarities
on overlapping areas of the tape. Each read head reads only one polarity or the other. The
result is a very high data density per inch of tape. The helical scan records at an angle to
the tape.

DAT drives use a data recording format called Digital Data Storage (DDS) which
provides three levels of error correcting code to ensure excellent data integrity. Typical
capacity of DAT cartridges varies from 4 GB to 14 GB. DAT drives have a data transfer
speed of about 366 KB/sec.

Advantages and Limitations of Magnetic Tapes

Advantages

As a secondary storage device, magnetic tapes have the following advantages:


1. Their storage capacity is virtually unlimited because as many tapes as required can
be used for storing very large data sets.
2. With the low cost of tape reels and cartridges and high data recording densities, the
cost per bit of storage is very low for magnetic tapes. An additional cost benefit is that
tapes can be erased and reused many times.
3. Since the tape reels and cartridges are compact and light in weight, they are easy to
handle and store. Very large amount of data can be stored in a small storage space.
4. Due to their compact size and light weight, magnetic tape reels and cartridges are
also easily portable from one place to another. They are often used for transferring data
and programs from one computer to another, which are not linked together.
Limitations
As a secondary storage device, magnetic tapes have the following limitations:
1. Due to their sequential access nature, they are not suitable for storage of those data
that frequently require to be accessed randomly.
2. They must be stored in a dust-free environment because specks of dust can cause
tape-reading errors.
3. They must also be stored in-an environment with properly controlled temperature
and humidity levels, otherwise the tape ribbon may get twisted due to warping, resulting
in loss of stored data.
4. They should be properly labeled so that some useful data stored on a particular tape
is not erased by mistake.
Uses of Magnetic Tapes

Magnetic tapes are typically used for one or more of the following purposes:
1. For applications that are based on sequential data processing. For example as shown
in Figure 8.12, the contents of an inventory master file (which is the permanent source of
inventory data) may be periodically updated using a transaction file (which contains data
reflecting inventory activities during the period) to create a new inventory master file
which is used in the next processing cycle. Magnetic tapes are the most suitable storage
for such applications.
2. Backing up of data stored on an on-line storage device such as a disk for its off-line
storage so that if by accident the data on the disk gets corrupted or gets lost, it can be
retrieved from the backup tape and stored back on the disk. .
3. Archiving of data which are not used frequently, but which may be used once in a
while.
4. Transferring of data and programs from one computer to another, which are not
linked together.
5. Distribution of software by vendors. Originally sold software or software updates are
often distributed by vendors on magnetic tapes.

MAGNETIC DISK

Magnetic disks are the most popular medium for direct-access secondary storage.
Because of their random access capability, they are the most popular on-line secondary
storage devices.

A magnetic disk is a thin, circular plate/platter made of metal or plastic that is usually
coated on both sides with a magnetizable recording material sych as iron-oxide. Data are
recorded on the disk in the form of tiny invisible magnetized and non-magnetized spots
(representing Is and Os) on the coated surfaces of the disk. A standard binary code,
usually 8-bit EBCDIC, is used for recording data. The disk itself is stored in a specially
designed protective envelope or cartridge, or several of them may be stacked together in a
sealed, contamination-free container.

Like magnetic tapes, magnetic disks can also be erased and reused indefinitely. Old data
on a disk are automatically erased as new data are recorded in the same area. However,
the information stored can be read many times without affecting the stored data. Hence
the reading operation is non-destructive of stored data, and the data stored on a magnetic
disk remains indefinitely until they are erased or over written at a future time.

Basic Principles of Operation

Storage Organization

For data recording, the surface of a disk is divided into a number of invisible concentric
circles called tracks. As shown in Figure 8.13, the tracks are numbered consecutively
from outermost to innermost starting from zero. The number of tracks varies greatly
between disks, from as few as 40 on some small, low-capacity disks to several thousand
on large, high-capacity disks.

Each track is further subdivided into sectors. For this, in addition to the concentric
circles, the disk surface is also divided into invisible pie-shaped segments (see Figure
8.14). Thus if there are eight such pie-shaped segments, each track will get divided into
eight parts, and each of these eight portions of a track is called a sector.

A sector typically contains 512 bytes. A sector is the smallest unit with which any disk
can work. That is, disk drives are designed to access (read/write) only whole sectors at a
time. Even if the computer needs to change just one byte out of the 512 bytes stored on a
sector, it rewrites the entire sector.

Notice from Figure 8.14 that the sectors on the outer tracks are longer than those on the
inner ones. Since each sector records the same number of characters (usually 512
characters), the length of the sectors on the innermost track determines the storage
capacity for the sectors on all other tracks of the disk, This means that the storage space
remains underutilized on the sectors in the outer tracks of the disk. This is a disadvantage
of dividing disks into pie-shaped segments. To avoid this problem of underutilization of
storage space, some systems such as Apple and Commodore, partition the disk in such a
manner that all sectors occupy approximately the same amount of space. One such type
of partitioning of disk is shown in Figure 8.15. In this method, the tracks are first
partitioned into groups, and the tracks in different groups have different number of
sectors per track. For example, in Figure 8.15 the tracks are partitioned into three groups.
The tracks belonging to the innermost group have 8 sectors per track, the tracks
belonging to the next group have 9 sectors per track and the tracks belonging to the
outermost group have 10 sectors per track. Using this new method of disk partitioning,
Apple was able to increase the storage capacity of its 3 Vi-inch floppy disk by about
40%.

When people refer to the number of sectors a disk has, the unit they use is sectors per
track - not just sectors. Thus if a disk has 200 tracks and 8 sectors per track, it has 1600
(200 x 8) sectors - not 8 sectors.

Each sector of a disk is assigned a unique number. Before a disk drive can access a piece
of data (a record) stored on a disk, it must specify the record's disk address. The disk
address is comprised of the sector number, track number, and surface number (when
double-sided disks are used). That is, the disk address represents the physical location of
the record on the disk.170

We saw that disk drives are designed to access only whole sectors at a time (a sector
being the smallest unit of data access from a disk). Since a file usually is not of a size that
is an even multiple of sector size (usually 512 bytes), some part of the last sector
allocated to the file may be unused. Thus, on an average half of the sector size is wasted
for each file stored on the disk. Hence it is recommended that the sector size for a disk
should not be too large. The sector size should not even be too small, otherwise the size
of the mapping table used to map disk addresses to data records will become too large.
The DOS operating system goes one step further of combining two or more sectors to
form a cluster. In this case, the smallest unit of data access from a disk becomes a cluster
-not a sector. That is, read/write operations read/write a whole cluster at a time. Cluster
sizes vary, depending on the size and type of the disk, but they can range from 2 to 64
sectors per cluster. Notice that a cluster-based disk organization may lead to more
wastage of disk space as compared to sector-based organization, because in case of
cluster-based systems, on an average, half of the cluster size is wasted for each file stored
on the disk. However, cluster-based organization, leads to less management overhead for
mapping of data records to physical disk locations.

Often multiple disks are stacked and used together to create large capacity disk storage
systems. In this case, a set of magnetic disks is fixed to a central shaft one below the
other to form a disk pack (see Figure 8.16). The disk pack is sealed and mounted on a
disk drive, which consists of a motor to rotate the disk pack about its axis. The disk drive
also has an access arm assembly that has separate read/write heads for each surface of the
disk pack on which data can be recorded. Normally, the upper surface of the top disk and
the lower surface of the bottom disk are not used in a disk pack because these surfaces
may get easily scratched. The access arm assembly is designed in such a way that all the
access arms (on which the read/write heads are fixed) for all the disk surfaces move
together. Thus, if the read/write head that serves the 0th recording surface is positioned
over the 5th track, each of the heads on the arms that serve other recording surfaces is
similarly positioned over the 5th track. For faster access of data from disk packs, a
concept called cylinder is used for data organization on disk packs. As shown in Figure
8.16, a set of corresponding tracks on all the recording surfaces of a disk pack together
form a cylinder. For example, the 5th track of all the recording surfaces together comprise
the 5th cylinder of the disk pack. Thus if there are 200 tracks on a single disk surface,
there are 200 cylinders in the disk pack. Obviously, in this case the disk address of a data
record is comprised of sector number, cylinder number, and surface number (track
number is not required because track number and cylinder number are same). Faster
access of data is achieved by cylinder-based organization by avoiding movement of
access arms when large number of related records are to be processed in sequence. The
related records of a file can be stored on the same cylinder of the multiple disks of a disk
pack so that in one revolution of the disk pack, all records stored on say track 5 of surface
0 are read. In the next revolution, the subsequent records stored on track 5 of surface 1
are read, in the revolution after that, the subsequent records stored on track 5 of surface 2
are read, and so on. This procedure can continue down the cylinder without any delays
caused by the movement of access arms.

Storage Capacity

As you might have already guessed, the storage capacity of a disk system depends on the
following:
1. Number of recording surfaces,
2. Number of tracks per surface,
3. Number of sectors per track, and
4. Number of bytes per sector
It is a multiple of the above four parameters. That is,
Storage capacity of a disk system = Number of recording surfaces
x Number of tracks per surface
x Number of sectors per track
x Number of bytes per sector

For example, suppose a disk pack has 10 disk plates each having 2655 tracks. Suppose
there are 125 sectors per track, and each sector can store 512 bytes. Since the disk pack
has 10 disk plates, so it will have 18 recording surfaces (excluding the upper surface of
the topmost disk and the lower surface of the bottommost disk). Hence the capacity of
this disk pack will be = 18 x 2655 x 125 x 512 = 3,05,85,60,000 bytes = 3 x 10 9 bytes
(approximately) = 3 GB (3 Giga Bytes). Essentially one character can be stored per byte.
So a disk system with 3 GB capacity can store 3 billion characters of information.

Notice that the more recording surfaces a particular disk system has, the greater its
storage capacity will be. For example, in case of a disk system having only one disk (i.e.,
a floppy disk), the storage capacity of a double-sided disk plate will be about twice that
of a single-sided one. And the storage capacity of a disk system having multiple disk
plates (i.e., a disk pack) will be many times more than a single-disk system.

As the storage capacity of a disk system is also directly proportional to the number of
tracks per surface, disks having larger diameter can have more tracks and larger storage
capacity. However, disk size cannot be made too large because it will affect the overall
size of the disk unit. And the constant effort of the designers of disk systems is to provide
more storage capacity in as compact form as possible. Hence instead of increasing the
disk size for larger storage capacity, the designers prefer to increase the storage capacity
by increasing th& tracks per inch of surface and bits per inch of track. That is, a constant
goal of the designers of disk systems is to increase the data density of each square inch of
disk surface.

Access Mechanism

Data are recorded on the tracks of a spinning disk surface and read from the surface by
one or more read/write heads. As shown in Figure 8.17, the read/write heads are mounted
on an access arms assembly. Most disk drives have a single read/write head for each disk
surface. But some faster disk systems use multiple heads on each access arm to service a
number of adjacent tracks simultaneously.

The access arms assembly can be moved in and out in the direction shown in the figure
so that the read/write heads can be moved horizontally across the surfaces of the disks. In
this manner, the read/write heads can be positioned on any track on which data are to be
recorded or from which data are to be read. In case of a disk pack, each usable surface
has its own read/write head and all the heads move together. Hence information stored on
the tracks, which constitute a cylindrical shape through the disk pack, is accessed
simultaneously. Recall the cylindrical storage arrangement of information in a disk pack.
The read/write heads are of flying type. That is, they do not have direct contact with the
disk surfaces. This prevents wear on the surface of the disk. A separation of about
0.00002 inch is maintained between a read/write head and its corresponding disk surface.
In fact, the read/write heads fly so close to the disk surface that if a dust particle
(typically of 0.0015 inch size), smoke particle (typically of 0.00025 inch size), finger
print (typically of 0.00062 inch size), or a human hair (typically of 0.003 inch size) were
placed on the disk surface, it would bridge the gap between the read/write head and the
disk surface, causing the head to crash. A head crash, in which the head touches the disk,
destroys the data stored in the area of the crash and can destroy a read/write head as well.

Access Time

Disk access time is the interval between the instant a computer makes a request for
transfer of data from a disk system to the primary storage and the instant this operation is
completed. To access information stored on a disk, the disk address of the desired data
has to be specified. We saw that the disk address is specified in terms of the surface
number, the track/cylinder number, and the sector number. Information is always written
from the beginning of a sector and can be read only from the track beginning. Hence disk
access time depends on the following three parameters: .

1. Seek Time. As soon as a read/write command is received by the disk unit, the
read/write heads are first positioned on to the specified track (cylinder) number by
moving the access arms assembly in the proper direction. The time required to position
the read/write head over the desired track is called the seek time. The seek time varies
depending on the position of the access arms assembly when a read/write command is
received. If the access arms assembly is positioned on the outer most track and the track
to be reached is the inner most one then the seek time will be maximum, and it will be
zero if the access arms assembly already happens to be on the desired track. The average
seek time is thus specified for most systems which is of the order of 10 to 100
milliseconds.

We also saw that some disk systems have multiple read/write heads on each access arm.
This is basically for reducing the seek time. For example, a disk system may have two
sets of read/write heads for each surface, one for reading/writing on the inside tracks and
another for the outside tracks. This will reduce the average seek time by half of that for a
disk system which has a single read/write head per surface, because each read/write head
needs to cover and move across only half of the total number of tracks.

2. Latency. Once the heads are positioned on the desired track, the head on the
specified surface is activated. Since the disk is continuously rotating, this head should
wait for the desired data (specified sector) to come under it. This rotational waiting time,
i.e., the time required to spin the desired sector under the head is called the latency. The
latency, also known as the rotational delay time, is also a variable and depends on the
distance of the desired sector from the initial position of the head on the specified track. It
also depends on the rotational speed of the disk which may be anywhere from 300 rpm
(rotations per minute) to 7200 rpm. An average latency time is thus normally specified
which is of the order of 5 to 80 milliseconds. Note that the average latency of a disk
system is equal to half the time taken by the disk to rotate once. Hence the average
latency of a disk system whose rotational speed is 3600 rpm will be 0.5/3600 minutes =
8.3 milliseconds.

3. Transfer Rate. Transfer rate refers to the rate at which data are read from or written
to the disk. Once the read/write head is positioned over the desired sector, the data are
read/written at a speed determined by the rotational speed of the disk. If the rotational
speed of a disk is 3600 rpm, the disk has 125 sectors/track, and 512 bytes/sector, then in
one full revolution of the disk, the amount of data transferred will be 125 x 512=64,000
bytes = 64 k bytes (approximately). Hence the transfer rate of the disk system will be
64,000 * 3600/60 bytes/second = 38,40,000 bytes/second = 3.8 Megabytes/second
(approximately). Notice that the transfer rate of a disk system depends on the density of
the stored data and the rotational speed of the disk.

Since the data transfer time is negligible (due to high transfer rate) as compared to seek
time and latency, the average access time for a disk system is the sum of its average seek
time and average latency. The average access time for different types of disk systems
varies over a wide range and may be anywhere from 10 to 600 milliseconds.

Since the access time for a piece of data stored on a disk depends on the physical location
of the data, it is more correct to refer to a disk system as direct access storage device
instead of random access storage device. Random access refers to a storage device in
which the access time is independent of the physical location of the data. For example,
primary storage i$ a random access storage. However, this distinction is not always
observed strictly and hence disk systems are often referred to as random access storage
devices.

Disk Formatting

Magnetic disks come in various different sizes. The size of a disk is usually referred to by
its diameter. Typical disk sizes include those with 14 inch, 9 inch, 8 "inch, 5% inch, 3V4
inch, and VA inch diameter. Obviously, different size disks require different disk drives
so that the dimensions of the mechanical components of the disk drive match with that of
the disks to be used with it. Even for disks of the same size, all disk drives are not the
same because we saw that different computer systems have different ways of organizing
data on the disk surface. Hence disk drives of different computers may have their own
way of defining tracks, sectors, and sector size (number of bytes/sector) to match their
own way of organizing data. This implies that computer manufacturers should also
manufacture the disks that can be used in their computer systems. This is a severe
limitation because it prevents the use of disks manufactured by third party vendors into
one's own computer system. To overcome this problem, the concept of disk formatting
was introduced. According to this concept, before a disk can be used with a computer
system, it must first be prepared by means of a process called disk formatting by the
computer system. For this, the raw (unformatted) disk is inserted in the disk drive of the
computer system and the disk formatting command is initiated. In this process, the disk
drive's read/write head lays down a magnetic pattern on the disk's surface. This pattern
enables the disk drive to organize and store the data in the data organization defined for
the disk drive. Most computers maintain on the disk a table with the sector and track
locations of data. This table, known as the File Allocation Table (FAT), enables the
computer to locate data easily. The disk formatting command also takes care of creating
the FAT and setting aside sufficient space on the disk for it.

Disk formatting is one of the basic tasks handled by the computer's operating system. If
the formatting done by the disk drives of two different computer systems is exactly the
same, the two computers are said to have compatible disk drives. Compatible disk drives
allow disks prepared by one computer to be used by the other computer. This facilitates
transfer of data and programs from one computer to another which are not linked
together. Note that this is not possible by the use of disks between computers having
incompatible disk drives.

Disk Drive

A magnetic disk has to be mounted on a disk drive before it can be used for reading or
writing of information. A disk drive contains all the mechanical, electrical and electronic
components for holding one or more disks and for reading or writing of information on to
it. That is, it contains the central shaft on which the disks are mounted, the access arms
assembly, the read/write heads, and the motors to rotate the disks and to move the access
arms assembly. Although disk drives vary greatly in their shape, size and disk formatting
pattern, they can be broadly classified into the following two types:

1. Disk drive with interchangeable magnetic disks. These disk drives allow the
loading and unloading of magnetic disks as and when they are needed for reading/writing
of data on to them. That is, at one instance a particular disk might be loaded for use, and
at another instance another disk might be loaded in the same disk drive. This allows data
on disks to be stored off-line and virtually unlimited capacity of the disk system because
as many disks as required can be used one after another to store very large data sets.
2. Disk drive with fixed magnetic disks. These disk drives come along with a set of
permanently fixed disks. In this case, the disks along with the read/write heads and the
access mechanisms of the disk drive are permanently housed in sealed, contamination-
free containers. The sealed packaging allows the disks to operate in a dust-free
environment. This enables the designers to provide increased data density of each square
inch of disk surface in these disk drives by reducing the distance between the read/write
head and the disk surface so that smaller magnetized spots can be precisely written and
then retrieved. Thus these disk drives provide higher storage capacity with the same size
disks and same number of disk surfaces. However, because of the sealed packaging, the
disks are not removable from their disk drives. Hence the storage capacity of these disk
systems is limited.
Disk Controller

A disk drive is connected to and controlled by a disk controller which interprets the
commands for operating the disk drive. Since disk is a direct access storage device, the
disk controller typically supports only Read and Write commands. The disk address
consisting of surface number, cylinder/track number, and sector number needs to be
specified as parameters of the disk Read and Write commands. Often, a disk controller is
connected to and controls more than one disk drive. In this case, the disk drive number
must also be specified as a parameter of Read and Write commands so that the read/write
operation is carried out on the specified disk surface of the correct disk drive.
Types of Magnetic Disks

All magnetic disks are round platters. They come in different sizes, different types of
packaging, and can be made of rigid metal or flexible plastic. Based on these differences
there are many different types of magnetic disks available today. However, all of them
may be broadly classified into two types - floppy disks and hard disks. Floppy disks are
individually packaged in protective envelopes or plastic cases, whereas hard disks may be
packaged individually or in multiples in cartridges or contamination-free containers.
Depending on the type of packaging, hard disks are further classified into Zip/Bernoulli
disks, disk packs, and Winchester disks. The broad classification of magnetic disks is
shown in Figure 8.18. The four types of magnetic disks are described below.
Magnetic Disks
Floppy Disks, Hard Disks
Zip/Bernoulli, Disks, Disk Packs

Floppy Disks

A floppy disk is a round, flat piece of flexible plastic coated with magnetic oxide. It is
encased in a square plastic or vinyl jacket cover. The jacket gives handling protection to
the disk surface. Moreover, it has a special liner that provides a wiping action to remove
dust particles that are harmful for the disk surface and the read/write head. Floppy disks
are so called because they are made of flexible plastic plates which can bend, not hard
plates. They are also known as floppies or diskettes. They were introduced by IBM in
1972 and are now being produced in various sizes and capacities by many manufacturers.

Floppy-diskdrive

A. floppy-disk drive is a device that is used to read/write data from/to floppy disks. The
drive has a spindle that rotates the disk, and read/write heads that can move in and out to
position the read/write heads on any track of the disk surface. It is of the interchangeable
magnetic disks type. That is, it allows the loading and unloading of magnetic disks as and
when they are needed for reading/writing data on to them. A floppy disk can be very
easily loaded into or unloaded from a floppy-disk drive just by slipping the disk inside
the drive's slot or by pressing the eject button on the drive. The disks are loaded into the
disk drive along with the jacket cover and data are read/written through an aperture in the
jacket (see Figure 8.19). Unlike the hard-disk drives, the read/write heads of a floppy-
disk drive make direct contact with the disk surface during the process of reading or
writing. Hence floppy disks get worn out with constant use. Manufacturers guarantee
about 2 million reads of a floppy disk track. In case of currently used floppy-disk drives,
the rotational speed of a floppy disk is of the order of 300 to 400 rpm, and the data
transfer rate is of the order of 10 to 30 Kilobytes/second.

Types of floppy disks

Although floppy disks and their corresponding drives are available in many sizes and
capacities, the two types in widespread use today are the 5'/4-inch and the 3'/2-inch
diskettes. They artrbriefly described below.

1. The 5%-inch diskette. It is a floppy disk of 5V4-inch diameter. The disk is encased in a
square vinyl jacket that is harder than the disk itself but is still flexible. As shown in
Figure 8.19, the jacket has on oval cutout (aperture) through which the read/write head
makes direct contact with the disk surface. It moves radially along this opening of the
jacket cover. The disk has a hole in the center in which the drive's spindle fits so that the
disk can be rotated at high speed during operation. The disk rotates inside its jacket cover
whose inner side is smooth and permits free rotation of the disk.

Early 5'/4-inch floppy disks recorded data on only one side of the disk and were known
as single-sided (SS) diskettes. However, today all 5'A-inch diskettes use both the disk
surfaces for data recording and are known as double-sided (DS) diskettes. The double-
sided 5%-inch diskette of today come in two capacities - double density (DD) and high
density (HD). Recall that disk density refers to the number of bits that can be stored per
square inch area on one surface of the disk. The DSDD (double-sided, double-density)
574-inch diskettes have 40 tracks, 9 sectors/track, and 512 bytes/sector, giving a total
disk storage capacity of 2 (for two surfaces) x 40 x 9 x 512 = 3,68,640 bytes = 360 KB
(approximately). On the other hand, the DSHD (double-sided, high density) 5V4-inch
diskettes have 80 tracks, 15 sectors/track and 512 bytes/sector, giving a total disk storage
capacity of 2 x 80 x 15 x .512=12,28,800 bytes = 1.2 MB (approximately).

2. The 3 ½ -inch diskette. It is a floppy disk of 3 '/2-inch diameter. The disk is encased in
a square hard-plastic jacket cover. The jacket cover has a cutout (aperture) for the
read/write head to make contact with the disk surface. However, unlike the 5'/4-inch
diskettes, this aperture of the 3'/2-inch diskettes is covered with a sliding metal piece (see
Figure 8.20). When the diskette is inserted into the drive, this covers slides back to
expose the disk surface to the read/write head.

Light indicator (blinks when read/write operation takes place)


(a) Front view of a floppy disk drive.
Opening for inserting the disk inside the drive
Floppy disk eject button
Write-protect plastic tab
Sliding metal piece cover
User's label for identification
(b) A 31/2-inch floppy disk

All 3'/2-inch floppy disks are of double-sided type and record data on both the disk
surfaces. However, they come in three different capacities - double density, high density,
and very high density. The double-density 3'/2-inch diskettes have 40 tracks, 18
sectors/track, and 512 bytes/sector, giving a total disk storage capacity of 2 (for two
surfaces) x40x 18x512 = 7,37,280 bytes = 720 KB (approximately). The high-density
31//2-inch diskettes have 80 tracks, 18 sectors/track, and 512 bytes/sector, giving a total
disk storage capacity of 2 x 80 x 18 x 512 = 14,74,560 bytes =1.4 MB (approximately).
The, very high-density 3'/2-inch diskettes have 80 tracks, 36 sectors/track, and 512
bytes/sector, giving a total disk storage capacity of 2 x 80 x 36 x 512 = 29,49,120 bytes =
2.88 MB (approximately).

Figure 8.21 summarizes the capacities of the various types of 5'/4-inch and 3'/2-inch
diskettes. Note that a smaller size disk can actually have more storage capacity than a
larger size disk. Because of their hard-plastic jacket cover and the sliding metal cover
over the aperture, the 3/4-inch floppy disks are more durable. The 3'/2-inch diskettes are
slowly replacing the 5'A-inch diskettes because of their better durability, compact size
(which can easily fit in a shirt's pocket), and higher capacity. As a result, the 5%-inch
floppy disks are gradually disappearing.

Size No. of No. of No. of No. of Capacity in Approximate


(Diameter surfaces tracks sectors/track bytes/sector bytes capacity
in inches)
5'/4 2 40 9 512 3,68,640 360 KB
5% 2 80 15 512 12,28,800 1.2 MB
VA 2 40 18 512 7,37,280 720 KB
VA 2 80 18 512 14,74,560 1.4 MB
VA 2 80 36 512 29,49,120 2.88 MB
Figure 8.21. Summary of the capacities of the various types of 5%-inch and 31/4-inch
diskettes.

Note that the capacities given in Figure 8.21 are for DOS-based computers. As discussed
before, different makes of computers may use different formatting style resulting in
different capacities for the same disk. For example, a double-density 3'/2-inch diskette
used on Macintosh systems has a storage capacity of 800 KB instead of 720 KB
mentioned in Figure 8.21.

Tips for proper usage and handling of floppy disks

Although floppy disks are non-volatile storage media, data stored on them can still be lost
or damaged if they are not handled properly. Here are a few tips for the proper usage and
handling of floppy disks:

1. To prevent loss of stored data due to unintentional erasing/over-writing, the floppy


disks should always be kept write protected when not in use. Fortunately, all floppy disks
have a simple write protection mechanism. For example, as shown in Figure 8.19, a 5%-
inch floppy disk can be write protected by covering the write-protect notch located near
the upper-right corner of the disk covei with a write-protect sticker. These stickers are
supplied together with the floppy disks when yov purchase them. Similarly, as shown in
Figure 18.20, a 3%-inch floppy disk can be write protected b) sliding a plastic tab in the
upper-left corner of the plastic cover such that a hole shows through the disk cover.

2. No sharp-edged device should be used for marking/writing something on the flexible


type 5'/4-inch diskettes. A felt-tip pen should be used to write some information on the
disk label and the writing should be done very gently without applying pressure.

3. A floppy disk should never be forced into or removed from a disk drive when the
drive is in operation (its light indicator is on). Doing so may cause the read/write head to
break, or may cause the read/write head to scratch the disk surface, resulting in damaging
the disk or the data stored on it.

4. Their recording surfaces should never be touched by hand. These surfaces are
already exposed through the oval cutout in case of 514-inch diskettes, and can be exposed
by sliding the metal cover back by hand in case of 3'/2-inch diskettes.

5. The flexible type 514-inch diskettes should not be bent and should not be applied
with any type of intense pressure.

6. To keep track of what information is stored on which floppy disk, and when was it
last used, the floppy disks should always be properly labeled.

7. Since magnetic particles tend to lose their charge with time, the data stored on floppy
disks may get damaged or lost after several months even if you take proper care of your
floppy disks. This problem is known as byte rot. To prevent data loss due to byte rot
problem, it is suggested that data stored on a disk should be refreshed (re-written) every
year. To do this, copy the contents of an entire floppy disk on to the hard disk of a
computer, and then copy them back on to the same floppy disk.

8. They should always be stored away from anything that has a magnetic charge or that
generates a magnetic field. For example, they should be kept away from magnets,
magnetic materials, and electric equipment.

9. They should always be stored in a place where it is not very hot or humid. Floppy
disks being made of thin plastic may get bad due to warping under extreme temperature
and humidity conditions.
10. Multiple disks should not be stacked on top of each other. They should be stored by
keeping them standing against their edge in specially designed plastic boxes to prevent
them from dust particles.

Floppy disks are very cheap as compared to other secondary storage devices. They are
also a convenient off-line storage medium for the small computer users. Hence diskettes
are currently one of the most popular, inexpensive secondary storage medium used in
small computer systems.

Hard Disks

Hard disks are the primary on-line secondary storage device for most computer systems
today. Unlike floppy disks, which are made of flexible plastic or mylar, hard disks are
made of rigid metal (frequently aluminium). The hard disk platters come in many sizes
ranging from 1 to 14-inch diameter.

Types of hard disks

Depending on how they are packaged, hard disks are normally categorized into the
following three types:

1. Zip/Bernoulli Disks. In this type, a single hard disk platter is encased in a plastic
cartridge. A commonly used zip disk is of 3'/2 inch size having a storage capacity of
about 100 MB depending on the formatting style used by a particular computer system.
Its disk drive is called a zip drive. A zip drive may be of portable or fixed type. The fixed
type is a part of the computer system, permanently connected to it. The portable type
can be carried to a computer system, connected to it for the duration of use, and then can
be disconnected and taken away when the work is done. The zip disks can be easily
insertedanto or removed from a zip drive just as we insert and remove floppy disks in a
floppy disk drive or a video cassette in a VCR.
2. Disk Packs. A disk pack consists of multiple (two of more) hard disk platters
mounted on a single central shaft. Thus all the disks of a disk pack revolve together at
the same speed. As mentioned before, the disk drive of a disk pack has a separate
read/write head for each disk surface excluding the upper surface of the topmost disk and
the lower surface of the bottommost disk. These two surfaces are not used for data
recording in a disk pack. When not in use, disk packs are stored in plastic cases as shown
in Figure 8.22. They are of removable/interchangeable type in the sense that they have to
be mounted on the disk drive before they can be used, and can be removed and kept off-
line when not in use. That is, different disk packs can be mounted on the same disk-pack
drive at different instances of time. This gives virtually unlimited storage capacity to disk
packs.
3. Winchester Disks. A Winchester disk also consists of multiple (two or more) hard
disk platters mounted on a single central shaft. However, the main difference between a
Winchester disk and a disk pack is that Winchester disks are of fixed type. That is, the
hard disk platters and the disk drive are sealed together in a contamination-free container
and cannot be separated from each other. Thus as opposed to disk packs which have
virtually unlimited capacity, Winchester disks have limited capacity. However, for the
same number of disk platters of the same size, Winchester disks can manage, to have
larger storage capacity than disk packs due to the following reasons:

- Because both the disk platters and the disk drive are sealed in a contamination-free
container and do not require to be separated later, all the surfaces of all the disk platters
(including the upper surface of the topmost platter and the lower surface of the
bottommost platter) are used for data recording in case of Winchester disks. That is, for a
Winchester disk with foui platters, there are eight surfaces on which data can be recorded,
as opposed to six surfaces in case of a disk pack with four platters.
- The contamination-free environment allows Winchester disks to employ much greater
precision of data recording and accessing, resulting in greater density of data storage than
the interchangeable disk packs.

Winchester disks were so named after the 30-30 Winchester rifle because the early
Winchester disk systems had two 30-MB disks sealed together with the disk drive. The
storage capacity of today's Winchester disks is usually of the" order of a few tens of
megabytes to a few gigabytes (10 bytes).

Why do hard disks outperform floppy disks?

Hard disks outperform floppy disks in both data storage capacity and data access speed
due to the following reasons: -
1. A floppy disk drive is normally designed to operate with only one floppy disk platter,
whereas a hard disk drive normally operates with multiple hard disk platters, providing
several times more data storage capacity.
2. The rigid construction of hard disks as opposed to flexible construction of floppy
disks, allows higher precision in pinpointing positions on the disk, resulting in higher
data storage densities on disk surfaces. The contamination-free sealed environment of
Winchester disks allows its read/write head to fly much closer to the surface of the disk,
allowing much greater precision and further increase in disk densities. For instance,
floppy disks normally have 135 tracks per inch, whereas hard disks can easily have more
than 1000 tracks per inch.
3. The rigid construction of hard disks also allows them to spin at much greater speeds
than floppy disks, resulting in faster data access. Floppy disks tend to bend at higher
speeds due to their flexible construction. For example, a floppy disk normally spins at
360 rpm, whereas hard disks spin at 3600 rpm, 5400 rpm, or even 7200 rpm.
4. In most hard disk drives, the disk(s) keep spinning continuously. In contrast, the
diskette of a floppy disk drive is set in motion only when a command is issued to read
from or write to the disk. This also contributes to faster data access for hard disks as
compared to floppy disks.

Advantages and Limitations of Magnetic Disks

Advantages

As a secondary storage device, magnetic disks have the following advantages:


1. Unlike magnetic tapes, which support sequential access of data, magnetic disks
support direct access of data. Hence they are more suitable for a wider range of
applications.
2. Due to its random access property, magnetic disks are often used simultaneously by
multiple users as a shared device. For example, Winchester disks and disk packs are
often used as on-line secondary storage devices, in which case they store data of multiple
users of the computer system. A tape is not suitable for such type of usage due to its
sequential-access property.
3. Magnetic disks are suitable for both on-line storage of date. For example,
Winchester disks and disk packs are often used as on-line secondary storage devices,
whereas floppy disks and zip disks are used as off-line secondary storage devices. In fact,
the high-capacity Winchester disks have made it possible for today's most personal
computer users to enjoy the convenience of having all data and software readily
accessible at all times.
4. Except for the fixed type Winchester disks, the storage capacity of other magnetic
disks is virtually unlimited because as many disks are required can be used for storing
very large data sets.
5. Due to their low cost and high data recording densities, the cost per bit of storage is
low for magnetic disks. An additional cost benefit is that magnetic disks can be erased
and reused many times.
6. Floppy disks and zip disks are compact and light in weight. Hence they are easy to
handle and store. Very large amount of data can be stored in a small storage space.
7. Due to their compact size and light weight, floppy disks and zip disks are also easily
portable from one place to another. They are often used for transferring data and
programs from one computer to another, which are not linked together.
8. Any information desired from a disk storage can be accessed in a few milliseconds
because it is a direct access storage device. This is not possible in case of a tape storage,
which is a sequential access storage device.
9. Data transfer rate for a magnetic disk system is normally higher than a tape system.
10. Magnetic disks are less vulnerable to data corruption due to careless handling or
unfavorable temperature and humidity conditions than magnetic tapes.

Limitations

As a secondary storage device, magnetic disks have the following limitations:


1. Although magnetic disks may be used for both applications requiring random
processing of data and applications requiring sequential processing of data, for
applications of the latter type, use of magnetic disks may be less efficient than magnetic
tapes.
2. It is more difficult to maintain the security of information stored on magnetic disks
which are used as shared, on-line secondary storage devices, as compared to information
stored on magnetic tapes or on other types of magnetic disks.
3. For Winchester disks, a disk crash or drive failure often results in the loss of entire
data stored on it. It is not easy to recover the lost data. That is why suitable backup
procedures are suggested for data stored on Winchester disks.
4. Some types of magnetic disks, such as disk packs and Winchester disks, are not so
easily portable like magnetic tapes.
5. On a cost-per-bit basis, the cost of magnetic disks is low, but the cost of magnetic
tapes is even lower.
6. They must be stored in a dust-free environment.
7. Floppy disks, zip disks and disk packs should be labeled properly to prevent erasure
of useful data by mistake.

Uses of Magnetic Disks

Magnetic disks are typically used for one or more of the following purposes:
1. For applications that are based on random data processing.
2. As a shared on-line secondary storage device. Winchester disks and disk packs are
often used for this purpose.
3. As a backup device for off-line storage of data so that if by accident, the data on an
on-line storage device gets corrupted, it can be retrieved from the backup storage. Floppy
disks, zip disks, and disk packs are often used for this purpose.
4. Archiving of data which are not used frequently, but which may be used once in a
while. Floppy disks, zip disks, and disk packs are often used for this purpose.
5. Transferring of data and programs from one computer to another, which are not
linked together. Floppy disks and zip disks are often used for this purpose.
6. Distribution of software by vendors. Originally sold software or software updates
are often distributed by vendors on floppy disks and zip disks.

OPTICAL DISK

As compared to magnetic tape and magnetic disk, optical disk is a relatively new
secondary storage medium. During the last few years, it has proved to be a promising
random access medium for high capacity secondary storage because it can store
extremely large amounts of data in a limited space.

An optical-disk storage system consists of a rotating disk which is coated with a thin
metal or some other material that is highly reflective. Laser beam technology is used for
recording/reading of data on the disk. Due to the use of laser beam technology, optical
disks are also known as laser disks or optical laser disks.

Basic Principles of Operation

Storage Organization

Unlike magnetic disks that have several concentric tracks, an optical disk has one long
track that starts at the outer edge and spirals inward to the center (see Figure 8.23). This
spiral track is ideal for reading large blocks of sequential data, such as music. But it
makes for slower random access time than the concentric tracks used by magnetic disks,
whose sectors can be located faster because they are always found on a given track at a
fixed distance from the center.

Like a track on a magnetic disk, the track of an optical disk is split up into sectors, but
with optical disks each sector has the same length regardless of whether it is located near
the disk's center or away from the center. This type of data organization allows data to be
packed at maximum density over the entire disk. However, it also requires a more
complicated drive mechanism because the rotation speed of the disk must varv inversely
with the radius; the drive must slow down the disk's rotation speed to read sectors
towards the outside of the disk and speed it up to read sectors towards the center of the
disk.

(a) Track pattern on an optical disk


(b) Track pattern on a magnetic disk

Storage Capacity

The cost-per-bit of storage is very low for optical disks because of their low cost and
enormous storage density. They come in various sizes ranging from 12-inch to 4.7-inch
diameter. The most popular one is of 5.25 inch diameter whose capacity is around 650
Megabytes. This storage capacity is equivalent to about 2, 50,000 pages of printed text or
total capacity of 550 double-sided, high-density floppy disks of the same size. This
tremendous storage capacity makes optical disks the most suitable storage media for
multimedia applications (described in Chapter 19).

As optical disks have a single track, their storage capacity depends on the following:
1. Number of sectors, and
2. Number of bytes per sector
It is a multiple of the above two parameters. That is,
Storage capacity of an optical disk = Number of sectors
x Number of bytes per sector

The 5.25-inch optical disks typically have 3,30,000 sectors, each of 2352 bytes. That
gives a total capacity of 3,30,000 x 2352 = 776 x 106 bytes = 776 Megabytes. This is the
unformatted capacity. The formatted capacity is about 650 Megabytes.

Access Mechanism

Optical disks use laser beam technology for recording/reading of data on the disk surface.
With this technology, the read/write head used in magnetic storage is replaced by two
laser beam sources. One laser beam (of greater intensity) is used to write to the recording
surface by etching microscopic pits on the disk surface, and another laser beam (of lesser
intensity) is used to read the data from the light-sensitive recording surface. That is, data
recording is done by focusing the stronger laser beam on the surface of the spinning disk.
The laser beam is turned on and off at a varying rate because of which tiny pits (visible
only through a powerful microscope) are burnt into the metal coating of the disk along its
tracks. To read the stored data, the less-powerful laser beam is focused on the disk
surface. As shown in Figure 8.24, this beam is strongly reflected by the coated surface
(known as a land) and weakly reflected by the burnt surface (known as a pit), producing
patterns of on and off reflections that are converted into electronic signals of binary Is
and 0s by a sensor. Note that a mechanical read/write access arm is not needed in this
case because a light beam can be easily deflected to the desired place on the optical disk.
Access Time

Since a mechanical read/write access arm is not needed, the delay that occurs in case of
magnetic disks due to mechanical movements of the access arm will not be there in case
of optical disks. Hence you may think that data accessing from optical disks will be much
faster (access time will be less) as compared to that from magnetic disks. However this is
not true. Optical disk drives are slower (have larger access time) than magnetic disk
drives due to the following reasons:
1. We saw that the sectors of an optical disk are arranged on a continuous spiral track.
This data organization results in a slower random access time than the concentric tracks
used by magnetic disks, whose sectors can be located faster because they are always
found on a given track at a fixed distance from the center.
2. We also saw that with optical disks each sector has the same length regardless of
whether it is located near the disk's center or away from the center. This data
organization requires a more complicated drive mechanism because the rotation speed of
the disk must vary inversely with the radius; the drive must slow down the disk's rotation
speed to read sectors towards the outside of the disk and speed it up to read sectors
towards the center of the disk. This access mechanism leads to slower data access (larger
access time) as compared to magnetic disks, in which case the disks rotate at a constant
speed irrespective of the location of the data to be accessed.
Access times for optical disks are typically in the range of 100 to 300 milliseconds.
Compare this with the access times of floppy disks which are typically in the range of
100 to 200186

Optical Disk Drive

An optical disk has to be mounted on an optical disk drive before it can be used for
reading or writing of information. An optical disk drive contains all the mechanical,
electrical and electronic components for holding an optical disk and for reading or
writing of information on to it. That is, it contains the tray on which the disk is kept, the
read/write laser beams assembly, and the motor to rotate the disk. A typical optical disk
drive is shown in Figure 8.25.

An optical disk drive differs from a magnetic disk drive in the following manner:
1. As shown in Figure 8.24, it uses laser beam technology for data reading/writing and
has no mechanical read/write access arm.
2. Magnetic disk drives use a constant angular velocity (CAV) encoding scheme
whereas optical disk drives use a constant linear velocity (CLV) encoding scheme. That
is, in case of hard disk drives the disk spins at a constant rate of speed and each sector
occupies the area subtended by a fixed angle. On the other hand, in case of optical disk
drives, the rotational speed of the disk varies inversely with the radius; the motor slows
down the disk to read sectors towards the outside of the disk and speeds it up to read
sectors towards the inside of the disk. Doing this requires a more complicated drive
mechanism that can overcome the inertia of the disk when accelerating and the
momentum when decelerating, which slows the drive's random access time. But this
encoding scheme also allows data to be packed at maximum density over the entire disk.
Types of Optical Disks

All optical disks are round platters. They come in different sizes and capacities. The two
most popular types of optical disks in use today are CD-ROM and WORM disks. They
are described below.

CD-ROM

CD-ROM stands for Compact Disk-Read-Only Memory. It is a spin off of music CD


technology and works much like the music CDs used in music systems. In fact, if you
have a sound board and speakers connected to your computer, you can play music CDs
with your PC.

The CD-ROM disk is a shiny, silver color metal disk of 5% inch (12 cm) diameter. It has
a storage capacity of about 650 Megabytes. It is so called because of its enormous storage
capacity on a compact-size disk, and because it is a read-only storage medium. That is,
these disks come pre-recorded and the information stored on them cannot be altered.
CD-ROM disks are pre-stamped by their suppliers. The process of recording of
information on these disks is called mastering. That is, CD-ROM disks are created at a
mastering facility, just as music CDs are created at a recording studio. For this, a master
disk is first- made with the high-power laser, which is then replicated on multiple disks
by a stamping process (disk pressing process). In this process, the embossed surface of
pits and lands is accurately reproduced on each copy. The replicated copy is then plated
with a reflective surface, and a clear protective layer is added to complete the replication
process. These copies are then distributed with their pre-recorded contents. Once inserted
into the disk drive, the information stored on the disk can be read into the primary storage
of the computer system for processing or display. However, the data on the disk are fixed
and cannot be altered. This is in contrast to the read/write capability of magnetic tapes
and magnetic disks.

The fact that a normal user cannot write data to a CD-ROM disk does not mean that this
storage medium is not useful. In fact, there are many applications which make use of
huge volumes of data that rarely change, For example, dictionaries; encyclopedias;
medical, legal, or other professional reference libraries; music; and video can be stored
electronic form on a CD-ROM disk for efficient, electronic access by a computer user
because all these require tremendous amount of data that a normal user needs to only
refer to (read). Because of their high storage capacities and the fact that no one can
change the data stored on them, CD-ROM disks provide an excellent medium to
distribute large amounts of data at low cost. For example, infopedia is a single CD-ROM
disk that holds a complete encyclopedia, or a dictionary, or a world atlas, or a dictionary
of quotations or biographies of great people, or information about all educational
institutions of a particular type in a country etc CD-ROM disks are nowadays also used
extensively for distribution of electronic version of conference proceedings, journals,
magazines, books, etc. They are also the distribution medium of choice of many software
companies who distribute every new version and upgrade of their software products to
their clients on CD-ROM disks. They are also extensively used for storage and
distribution of multimedia applications which involve the integration of text, sound,
graphics, motion video, and animation.

To allow CD-ROM disks to be widely distributed and used on different computers, a


standard for recording information on CD-ROM disks, called ISO 9660, has been
evolved by the International Standards Organization According to this standard, a
Volume Table of Contents (VTOC) is created on the disk which allows storage and direct
access of 1,40,000 files on the disk. With this, any one of the 1,40,000 files can be
opened with a single seek. A software known as MSCDEX (Microsoft CD Extension),
which has been developed by Microsoft Corporation, is used for recording data in ISO
9660 format on CD-ROM disks. The ISO 9660 format is accented by all CD-ROM
vendors.

WORM Disk

We saw that CD-ROM disks are produced by manufacturers with expensive duplication
equipment This is economical only when a large number of copies of a master disk are
to be produced. Often users of computer systems would like to produce a few copies, or
a single copy of their own information in-house. This is possible by the use of WORM
disks.

WORM stands for write-once, read-many. WORM disks allow the users to create their
own CD-ROM disks by using a CD-recordable (CD-R) drive, which can be attached to a
computer as a regular peripheral device. WORM disks, which look like standard CD-
ROM disks, are purchased blank and encoded using a CD-R drive. The information
recorded on a WORM disk by a CD-R drive can be read by any ordinary CD-ROM drive.
As the name implies, data can be written only once on a WORM disk, but can be read
many times. That is, as with a CD-ROM disk, once data have been etched on to the
surface of a WORM disk, they become permanent that can be read but never altered.
Moreover, writing on a WORM disk cannot be done in multiple sessions, and all the data
to be recorded have to be written on the disk surface in a single recording session. The
same laser beam technology as discussed before is used for recording and reading of data.

Because of their permanent recording nature and large storage capacity, WORM disks are
the preferred storage media for archival application, which now depend on microfilm,
magnetic, or paper file media. Data archiving enables old data to be recorded on a
secondary storage media (such as a WORM disk) so that they can be deleted from the on-
line storage device (such as a hard disk), thus freeing space for new data. WORM disks
are also an ideal medium for making a permanent record of data. For example, many
banks use them for storing their daily transactions. The transactions are written to a
WORM disk in-house by the bank and become a permanent record that can be only read
but never altered.

Advantages and Limitations of Optical Disks

Advantages
As a secondary storage device, optical disks have the following advantages:
1. The cost-per-bit of storage for optical disks is very low because of their low cost and
enormous storage density.
2. The use of a single spiral track makes optical disks an ideal storage medium for
reading large blocks of sequential data, such as music.
3. Optical disk drives do not have any mechanical read/write heads to rub against or
crash into the disk surface. This makes optical disks a more reliable storage medium than
magnetic tapes or magnetic disks.
4. Optical disks have a data storage life in excess of 30 years. This makes them a better
storage medium for data archiving as compared to magnetic tapes or magnetic disks.
5. Since data once stored on an optical disk becomes permanent, the danger of stored
data getting inadvertently erased/overwritten is not there with optical disks.
6. Due to their compact size and light weight, optical disks are easy to handle, store,
and port from one place to another.
7. Music CDs can be played on a computer having a CD-ROM drive along with a
sound board and speakers. This allows computer systems to be also used as music
systems whenever desired.

Limitations

As a secondary storage device, optical disks have the following limitations:


1. It is a read-only (permanent) storage medium. Data once recorded, cannot be erased
and hence the optical disks cannot be reused.
2. The data access speed for optical disks is slower than magnetic disks.
3. Optical disks require a more complicated drive mechanism than magnetic disks.

Uses of Optical Disks

Optical disks are typically used for one or more of the following purposes:
1. For distributing large amounts of data at low cost. For example, a complete
encyclopedia, dictionary, world atlas, dictionary of quotations, biographies of great
people, information about all educational institutions of a particular type in a country, etc.
are often distributed on CD-ROM disks.
2. For distribution of electronic version of conference proceedings, journals, magazines,
book, product catalogs, etc.
3. For distribution of new or upgraded versions of software products by software
vendors.
4. For storage and distribution of a wide variety of multimedia applications.
5. For archiving of data, which are not used frequently, but which may be used once in
a while.
6. WORM disks are often used by end-user companies to make permanent storage of
their own proprietary information. For example, many banks use them for making a
permanent record of their daily transactions.
MAGNETO-OPTICAL DISK
We saw that both CD-ROM and WORM optical disks are permanent storage devices.
That is, data once written on them cannot be erased and overwritten. Hence unlike
magnetic tapes and magnetic disks, optical disks are not reusable. To overcome this
limitation of optical disks, researchers invented magneto-optical disk technology which
integrates optical and magnetic disk technologies to enable rewritable storage with laser-
beam technology. Since magneto-optical disks are rewritable, they are also known as
rewritable optical disks.

A magneto-optical disk consists of a rotating disk that is covered with magnetically


sensitive metallic crystals sandwiched inside a thin layer of plastic coating. In its normal
state, the plastic coating is solid, preventing the metallic crystals from moving. To write
data on the disk, the laser beam of greater intensity is focused on the surface of the disk at
the location of writing. The intensity of this laser beam is just strong enough to melt the
plastic coating for a very short instance of time that is just long enough to allow a magnet
to change the orientation of the metaliic crystals. The magnet has an effect at only the
point where the laser beam is focused because the plastic coating at only that point is
fluid enough to allow the metallic crystals to be reoriented.

To read data from a magneto-optical disk, the laser beam of lesser intensity is focused on
the disk track formed by the metallic crystals. As the disk spins and the metallic crystals
pass under the laser beam, depending on their orientation (alignment), some metallic
crystals reflect the light while others scatter the light, producing patterns of on and off
reflections that are converted into electronic signals of binary Is and Os by a sensor.

Magneto-optical disks are today available in various sizes and storage capacities. The
ones having 5'/4-inch and 3/2-inch diameter have storage capacities in excess of 1 GB.
However, the access speed of magneto-optical disk drives is slower than hard-disk drives.
The access time for magneto-optical disk drives is about 30 milliseconds which is almost
as fast as the access speed of slower hard-disk drives. Moreover, magneto-optical disk
drives are more expensive and less feliable than magnetic disk drives. Due to these
reasons, magneto-optical disks are not yet as popular as magnetic disks or optical disks.
But as magneto-optical disk technology matures to offer reliable and cost-effective
rewritable storage media, it eventually may dominate the secondary storage market in the
future.

Magneto-optical disks are ideal for multimedia applications that require large storage
capacity. They are also used for applications that require large volumes of storage with
relatively little update activity, and for applications that require a reusable, portable and
durable secondary storage device.

MASS STORAGE DEVICES

Mass storage devices are storage systems that have storage capacity of several trillions of
bytes of data.
Researchers are constantly trying to improve the secondary storage media discussed
above by increasing their capacity, performance, and reliability. However, any physical
storage media has a limit to its capacity and performance. When it gets harder to make
further improvements in the physical storage media and its drive, researchers normally
look for other methods for improvement. Mass storage devices are a result of such
improvements which researchers have resorted to for larger capacity secondary storage
devices. The idea is to use multiple units of the storage media being used (such as
multiple disks, multiple tapes, multiple CD-ROMs, etc.) as a single secondary storage
device. Based on this idea, the three types of commonly used mass storage devices are:
1. Disk array, which uses a set of magnetic disks.
2. Automated tape library, which uses a set of magnetic tapes.
3. CD-ROM jukebox, which uses a set of CD-ROMs.
These three types of mass storage devices are briefly described below.
The average access times of mass storage devices are measured in seconds instead of
milliseconds because a transport mechanism must first move to retrieve the storage media
(such as disk, tape or CD-ROM) upon which the desired data is stored. It requires several
seconds to locate the storage media specified and then few milliseconds are needed to
transfer the data to the memory. Thus an average access time of few seconds is common
for these storage devices. But a mass storage device has huge storage capacity and a very
small cost per bit stored.
Relatively slow access times limit the use of mass storage devices in many applications.
However, mass storage devices are cost-effective alternative to on-line magnetic tape or
disk storage in applications that require huge storage capacity and in which rapid access
to data is not essential. When used for off-line storage, mass storage devices are often
referred to as archival storage because of the very large volumes of historical or backup
data that they can store.

Disk Array

A disk array, which first appeared on the market in 1993, is a set of hard disks and hard
disk drives with a controller mounted in a single box. All the disks of a disk array form a
single large storage unit. A disk array is commonly known as a RAID (Redundant Array
of Inexpensive Disks). The term inexpensive comes from the fact that each of the
medium-sized hard disks in the disk array is much less expensive than a single large hard
disk.
Although RAID systems were originally developed to provide large secondary storage
capacity with enhanced performance, today they are also becoming popular due to
enhanced reliability. How do RAID systems provide enhanced storage capacity,
enhanced performance, and enhanced reliability is briefly explained below.

Suppose we have a 4 Gigabyte disk whose each track contains 128 sectors, each of 512
bytes. The system uses 4 sectors per cluster (also known as a block), so that every
read/write access to the disk transfers 2 Kilobytes (512 bytes x 4) of data. The disk makes
one revolution in 10 ms and can transfer a block in 0.15 ms. Now suppose a RAID
system uses 4 of these disks and puts them in the same enclosure. This 4-disk RAID unit
will have total storage capacity of 4 x 4 = 16 Gigabytes. This naturally results in a four
fold increase in storage capacity as compared to a single disk's storage capacity.
Furthermore, this RAID unit will have blocks of 4 x 2 = 8 Kilobytes which will consist of
the matching blocks (the ones with the same block number) on the four disks (recall the
cylinder concept of data organization when multiple disks are used in a disk pack). The
access time for a block on this RAID unit will be the same as for the individual disks, but
the transfer rate will be four times since we can now deliver an 8 Kilobyte block in 0.15
ms. The transfer rate has increased from 2K/0.00015 = 13.33 Megabytes/second to
8K/0.00015 = 53.33 Megabytes/second. Clearly the storage capacity and performance
can be further enhanced by using even more disks in the RAID with parallel data transfer.
Enhanced reliability is achieved by RAID units by taking advantage of the presence of
multiple disks. The two commonly used techniques used for this purpose are mirroring
and striping. In case of mirroring, the system makes exact copies of files on two hard
disks. That is, one is the mirror image of the other one and if one of the two copies gets
corrupted, the other copy is available for accessing.

In case of striping, a file is partitioned into smaller parts and different parts of the file are
stored on different disks. In this case, a spare disk is used to record parity data that are
used for error checking and data recovery in case of a disk failure. When the file is read,
the data on the spare disk ensures that the data read from the other disks are correct.

In addition to enhanced reliability, both mirroring and striping also speed up the process
of reading data from the disk array because the different hard disk drives of the RAID
unit can read different parts of the file at the same time.

Figure 8.26 shows a RAID unit having 10 disks. A large RAID unit can be composed of
more than one hundred disks and can have storage capacity of several terabytes (1
terabyte = 1012 bytes).

Note that the same RAID unit can be used in several different ways (combinations of
striping, mirroring, and error detection and correction) by changing the control software.
Depending on the various types of control software, there are the following commonly
accepted levels of RAID systems, each one with unique economic, performance and
reliability tradeoffs:

1. RAID level 0: It uses striping.


2. RAID level 1: It uses mirroring.
3. RAID level 2: It uses striping plus error detection and correction.
4. RAID level 3: It uses striping with dedicated parity.
5. RAID level 4: It uses modified striping with dedicated parity.
6. RAID level 5: It uses modified striping with interleaved parity.
7. RAID level 0 + I: It uses striping and mirroring.

With such a wide range of reliability features inbuilt in them, modern RAID systems
have mean time between data loss (MTBL) of well over a million hours, tlence they are
often considered as a basic unit for building reliable computer systems. With more and
more organizations relying on information technology to run their business, unscheduled
interruptions have more serious consequences. As a result, today many organizations are
turning to the RAID as a safer way to store large amounts of data.

Automated Tape Library

An automated tape library is a set of magnetic tapes with a controller mounted in a single
unit. The unit has one or more tape drives to read and write data on the tapes in the tape
library. In case of units having multiple tape drives, it is possible to read/write data
from/to multiple magnetic tapes simultaneously resulting in faster data transfer rates.
Multiple drives also lead to improved reliability of the storage unit because if one of the
drives fails, the unit can continue to function with other drives at a slower speed. The unit
also has robotic arms to retrieve the appropriate tape from the tape library and mount it
on one of the tape drives for processing. The tape is automatically returned to the library
at the end of the job. A large tape library can accommodate up to several hundred high
capacity magnetic tapes bringing the storage capacity of the storage unit to several
terabytes (1 terabyte is equal to one trillion bytes).

Automated tape libraries are typically used for data archiving and as an on-line data
backup device for automated backup. They are mainly found in large computer centres.

CD-ROM Jukebox

The principle of operation of a CD-ROM jukebox is very similar to that of an automated


tape library except for the fact that it uses a set of CD-ROMs instead of magnetic tapes as
the storage media. That is, a CD-ROM jukebox is a set of CD-ROM disks with a
controller mounted in a single unit. The unit has one or more CD-ROM drives to read
data from the CD-ROM disks in the jukebox. In case of units having multiple CD-ROM
drives, it is possible to read data from multiple CD-ROM disks simultaneously resulting
in faster data transfer rates. Multiple drives also lead to improved reliability of the storage
unit because if one of the drives fails, the unit can continue to function with other drives
at a slower speed. The unit also has robotic arms to retrieve the appropriate CD-ROM and
mount it on one of the CD-ROM drives for processing. The CD-ROM is automatically
returned to the appropriate slot at the end of the job. A large CD-ROM jukebox can
accommodate up to several hundred CD-ROM disks bringing the storage capacity of the
storage unit to several terabytes.

CD-ROM jukeboxes are typically used for archiving read-only data that needs to be
accessed on-line but where access time is not very critical. For example, on-line
museums, on-line digital libraries and on-line encyclopedia are a few systems that may
make use of this mass storage device in an effective manner.

OTHER RELATED CONCEPTS

Few other concepts related to secondary storage of computer systems are briefly
described below.
Drive Interface Standards

Secondary storage devices need a controller to act as an intermediary between the device
and the rest of the computer system. On some computers, the controller is an integral part
of the computer's main motherboard. On others, the controller is an expansion board that
connects to the system bus by plugging into one of the computer's expansion slots. In
order that devices manufactured by independent vendors can be used with different
computer manufacturers, it is important that the controllers follow some drive interfacing
standard. The four commonly used drive interface standards are:

1. Integrated Drive Electronics (IDE). IDE incorporates much of the intelligence of the
controller into the drive itself. Because most of their controlling electronics are on the
drive itself, IDE controllers are small, simple cards that do little more than providing an
IDE drive with a place to plug into the computer's bus. In fact, some computer
manufacturers build IDE support right into their motherboards. IDE provides data-
transfer rates of about 1 Megabytes per second under ideal conditions.

2. Enhanced Small Device Interface (ESDI). Like IDE, ESDI (pronounced


"es-dee") also incorporates much of the intelligence of the controller into the drive.
This provides a simpler interface with the computer and leads to faster and more reliable
operation. An ESDI controller can theoretically address up to 1 terabyte (1012 bytes) of
disk space and can reliably transfer up to 3 Megabytes per second.

3. Intelligent Peripheral Interface-level 3 (IPI-3). IPI-3 is used in minicomputers and


mainframe systems for interfacing faster, larger disks (having diameter of 8 inches or
more) with the main computer system. It allows faster data transfer from the disk to the
computer's memory as compared to IDE or ESDI.
4. Small Computer System Interface (SCSI). In case of IDE, ESDI and IPI-3, a
separate device controller is required in the computer system for each type of device that
has to be connected to it. SCSI (pronounced "scuzzy") is an interesting and important
variation of the separate device controller idea for each device. It uses a generic device
controller (called SCSI controller) on the computer system and allows any device with an
SCSI interface to be directly connected to the SCSI bus of the SCSI controller. The SCSI
interface of a device contains all circuitry that the device needs to operate with the
computer system.

As shown in Figure 8.27, a SCSI controller connects directly to the computer bus on one
side and controls another bus (called SCSI bus) on the other side. Since the SCSI
controller is connected to the computer's bus on one side and to the SCSI bus on the other
side, it can communicate with the processor and memory and can also control the devices
connected to the SCSI bus. The SCSI bus is a bus designed for connecting devices to a
computer in a uniform way. In effect, the SCSI controller extends the computer's bus
outside the main system box and allows other devices to be connected to the computer
with the help of this extended bus. The important thing about the SCSI bus is that there is
a standard protocol for sending device control messages and data on the bus. Each device
connected to the SCSI bus has a standard SCSI interface (a single chip) that knows about
the bus protocol.

Since SCSI extends the computer's bus outside the main computer box, it allows any
SCSI device to be connected to the computer without the need to open the computer box
and install a device controller on its internal bus. Bringing the computer's bus directly
into the drive allows even higher data-transfer rates than are possible with ESDI. A SCSI
being an extension of a computer's bus, it can accommodate multiple devices
simultaneously. Most current implementations of SCSI limit the number of devices to
seven due to the bus capacity limitation. Moreover, SCSI being an extension of the bus,
any type of device (hard-disk drive, optical-disk drive, tape drive, printer, plotter,
scanner, etc.) can be linked (or daisy-chained) on a single SCSI port (see Figure 8.27).

As the name implies, SCSI started out as a standard interface for connecting devices to
small computer systems. But the advantages of a common interface soon became
apparent in all sizes of systems, and newer versions of SCSI have much higher data-
transfer rates and are used in high-end systems.

Data Backup

What is Data Backup?

Data backup is the process of creating a copy of the data from an on-line storage device
to a secondary storage backup device such as, magnetic tape, floppy disk, zip disk, disk
pack or WORM disk, (not necessarily but usually for off-line storage of the data) so that
if by accident the data on the on-line storage device gets corrupted or lost, it can be
retrieved from the backup device and stored back on the on-line storage device.

Why Backup Data?

Taking periodic backup of on-line data and keeping them on off-line secondary storage
devices is an important and necessary practice for computer users because the data on an
on-line storage device, such as a hard disk, can be damaged or lost in any one or more of
the following ways:
1. A disk crash.
2. A virus attack.
3. A hardware malfunction.
4. An unintended accidental deletion of useful files.
5. A natural disaster like fire or earthquake damaging the computer system.
The amount of time it would take you to re-create all of your files if you lost them is far
greater than the few minutes it will take you to back them up. Hence protecting valuable
data with regular backups is a must for all computer centres and all computer users.

Types of Backup
The two basic types of backup are full backup and incremental backup. They are
described below.

1. Full Backup. In this case, all the data on the on-line secondary storage device is
copied on the backup device at the time of backup. That is, the backup procedure creates
a copy of every file from the on-line secondary storage device on to the backup device,
whether the file has been changed or not. Depending on the volume of data being backed
up and the backup device used, full backups can take anywhere from a few minutes to a
few hours to complete.

2. Incremental Backup. Since backup is an expensive process both in terms of the time
taken to complete and the storage space occupied on the backup device, full backup is not
always suggested. To save on backup time and storage space, one can often go for
incremental backup instead of full backup. In this case, only the newly created files or
files that have been changed since the last backup are copied on the backup device from
the on-line secondary storage device at the time of backup. The obvious question is how
to keep track of the newly created and modified files since the last backup. Fortunately,
every file stored in the system contains the date when it was created or last changed, so
the backup software (known as backup utility) can simply compare these dates to those in
its log for taking incremental backup.

Incremental backup is faster than full backup because it needs to create a copy of only the
new and modified files since the last backup. This may actually result in copying of only
a few files out of hundreds of files stored on the on-line secondary storage device.
However, full backup is simpler and a little safer when the data has to be restored back
from the backup device on to the on-line secondary storage device. If you want to restore
a particular file that was lost, you need to search for it at only one place in case of full
backup, whereas in case of incremental backup you need to search for it on several
backups tracing back from the most recent backup till you find the file. Similarly, in the
event of a disk crash, when all the files are lost and need to be restored back on to a new
disk, it is very easy to do this with full backup as compared to incremental backup
because the full backup is a mirror image of the entire disk and can be restored as it is.

Backup Policy

Every computer system needs to have a well defined backup policy. The backup policy
for a computer system depends on its nature of usage, types of users, its operating
environment, etc. A backup policy normally decides about the following:

1. What is the periodicity of backup? That is, is the backup procedure executed hourly,
daily, weekly, fortnightly, monthly, etc. The periodicity normally depends on the nature
of usage and the criticality of the stored data of a system.
2. Whether to take full or incremental backup? This again depends on the nature of
usage of the system. For example, if a user creates only a few files (say letters) a day, an
incremental backup performed at the end of each day or even once a week may be
sufficient. On the other hand, if a user frequently creates many files, weekly full backups
are safer. A compromise that works well for many systems is performing incremental
backups daily and full backups once in a week.
3. What storage media to use for backup? This is normally decided by the average
volume of data that is backed up every time the backup procedure is executed. Small
backups are normally taken on floppy disks, whereas larger backups are taken on
magnetic tapes. Very large backups may also be taken on disk packs.
4. Who takes backup? This normally depends on the usage environment of computer
systems. Foi example, in case PCs it is the PC user who is normally responsible for
taking the backup of his/her. PC. In case of large computer centres, where a system is
shared by many users, backup is normally the responsibility of the system administrators
of the system. Often backup is an automated procedure in large computer centres, in
which case it is automatically executed at the defined periodicity and the data on hard
disk is automatically backed up on an on-line backup device such as a tape library. In this
case, backup is the responsibility of the system itself.

Where to store the backup media with the backed up data? We just now saw that the
backup device along with the media may be an on-line device such as a tape library. In
this case, the backup media is actually stored very near to the computer system. This is
not acceptable if we need to protect the data against natural calamities. Hence off-line
storage of backup data is always preferred to its online storage. Moreover, to protect the
data against natural calamities, it is suggest to store the backup media.with the backed up
data in a building that is away from the building where the computer system whose data
is backed up is located.

RAM Disk

We saw that hard disks are used as on-line secondary storage devices in most computer
systems of today. However, the data access speed of a hard disk is much slower than that
of a semiconductor RAM (recall that RAM chips are used for main memory). This is
because hard disks involve mechanical movements, whereas semiconductor RAMs are
pure electronic devices. To make applications execute faster, in some computer systems a
block of semiconductor RAM chips (other than the RAM chips used for the main
memory) is used as a simulated disk. That is, an application to be executed is first loaded
from the hard disk into the simulated disk and then only its execution is started. The
application executes faster than normal in this case because the method avoids most of
the delay that might be caused by frequent calls to the hard disk for data loading during
execution.

The RAM chips used as a simulated disk are often referred to as a RAM disk, or a silicon
disk, or a pseudo disk. These RAM chips may be placed on an add-on circuit board that
fits inside the main computer box, or they may be housed in a separate cabinet. In either
case, these extra RAM chips look just like a disk drive to the control programs used in the
computer's operating system. Note that RAM disk is not really a disk at all.

A RAM disk greatly helps in enhancing the speed of the computer system because the
CPU can now access the desired data almost instantly from the RAM disk instead of
waiting for few milliseconds to obtain the same data from the hard disk. However, RAM
chips are volatile and the data stored in them are lost when power is switched off. Thus,
programs and data files produced during a processing session must be stored on a
permanent storage device, such as a hard disk, before the power is switched off.

Digital Versatile Disk (DVD)

DVD is a standard format for the distribution and interchange of digital content in both
computer-based and consumer electronic products. The format is designed to store
various types of large multimedia data on a new and improved version of the CD
(Compact Disk) which works on optical disk technology. That is, both DVD-ROM and
CD-ROM store data using pits embossed in the disk surface. However, these pits are
about AXA times as dense on the DVD-ROM as on the CD-ROM and can store about
seven times more data per side. The greater density is due to a more efficient data
modulation scheme and error correction method that packs more data bits into every bit.
Physically, both DVD and CD are identical in both diameter and total thickness.
Currently available DVDs have 4.7 GB capacity per side. They provide about 135
minutes of video playback at an average data rate of little less than 5 Megabits/second.

The DVD standard has two layers of specifications known as physical layer and logical
layer. The physical layer specifications apply to the physical media itself, whereas the
logical layer specifications are for supporting all types of applications. The physical layer
specification defines the following types of physical media:

1. DVD-ROM. It is used for mass distribution of pre-recorded software programs and


multimedia.
2. DVD-RAM. It is used for general read-and-write applications in the PC or
consumer electronics domains.
3. DVD-R. It is -used low-cost, write-once recordable media.
4. DVD-RW. It is a rewritable version of DVD-R.

On the other hand, the logical layer specification defines recording formats for video and
audio data for mass distribution of pre-recorded motion pictures and music. The key
features of DVD-video and DVD-audio specifications are as follows:
1. DVD-video. It offers many more features than other pre-recorded movie products.
It beats the original 12-inch laser disk products in convenience and low price. It is far
superior to pre-recorded tapes in image quality and sound because it has multichannel
surround sound. In addition, it has multiple selectable language soundtracks and
subtitles, voice-over commentaries by the movie's cast or director, and convenient
random access to special features.
2. DVD-audio. It offers multiple choices of sampling rate and numbers of bits per
sample. For super-high fidelity, the music producer might opt for two channels with 24-
bit sampling at a rate of 192 KHz. (Contrast the basic CD standard with its two channels
and 16-bit sampling at 44 KHz.) The specification also supports up to six channels of
multichannel surround sound with 24-bit sampling at a 48 KHz rate. Besides the
improved audio features, the DVD-audio specification goes beyond CD by making
provision for visual menus, still images, and video to accompany the audio program.

Storage Hierarchy

We have learnt about the various types of storages used with computer systems. We also
saw that different types of storages have different capacity, speed of access, and cost per
bit stored. As a single type of storage is not superior in speed of access, capacity, and
cost, most computer systems make use of a hierarchy of storage technologies.

A typical storage hierarchy pyramid is shown in Figure 8.28. It includes cache memory,
main memory, secondary storage and mass storage. As we move up the pyramid, we
encounter storage elements that have faster access time, higher cost per bit stored, and
less capacity. A larger storage capacity, lower cost per bit stored, and slower access time
are the results of moving down the pyramid. Thus, cache memory generally has the
fastest access time, the smallest storage capacity, and the highest cost per bit stored. The
primary storage (main memory) falls next in the storage hierarchy list. On-line, direct-
access secondary storage devices such as magnetic hard disks make up the level of
hierarchy just below main memory. Off-line, direct-access and sequential-access
secondary storage devices such as magnetic tape, floppy disk, zip disk, WORM disk, etc.
fall next in the storage hierarchy. Mass storage devices, often referred to as archival
storage, are at the bottom of the storage hierarchy. They are cost-effective for the storage
of very large quantities of data when fast access time is not necessary.

Notice that the use of a hierarchy of storage technologies shown in Figure 8.28, is a cost
effective way of designing computer systems with very large storage capacities.
Smaller capacity, faster access time, and higher cost per bit stored
Cache memory
Main memory
On-line, direct-access and
sequential-access secondary
storage device such as hard disk
Off-line, direct-access and sequential-access secondary storage devices such as magnetic
tape, floppy disk, zip disk, WORM disk, etc.
Larger capacity, slower access time, and lower cost per bit stored
Mass storage devices such as tape library, CD juke box, etc.

Points to Remember

1. The primary storage of a computer system has limited capacity and is volatile.
Hence, additional memory, called auxiliary memory or secondary storage, is used with
most computer systems.
2. The secondary storage of a computer system is non-volatile and has low cost per bit
stored, but it generally has an operating speed far slower than that of the primary storage.
3. A sequential-access storage device is one in which the arrival at the location desired
may be preceded by sequencing through other locations, so that access time varies
according to location. On the other hand, a random-access storage device is one in which
any location in the device may be selected at random, access to the information stored is
direct, and approximately equal access time is required for each location.
4. Magnetic tape is the most popular sequential-access storage device. It consists of a
plastic ribbon, usually V2 inch or lA inch wide that is coated with a magnetizable
recording material. The tape ribbon is stored in reels or a small cartridge or cassette.
5. The tape of a magnetic tape storage is divided into vertical columns called frames
and horizontal rows called channels or tracks. A character is recorded per frame.
6. The storage capacity of a magnetic tape is a multiple of its data recording density and
length.
7. A magnetic tape drive is used for storage and retrieval of data stored on magnetic
tape medium.
8. A tape drive is connected to and controlled by a tape controller, which interprets the
commands for operating the tane drive.200
I Foundations of Computing
9. The four commonly used types of magnetic tapes are i^-inch tape reel, V2-inch tape
cartridge, Vi-inch streamer tape and 4-mm digital audio tape.
10. Magnetic disk is the most popular direct-access storage device. It consists of a thin,
circular plate made of metal or plastic that is coated on both sides with a magnetizable
recording material. The disk is stored in a specially design^ protective envelope or
cartridge, or several of them may be stacked together in a sealed, contamination-free
container.
11. The surface of a magnetic disk is divided into a number of invisible concentric
circles called tracks. Each track is further subdivided into sectors. A sector is the
smallest unit of data access from a disk. In case of disk units having multiple disk plates,
a set of corresponding tracks on all the recording surfaces together form a cylinder.
12. The storage capacity of a disk system is a multiple of its number of recording
surfaces, number of tracks per surface, number of sectors per track and number of bytes
per sector.
13. The data access time for a disk depends on seek time, latency and transfer rate. The
time required to position the read/write head over the desired track is called seek time.
The time required to spin the desired sector under the head is called latency. Transfer
rate refers to the rate at which data are read from or written to the disk.
14. A magnetic disk drive contains all the mechanical, electrical and electronic
components for holding one or more disks and for reading or writing of information on to
it.
15. A disk drive is connected to and controlled by a disk controller, which interprets the
commands for operating the disk drive.
16. All types of magnetic disks may be broadly classified into two types - floppy disks
and hard disks. Floppy disks are made of flexible plastic whereas hard disks are made of
rigid metal. Depending on the type of packaging, hard disks are further classified into
zip disks, disk packs and Winchester disks.
17. An optical-disk storage system consists of a rotating disk, which is coated with a thin
metal or some other material that is highly reflective. Laser beam technology is used for
recording/reading of data on the disk.
18. The storage capacity of an optical disk is a multiple of its number of sectors and
number of bytes per sector.
19. An optical disk drive contains all the mechanical, electrical and electronic
components for holding an optical disk and for reading or writing of information on to it.
20. The two most popular types of optical disks in use today are CD-ROM and WORM
disks. CD-ROM disk is a read-only storage medium whereas WORM disk is a write-
once, read-many storage medium.
21. Magneto-optical disks integrate optical and magnetic disk technologies to enable
rewritable storage with laser-beam technology.
22. Mass storage devices use multiple units of a storage media to create a single
secondary storage device.
23. A disk array (also known as a RAID) is a mass storage device that uses a set of hard
disks and hard disk drives with a controller mounted in a single box. All the disks of a
disk array form a single large storage unit. RAID systems provide enhanced storage
capacity, enhanced performance and enhanced reliability.
24. An automated tape library is a mass storage device that uses a set of magnetic tapes
and tape drives with a controller mounted in a single unit.
25. A CD-ROM jukebox is a mass storage device that uses a set of CD-ROM disks and
CD-ROM drives with a controller mounted in a single unit.
26. In order that devices manufactured by independent vendors can be used with
different computer manufacturers, it is important that the device controllers follow some
drive interfacing standard. The four commonly used drive interface standards are -
Integrated Drive Electronics (IDE), Enhanced Small Device Interface (ESDI), Intelligent
Peripheral Interface-level 3 (IPI-3) and' Small Computer System Interface (SCSI).
27. Data backup is the process of creating a copy of the data from storage backup device
so that if by accident the data on the on-line it can be retrieved from the backup device
and stored back on the on-line storage device to a secondary storage device gets
corrupted or gets lost, line storage device.
28. The two basic types of backup are - full backup an incremental backup. In full
backup, all the data on the online secondary storage device is copied on the backup
device at the time of backup, whereas in incremental backup only the newly created files
or files that have been changed since the last backup are copied.
29. To make applications execute faster, in some computer systems a block of
semiconductor RAM chips (other than the RAM chips used for the main memory) is used
as a simulated disk. These RAM chips are often referred to as a RAM disk, or a silicon
disk, or a pseudo disk.
30. DVD (Digital Versitile Disk) is a standard format for the distribution and interchange
of digital content in both computer-based and consumer electronic products. The format
is designed to store various types of large multimedia data on a new and improved
version of the CD which works on optical disk technology.
31. As a single type of storage is not superior in speed of access, capacity and cost, most
computer systems make use of a hierarchy of storage technologies known as storage
hierarchy. A typical storage hierarchy pyramid includes cache memory, main memory,
secondary storage and mass storage.
Questions

1. What is a secondary storage? How does it differ from a primary storage?


2. What are the main limitations of the primary storage of a computer system?
3. Why is secondary storage used in most computer systems?
4. Name some of the popular secondary storage devices used in today's computer
systems.
5. Give the broad classification of the popular secondary storage devices used in
today's computer systems.
6. What is a sequential-access storage device? Give examples of a few applications for
which such a storage device is suitable.
7. What is a random-access storage device? Give examples of a few applications for
which such a storage device is suitable.
8. Distinguish between a sequential access, a direct access, and a random access
storage device. Give one example of each.
9. "The storage approach selected for a particular application is determined by the way
the data are organized and processed." Discuss.
10. Differentiate between on-line and off-line storage of data. Name a storage device
suitable for each type of data storage.
11. Explain how information js recorded on a magnetic tape.
12. What is a parity bit? How is it used for detecting errors?
13. What is a magnetic tape drive? Describe the main components and the basic
operation mechanism of a half-inch magnetic tape reel drive.
14. Define "data recording density" and "data transfer rate" for a magnetic tape drive.
What is the data transfer rate for a magnetic tape system for which the tape density is 800
BPI and the tape speed is 200 inches per second?
15. A magnetic tape is a continuous medium in which data are recorded serially and
there is no addressing mechanism. In this situation, explain how different data records
stored on a magnetic tape are identified.
16. In the context of magnetic tape storage, what is an inter-record gap? Why is it
needed?
17. In the context of magnetic tape storage, what is an inter-block gap? Why is it
needed?
18. In the context of magnetic tape, what is blocking? Explain how blocking helps in
faster tape I/O operation.
19. In the context of magnetic tape storage, what is blocking factor? How is blocking
factor generally decided'
20. The tape usage increases as the blocking factor increases. Give an example to
illustrate this.
21. The tape usage increases as the blocking factor increases. This means that the
blocking factor should be i large as possible. What is the problem in making the blocking
factor too large?
22. In the context of magnetic tape storage, explain the role of the following:
(a) File header label (d) End of tape marker
(b) File trailer label (e) Beginning of tape marker
(c) Tape header label
23. What is a magnetic tape controller? List some of the commands that a magnetic
tape controller typical supports.
24. List out the main advantages of half-inch tape cartridges over half-inch tape reels.
25. List out the main differences in the way data are organized and accessed in case of
half-inch tape reels ai half-inch tape cartridges.
26. List out the main differences between half-inch tape and quarter-inch streamer tape.
Which of the two ma better utilization of tape storage and why?
27. What is the QIC standard? How is it useful?
28. Differentiate between serial and parallel representation of data recording on magnetic
tapes. Give one example of each to illustrate the two types of data recording.
29. Explain how a very high data recording density is obtained in case of digital audio
tape.
30. List out the main advantages of magnetic tapes as a secondary storage device.
31. List out the main limitations of magnetic tapes as a secondary storage device.
32. List out the main uses of magnetic tapes.
Write short notes on:
(a) Secondary storage
(b) Magnetic tape drive
(c) Magnetic tape reel
(d) Magnetic tape cartridge
(e) Streamer tape
(f) Digital audio tape
(g) Sequential-access storage device
(h) Direct-access storage device
(i) Uses of magnetic tapes
(j) Advantages and limitations of magnetic tapes
34. What is a magnetic disk? Explain how data are stored and organized on a magnetic
disk.
35. In the context of magnetic disk storage, define the following terms and give the
relationship among them (if any):
(a) Track (d) Cylinder
(b) Sector (e) Disk address
(c) Cluster
36. Describe the two commonly used methods of partitioning a disk surface into sectors
and list out their relative advantages and disadvantages.
37. What will be the storage capacity of a double-sided disk that has 400 tracks, 16
sectors per track and 512 bytes per sector?
38. List out the relative advantages and disadvantages of sector-based and cluster-based
disk organizations.
39. The sector size of a disk should not be too large or too small. Explain why.
40. What is a disk pack? Explain how data are organized and accessed from a disk pack.
41. What is a cylinder? A disk pack has 16 surfaces and 200 tracks on each surface. How
many cylinders are there in this disk pack?
42. Explain how cylinder-based organization leads to faster access of data in a disk pack.
43. What factors determine the storage capacity of disks?
44. A disk pack consists of 6 disk plates. Each plate has 400 tracks and there are 50
sectors per track. If 512 bytes can be stored per sector, then calculate the total number of
bytes that can be stored in this pack.
45. Disks having larger diameter can have more tracks and larger storage capacity. In
spite of this fact, why are disks with very large diameters not used for designing large
capacity magnetic disk storage systems?
46. Describe the structure of the two commonly used types of access arms assembly in
disk systems. List their relative advantages and disadvantages.
47. What is a head crash in case of a disk system? How does it affect a computer
system?
48. Define the following terms in context of a disk storage:
(a) Access time (c) Latency
(b) Seek time (d) Transfer rate
49. For every read/write access to a disk, is seek time constant or variable? If it is
constant, what is its value? If it is variable, what are its minimum and maximum values?
50. For every read/write access to a disk, is the value of latency constant or variable? If
it is constant, what is its value? If it is variable, what are its maximum and minimum
values?
51. Explain how do disk systems with multiple read/write heads per surface help in
reducing seek time as compared to those with single read/write head per surface.
52. What is transfer rate of a disk system? What are the two main parameters on which
it depends?
53. The rotational speed of a disk system having a single recording surface is 300 rpm.
It has 80 sectors/track and 512 bytes/sector. What is the transfer rate of this disk system?
54. Explain access time, seek time and latency for disk storage. What is the access time
of a disk system whose average seek time is 20 milliseconds and average latency is 7
milliseconds?
55. What is "flying-head?" How does it help in increasing the life of a disk storage?
56. Differentiate between direct and random access storage devices. In which category
does a magnetic disk fall? Give reasons for your answer.
57. What is disk formatting? Why is it needed?
58. Differentiate between a formatted and an unformatted disk. How is the formatting
of an unformatted disl done?
59. What is a File Allocation Table (FAT) in context of a disk storage? Why is it
needed? How is it created?
60. When are two computer systems said to have compatible disk drives? How is this
compatibility featun useful?
61. What is a magnetic disk drive? Differentiate between disk drives with
interchangeable magnetic disks am disk drives with fixed magnetic disks.
62. List out the relative advantages and limitations of disk drives with interchangeable
magnetic disks and dis drives with fixed magnetic disks.
63. What is a disk controller? List out the typical commands supported by a disk
controller along with th parameters to be specified with each command.
64. List out the various types of magnetic disks commonly used in today's computer
systems. Give some typical uses of each type of magnetic disk.
65. List out the key differences between floppy disks and hard disks. Which one is
more durable and why?
66. What is a floppy disk? Describe the basic principles of operation of a floppy disk
drive.
67. List out the main differences between a 5!4-inch diskette and a 3 '/2-inch diskette.
Which one is more durable and why?
68. How will you write protect a
(a) 5'/i-inch diskette
(b) 3'/2-inch diskette
69. List out some of the precautionary measures that one should take for the proper
usage and handling of floppy disks.
70. Although floppy disks are non-volatile storage media, data stored on them can still
be lost or damaged if they are not handled properly. Discuss.
71. What is "byte rot" problem? How can you take care of this problem?
72. What is a hard disk? Name three different types of hard disks. Give a typical usage
of each type.
73. What is a zip disk? List out the similarities and differences between a zip disk and a
floppy disk.
74. What is a zip drive? Differentiate between portable and fixed types of zip drive.
75. What is a disk pack? List out the similarities and differences between a disk pack
and a Winchester disk.
76. What is a Winchester disk? Why is it so called?
77. For the same number of disk platters of the same size, Winchester disks can manage
to have larger storage capacity than disk packs. Explain why.
78. A disk storage has four platters. How many recording surfaces are there in this disk
storage if it is
(a) a Winchester disk
(b) a disk pack?
79. Hard disks outperform floppy disks in both data storage capacity and data access
speed. Explain why.
80. Give two reasons why hard disks have more storage capacity than floppy disks.
81. Give two reasons why hard disks have better data access speed than floppy disks.
82. List out the advantages and limitations of magnetic disks as a secondary storage
device.
83. List out the main advantages of magnetic disks as compared to magnetic tapes as a
secondary storage device.
84. List out the typical uses of magnetic disks.
85. Write short notes on:
(a) Disk formatting
(b) Disk pack
(c) Floppy disk
(d) Hard disk
(e) Zip disk
(f) Winchester disk
(g) Magnetic disk drive (h) Uses of magnetic disks
(i) Advantages and limitations of magnetic disks (j) Proper usage and handling of floppy
disks
86. What is an optical disk? How are data recorded/read from an optical disk?
87. Differentiate between the ways data are organized on a magnetic disk and an
optical disk. Which data organization leads to faster random access time and why?
88. It is said that an optical disk drive requires a more complicated drive mechanism
than a magnetic disk drive. Explain why.
89. What are the main parameters on which the storage capacity of an optical disk
depends? Write the equation for calculating the storage capacity of an optical disk based
on these parameters.
90. A 5%-inch optical disk has 3,00,000 sectors, each of 2352 bytes. What is its total
storage capacity?
91. Why are mechanical read/write access arms not needed in case of optical disk
drives?
92. Why are optical disk drives slower (have larger access time) than magnetic disk
drives?
93. List out the main differences between a magnetic disk drive and an optical disk
drive.
94. What are the two commonly used types of optical disks? What is the basic
difference between the two?
95. Differentiate between a CD-ROM and a WORM disk. Give some typical uses of
each.
96. What is a CD-ROM? Why is it so called?
97. What is "mastering" of CD-ROM disks? How is it done?
98. What is an "infopedia"? Give some typical examples of it.
99. What is the ISO 9660 standard for? How is it useful?
100. What is a WORM disk? What limitation of a CD-ROM disk does it overcome?
What limitation it still has?
101. What is meant by "data archiving"? Why is it done? Name some secondary storage
media that are used for data archiving.
102. List out the main advantages and limitations of optical disks as a secondary storage
device.
103. List out the reasons why optical disks are a better storage medium for data
archiving as compared to magnetic tapes or magnetic disks.
104. List out the typical uses of optical disks.
105. Write short notes on:
(a) Optical disk drive
(b) CD-ROM
(c) WORM disk
(d) Uses of optical disks
(e) Advantages and limitations of optical disks
106. What is a magneto-optical disk? What limitation of an optical disk does it
overcome?
107. Explain how data are recorded and read from a magneto-optical disk.
108. List out some of the typical uses of magneto-optical disks.
109. What is the basic principle of having larger capacity in mass storage devices?
110. What are the three commonly used types of mass storage devices? What are the
basic storage media components used in each type?
111. What is a disk array? How does it provide enhanced storage capacity and enhanced
performance?
112. What is a RAID? Why is it so called? Explain how does it provide enhanced
reliability.
113. What is mirroring? Explain how mirroring leads to enhanced reliability and faster
read operations in case of a RAID.
114. What is striping? Explain how striping leads to enhanced reliability and faster read
operations in case of a RAID.
115. What is a RAID level? Name some of the commonly used RAID levels and the
techniques used byeach for enhanced reliability.
116. What is an automated tape library? What are its main components? How are
these components used together to provide a mass storage device? List out some typical
uses of an automated tape library.
117. What is a CD-ROM jukebox? What are its main components? How are these
components used together to provide a mass storage device? List out some typical uses of
a CD-ROM jukebox.
118. List out the two basic differences between an automated tape library and a CD-
ROM jukebox.
119. Write short notes on:
(a) Disk array
(b) RAID
(c) CD-ROM jukebox
(d) Automated tape library
120. What is a drive interface standard? How is it useful? Name two commonly used
drive interface standards.
121. Write short notes on:
(a) Integrated Drive Electronics (IDE) interface
(b) Enhanced Small Device Interface (ESDI)
(c) Intelligent Peripheral Interface-level 3 (IPI-3)
(d) Small Computer System Interface (SCSI)
122. Explain how SCSI device interface standard is different from other device interface
standards like IDE and ESDI.
123. What is (a) a SCSI controller, (b) a SCSI bus and (c) a SCSI device?
124. Draw a diagram to illustrate how SCSI devices are connected to and communicate
with a computer system.
125. What is data backup? Why is it needed?
126. Name some secondary storage devices that are commonly used for data backup.
127. Name four different ways in which data on an on-line storage device may get
damaged or lost.
128. Name the two basic types of backup. Which one will normally take more time and
storage and why?
129. Differentiate between full backup and incremental backup. List out their relative
advantages and disadvantages.
130. In case of incremental backup, only the newly created files or files that have been
changed since the last backup are copied on the backup device from the on-line
secondary storage device at the time of backup. Explain how a backup utility keeps track
of the newly created and modified files since the last backup.
131. What is a backup policy? Why is it needed? What types of issues does it deal with?
132. What is meant by periodicity of backup? How is it normally decided?
133. What is automatic backup? How is it different from a manual backup?
134. How can critical data be protected against natural calamities?
135. Write short notes on:
(a) Incremental backup
(b) Full backup
(c) Backup policy —
136. What is a RAM disk? How does it help in faster execution of an application?
137. What is a pseudo disk? How does it help in enhancing the speed of a computer
system?
138. List out the relative advantages and disadvantages of a RAM disk and a magnetic
disk.
139. What is DVD? Why is it so called?
140. Differentiate between a DVD-ROM and a CD-ROM.
141. Differentiate among DVD-ROM, DVD-RAM, DVD-R and DVD-RW. Give a
typical use of each.
142. What is DVD-video? List out its key features.
143. What is DVD-audio? List out its key features.
144. What is a storage hierarchy? Draw a typical storage hierarchy pyramid.
145. Explain how the use of a storage hierarchy helps in building very large storage
capacities for computer systems in a cost effective way.
146. Write short notes on:
(a) RAM disk
(b) Data backup
(c) Storage hierarchy
147. Write short notes on:
(a) DVD-video
(b) DVD-audio
148. Write short notes on:
(a) Magnetic tape
(b) Magnetic disk
(d) Mass storage devices
(e) Drive interface standards
(f) Digital Versatile Disk (DVD)
(c) Optical disk
(d) Magneto-optical disk
149. Write the full form of the following abbreviations:
(a) DAT
(b) IRG
(c) IBG
(d) BOT marker
(e) EOT marker
(f) DDS format
(g) QIC standard (h) FAT
(i) DSDD diskette (j) DSHD diskette (k) CD-ROM (1) WORM disk
(m) CD-R drive (n) IDE interface (o) ESDI
(P) IPI-3 (q) SCSI (r) DVD (s) DVD-ROM (t) DVD-RAM (u) DVD-R (v) DVD-RW (w)
RAID (x) VTOC

Chapter 9

Input-Output Devices

We have already seen in Chapter 2 that data and instructions must enter the computer
system before any computation can be performed and the results of computation must be
supplied to the outside world to allow the users to take decisions and necessary actions.
Thus, a computer system can be useful only when it is able to communicate with its
external environment (its users). As shown in Figure 9.1, the input-output devices
(abbreviated I/O devices) provide the means of communication between the computer
and the outer world. They are also known as peripheral devices because they surround the
CPU and the memory of a computer system. Input devices are used to enter data from the
outside world into primary storage and output devices supply the results of processing
from the primary storage to the users. A wide variety of I/O devices are now available.
For a particular application, one type may be more desirable than another. There are some
devices, which are used for both the input and the output functions. The goal of this
chapter is to familiarize the readers with the various types of I/O devices available for
computer systems.

It is important to note that even the fastest of the I/O devices is very slow when compared
to the speed of primary storage and CPU. The main reason for this is that the speed of I/O
devices in most cases depends upon mechanical movement and the potential for
improvement of such devices is limited. It has been difficult to produce I/O devices that
can match the processor and storage speeds, and there is a constant demand for faster and
faster I/O devices.

INPUT DEVICES

An input device is an electromechanical device that accepts data from the outside world
and translates them into a form the computer can interpret. A wide range of input devices
is available today that can be broadly classified into the following categories:
1. Keyboard devices
2. Point-and-draw devices
3. Data scanning devices
4. Digitizer
5. Electronic cards based devices
6. Voice recognition devices
7. Vision based devices
8. Offline data entry devices

The various types of input devices along with their typical applications are described
below.

Keyboard Devices

Keyboard devices are the most commonly used input devices today. They allow data
entry into a computer system by pressing a set of keys (labeled buttons), which are neatly
mounted on a keyboard connected to the computer system. Keyboard devices can be
broadly classified into two types - general-purpose keyboards and special-purpose
keyboards. They are described below.

General-purpose Keyboards

General-purpose keyboards are standard keyboards used with most computer systems.
They are called general-purpose because they have enough keys to make them useful for
any type of application. That is, they are designed to meet the data entry requirements of
a very wide range of computer users.

The most popular general-purpose keyboard used today is the 101-keys QWERTY
keyboard. It was introduced and promoted by IBM for use with IBM PCs and IBM-
compatible PCs (personal computers). It is so called because it has altogether 101 keys
out of which the keys for alphanumeric characters follow the commonly used QWERTY
layout. The QWERTY layout has been adopted from the standard typewriter keyboard
layout. The positioning of the character keys in this layout ensures faster typing speed. In
this layout, the alphabetic keys are arranged so that the upper-left row of letters begins
with the six letters Q, W, E, R, T, and Y (see Figure 9.2). Designers of other keyboards
claim that their boards are easier to learn and use than the QWERTY keyboard. One such
example is the Dvorak keyboard. It has not been widely accepted, however, because most
people have already learnt and got used to the QWERTY keyboard layout.

As shown in Figure 9.2, the keys of a QWERTY keyboard are grouped into the following
functional groups to make the keyboard easier and more comfortable to use:
1. Alphanumeric Keys. The alphanumeric keys contain the keys for the letters of
English alphabet, the numbers 0 to 9, and several special characters like ?, /, $, &, @, etc.
As already mentioned, the arrangement of these keys follows the QWERTY layout.
2. Numeric Keypad. The numeric keypad is a set of keys that looks like an adding
machine with its ten digits and mathematical operators (+, -, » and /). It is usually
located on the right side of the keyboard. Notice from Figure 9.2 that the ten digits and
the mathematical operators keys, which form the numeric keypad are also present in the
set of alphanumeric keys. This makes the numeric keypad redundant. However the
numeric keypad is still provided because it permits rapid entry of numeric data. As it is
redundant, numeric keypad is usually not provided on portable PCs (laptops) due to space
limitations.
3. Arrow Keys. Arrow keys are a set of four keys - up (T), down (I), left (<-) and right
(->). They are also called cursor-control or cursor-movement keys because they are
mainly used to move the cursor at a desired location on the terminal screen connected to
the keyboard. A cursor, which usually appears as an underscore (_), a vertical line (|), or
a rectangle (■) on the terminal screen, always indicates the location of the next keyed-in
character on the screen. The arrow keys allow you to move the cursor up and down,
usually a line at a time, and left and right, usually a character at a time.

For many software packages, the arrow keys are also used to view parts of a document or
worksheet that extend past the size of the terminal screen. This is known as scrolling. The
up and down keys are used for vertical scrolling and the left and right keys are used for
horizontal scrolling of the contents displayed on the terminal screen.

4. Special Function Keys. The keyboard also has a set of special function keys, each
one of which is labeled with the type of function it performs. Some of the most important
keys that belong to this set are:

- Enter. Is used to send keyed-in data or a selected command to the memory.


- Shift. Is used to enter a capital letter or one of the special characters above the
numbers. This is achieved by pressing the Shift and the corresponding character keys
simultaneously.
- Ctrl. Is used in conjunction with other keys to expand the functionality of the
keyboard. For example, just as the Shift key is used with an alphabet key to enter the
alphabet in capital letter, Ctrl key is also used with another key to give a key new
meaning. The exact functionality in this case depends on the software being used.
- Alt. Similar to Ctrl key, this key is also used in conjunction with other keys to
expand the functionality of the keyboard.
- Backspace. Is used to move the cursor one position to the left and delete the character
in that position.
- Tab. Is used to advance the cursor to the next user-defined tab position, which is the
location where the user wants to enter the next data.
- Caps Lock. Is used to toggle (alternate/switch) the capital letter lock feature on and
off. When this feature is "on", all letters entered from the keyboard are entered as capital
letters.
- Num Lock. Is used to toggle the number lock feature on and off. When this feature is
"on", numbers are entered when you press the numbered keys on the numeric keypad.
- Home. Is used to move the cursor to the beginning of the work area, which may be
the beginning of the line, screen or document depending on the software being used.
- End. Is used to move the cursor to the end of a work area.
- Delete. Is used to delete the character at the cursor position.
- Page up. Is used to display the previous page of the document being currently viewed
on the terminal screen. The page size in this case is equal to the size of the screen.
- Page down. Is used to display the next page of the document being currently viewed
on the terminal screen. Page up and Page down keys are also used to position the cursor
at the previous and next record when using database software.
- Insert. Is used to toggle between the insert and typeover modes of data entry. In insert
mode, any text entered gets inserted (added) at the cursor position. On the other hand, in
typeover mode, the entered characters get typed over the character at the cursor position.
- Escape. Is usually used to negate the current command or menu and return to the
work screen. This key may have other functions depending on the software being used.
- Spacebar. Is used to enter a space at the cursor position.
- Print screen. Is used to print what is currently being displayed on the screen.

5. Other Function Keys. Besides the keys mentioned above, the keyboard also has a set of
user-programmable function keys that are merely labeled as Fl, F2, F3, and so on. The
actual function assigned to each of these keys is different for different software packages.
Hence these function keys are used in many different ways by the programs being
executed. For example, a word processing program can use the Fl, F2 and F3 keys to
make the selected text underlined, italic and bold respectively. These function keys are
also known as soft keys because their functionality can be defined in software.

Special-purpose Keyboards

The data entry requirements of computer systems deployed for special-purpose


applications may not be as versatile as general-purpose computer systems. Hence
computer systems used for special-purpose applications can have special-purpose
keyboards to enable faster data entry and rapid interaction with computer systems. For
example, the point-of-sale (POS) terminals used in supermarkets and fast-food
restaurants for registering sold goods and issuing a receipt to every customer can have a
simpler keyboard equipped with special-function keys that enable rapid processing of
sales transactions as well as alphanumeric input. For instance, instead of typing the name
and price of a purchased item, say Veg. Pizza, the operator need only press the key
labeled "Veg. Pizza" and the system automatically prints the name and price of the item
from an internally stored database. This application requires a special-purpose keyboard
for rapid data entry and faster operation. Similarly, an ATM (Automatic Teller Machine)
used in banks for financial transactions by customers needs a simple keyboard with only
a few keys for the purpose. There are many such applications that may have the benefit of
rapid data entry and faster operation by the use of special-purpose keyboards that are
custom-designed for a special type oi application. Keyboards specially designed and used
for a specific type of application are called special-purpose keyboards.

Other Related Concepts

Some other concepts related to keyboards are discussed below.

Foreign Language Keyboards

Several countries, which do not use English alphabets in their local languages, have
designed special keyboards for data entry in their local languages. Some of these
keyboards have a large number of keys and use a coding scheme with more bits to
accommodate the large number of characters used in the language. For example, the
coding scheme used for the QWERTY keyboards works with an 8-bit code, which can
accommodate 2 = 25€ different characters. However, Japanese language keyboards work
with a 16-bit coding scheme to accommodate all the characters used in Japanese
language.

Keyboard Templates

We saw in the discussion above that the exact function assigned to the function keys Fl to
F12 and to some of the special function keys depends on the software being used. That is,
different software packages program the same keys to perform different functions. If a
user uses different types of software, it becomes difficult for him/her tc remember the
functions assigned to different keys for different software. Hence several software
vendors distribute their software packages with keyboard templates that designate which
commands are assigned to which function keys. These templates are usually made of
plastic that nicely fit over the keyboard. The functionality 01 the various function keys is
written on tpp of the plastic at the positions of those function keys. With this, a used need
not remember the functions assigned to different keys by different software packages.

Software Simulated Keys

We often come across the situation of entering a non-standard character such as "a" or
"±", or a phrase or name such as "Prentice-Hall of India" again and again while preparing
a particular document. To allow faster entry of data, a user may reassign a keyboard key
to produce them. For example, a user may write a software to reassign the character "#"
to the name "Prentice-Hall of India" so that whenever he/she enters the character "#"
from the keyboard, the system automatically enters "Prentice-Hall of India" in place of
the character #. Such arrangements of making the key produce something different from
what it is normally supposed to produce is known as software simulation of the key.

Autorepeat Feature

Almost all keyboards are designed with the auto repeat feature. According to this feature,
if a key remains pressed for the auto repeat initial delay period (usually of the order of
300 milliseconds),, then the character or the functionality of the key starts auto-repeating.
For example, if the key with the character "a" is kept pressed, then the characters
"aaaaa....." will start appearing on the terminal screen till it is kept pressed. This feature
facilitates faster data entry when the same character is to be entered multiple times or
when multiple lines or pages have to be skipped.

Keyboard Buffer

A keyboard buffer is a small memory inside either the terminal or the keyboard in which
each keystroke is first saved before being transferred to the computer's main memory for
processing. The keyboard buffer usually has capacity to save from a few tens to a few
hundreds of keystrokes. Storing of keystrokes in keyboard buffer instead of sending them
directly to the main memory makes the user interaction with the system much more
efficient and smooth. This is because when the keystroke is made, the processor may be
busy doing something else and may not be in a position to immediately transfer the
keyboard input to the main memory. In this case, if there was no keyboard buffer, the
keyboard would have got locked after every keystroke, not allowing the user to enter
anything till the keyboard input was transferred to the main memory and the lock was
released. This would have caused severe problem and delay in data entry especially for
data entry operators with fast typing speeds. The keyboard buffer helps in overcoming
this problem by allowing the user to enter keyboard inputs at their own convenient speed.
The keyboard inputs are stored in the keyboard buffer and the processor keeps
transferring them to the main memory whenever it gets time to attend to the keyboard
device.

Point-and-Draw Devices

Interaction with computers was initially restricted mainly to text mode. However, it was
soon realized that interacting with computers in text-mode is cumbersome and time-
consuming. Hence a new type of interface, called graphical user interface (GUI) was
devised for interacting with computers. As shown in Figure 9.3, a GUI provides to the
user a screen full of graphic icons (small images on the screen) or menus and allows the
user to make a rapid selection from the displayed icons or menus to give instructions to
the computer. With such an user interface, the basic requirement is to have an input
device that can be used to rapidly point to and select a particular graphic icon or menu
item from the multiple options displayed on the screen. The keyboard was found to be
very inconvenient and unsuitable for this requirement. Hence research efforts to find a
suitable input device to meet this requirement gave birth to several input devices like
mouse, track ball, joystick, light pen and touch screen. Later it was realized that many of
these devices like mouse and light pen could also be very effectively used to create
graphic elements on the screen, such as lines, curves, and freehand shapes. With this new
ability, these devices came to be known as point-and-draw devices. These input devices
have made computers a much easily usable tool and have also established the computer
as a versatile tool for graphic designers. Some of the most commonly used point-and-
draw devices are described below.

Mouse

As of today, the mouse is the most popular point-and-draw device. It has become a must-
have input device on personal computers and workstations that have a GUI-based video
display terminal. As shown in Figure 9.4, the mouse is a small hand-held device, which
can comfortably fit in a user's palm. It rolls on a small bearing and has one or more
buttons on the top. When a user rolls the mouse across a flat surface, such as on top of the
table on which the computer is placed, the graphics cursor moves on the screen of the
video display terminal in the direction of the mouse's movement. The graphics cursor,
which is used to point and draw, is displayed on the screen as a variety of symbols such
as an arrow ( fl ), a wrist with a pointing finger (m~), etc. Depending on the application,
the text and graphics cursor may be displayed on the screen at the same time.
Since all movements of the mouse are reproduced by the graphics cursor on the screen,
you can move the graphics cursor at a menu item or an icon by moving the mouse. For
example, move the mouse away from you to move the cursor up on the screen, move the
mouse towards you to move the cursor down on the screen, move the mouse right to
move the cursor right on the screen, and move the mouse left to move the cursor left on
the screen. In this way, the mouse can be used for quick positioning of the graphics
cursor on the desired menu item or an icon. When positioned at a menu item or an icon,
the graphics cursor is said to point to that menu item or icon. With a click of the mouse's
button, the system can then be notified of this choice. Note that notifying the system of a
particular choice out of the various options provided by the software is much easier with
a mouse than pressing various key combinations. With the proper software, a mouse can
also be used to draw pictures on the screen and edit text.

The following five simple techniques are used to carry out the various types of operations
possible with a mouse:
1. Point. To point means to move the mouse suitably to move the graphics cursor on top
of an icon or a menu item.
2. Click. To click means to press and release the left mouse button once. It allows
selection of the menu item represented by the icon, which is currently being pointed to by
the graphics cursor. The function of the right button varies between software packages,
but often it is used to call up a menu of options.
3. Double-click. To double-click means to press and release the left mouse button
twice in rapid succession. It allows execution of the program represented by the icon,
which is currently being pointed to by the graphics cursor. The function of double-
clicking the right mouse button varies between software packages.
4. Simultaneous-click. To simultaneous-click means to press and release both the left
and right mouse buttons simultaneously. It is used by some software packages to give
added functionality to the mouse. The actual functionality for simultaneous-click varies
from one software package to another.
5. Drag. To drag an item means to position the graphics cursor over the item, then
depress the button and hold it down as the graphics cursor is moved on the screen by
moving the mouse. You may drag an icon to change its location on the screen. When
using a graphics software program, you drag the graphics cursor to draw graphics objects
(such as lines, circles, curves, freehand drawings, etc.) on the screen. When using a
word processing program, you select a block of text for deleting it or for changing its
style by dragging the graphics cursor from the beginning to the end of the block.
The mouse reports the movement and button click events in a sequential stream as they
happen. These are coded as multibyte records. The first byte is the event type, and the
following bytes are the particulars of the event (the change in the vertical and horizontal
position of the mouse for mouse movement events, which button and the type of click for
mouse click events). However, like a keyboard, a mouse also uses an interrupt
mechanism to report the mouse operations to the computer system. That is, it does not
directly send a message to the program that is currently executing.. Rather, it stores the
sequential stream of events in a special memory buffer and sends an interrupt request to
the CPU. The currently executing program regularly checks to see whether a mouse event
has occurred. On sensing an interrupt signal, »the program reads the sequential stream of
events from the special memory buffer and then reacts appropriately.

Mouse devices are of many types and there are many ways to categorize them. Some of
the commonly used ways to categorize mouse devices are discussed below.
1. Mechanical and Optical Mouse. A mechanical mouse has a ball inside it that partially
projects out through an opening in its base. The ball rolls due to surface friction when the
mouse is moved on a flat surface. On two sides of the ball at a 90-degree angle from each
other are two small wheels that spin to match the speed of the ball. Each wheel of the
mouse is connected to a sensor. As the mouse ball rolls when the mouse is moved, the
sensors detect how much each wheel spins and send this informationjo the computer in
the form of changes to the current position of the graphics cursor on the screen.
An optical mouse has no mechanical parts like the ball and wheels. Instead it has a built-
in photo-detector. Such a mouse comes with a special pad with gridlines printed on it. For
moving the graphics cursor on the screen, the mouse has to be moved on the special pad.
The photo-detector senses each horizontal and vertical line on the pad as the mouse
moves on it, then it sends this information to the computer in the form of changes to the
current position of the graphics cursor on the screen.
2. One, Two and Three Buttons Mouse. A mouse can have one, two or three buttons.
As many programs are designed to use only a single button, so a one-button mouse is
good enough for them. Some programs are designed to operate with a two-button or
three-button mouse. If the system has lesser number of buttons, then such programs can
still be made to run on the system by providing an alternative way to indicate a click of
these buttons - such as by pressing the shift key on the keyboard while the mouse button
is clicked. With a mouse having multiple buttons, the leftmost button is the main button
that allows for most mouse operations because most people are right-handed and use their
right index finger to click the main button. However, another button can always be
configured as the main button. For example, the right-most button can be configured as
the main button for left-handed users.
3. Serial and Bus Mouse. A serial mouse is one, which is designed to plug into a serial
port (a built-in socket in the computer's back panel to which external devices can be
connected). Such a mouse does not require a special electronic card for connecting the
mouse to the computer system. On the other hand, a bus mouse is one that requires a
special electronic card that provides a special port just for the mouse for connecting the
mouse to the computer system. The special electronic card is fitted into one of the
expansion slots inside the computer. Thus a bus mouse occupies one of the expansion
slots whereas a serial mouse does not need any expansion slot.
4. Wired and Cordless Mouse. A wired mouse is connected to the computer system
with a small cord (wire). On the other hand, a cordless mouse is not connected to the
computer system. It communicates with the computer system with the help of a special
controller that operates by transmitting a low-intensity radio or infrared signal. Although
a cordless mouse is more expensive than a wired mouse, it allows easier movements of
the mouse.
Trackball

A trackball is a pointing device that is similar to a mechanical mouse. As shown in Figure


9.5, the ball that is placed in the base of a mechanical mouse is placed on the top along
with the buttons in case of a trackball. To move the graphics cursor around the screen, the
ball is rolled with the fingers. Because the whole device is not moved for moving the
graphics cursor, a trackball requires less space than a mouse for operation. Since it need
not be moved for moving the graphics cursor, it is often attached to or built into the
keyboard. Trackballs built into the keyboard are commonly used in laptop (notebook)
computers because a mouse is not practical for laptop users in a small space. Because the
ball is fixed on the top, some people find it helpful to think of a trackball as an upside-
down mouse.

A trackball comes in various shapes and forms with the same functionality. The three
commonly used shapes are a ball, a button, and a square. In case of a ball, the ball is
rolled with the help of fingers to move the graphics cursor. In case of a button, the button
is pushed with a finger in the desired direction of the graphics cursor movement. In case
of a square plastic, the finger is placed on top of it and moved in the desired direction of
the graphics cursor movement.

Joystick

A joystick is a pointing device that works on the same principle as a trackball. To make
the movement of the spherical ball easier, the spherical ball, which moves in a socket, has
a stick mounted on it (see Figure 9.6). Instead of using the fingers in case of a trackball,
the user of a joystick moves the spherical ball with the help of the stick with his/her hand.
The stick can be moved forward or backward, left or right, to move and position the
graphics cursor at the desired position. Potentiometers are used to sense the movements.
On most joysticks, a button on the top is provided to select the option, which is currently
pointed to by the cursor. The button is clicked to make this selection.

Typical uses of a joystick include video games, flight simulators, training simulators, and
for controlling industrial robots.

Electronic Pen

Another point-and-draw device is an electronic pen. In a pen-based system, you hold the
pen in your hand and directly point with it on the screen to select menu items or icons; or
directly draw graphics on the screen with it; or write with it on a special pad for direct
input of the written information to the system. Electronic pens are of the following types:
1. Light Pen. It uses a photoelectric (light sensitive) cell and an optical lens mounted in
a pen-shaped case. The photoelectric cell and lens assembly is designed in such a way
that it focuses onto it any light in its field of view. Hence with this mechanism the pen
can be used to indicate screen position to the computer. You operate the pen by moving
its tip over the screen surface. As the light pen is moved over the screen surface, it detects
the light being emitted from a limited field of view of the monitor's display. This electric
response is transmitted to a processor, which can identify the menu item or icon that is
triggering the photocell. In this manner, the graphics cursor automatically locks on to the
position of the pen and tracks its movement over the screen. The case of the pen has a
finger-operated button, which is used to select an option from the screen by clicking it.
In addition to being used for pointing and selecting options from a set of options
displayed on the screen, light pens are frequently used for computer-aided design (CAD)
applications. For example, the user can directly draw on the screen with a light pen. By
using the pen along with a keyboard, the CAD application can allow users to select
different colors and line thicknesses, reduce or enlarge drawings, and add or erase
graphics objects such as lines, circles, rectangles, etc.
2. Writing Pen with Pad. This type of electronic pen comes with a special type of
writing pad. The pen is used to write on the pad whatever information the user wants to
input to the computer system. Although this input device may appear to be an easy way
to input text into the computer for word processing, as of today it is not used for inputting
large amounts of text. The main reason for this is that the technology to correctly
decipher the handwriting of the users is not yet matured and successful. However, this
does not mean that the writing pen and pad is not so useful input device. It is a very
useful input device for signatures and messages that are stored and transferred as a
graphic image without the need for the system to decipher it as is done in case of a FAX
message. The image of the signature or message can be stored by the computer for
retrieval by the same user at a later date, or for transfer to another user's system who can
easily make sense out of the message when it is displayed on his/her screen.

This input device is commonly used in Personal Digital Assistants {PDAs), which are
pocket-sized computers having calendar, calculator, and notepad facility. The notepad
facility is in the form of a writing pen with a pad and allows the user to make notes of
information to be stored and retrieved at a later point of time. Note that the notepad
allows the user to input not only textual information but also freehand drawings. Pocket
computers with writing pen and pad input device are also used by goods delivery
organizations in which the person making deliveries can have recipients sign their name
on the computer with a pen. The image of the signature is captured and stored like a
photograph without any need for the computer to decipher it.

Touch Screen

Touch screen is the most simple, intuitive, and easiest to learn of all input devices. A
touch screen enables the users to choose from available options by simply touching with
their finger the desired icon or menu item displayed on the computer's screen.

Computers with touch screen facility use optical sensors in, or near, the computer's screen
that can detect the touch of a finger on the screen. The sensors communicate the position
of touch to the computer, which interprets the input made by the user. Another
technology used by touch screen monitors is the pressure sensitive monitors. In this case,
a flat pad is located beneatn the base of the computer's screen, which has sensors to
measure the monitor's weight at many points. When a user touches the screen, the
changing weights and forces transferred down to the sensors allow the device to detect
the location of the touch. Note that this type of touch screen monitors may sometimes
require the user to apply a little pressure with his/her finger at the point of touch to
successfully transmit the desired input to the system.

Touch screens are very useful for computer systems that need to have a simple, intuitive
interface with the intended users so that the users can use the system without any formal
training. Hence they are the most preferred human-computer interface devices used in
information kiosks. An information kiosk is an unattended system that is used to store
information of public interest and allows common people to access the stored information
as per their requirement. For example, information kiosks may be located

1. At an airport or a railway station to provide information to arriving passengers about


hotels, restaurants, tourists spots, etc. in the city.
2. In large department stores and supermarkets to provide information to the customers
about the locations of the various types of goods being sold, locations of the rest rooms,
locations of other attractions in the shopping complex, the items on sale on a particular
day and their locations, etc.
3. In large museums or zoos to guide the visitors to the locations of various attractions
and facilities as well as cautioning them against things that they are not supposed to do
while inside.
At all these public places, a system with a touch screen interface is most intuitive and
desirable for use by common public. Touch screen interface is also used in automatic
teller machines by banks and credit card companies. They are also appropriate for use in
environments where dirt or weather conditions would prohibit the use of keyboards and
pointing devices.

Data Scanning Devices

In order to reduce the possibility of human error in data entry, the trend in data entry has
been towards decreasing the number of transcription (copying data by typing, keying or
writing) steps. This is accomplished by entering the data directly from the source
document. Data scanning devices are input devices used for direct data entry into the
computer system from source documents. Some of the data scanning devices are also
capable of recognizing marks or characters. Data scanning devices typically have the
following characteristics:
1. They eliminate some of the duplication of human effort required to get data into the
computer. Human beings do not have to key the data.
2. The reduction in human intervention improves data accuracy and can increase the
timeliness of the information processed.
3. Since scanners are direct data entry devices, they demand high quality of input
documents. Documents that are poorly typed or have strikeovers or erasures are normally
rejected.
4. With these devices, form design and ink specification may become more critical than
is the case when people key the data from the forms.
Data scanning devices are of many types. Some of the commonly used ones are described
below.
Image Scanner

An image scanner is an input device that translates paper documents into an electronic
format that can be stored in a computer. The input documents may be typed text, pictures,
graphics, or even handwritten material. This input device has been found to be very
useful in preserving paper documents in electronic form. The copy of a document stored
in a computer in this manner will never deteriorate in quality or become yellow with age
and can be displayed or printed whenever desired. If the computer in which the scanned
document is stored has the right kind of software (called image-processing software), the
stored images can be altered and manipulated in interesting ways.

Image scanners are also called optical scanners because they use optical technology for
converting an image into electronic form. That is, they convert an image into electronic
form by shining light onto the image and sensing the intensity of the reflection at every
point of the image. This conversion process can be best understood with the help of an
example. Suppose there is a document with the word "BIT" written on it. This document
has to be scanned and stored in the computer. The scanner treats the document as if it is
drawn on a graph sheet as shown in Figure 9.7(a). An intersection of a horizontal and a
vertical line of the graph is called a grid point. If there is a dark spot at a grid point, it is
represented by a 1, otherwise it is represented by a 0. Figure 9.7(b) shows the
representation of the image of Figure 9.7(a). This representation is called the bit map
representation of an image. Each bit in the representation of the image is called & pixel (a
picture element).

The finer is the granularity of grid points, the better the scanner is because it can convert
a given image with greater accuracy. Scanners having 300 to 600 grid points per inch are
common. Moreover, we saw in Figure 9.7 that each grid point is encoded as just 1 bit.
More bits are used to represent each grid point in high quality black-and-white scanners
and color scanners. For example, a good quality black-and-white scanner may use 4 bits
per grid point to encode different shades from black to gray to white. Similarly, a color
scanner may use 24 bits per grid point to represent a maximum of 256 different shades of
color.

Image scanners come in various shapes and sizes. The two commonly used types based
on this classification are flat-bed and hand-held scanners. They are briefly described
below.

1. Flat-bed scanner. As shown in Figure 9.8, a flat-bed scanner is like a copy machine
consisting of a box having a glass plate off its top and a lid that covers the glass plate.
The document to be scanned is placed upside down on the glass plate. The light source is
situated below the glass plate and moves horizontally from left to right when activated.
After scanning one line, the light beam moves up a little and scans the next line. The
process is repeated for all the lines. It takes about 20 seconds to scan a document of size
21 cm x 28 cm.
2. Hand-held scanner. As shown in Figure 9.9, a hand-held scanner has a set of light
emitting diodes encased in a small case that can be conveniently held in hand during
operation. To scan a document, the scanner is slowly dragged from one end of the
document to its other end with its light on. The scanner has to be dragged very steadily
and carefully over the document, otherwise the conversion of the document into its
equivalent bit map will not be correct. Due to this reason, hand-held scanners are used
only in cases where high accuracy is not needed. They are also used when the volume of
documents to be scanned is low. They are also much cheaper as compared to flat-bed
scanners.

Optical Character Recognition (OCR) Device

We saw in the description above that image scanners may be used to input a wide variety
of documents including pictures, graphics, typed text, or handwritten text. When they are
used for inputting text documents (typed c handwritten), they have the following two
limitations:
1. Since the input document is stored as an image instead of text, it is not possible to do
any word processing of the document (the computer cannot interpret the stored document
as letters, number and special characters).
2. The storage required for storing the document as an image is several times more than
that required fc storing the same document as a text. For example, a page of printed text
having 2000 characters can be stored as 2000 bytes using the ASCII representation. A bit
map image representation of the same document will require 10 to 15 times more storage
depending on the resolution (granularity) of gri points.
The OCR technology is used to overcome these limitations. In this case, the scanner is
equipped with a character recognition software (called OCR software) that converts the
bit map images of characters to equivalent ASC codes. That is, the scanner first creates
the bit map image of the document and then the OCR software translate the array of grid
points into ASCII text that the computer can interpret as letters, numbers and special
characters.

To translate bitmaps into text, the OCR software examines the bitmap of each character
and compares with the set of characters the machine has been programmed to recognize.
Whichever character pattern it matches, or near matches, is considered to be the character
read. If a scanned character does not match satisfactorily with any c the already stored
character patterns, it is rejected.

OCR software is extremely complex, because it is difficult to make a computer recognize


an unlimited number (typefaces and fonts. Hence these software are designed to
recognize texts that are written using standard type. fonts (called OCR fonts). Two such
standard fonts are OCR-A (American standard) and OCR-B (Europea standard). OCR-A
and OCR-B fonts are shown in Figure 9.10. and Figure 9.11. respectively. Note that if tl
document contains italics or bold face letters, or fonts other than that for which the OCR
software has bee designed, the OCR software will not work effectively.
So far, OCR devices work reliably only for printed text. However, attempts are also being
made these days to use OCR devices for recognizing handwritten characters. In this case,
special care has to be taken to ensure that in the handwritten document, characters are of
standard size, lines making up the characters are connected, and no stylish loops etc. are
used. There is yet no successful OCR software to fully convert handwritten text into
ASCII. The main reason behind this is that everyone's handwriting is different and the
parameters for how individual characters are formed are very broad. In fact,
programming a computer to recognize handwriting is so tough that it may be several
years before computers can read most handwriting accurately. The difficulty in teaching
computers to recognize handwritten documents can be understood by the fact that the
handwriting of many individuals is almost illegible to other individuals, especially if it is
examined letter by letter. In such cases we take advantage of the fact that when we read a
handwritten document, we have a good idea of its context (what the topic is). Hence we
can often read a handwritten document even if we can decipher only a few letters in each
word. But teaching a computer to perform the same task is really difficult.

Optical Mark Reader (OMR)

These scanners are capable of recognizing a pre-specified type of mark made by pencil or
pen. For example, many students might have appeared in objective type tests where they
had to mark their answers to questions on a special pre-printed test scoring sheet by
darkening a small square, circular or oval shaped box by a pencil to indicate their correct
choice out of the various given options (see Figure 9.12). These answer sheets are
directly fed to a computer for grading with the use of an optical mark reader.

The actual technique used by an OMR device for recognition of marks involves focusing
a light on the page being scanned and detecting the reflected light pattern from the marks.
Pencil marks made with a soft lead pencil (high graphite content) reflect the light
enabling the reader to determine which responses are marked.

Note that OMR devices require that the pre-printed forms use good quality paper and the
boxes to be marked on them are accurately aligned for correct interpretation of input data.
Furthermore, the pre-printed forms should not be folded so that the marks can be read
correctly.

The use of OMR is not limited only to the grading of objective type tests. In fact, any
input data that is of a choice or selection nature can be recorded for OMR input. Thus
OMR is very useful for grading tests with objective type questions in which a large
number of students appear and for researchers who need to tabulate responses to large
surveys where responses can be restricted to one or more out of a few possibilities.

Bar-Code Reader

Data coded in the form of small lines (known as bars) are known as bar codes. Bar codes
represent alphanumeric data by a combination of adjacent vertical lines (bars) by varying
their width and the spacing between them. They are particularly used for unique
identification of all types of goods, books, postal packages, badges, tags, etc.

A bar-code reader is a device used for reading (decoding) bar-coded data. It may be a
hand-held scanner, or may be embedded in a stationary scanner. It scans a bar-code
image and converts it into an alphanumeric value, which is then fed to the computer to
which the bar-code reader is connected, just as though the alphanumeric value had been
typed on a keyboard.

A bar-code reader uses a laser-beam scanning technology. The laser beam is stroked
across the pattern of bars of a bar code. Different bar codes having different patterns of
bars reflect the beam in different ways, which is sensed by a light-sensitive detector.
Reflected light patterns are converted into electrical pulses and then transmitted to
recognition logic circuits which convert it into an alphanumeric value.

Just as there are a variety of internal bit encoding systems, there are a variety of bar-
coding systems. The most widely known bar-coding system is the Universal Product
Code (UPC), which now appears on almost all retail packages in USA. The UPC,
originally used for supermarket items, is now being printed on other consumer goods
also. The UPC bar-code patterns are decoded as 10 digits. The first 5 of these digits
identify the manufacturer or supplier of the product and the next 5 digits identify a
specific product of the manufacturer (see Figure 9.13).

Bar code readers are commonly found in supermarkets and department stores. When a
customer picks up a product for purchasing and/brings it to the cash counter for payment,
the sales person at the counter uses a barcode reader to scan the bar code printed on the
product. The bar-code reader converts the bar code into an alphanumeric value and feeds
it to the computer that looks up the price of the product, possibly updates inventory and
sales records, and uses the price and description information to prepare a purchase bill for
the customer. Postal delivery services also use bar codes to identify and track each
packet. For example, Federal Express of USA uses a unique bar-coding system and their
employees can usually tell a customer within a matter of minutes the current location of
any packet.

Magnetic-Ink Character Recognition (MICR)

MICR is similar to OCR and is used by the banking industry for faster processing of the
large volume of cheques being handled every day by this industry. Banks that employ
MICR technology use a special type of cheque. The bank's identification code (name,
branch, etc.), account number, and the cheque number are pre-printed (encoded) using
characters from a special character set on all these cheques with a special ink that
contains magnetizable particles of iron oxide before the cheques are given to the
customers for use. A sample cheque that employs MICR technology is shown in Figure
9.14.
When a customer presents a filled-in cheque at a bank, a bank employee manually enters
(keys in) the amount written on the cheque in the lower right corner of the cheque using
an MICR inscriber, which prints the amount with the magnetic ink. The date of the
transaction is automatically recorded for all cheques processed that day. This cheque is
then processed using an MICR reader-sorter, which can recognize magnetic ink
characters. The MICR reader-sorter reads the data on the cheques and sorts the cheques
for distribution to other banks or for further processing.

The most commonly used character set by MICR devices is known as E13B font that
consists of the numerals 0 to 9 and four special characters as shown in Figure 9.15.
Coded data in the form of these fonts are transferred from cheques to the computer by an
MICR reader-sorter. As the cheques enter the reading unit, they pass through a magnetic
field, which causes the particles in the ink to become magnetized. Read heads then
interpret these characters by examining their shapes. The sorter is basically used to sort
the cheques into different pockets according to their identification code numbers.

MICR technology speeds up data input for the banking industry because cheques can be
directly fed into the input device and automatically processed thereafter. Besides enabling
faster processing of cheques, this technology also ensures accuracy of data entry because
most of the information is pre-printed on the cheque and is directly fed to the computer.
However, MICR has not been adopted by other industries because the currently
supported character set has only 14 symbols (10 digits and 4 special characters). No
alphabetic characters are available.

Digitizer

A digitizer is an input device used for converting (digitizing) pictures, maps and drawings
into digital form foi storage in computers. For example, the JC and y coordinates of points
in a drawing may be stored in digital form. This enables re-creation of the drawing from
the stored information whenever required as well as easy incorporation of changes in the
drawing as and when required.

As shown in Figure 9.16, a digitizer consists of a digitizing tablet (also known as


graphics tablet) associated wit! a stylus. The digitizing tablet is a flat surface that contains
hundreds cf fine copper wires forming a grid. Each copper wire receives electric pulses.
The digitizing tablet can be spread over a working table and is connected to a computer.
The stylus is like a pen or a lens-like cursor with a cross-hair and button. The stylus is
connected to the tablet and can be pressed down at a point on the tablet to input the (x, y)
coordinates of the point. When the stylus is moved on the tablet, the cursor on the
computer's screen moves simultaneously to a corresponding position on the screen to
provide visual feedback to the operator. This enables the operator to draw sketches
directly or to input sketched drawings very easily. Inputting drawings or developing
sketches using a digitizer is further simplified by the fact that poorly sketched lines, arcs
and other graphical objects are automatically input as mathematically precise objects, like
straight lines and smooth curves.
Digitizers are commonly used in the area of Computer Aided Design (CAD) by architects
and engineers to design cars, buildings, medical devices, robots, mechanical parts, etc.
They are also used in the area of Geographical Information System (GIS) for digitizing of
maps available in paper form.

Electronic-card Reader

Electronic cards and their associated readers offer another means of direct data entry into
a computer system. Electronic cards are small plastic cards having encoded data
appropriate for the application for which they are used. An electronic-card reader, which
is normally connected to a computer, is used to read the data encoded on an electronic
card and transfer it to the computer for further processing.

Electronic cards are often used by banks and issued to the customers for use in automatic
teller machines (ATMs). An ATM allows a customer to deposit or withdraw cash 24
hours a day without the need to interact with a bank employee. It is an unattended
machine, which may be located at any place (either inside the bank or away from the
bank). It is normally connected to the bank's computer. The electronic card for use in
an ATM has the customer's account number and credit limit (maximum amount that
he/she can withdraw in a day) encoded on t card. An ATM has an electronic-card reader
associated with it. When a customer inserts his/her card into the ATM (actually the
electronic-card reader of the ATM), the reader reads the data encoded on the card and
transmits it to the bank's computer, which activates the customer's account. The customer
can then carry out t desired transaction by following the instructions displayed on the
screen of the ATM and pressing a few keys on the customized keyboard of the ATM.

Electronic cards are also used by many organizations for controlling access of various
types of employees to physically secured areas. In this case, each employee is given an
electronic card with his/her authorization data encoded on it. The authorization data
contains information that specifies which employee is allowed access which areas. All
physically secured areas of the organization have an electronic-card reader installed at
entrance. When an employee wants to enter into a physically secured area, he/she inserts
his/her electronic ca into the reader installed at the entrance of that area. The reader reads
and checks the authorization data encoded on the card before permitting the individual to
enter the area (the door is electronically linked to the reader and opens only if the reader
finds that the individual is authorized to have access to the area). In such applications, the
electronic-card reader is normally linked to a central computer, which maintains a record
of who all entered or left secured area and at what time. In case of security breaches, this
record is used to trace the problem.

Depending on the manner in which data is encoded, electronic cards are of the following
two types:
1. Magnetic strip cards. These cards have a magnetic strip on their back. The data to be
encoded the card is stored on the magnetic strip. The magnetic strip of a card can contain
much more data f unit of space than do printed characters or bar codes. Moreover, the
data stored on the magnetic strip cannot be read visually. This makes them a perfect
candidate for storing confidential data.
2. Smart cards. Smart cards have a built-in microprocessor chip instead of the magnetic
strip. The data to be encoded on the card is permanently stored in the memory of the
microprocessor chip. The memory of a smart card microprocessor can contain much
more data than the magnetic strip of a magnetic strip card. Moreover unlike a magnetic
strip card, a smart card also has some processing capability because its microprocessor
has its own processor and memory. This feature attributes intelligence to smart cards
and makes them more suitable for a wider variety of applications than magnetic strip
cards. For example, a smart card can be used as a cash card by storing a specific amount
of cash in the microprocessor chip before the card is issued to a customer. As and when
the customer uses the card to make purchases, the amount of purchase made at every
instance is deduct from the balance amount stored in the card by inserting the card in a
card read/write machine (al called electronic registers) that is available with shops who
allow use of smart cards for making purchases. At any time, the customer can pay more
money to the card company and get the balance amount stored in the card increased. In
effect, this application allows smart cards to be used electronic money. Because smart
cards can hold more information, have some processing capability, and is almost
impossible to duplicate, they may soon replace magnetic strip cards.

Voice Recognition Devices

Voice recognition devices are input devices that allow a person to input data to a
computer system by speaking it. Thus they make computers much easier to use. However
as a data input device, currently voice recognition systems have limited success because
correct interpretation by a machine of the large number of words in the vocabulary of a
language is difficult. The major difficulty has been that people speak with different
accent (pronounce differently) and intonations (with different tone or pitch of the voice),
and the fact that the meaning of words can vary depending on the context in which they
are used. Hence today's voice recognition systems are limited to accepting few words
within a relatively small domain and can be used to enter only limited kinds and
quantities of data.

A computer with a voice recognition device consists of a microphone or telephone and


follows the following steps to recognize and act upon a spoken input data (see Figure
9.17):
1. Speak. The person willing to input data to the computer system speaks
into the microphone/telephone attached to it.
2. Convert into electrical signals. The spoken word(s) is then converted into electrical
signals by breaking down each sound into its various frequencies. This step converts the
spoken word(s) into its analog form.
3. Digitize. A digital-to-analog converter is then used to convert the analog form of the
spoken word(s) into its digital form (in 1s and 0s) so that they can be stored and
interpreted by the computer.
4. Match with pre-stored words. The digitized version of each spoken word is matched
against similarly formed pre-stored words in the computer's electronic dictionary. The
creation of the electronic dictionary (a database of pre-stored words) is done during a
training session. That is, the system is initially operated in a training mode when the
words and phrases to be stored in the electronic dictionary are spoken several times to
train the system to recognize them. In this mode, the patterns for all the spoken words and
phrases spoken during the training session are created and stored for future matching.

5. Perform corresponding action. When a match for the spoken word(s) is found, it is
displayed on the computer's terminal and/or the appropriate action corresponding to the
input is performed (for example, stop doing whatever it was performing). In some case,
the system may display the word(s) and wait for operator's confirmation to prevent doing
something different from what the operator intended (in case of wrong interpretation of
the spoken word(s) by the computer). If no match is found for the spoken word, the
speaker is asked to repeat the word.

Voice recognition systems are normally classified into the following two categories:
1. Speaker-dependent. Due to the vast variation in the accent of different speakers,
most voice, recognition systems of today are speaker-dependent. That is, they can
recognize the speech of only a single individual or a few individuals. All these
individuals must have participated in the training session to train the system to recognize
their accent of the pre-stored words in the computer's dictionary. The system usually
maintains a different database of pre-stored words for different individuals because the
digital form of the same word may be different for different individuals.
2. Speaker-independent. Speaker-independent voice recognition systems can recognize
words spoken by anyone. Based on the idea of making a speaker-dependent system for
more than one individual, it is clear that speaker-independent systems will require a very
large database of pre-stored words to accommodate anyone's voice pattern. To take care
of this practical problem, speaker-independent systems are designed to have a very
limited vocabulary. For example, the vocabulary of such a system may have the words
YES, NO, ZERO, ONE, TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE and
TEN. Speaker-independent systems are much more difficult to build than speaker-
dependent systems.
I
According to another classification mechanism, voice recognition systems are of the
following two types:
1. Single word recognition systems. These systems are designed to recognize only a
single spoken word, such as YES, NO, MOVE, STOP, at a time. Speaker-independent
systems are mostly of this type.
2. Continuous speech recognition systems. These systems are designed to recognize
spoken sentences such as MOVE TO THE NEXT BLOCK. Since recognizing
continuously spoken sentences is more difficult than recognizing words, continuous
speech recognition systems are speaker-dependent.
Although in its infancy, voice recognition systems are already being used for a wide
range of applications. Some of its typical applications are as follows:
1. For inputting data to a computer system by a person in situations where his/her hands
are busy, or his/her eyes must be fixed on a measuring instrument or some other object
For example, a quality-control person who must use his/her hands to detect defects can
call out the identification number of the sample found defective as they are detected;
persons handling baggage at airports can simply speak out the three-letter destination
identifier for the luggage to be automatically routed to the appropriate conveyor system;
and doctors in an operation room can request certain information about a patient while
operating.
2. For authentication of a user by a computer system based on voice input.
3. For limited use of computers by individuals with physical disabilities.
In addition to making input of data easier, voice recognition systems also provide
tremendous freedom of movement to the operator because the operator is free to stand up
and move around while inputting voice data to the system.

Vision-Input System

A vision-input system allows a computer to accept input just by seeing an object. The
input data in this case is normally an object's shape and features in the form of an image.
The idea is to simulate the capability of a human vision system in a limited sense.
A computer with a vision-input device consists of a digital camera and follows the
following steps to recognize a given object:
1. The digital camera is focused on the input object to take a picture of the object.
2. The digital camera creates an image of the object in digital form (in 1s and 0s) so that
it can be stored and interpreted by the computer.
3. The digitized image of the object is matched against similarly formed pre-stored
images in the computer's image database.
4. Depending on whether a match is found or not, the system takes the appropriate
action.
Vision-input devices are mainly used today in factories for designing industrial robots
that are used for quality-control and assembly processes. For example, a robot used for
quality-control may inspect objects and separate those, which do not meet certain quality-
control specifications. Another robot may be used to separate objects of different shapes
in different bins. Still another robot may be used to recognize, grasp, insert, and align the
various components needed to assemble some product. A simple example of a vision-
input system is shown in Figure 9.18. This system separates round and square shaped
objects passing on a conveyor belt in their respective bins and also separates defective
objects in a reject bin.

Off-line Data Entry Devices

Data entry is the process of transforming input data into a form the computer system can
store and interpret. Data entry may be carried out in either offline or online manner.
Online data entry involves input devices, which are connected directly to the computer.
On the other hand, offline data entry involves devices through which data is recorded on
some media (such as floppies or tapes) and then entered into the computer later. Since
data entry is done by data entry operators and the speed with which a human being can
enter data is very less as compared to the data processing speed of a computer, so when
data entry, is done offline, it saves the precious computer time.

As the major forms of storage media are tapes, floppies and disks, there are offline data
entry devices for each of these. They are briefly described below.

Key-to-Tape

A key-to-tape device, also known as magnetic tape encoder, is designed to record keyed
data directly on to a magnetic tape. The device has a keyboard, a display monitor and a
slot to insert the tape. An operator keys in the source data using the keyboard. To
facilitate data entry, a blank form with appropriate fields is displayed on the monitor's
screen. The entered data is stored temporarily in a buffer (temporary storage area) by the
device and displayed on the monitor for visual checking of its correctness. If an error is
made in entering a data item, the operator can back-space and re-enter it. When the
operator is convinced that the data entered in the form is correct and wants to store it on
the tape, he/she presses a control key, which causes the data to be stored on the tape from
the buffer.

Magnetic tape encoders are available for recording data magnetically on reels, on
cassettes, and on tape cartridges. The magnetic tape reels produced by key-to-tape
systems are in a computer-compatible format for subsequent direct data input into a
computer. However, data on cartridges and cassettes often are transferred to higher-speed
media, such as full sized reel of magnetic tape or magnetic disk, for efficient data transfer
to the computer.

Key-to-Floppy

The device has a keyboard, a display monitor and a slot to insert the floppy disk. Data is
entered exactly in the same manner as described for the key-to-tape device.
Both the key-to-tape and the key-to-floppy devices can also be used to verify the
correctness of the data, which has already been stored on a tape/floppy. For this, the
machine is operated in a "verify" mode and another operator keys in the same data from
the source document with the tape/floppy, having the pre-stored data, inserted in the slot.
In this mode, the data keyed in and stored in a buffer is compared with the data in the
tape/floppy by reading the data from the tape/floppy. If4he two data do not agree, an
audible and visual signal alerts the operator. The operator verifies the correctness of the
field in error with the source document and re-enters the correct data if necessary which
replaces the incorrect data on the tape/floppy.

Key-to-Disk

Key-to-disk devices are used as data recording stations in systems where data from
different points have to be recorded for processing at one point. Typically, from 8 to 64
keyboard stations are linked to a small special-purpose computer to record source data on
a disk. Each station has a keyboard and a display monitor. Information entered via the
keyboard is displayed on the monitor's screen to allow a visual check. The small special-
purpose computer is required to control the input from the various stations, enabling the
data to be held temporarily for verification and editing before allocation to the disk
storage. Thus, these data entry systems are able to correct data before storing it on a
magnetic disk and before its entry into the main computer system.

OUTPUT DEVICES

An output device is an electromechanical device that accepts data from a computer and
translates them into a form suitable for use by the outside world (the users). A wide range
of output devices is available today that can be broadly classified into the following
categories:
1. Monitors
2. Printers
3. Plotters
4. Computer output microfilm
5. Screen image projector
6. Voice response systems
The various types of output devices along with their typical applications are described
below.
Output devices generate computer output, which can be broadly classified into the
following two types:
1. Soft-copy output. A soft-copy output is an output, which is not produced on a paper or
some material that can be touched and carried for being shown to others. They are
temporary in nature and vanish after use. For example, output displayed on a terminal
screen or spoken out by a voice response system are soft-copy output.

2. Hard-copy output. A hard-copy output is an output, which is produced on a paper or


some material that can be touched and carried for being shown to others. They are
permanent in nature and can be kept in paper files or can be looked at a later time when
the person is not using the computer. For example, output produced by printers or plotters
on paper are hard-copy output.

Monitors

Monitors are by far the most popular output devices used today for producing soft-copy
output. They display the generated output on a television like screen (see Figure 9.19). A
monitor is usually associated with a keyboard and together they form a video display
terminal (VDT). A VDT (often referred to as just terminal) is the most popular
input/output (I/O) device used with today's computers: That is, it serves as both an input
and an output device. The keyboard is used for input tu the computer and the monitor is
used to display the output from the computer. The name "terminal" comes from the fact
that a terminal is at the terminal, or end, point of a communication path.

The two basic types of monitors used today are cathode-ray-tube (CRT) and flat-panel.
The CRT monitors look much like a television and are used with non-portable computer
systems. On the other hand, the flat-panel monitors are thinner and lighter and are
commonly used with portable computer systems like notebook computers.

How a CRT Monitor Displays an Output?

A CRT monitor is a glass tube with a screen at one end and an electron gun at the other
end. Its major components are shown in Figure 9.20. The electron beam generator has an
oxide-coated metal called cathode and a heating filament. The cathode emits a large
number of electrons when heated by the filament. In front of the electron beam generator
is a control grid that is applied with an appropriate positive voltage to allow the exact
number of electrons, out of the generated ones, to pass through it for striking at the
monitor's screen. Larger is the positive voltage applied to the control grid, larger will be
the number of electrons that will be allowed to strike the screen, and larger will be the
beam's intensity. If the grid voltage is negative, then no electrons will be allowed to pass
the grid and the beam is said to be blanked.

The electrons, which are allowed to pass through the control grid are accelerated and
focused by an assembly unit consisting of accelerating electrodes and a focusing electron
lens. The accelerating electrodes are applied with a positive voltage to accelerate the
electrons and the focusing electron lens consists of a cylindrical metal enclosure with a
hole through which the electrons pass in the form of an electron beam. The electron beam
generator, the control grid, and the accelerating electrodes with focusing electron lens
together form the electron gun of the CRT monitor.

To focus the electron beam generated by the electron gun at a desired point on the screen,
the beam is passed through a pair of vertical deflection plates and a pair of horizontal
deflection plates. Appropriate positive voltages are applied to one of the vertical and one
of the horizontal plates to achieve this. For example, the beam can be moved up/down by
applying a suitable positive voltage to the top/bottom plate of the vertical plates pair.
Similarly, the beam can be moved left/right by applying a suitable positive voltage to the
left/right plate of the horizontal plates pair.

The focused and accelerated electron beam can thus be made to hit at any point on the
screen. The backside of the monitor's screen is coated with phosphor, a chemical that
glows for a short time when it is hit by the electron beam. The screen's phosphor coating
is organized into a grid of dots called pixels (a contraction of picture elements). Since the
phosphor glows only for a short time (few microseconds), an image drawn on the screen
would be visible only for a few microseconds and then fade away, unless the image is
repeatedly drawn. This may appear to be an inconvenience, but it is also an advantage
since there is no need to erase anything. Instead, we just need to draw new images and
the old ones automatically fade away.

In fact, the electron gun does not draw an image directly by focusing and shooting on the
pixels forming the image. Instead, it traverses the screen in a fixed pattern as shown in
Figure 9.21. That is, it systematically aims at every pixel on the screen, starting at the
top-left corner and scanning to the right horizontally, then dropping down a small
distance and scanning another line. Each horizontal line of pixels is called a scan line.
There are a fixed number of pixels on every scan line, and a pixel can be written or not in
each position by turning the beam on and off. When the beam gets to the right end of a
scan line, it is turned off and moved to the starting point of the next scan line. This is
called the horizontal trace. After scanning all the scan lines, when the beam gets to the
right end of the bottom-most scan line, it is turned off and moved to the starting point of
the top-most scan line. This is called the vertical trace.

In one pass of scanning the entire screen, if the electron beam travels all the scan lines
sequentially from top to bottom, it is called a. progressive scan (see Figure 9.21 (a)). On
the other hand, if the electron beam travels only 9.21 (b)). In case of interlaced scan since
the monitor scans every other line instead of each line in order, so it has to transmit only
half as much data in a single pass, but takes two passes to draw the entire screen. As
interlaced scan may cause flicker of images drawn on the screen, it is used in lower-
quality monitors. High quality monitors use progressive scan.

How to Compare CRT Monitors

CRT Monitors are normally compared based on the following attributes:

1. Screen Size. Display screens of monitors vary in size from 5 to 25 inches (diagonal
dimension). Monitors with 17 inch to 21 inch screen size are common today with
personal computers and other desktop computers. With users increasingly viewing
multiple windows, video clips, animated objects, and complex graphics, monitors with
larger screens are preferred. However, the larger the screen the costlier is the monitor.
2. Resolution. Resolution refers to the number of points to which electron beam can be
directed (pixels) on the screen. As the pixels are arranged in scan lines, the resolution of a
monitor depends on its total number of scan lines and total number of pixels per scan line
(note that each scan line has same number of pixels). The total number of scan lines is
called a monitor's vertical resolution and the total number of pixels per scan line is called
its horizontal resolution. The overall resolution of a monitor is expressed as a multiple of
its horizontal and vertical resolutions. A low-resolution monitor has a resolution of about
320 x 200. Today, most monitors have a resolution of about 800 * 600. High-end
monitors can have resolutions of 1024 x 768, 1280 x 1024 or even more. The higher the
resolution of a monitor, the clearer will be its displayed images. Very high-resolution
monitors project extremely clear images that look almost like photographs.
3. Refresh Rate. We saw that when a pixel on the phosphor-coated screen is hit by the
electron beam, it glows only for a short time (few microseconds) and then fades away.
Hence to make a displayed image appear flicker-free, it should be drawn again and again.
The number of times it is to be drawn depends upon the persistence of human vision and
persistence time of the phosphor used. Normally an image has to be redrawn 30 to 60
times a second to make it appear flicker-free. We saw that the electron beam scans the
entire screen for drawing images on the screen. Hence to make the displayed contents
appear flicker-free, the electron beam should scan the entire screen 30 to 60 times a
second. The actual number of times that the electron beam scans the entire screen per
second is called the refresh rate of the monitor. The higher the refresh rate, the better will
be the display quality of a monitor because it will be less strenuous for the eyes to
continuously view the screen. Today, most monitors operate at 60 Hz. That is, they
refresh the screen 60 times per second. Better quality monitors operate at 70 to 90 Hz,
refreshing the screen 70 to 90 times per second.
4. Color. Based on this attribute, monitors may be either monochrome or color. A
monochrome monitor can display images only in a single color, usually white, red, green,
blue, or amber. On the other hand, a color monitor can display multi-colored images.
Although a monochrome monitor can display only a single color, it is usually capable of
displaying multiple shades (increased and reduced color intensities) of the same color.
The term gray scales is used to refer to the number of shades of a color that a monitor can
display. Monochrome monitors are rapidly becoming a thing of the past, as most
applications today require color monitors.
A color monitor functions just like a monochrome monitor. To add color, it uses three
electron beams instead of one, and each pixel on the screen is made up of three tiny red,
green, and blue phosphors arranged in the shape of a triangle. When the three electron
beams are combined and focused on a pixel, the phosphors of that pixel light up to form a
tiny spot of white light. Different colors can be displayed by combining various
intensities of the three beams. Color monitors are also called RGB monitors because they
use red, green and blue as the primary additive colors for generating multiple colors.
Color monitors use multiple bits to represent each pixel. For example, if each pixel is
represented by one byte (8 bits), then it can indicate one of 2s = 256 different colors to
draw the pixels. That is, the monitor is said to support 256 different colors. There are
millions of colors when we consider all the shades and mixtures of color possible, and so
256 seems like far too few colors. Today's high-end monitors usually use 24 bits to
represent each pixel. Such monitors can support 224 or about 16 million different colors.
Based on the resolution and number of colors supported, several standards for color
monitors have evolved. Each one is implemented by installing an add-on board
(commonly known as a graphics adapter board or a video card) in the main computer box
and connecting it to the appropriate monitor. The four most popular of these standards
are:
- CGA (Color Graphics Adapter). It has a low resolution of 320 x 200 and supports up
to 16 colors.
- EGA (Extended Graphics Adapter). It has a resolution of 640 * 350 and supports up
to 16 colors.
- VGA (Video Graphics Array). It has a resolution of 640 x 480 and supports up to 256
colors.
- Super VGA. It provides resolution from 800 x 600 to 1280 x 1024 and supports 256
or more colors.
Today, CGA and EGA are standards of the past because all modern personal computers
come with at least VGA output.

A video card (graphics adaptor card) has its own memory called video RAM. The higher
the resolution and the more colors a monitor supports, the larger is the video RAM
required. The video RAM capacity required for different types of monitors is summarized
in Figure 9.22.
Flat Panel Monitors

A flat panel monitor (shown in Figure 9.23) is only about one inch thick, is light in
weight, and consumes less electricity as compared to a CRT monitor. These features
make a flat panel monitor most suitable for use with portable computer systems such as a
laptop (notebook) computer. Note that a portable computer must be compact in size, light
in weight, and should consume less power so that it can be operated for longer durations
with batten at places where there is no power point, such as while traveling. These
requirements render a CRT monitor unsuitable for these systems because of its large size,
heavy weight, and more power requirement.

The display technologies used by flat panel monitors include liquid-crystal display
(LCD), electro-luminescent display (ELD), and gas-plasma display (GPD). Out of these,
LCD monitors are most commonly used. As the name implies, LCD monitors use a
special kind of liquid crystals to display images on the screen. The liquid crystals used in
these monitors are normally transparent, but become opaque when charged with
electricity.

One problem with these monitors is that they are hard to read under certain lighting
conditions. This is because unlike the phosphors used in CRT monitors, the liquid
crystals do not glow when charged, so there is not enough contrast between the images
and their background to make them clearly legible under all lighting conditions. To take
care of this problem, some LCD monitors put a light source behind the screen. Although
this makes the screen easier to read, the light source requires additional power, which can
be a problem for portable computer systems that often run on battery.

Printers
Printers are the most commonly used Output devices today for producing hard-copy
output. There are many ways to classify a wide variety of printers available today. The
most commonly used ways are:
1. Printing technology used. According to this classification, the common types of
printers are dot-matrix printers, ink-jet printers, drum printers, chain/band printers and
laser printers.
2. Approach of printing. According to this classification, printers are classified as
impact printers and non-impact printers. Impact printers use the approach of hammering
a typeface against paper and inked ribbon to produce printed output. Nonimpact printers
do not hit or impact a ribbon to print. They use thermal, electrostatic, chemical or inkjet
technology to produce printed output. Impact printers can produce multiple copies by
using carbon in a single print cycle, which is not possible with a non-impact printer.
However, an impact printer is noisy in operation and normally uses covers to reduce the
noise level. Non-impact printers are quiet in operation.
3. Speed of printing. According to this classification, printers are classified as character
printers, line printers and page printers. As the names imply, a character printer prints one
character at a time, a line printer prints one line at a time, and a page printer prints an
entire page at a time. Accordingly, printer speeds are measured in characters-per-second
(cps) for character printers, lines-per-minute (lpm) for line printers, and pages-per-minute
(dpi) for page printers. The print-speed ranges for the three types of printers are 40 to 450
cps, 1000 to 5000 lpm, and 4 to 800 ppm.
4. Quality of printing. The quality of the printed output is directly proportional to the
resolution of printing which is measured in dots per inch (dpi). The dpi qualifier refers to
the number of dots that can be printed per linear inch, horizontally or vertically. That is,
a 300-dpi printer is capable of printing 90,000 (300 x 300) dots per square inch.
According to this classification, printers are classified as near-letter-quality (NLQ), letter-
quality (LQ), near-typeset-quality {NTQ) and typeset-quality (TQ). Near-letter-quality
printers have resolutions of about 300 dpi, letter-quality printers have resolutions of about
600 dpi, near-typeset-quality printers have resolutions of about 1200 dpi, and typeset-
quality printers have resolutions of about 2000 dpi. NLQ and LQ printers are used for
ordinary day-to-day printing jobs, whereas NTQ and TQ printers are used for top-quality
professional printing such as in publishing industries.
5. Language scripts. Since printers are output devices meant for producing hard copy
output for users, they must be capable of producing output in different languages familiar
to different groups of users. In fact, printers are available in almost all scripts, such as,
English, Devnagari, Japanese, Arabic, etc. According to this classification, printers may
be classified based on the scripts (also called fonts) supported. Note that a printer may
simultaneously support multiple scripts in which case it may be used to print in multiple
languages. For example, a printer may be capable of printing in both English and
Devanagari.
6. Color. Printers may be capable of producing output in a single color (such as blank,
red, yellow), in two or three colors (such as a document printed in black and white can
have the key words printed in red), or in multiple colors. Although printers capable of
printing in a single or two to three colors are suitable for producing textual documents, it
is often desirable to have printers, which can print in multiple colors for producing
multiple-color graphics outputs. According to this classification, printers are classified as
monochrome printers and color printers.

The various types of printers in use today are described below.

Dot-Matrix Printers

Dot-matrix printers are character printers that form characters and all kinds of images as a
pattern of dots. Figure 9.24 shows how various types of characters can be formed as a
pattern of dots. Based on this idea, the printing mechanism used by dot-matrix printers is
illustrated in Figure 9.25. As shown in the figure, a dot-matrix printer has a print head
that can move horizontally (left to right and right to left) across the paper. The print head
contains an array of pins, which can be activated independent of each other to extend and
strike against an inked ribbon to form a pattern of dots on the paper. To print a character,
the printer activates the appropriate set of pins as the print head moves horizontally. For
faster printing, many dot matrix printers are designed to print both while the print head
moves from left to right and while it moves from right to left on return. A dot-matrix
printer is shown in Figure 9.26.
In Figure 9.24 all the characters are formed by 5 horizontal and 7 vertical dots. Such a
pattern is called a 5 x 7 matrix. It can be generated by a print head having 7 pins.
However, you will notice that the print head in Figure 9.25 has 9 pins. The bottom 2 pins
are used for lower-case letters that extend below the line (for example, p, g, q and y).

The quality of the printed output is directly proportional to the density of the dots in the
matrix. Most early dot matrix printers had 9 pins and used 5 x 7 dot matrix patterns for
character formation. So the character that they printed had a maximum vertical resolution
of 7 dots. Many new dot matrix printers have 18 or 24 pins, which can print near-letter-
quality characters that appear solid. The arrangement of pins in an 18-pin print head of a
dot-matrix printer is shown in Figure 9.27.

Since dot matrix printers produce printed output as patterns of dots, they can print any
shape of character that a programmer can describe. This allows the printer to print many
special characters, different sizes of print, and the ability to print graphics such as charts
and graphs.

Dot-matrix printers are impact printers because they print by hammering the pins on the
inked ribbon to leave ink impressions on the paper. Hence they can be used to produce
multiple copies by using carbon paper or its equivalent. However due to impact printing,
dot-matrix printers are noisy as compared to non-impact printers.

Since dot-matrix printers use inked ribbon to produce printed output, they are usually
monochrome. However, some dot-matrix printers use a ribbon having rows of two to
three colors to produce printed output in selected few colors.

Figure 9.27. The arrangement of pins in an 18-pin print head of a


dot-matrix printer. It permits dots to overlap to increase the244
I Foundations of Computing
Dot-matrix printers are normally slow with speeds usually ranging between 30 to 600
characters per second. However they are cheap in terms of both initial cost and cost of
operation. Hence they are preferred by individuals and organizations for generating
printed outputs if the speed and quality of printing are not important factors. They are
also used for applications that require multicopy output such as shipping forms and
invoices, which rely on impact for generating multiple copies.

InkJet Printers

InkJet printers are character printers that form characters and all kinds of images by
spraying small drops of ink on to the paper. The print head of an inkjet printer contains
up to 64 tiny nozzles, which can be selectively heated up in a few micro seconds by an
integrated circuit register. When the register heats up, the ink near it vapourizes and is
ejected through the nozzle and makes a dot on the paper placed in front of the print head.
To print a character, the printer selectively heats the appropriate set of nozzles as the print
head moves horizontally. An inkjet printer is shown in Figure 9.28.
InkJet printers produce higher quality output than dot-matrix printers because they form
characters by very tiny ink dots. A high-resolution inkjet printer has as many as 64
nozzles within height of 7mm, providing print resolution of around 360 dots per inch.

Since inkjet printers produce printed output as patterns of tiny dots, they can print any
shape of characters that a programmer can describe. This allows the printer to print many
special characters, different sizes of print, and the ability to print graphics such as charts
and graphs.

InkJet printers are non-impact printers because they print by spraying ink on the paper.
Hence they are quiet in operation. However, like other non-impact printers, inkjet printers
cannot be used to produce multiple copies of a document in a single printing.

InkJet printers can be both monochrome and color. A monochrome inkjet printer uses a
single print head, whereas a color inkjet printer uses multiple print heads, one per color.
Color inkjet printers can produce multiple color output.

InkJet printers are slower than dot-matrix printers with speeds usually ranging between
40 to 300 characters per second. Typically, an inkjet printer is more expensive than a dot-
matrix printer. They are preferred by individuals and organizations for generating printed
outputs if the speed of printing is not an important factor.

Drum Printers

Drum printers are line printers that print one line at a time. The print mechanism of a
drum printer is shown in Figure 9.29. It consists of a solid cylindrical drum with
characters embossed (raised characters) on its surface in the form of circular bands. Each
band consists of all the printing characters supported by the printer in its character set and
the total number of bands is equal to the maximum number of characters (print positions)
that can be printed on a line. Thus a drum printer with 132 characters per line and
supporting a character set of 96 characters will have altogether 12,672 (132x96)
characters embossed on its surface.

In addition to the drum, the printer has a set of hammers mounted in front of the drum in
such a manner that an inked ribbon and paper can be placed between the hammers and
the drum. The total number of hammers is equal to the total number of bands on the
drum, that is, one hammer is located opposite to each band of the drum.

The drum rotates at a high speed and a character at a print position is printed by
activating the appropriate hammer when the character embossed on the band at the print
position passes below it. Thus the drum would have to complete one till revolution to
print each line of output. This means that all characters on a line are not printed at exactly
the same time, but the time required to print an entire line is so fast that it appears as if
one line is printed at a time: A drum printer is shown in Figure 9.30.
The drum of a drum printer is expensive and cannot be changed often. Hence drum
printers can only print a predefined set of characters in a pre-defined style that is
embossed on the drum. Due to this reason, drum printers do not have the ability to print
-any shape 0f characters, different sizes of print, and graphics such as charts and graphs.

Drum printers are impact printers because they print by hammering the paper and the
inked ribbon against the characters embossed on the drum. Hence they can be used to
produce multiple copies by using carbon paper or its equivalent. However due to impact
printing, drum printers are noisy in operation and often use a cover to reduce the noise
level.

Since drum printers use inked ribbon to produce printed output, they are usually
monochrome. Typical speeds of drum printers are in the range of 300 to 2000 lines per
minute.

Chain/band printers are line printers that print one line at a time. The print mechanism of
a chain/band printer h shown in Figure 9.31. It consists of a metallic chain/band on which
all the characters of the character se supported by the printer are embossed. A standard
character set may have 48, 64 or 96 characters. In order t< enhance the printing speed, the
characters in the character set are embossed several times on the chain/band. For
example, the chain/band of a 64 character set printer may have 4 sets of 64 characters
each embossed on it. In this case, the chaia/band will have altogether 256 (64x4)
characters embossed on it.

In addition to the chain/band, the printer has a set of hammers mounted in front of the
chain/band in such a manner that an inked ribbon and paper can be placed between the
hammers and the chain/band. The total number of hammers is equal to the total number
of print positions. So if there are 132 print positions, then the printer will have 132
hammers.

The chain/band rotates at a high speed and a character at a print position is printed by
activating the appropriate hammer when the character embossed on the chain/band passes
below it. Since the character set is repeated several times on the chain/band, it is not
necessary to wait for the chain/band to make a complete revolution to position the desired
character in the correct print position.

Unlike the drum of a drum printer, the chain/band of a chain/band printer can be easily
changed. This allows the use of different fonts (styles of characters) and different scripts
(languages) to be used with the same printer. However, just like drum printers,
chain/band printers can only print pre-defined sets of characters that are embossed on the
chain/band used with the printer. Due to this reason, chain/band printers do not have the
ability to print any shape of characters, different sizes of print, and graphics such as
charts and graphs.

Chain/band printers are impact printers because they print by hammering the paper and
the inked ribbon against the characters embossed on the chain/band. Hence they can be
used to produce multiple copies by using carbon paper or its equivalent. However due to
impact printing, chain/band printers are noisy in operation and often use a cover to reduce
the noise level. A chain/band printer is shown in Figure .9.32.

Since chain/band printers use inked ribbon to produce printed output, they are usually
monochrome. Typical speeds of chain/band printers are in the range of 400 to 3000 lines
per minute.

Laser Printers

Laser printers are page printers that print one page at a time. The main components of a
laser printer are a laser beam source, a multi-sided mirror, a photoconductive drum and
toner (tiny particles of oppositely charged ink). To print a page of output the laser beam
is focused on the electro statically charged drum by the spinning multi-sided mirror. The
mirror focuses the laser beam on the surface of the drum in such a manner that it creates
the patterns of characters/images to be printed on the page. As the drum is
photoconductive, a difference in electric charge is created on those parts of the drum
surface that are exposed to the laser beam. As a result, the toner, which is composed of
oppositely charged ink particles, sticks to the drum in the places the laser beam has
charged the drum's surface. The toner is then permanently fused on the paper with heat
and pressure to generate the printed output. The drum is then rotated and cleaned with a
rubber blade to remove the toner sticking to its surface to prepare the drum for the next
page printing. A laser printer is shown in Figure 9.33.

Laser printers produce very high quality output because they form characters by very tiny
ink particles. The most common laser printers have resolutions of 600 dpi, whereas some
high-end laser printers have resolutions of 120 dpi. Because of their high resolution, these
printers give excellent graphics art quality.

Since laser printers produce printed output as patterns generated by the laser beam, they
can print any shape < characters that a programmer can describe. This allows the printer
to print many special characters, different size of print, and the ability to print graphics
such as charts and graphs.

Laser printers are non-impact printers because they do not have hammers striking on an
inked ribbon or paper. Hence they are very quiet in operation. However, like other non-
impact printers, laser printers cannot be used produce multiple copies of a document in a
single printing.

The majority of laser printers are monochrome, which can print multiple shades of gray.
However, color laser printers, which use many different colors of toners, are also
available. Color laser printers are many times more expensive than monochrome laser
printers.

Laser printers are faster in printing speed than other printers discussed before. Low speed
laser printers can pi 4 to 12 pages per minute. Very high-speed laser printers are also
available which can print 500 to 1000 pages' minute. That is fast enough to print this
entire book in about one minute. Because of their better print quality i printing speed,
laser printers are more expensive than other printers.

Hydra Printers

Today most modern offices have the following office equipment - a printer, a fax
machine, a copy machine and a scanner. There is a considerable overlap in the
technologies used in these machines. The need for these mach at one place and the
overlap in the technologies used in them has triggered the creation of all-in-
multifunctional device that is capable of doing all four functions. Such a device is called
a hydra printer. S< models of hydra printers may not perform all the four functions but
may perform only two or three functions. Hydra printers are relatively new, but they may
prove to be a popular office equipment of the future.

Plotters

We saw above that dot-matrix, inkjet and laser printers are capable of producing graphics
output. However many engineering design applications, like architectural plan of a
building, design of mechanical components of an aircraft or a car, etc., often require high-
quality, perfectly-proportioned graphic output on large sheets. The various types of
printers discussed above are, not suitable for meeting this output requirement of such
applications. A special type of output device called plotters is used for this purpose.
Plotters are an ideal output device for architects, engineers, city planners, and others who
need to routinely generate high-precision, hard-copy graphic output of widely varying
sizes.

The two commonly used types of plotters are drum plotter and flatbed plotter. They are
briefly described below.

Drum Plotter
In a drum plotter, the paper on which the design has to be made is placed over a drum
that can rotate in both clockwise and anti-clockwise directions to produce vertical
motion. The mechanism also consists of one or more pen holders mounted perpendicular
to the drum's surface. The pen(s) clamped in the holder(s) can move left to right or right
to left to produce horizontal motion. The movements of the drum and the pen(s) are
controlled by the graph plotting program. That is, under computer control, the drurn and
the pen(s) move simultaneously to draw the designs and graphs on the sheet placed on the
drum. The plotter can also annotate the designs and graphs so drawn by using the pen to
draw characters of various sizes. Since each pen is program selectable, pens having ink of
different colors can be mounted in different holders to produce multi-colored designs. A
drum plotter is shown in Figure 9.34.
Flatbed Plotter
I
A flatbed plotter plots a design or graph on a sheet of paper that is spread and fixed over
a rectangular flatbed table. In this type of plotter, normally the paper does not move and
the pen holding mechanism is designed to provide all types of motions necessary to draw
complex designs and graphs. That is, under computer control, the pen(s) move in the
required manner to draw the designs and graphs on the sheet placed on the flatbed table.
The plotter can also annotate the designs and graphs so drawn by using the pen to draw
characters of various sizes. Here also provision is there to mount more than one pen in
the pen(s) holding mechanism. Since each pen is program selectable, pens having ink of
different colors can be mounted in different holders to produce multi colored designs.
The plot size is restricted by the area of the bed. Some may be as small as. A4 size (8"xll"
page) while some very large beds used in the design of cars, ships, aircrafts, buildings,
highways, etc. can be up to 20 ft. by 50 ft. Some plotters are also designed to etch plastic
or metal plates. In this case, the plastic or metal sheet is spread on the bed and the
drawing pen has a sharp-edged needle. A flatbed plotter is shown in Figure 9.35.

Plotters are normally very slow in motion because of excessive mechanical movement
required during plotting. Hence there is a great mismatch between the speed of the CPU
and the speed of a plotter. Because of this reason, in most cases, output is first transferred
by the CPU onto a tape and then the plotter is activated to plot the design from the
information on the tape. However, in case of a computer system dedicated to design
work, the CPU may send output directly to a plotter.

Computer Output Microfilm (COM)

COM is an output device that allows computer output to be recorded on a sheet or roll of
microfilm as microscopic filmed images. COM devices commonly use a sheet of film
measuring 4"x6" for recording output information. This sheet of film is called a
microfiche ("fiche" is pronounced as "fish". It is a French word that means card). COM
recording process produces page images that are 48 or more times smaller than those
produced by conventional printers. Hence a single microfiche can hold about 300 times
as much information as a standard computer printed page.

COM uses a microfilm recorder for recording output information on a microfiche, and a
microfilm reader to view the information recorded on a microfiche. The microfilm
recorder receives output information from the computer system which it projects page-
by-page on to a CRT screen. A high-speed camera, in-built into the system, then takes a
picture of the displayed information. In some systems, the recorder processes the film
from the camera, and in other systems, a separate automated film developer is used to
produce the filmed images of the output information.

A microfilm reader that is used to view the output information recorded on a microfiche
is shown in Figure 9.36. It operates on a "back projection" principle and displays a frame
(a single page of information) at a time on a translucent screen whose typical size is about
8"xll". A user can read the displayed information on the screen. Most microfilm readers
also have a printer in-built into it or attached to it to allow a user to selectively print and
take a hard copy of the desired pages.

Most COM systems come with computer-assisted-retrieval software that allows a user to
quickly search < particular document, from the thousands of pages of recorded
information on the film, simply by specifying the pre-assigned index that corresponds to
the desired document. Without this, users would be required to spend lots of time in
manually searching through the film cartridge or card to find the desired document.

As compared to a printer, a COM system has the following advantages and limitations:
1. Information recording speed is many times faster for a COM system as compared to
a printer. A COM system is 20 to 25 times faster than an average line printer in this
regard.
2. Microfilm output is many times more compact than a printed page output. A single
microfiche can hold about 300 times as much information as a standard computer printed
page. Thus the mailing and storage costs of filmed documents are much less than paper
documents.
3. Microfilm output is less costly than printed output. The cost of paper needed for
printing a 1000 page document is about 20 to 30 times more than the cost of the film
needed to record the same information.
4. The initial investment required for installing a COM system is much more than that
required for buying an ordinary printer. Hence use of a COM system is justified only in
case of high volume workload.
5. Many people feel uncomfortable using a COM system because of retrieval delays
and the lack of facility to write notes on the margins of the reports.

A COM system provides an easy and compact way of recording and storing information,
and retrieving a desired piece of information in a matter of seconds. It is ideal for use in
applications where there is a large volume of information to be recorded, stored, and
selectively retrieved off-line. Organizations often need to maintain records of their
various types of documents, such as catalogues, bills, invoices, etc., for a number of years
before destroying them. A COM system is most suitable for this purpose. Insurance
companies, banks, libraries, public utilities departments, government agencies, and many
other types of organizations are regular users of COM systems.

Screen Image Projector

Screen image projector is an output device that is used to project information from a
computer on to a large screen (such as a cloth screen or a wall) so that it can be
simultaneously viewed by a large group of people. This output device is very useful for
making presentations to a group of people with the direct use of a computer. Before such
an output device was available, the contents of a presentation were prepared using a
computer, the presentation material was then printed on a printer, the printout was next
reproduced on overhead projector transparency sheets using a copy machine, and finally
the presentation was made using an overhead projector. Special marker pens had to be
used for marking certain portions of the contents on the transparency sheets during the
presentation. A screen image projector greatly simplifies this job. It can be directly
plugged to a computer system and the presenter can make a presentation to a group of the
people by projecting the presentation material one after another on a large screen with the
help of computer's keyboard or mouse. With this facility, the presenter can also directly
point to, mark, or edit certain portions of the contents of the displayed material during the
presentation to make the presentation more understandable. Additionally, a full-fledged
multimedia presentation with audio, video, image and animation can be prepared and
made using this facility to make the presentation more lively and interesting and also to
greatly simplify the job of the presenter.

Screen image projectors have become a common presentation equipment today. They are
commonly used with portable notebook computers to quickly setup a modern
presentation facility at any place with great ease. Like monitors, screen image projectors
provide a temporary, soft-copy output.

Voice Response Systems

Just as a voice recognition system allows a user to talk to a computer, similarly, a voice
response system enables a computer to talk to a user. A voice response system has an
audio-response device that produces audio output. Obviously, the output is temporary,
soft-copy output.

Voice response systems are basically of two types - voice reproduction system and
speech synthesizer. They are briefly described below.

Voice Reproduction System

A voice reproduction system produces audio output by selecting an appropriate audio


output from a set of prerecorded audio responses. The set of pre-recorded audio responses
may include words, phrases or sentences spoken by human beings; music or alarms
generated by musical instruments; or any other type of sound. The actual analog
recordings of the pre-recorded sounds are first converted into digital data and then
permanently stored on the computer's disk or in its memory chip. When audio output is to
be produced, the computer selects the appropriate sound from the set of pre-recorded
sounds, the selected sound is converted back into analog form, which is then routed to a
speaker to produce the audio output.

Voice reproduction systems are very useful in a wide range of applications. Their typical
uses include:
1. Audio help for guiding how to operate a system. For example, banking industry
uses voice reproduction systems in automatic teller machines to provide step-by-step
guidance to customers on how to transact with the bank using an ATM.
2. Automatic answering machines. For example, telephone enquiries for new
telephone numbers in place of an old number, or vacancy status of a particular flight or
train is often taken care of by an automatic answering machine.
3. Video games are made exciting and interesting by playing an event-based sound
from a set of prerecorded sounds.
4. Talking alarm clocks. For example, every hour the clock speaks out what is the time
by selecting the appropriate voice message corresponding to that hour from the set of pre-
recorded voice messages. Else the clock may speak "its time to wake up" at the time set
for alarm.
5. Talking toys and home appliances also employ a voice reproduction system.
6. Often personal computers with audio facility are used for automated multimedia
presentations during exhibitions.

Speech Synthesizer

A speech synthesizer converts text information into spoken sentences. To produce


speech, these devices combine basic sound units called phonemes. From a given text
information, sequence of words are combined into phonemes, amplified, and output
through the speaker attached to the system. Speech synthesizers are still in their infancy
because currently they can produce only limited unique sounds with only limited vocal
inflections and phrasing. However, they are very useful in a wide range of applications.
Their typical uses include:

1. For reading out text information to blind persons. For example, a recently published
book may be scanned using a scanner, converted into text using OCR software, and read
out to blind persons using a speech synthesizer. This will allow blind persons to know
the latest information published in a book as soon as it is printed, rather than wait for the
book to appear in Braille.
2. For allowing those persons who cannot speak to communicate effectively. For
example, the person simply types the information and the speech synthesizer converts it
into spoken words.
3. For translation systems that convert an entered text into spoken words in a selected
language. For example, a foreigner coming to India may enter a text that he/she wants to
communicate to an Indian and the speech synthesizer converts the entered text into
spoken words of the selected Indian language.

OTHER RELATED CONCEPTS

Before concluding this chapter, we will have a look at a few concepts related to
input/output devices. Several of these concepts are useful to understand how I/O devices
are connected to and communicate with a computer system.

Device Controllers

We saw in Chapter 7 that all the components of a computer communicate with the
computer's CPU through the system bus. That means the I/O devices need to be attached
to the system bus. However I/O devices are not connected directly to the computer's
system bus. Instead, they are connected to an intermediate electronic device called a
device controller, which in turn is connected to the system bus. Hence a device controller
is an interface unit between an I/O device and the system bus. On one side, it knows how
to communicate with the I/O device connected to it, and on the other side, it knows how
to communicate with the computer's CPU and memory through the system bus.

A device controller need not necessarily control a single device, rather a single device
controller can usually control multiple I/O devices. It comes in the form of an electronic
circuit board (also known as an electronic card) that plugs directly into the system bus,
and there is a cable from the controller to each device it controls. The cables coming out
of the controller are usually terminated at the back panel of the main computer box in the
form of connectors known as ports. Figure 9.37 illustrates how I/O devices are connected
to a computer system through device controllers.

Using device controllers for connecting I/O devices to a computer system instead of
connecting them directly to the system bus has the following advantages:
1. A device controller can be shared among multiple I/O devices allowing many I/O
devices to be connected to. the system.
2. I/O devices can be easily upgraded or changed without any change in the computer
system.
3. I/O devices of manufacturers other than the computer manufacturer can be easily
plugged-in to the computer system. This provides more flexibility to the users in buying
I/O devices of their choice.

Device controllers may or may not have DMA (Direct Memory Access) capability. As
shown in Figure 9.37, a device controller without DMA capability transfers data between
the computer's memory and an I/O device via the CPU. On the other hand, a device
controller with DMA capability can transfer data directly between the memory and an I/O
device without the help of CPU. Obviously, device controllers with DMA capability can
transfer data much faster than those without DMA capability. Due to this reason, nearly
all device controllers of today have DMA capability.

Serial and Parallel Ports

We saw that I/O devices are connected to I/O ports of a device controller, which in turn is
connected to the computer's system bus. The I/O ports are used to plug-in I/O devices to a
computer system in a similar manner as electric sockets in a house are used to plug-in
various types of electrical appliances when they need to be used. These I/O ports are
basically of two types - serial ports and parallel ports. They are briefly described below.

Serial Ports

A serial port may be used to connect any device that can send or receive a stream of bytes
serially, one bit at a time. A serial port is so called because it sends the data bits one at a
time (that is, serially). It has only one wire for sending data and another one for receiving
data. The eight bits of a byte are sent one at a time. Usually, two extra bits are sent with
the byte to help in the control and timing of the communication. A chip called UART on
the device controller's card converts parallel data from the system bus into serial data that
can flow through a serial cable or telephone wire. The process is illustrated in Figure
9.38. Similarly, the serial data received by the device controller from the I/O device is
converted into parallel data by the UART before it is sent to the system bus.

Serial ports are used for connecting slow I/O devices such as terminal, keyboard, mouse,
modem, etc. The physical appearance of a typical serial port is shown in Figure 9.39.

Parallel Ports

A serial port limits the speed at which it can transfer data because of the fact that it can
transfer only one bit at a time. Parallel ports overcome this limitation of serial ports by
allowing 8 or 16 bits of data to be transferred at a time. Accordingly, a parallel port has 8
or 16 parallel wires for sending and receiving data. Hence a parallel port with 8 wires can
transfer one byte (8 bits) at a time and one with 16 wires can transfer two bytes (16 bits)
at a time. The process of data transfer in case of a parallel I/O port is illustrated in Figure
9.40. Notice that unlike the case of serial I/O port, the conversion of bytes into bit
streams and vice-versa is not required in this case. This also leads to faster data transfer
than in case of serial I/O ports.

A parallel port can obviously handle a higher volume of data in the same amount of time
than a serial port. Hence they are used for connecting faster I/O devices such as printer,
analog-to-digital and digital-to-analog converters, etc. The physical appearance of a
typical parallel port is shown in Figure 9.41.

SCSI Interface

A computer's system bus has a finite number of slots (called expansion slots) to which
device controllers can be connected. If every I/O device comes with its own device
controller card, then a computer system will have the capability to connect only a very
limited number of I/O devices because it will soon run out of available expansion slots.
This problem is overcome by using a SCSI interface, which is an interesting and
important variation of the separate device controller idea for each device. As shown in
Figure 8.27 and discussed in Chapter 8, a SCSI interface uses a generic device controller
(called SCSI controller) and allows any device with an SCSI interface to be directly
connected to the SCgl bus of the SCSI controller. That is, instead of connecting device
controller cards into the computer's system bus via the expansion slots, SCSI extends the
computer's system bus outside the computer by way of a cable, and just as you can plug
one extension cord into another to lengthen the circuits, you can plug one SCSI device
into another to form a daisy chain. Most current implementations of SCSI limit the
number of devices that can be connected together to form a daisy chain to seven due to
the bus capacity limitation. This can really save you expansion slots in your computer for
connecting other devices. If none of your computer's device controller cards has a SCSI
interface, you can purchase a separate SCSI interface (as the one shown in Figure 9.42) to
plug into an existing parallel port to which you can connect additional SCSI devices.
Dumb, Smart and Intelligent Terminals

Terminals (monitors along with keyboards) are extensively being used today as online,
remote data entry devices. Depending on their local processing capability, these terminals
are classified as dumb, smart and intelligent.

A dumb terminal is a simple, low-cost terminal with alphanumeric display capability. It


has a keyboard for input, a means of communication with the CPU of the main computer,
and a screen to display the entered data and output received from the main computer.
Dumb terminals need not appear dumb to the user. Because of the rapidity with which the
main computer can communicate back to the terminal, many applications are not affected
if no actual processing is done locally at the terminal. However, dumb terminals transmit
all data directly to the main computer. This type of data is called "dirty" data because
errors are transmitted along with good data. The errors are then identified and informed
to the terminal operator by the CPU of the main computer and processing could be
delayed until "clean" data are obtained from the operator. This type of delay,
accompanied by the need to process the data over again, can be expensive.

A smart terminal usually has a microprocessor (a CPU) and some internal storage in
addition to I/O capabilities. It has local data editing capability and the ability to
consolidate input data prior to sending them to the CPU of the main computer. This
means that preliminary processing of input data can take place locally and that the data
can be cleaned up at the terminal itself before it is transmitted to the main computer for
processing this can lead to tremendous saving of clean data preparation time as compared
to dumb terminals. However, smart terminals cannot be programmed by users.

An intelligent terminal is a small computer by itself. It consists of a built-in


microcomputer that can be programmed by users. These programmable terminals have
extensive local data processing power. Large working files can be maintained locally and
small data processing jobs can be handled by the terminal itself without the need to
interact with the CPU of the main computer. They have their own on-line secondary
storage devices like disk, which are used during the processing of these small jobs.
Programmed error-detection tests can also be stored in the terminal for the validation of
input data which can ensure the transmission of clean data to the main computer system
for further processing.

With the fast reduction in the cost of microcomputer components and disk storage, most
terminals of today are intelligent or at least smart to help make data entry and retrieval
easier for the users.

X Terminals

An X terminal is a graphics terminal that has a rich set of commands for the following:
1. To display characters.
2. To move the cursor position.
3. To draw graphics and images such as draw a line of desired thickness and color,
draw an empty circle or a circle filled with a certain color, draw a bitmap, draw text, etc.
4. To manage areas on the screen (called windows) such as open a new window of the
desired size, close an existing window, resize an existing window, etc.
X terminals are very common these days.

Terminal Emulators

Today computers are hardly used in stand-alone mode. They are often connected to
networks and communicate with other computers on the network. In this type of scenario,
computers interact with each other in client-server mode and may keep changing their
roles of client and server at different occasions. In such a situation, a full-fledged
computer like a PC or a workstation is required to serve as a terminal for communicating
with a remote computer. But a PC or a workstation is not a terminal, and does not act like
a terminal. A simple way to solve this problem is to write a software program that runs on
the PC or workstation and communicates with the network interface over a serial port on
the PC or workstation and pretends that it is a terminal. Such a program is called a
terminal emulator.

Privacy Filter

Privacy filters are used with monitors to prevent others sitting/standing nearby the
monitor from viewing the contents displayed on it. Often users work with sensitive
information displayed on their monitors in an open area and always have the fear of their
co-workers around them viewing the displayed information. To overcome this problem,
you can use a privacy filter, which fits over your monitor's screen, covering the displayed
contents from people on either side of you. It is made of a plastic film that is inlaid with
microscopic black strips. If you are sitting in front of the screen, you can see through the
filter clearly. To others, the screen looks black.

Economically Designed Devices

Ergonomics is the science that deals with designing and arranging machines and other
things in such a way that their users can use them with maximum efficiency of the. This
is important for achieving maximum efficiency of the people working on these machines
and protecting them from accidents or medical problems caused due to continuous usage
of a machine for long hours. For example, prolonged usage of a badly designed keyboard
can cause wrist problems, sometimes so serious as to require surgery. Similarly,
prolonged usage of a badly designed monitor can cause eyesight problems. To help
prevent these types of problems, manufactures of I/O devices are continuously working
towards making ergonomically better and better devices. A few examples of efforts made
in this direction are (there may be hundreds of such examples):
1. Originally, the keyboard of a computer was attached to its monitor. But today, nearly
every terminal has a separate keyboard attached to the monitor with a reasonably long
cable so that the user can move the keyboard to any comfortable position on the table or
can even place it on his/her lap during operation.
2. Many new keyboards are designed with tilt adjustments and with hand-rest pads to
make their use more comfortable for the operators.
3. Cordless mouse allows more comfortable operation of mouse device as compared to
wired mouse.
4. Originally, monitors used to be fixed at one angle. But today, almost all monitors are
mounted on a ball bearing and can be tilted and rotated to suit the height and angle of
operation of an operator.
5. Monitors with curved screens are being replaced with those having flat screens to
improve readability and reduce reflections.
6. Monochrome monitors are being replaced with color monitors because they are more
comfortable to view. Many operators prefer them and report fewer instances of eye
fatigue and blurred vision.
7. Newer monitors use higher resolution to prevent flicker of displayed objects, which
may lead to eye problems.
8. Newer monitors also use special screen coatings for reducing glare on eyes.

Points to Remember

1. The input-output devices (abbreviated I/O devices) provide the means of


communication between the computer and the outer world. They are also known as
peripheral devices.
2. An input device is an electromechanical device that accepts data from the outside
world and translates them into a form the computer can interpret.
3. An output device is an electromechanical device that accepts data from a computer
and translates them into a form suitable for use by the outside world (the users).260
m
Foundations of Computing
4. Keyboard devices are the most commonly used input devices today. They allow data
entry into a computer system by pressing a set of keys (labeled buttons), which are neatly
mounted on a keyboard connected to the computer system.
5. A graphical user interface (GUI) provides to the user a screen full of graphic icons
(small images on the screen) or menus and allows the user to make a rapid selection from
the displayed icons or menus to give instructions to the computer.
6. Point-and-draw devices are input devices that can be used to rapidly point to and
select a particular graphic icon or menu item from the multiple options displayed on the
screen. Many of these devices can also be very effectively used to create graphic
elements on the screen, such as lines, curves and freehand shapes. Some of the commonly
used point-and-draw devices are mouse, trackball, joystick, electronic pen and touch
screen.
7. Data scanning devices are input devices used for direct data entry into the computer
system from source documents. Some of the data scanning devices are also capable of
recognizing marks or characters.
8. An image scanner is an input device that translates paper documents into an
electronic format that can be stored in a computer. The input documents may be typed
text, pictures, graphics, or even handwritten material. Image scanners are also called
optical scanners because they use optical technology for converting an image into
electronic form.
9. An optical character recognition (OCR) device is a scanner equipped with a character
recognition software. It is used for inputting text documents and store them in a form
suitable for doing word processing of the documents. That is, the computer can interpret
the stored document as letters, numbers and special characters.
10. An optical mark reader (OMR) is a scanner that is capable of recognizing a pre-
specified type of mark made by pencil or pen. Any input data that is of a choice or
selection nature can be recorded for OMR input.
11. Bar codes represent alphanumeric data by a combination of adjacent vertical lines
(called bars) by varying their width and the spacing between them. A bar-code reader is a
scanner used for reading (decoding) bar-coded data.
12. Magnetic-ink character recognition (MICR) technology is used by the banking
industry for faster processing of the large volume of cheques. This technology also
ensures accuracy of data entry because most of the information is pre-printed on the
cheque and is directly fed to the computer.
13. A digitizer is an input device used for converting (digitizing) pictures, maps and
drawings into digital form for storage in computers. This enables re-creation of the
drawing from the stored information whenever required as well as easy incorporation of
changes in the drawing as and when required.
14. Electronic cards are small plastic cards having encoded data appropriate for the
application for which they are used. An electronic-card reader, which is normally
connected to a computer, is used to read the data encoded on an electronic card and
transfer it to the computer for further processing.
15. Depending on the manner in which data is encoded, electronic cards are of two types
- magnetic strip cards and smart cards. Magnetic strip cards store the data to be encoded
on a magnetic strip attached to the back oi the card. On the other hand, smart cards have a
built-in microprocessor chip and the data to be encoded or the card is permanently stored
in the memory of the microprocessor chip.
16. Voice recognition devices are input devices that allow a person to input data to a
computer system b) speaking to it. They are basically of two types - speaker-dependent
and speaker-independent. Speaker-dependent systems can recognize the speech of only
a single individual or a few individuals. On the other hand, speaker-independent systems
can recognize words spoken by anyone.
17. A vision-input system allows a computer to accept input just by seeing an object. The
input data in this case is normally an object's shape and features in the form of an image.
18. Online data entry involves input devices, which are connected directly to the
computer, whereas offline data entry involves devices through which data is recorded on
some media (such as floppies or tapes) and then entered into the computer later. Since
the speed with which a human being can enter data is very less as compared to the data
processing speed of a computer, when data entry is done offline, it saves the precious
computer time. The commonly used offline data entry devices are key-to-tape, key-to-
floppy and key-to-disk.
19. Computer output generated by output devices are of two types - soft-copy output and
hard-copy output. Soft-copy outputs are temporary in nature and vanish after use. Hard-
copy outputs are permanent in nature and can be kept in paper files or can be looked at a
later time when the person is not using the computer.
20. Monitors are by far the most popular output device used today for producing soft-
copy output. They display the generated output on a television like screen.
21. A monitor and a keyboard are usually associated together to form a video display
terminal (VDT), which is often referred to as just terminal. A terminal serves as both an
input and an output device and is the most popular input/output (I/O) device used with
today's computers.
22. Printers are the most commonly used output devices today for producing hard-copy
output. Based on the printing technology used, printers are classified as dot-matrix
printers, inkjet printers, drum printers, chain/band printers and laser printers. According
to the approach of printing used, printers are classified as impact printers and non-impact
printers.
23. Dot-matrix printers are character printers that form characters and all kinds of images
as a pattern of dots.
24. InkJet printers are character printers that form characters and all kinds of images by
spraying small drops of ink on to the paper.
25. Drum printers are line printers that print characters by striking a set of hammers on an
inked ribbon and paper placed against a solid cylindrical drum with characters embossed
on its surface in the form of circular bands.
26. Chain/band printers are line printers that print characters by striking a set of hammers
on an inked ribbon and paper placed against a metallic chain/band on which all the
characters of the character set supported by the printer are embossed.
27. Laser printers are page printers that produce very high quality output by forming
characters and all kinds of images with very tiny ink particles.
28. Hydra printers are multifunctional devices that perform the functions of two or more
of the following office equipment - printer, fax machine, copy machine and scanner.
29. Plotters are an ideal output device for architects, engineers, city planners, and others
who need to routinely generate high-precision, hard-copy graphic output of widely
varying sizes. The two commonly used types of plotters are drum plotter and flatbed
plotter.
30. Computer Output Microfilm (COM) is an output device that allows computer output
to be recorded on a sheet or roll of microfilm as microscopic filmed images. It uses a
microfilm recorder for recording output information on a microfiche, and a microfilm
reader to view the information recorded on a microfiche.
31. Screen image projector is an output device that is used to project information from a
computer on to a large screen (such as a cloth screen or a wall) so that it can be
simultaneously viewed by a large group of people.
32. Voice response systems enable computers to talk to their users. They are of two types
- voice reproduction system and speech synthesizer. A voice reproduction system
produces audio output by selecting an appropriate audio output from a set of pre-recorded
audio responses. On the other hand, a speech synthesizer converts text information into
spoken sentences.
33. A device controller is an interface unit between an I/O device and the system bus. On
one side, it knows how to communicate with the I/O device connected to it, and on the
other side, it knows how to communicate with the computer's CPU and memory through
the system bus.
34. I/O devices are connected to I/O ports of a device controller, which in turn is
connected to the computer's system bus. The I/O ports are used to plug-in I/O devices to
a computer system. They are of two types -serial ports and parallel ports.
35. A serial port may be used to connect any device that can send or receive a stream of
bytes serially, one bit at a time. It is used for connecting slow I/O devices such as
terminal, keyboard, mouse, modem, etc.
36. A. parallel port can handle a higher volume of data than a serial port because it
transfers 8 or 16 bits of data at a time. It is used for connecting faster I/O devices such
as printer, analog-to-digital and digital-to-analog converters, etc.
37. SCSI interface uses a generic device controller (called SCSI controller) and allows
any device with an SCSI interface to be directly connected to the SCSI bus of the SCSI
controller. This helps save expansion slots in a computer for connecting other devices.
38. Depending on their local processing capability, terminals are classified as dumb,
smart and intelligent. A dumb terminal simply has alphanumeric display capability. A
smart terminal has local data editing capability and the ability to consolidate input data
prior to sending them to the main computer. It has a microprocessor and some internal
storage in addition to I/O capabilities. An intelligent terminal is a small computer by
itself that has extensive local data processing power. It consists of a built-in
microcomputer that can be programmed by users.
39. An X terminal is a graphics terminal that has a rich set of commands to display
characters, move the cursor position, draw graphics and images, and manage multiple
windows on the screen.
40. A terminal emulator is a program that runs on a PC or workstation and pretends that
it is a terminal when the PC or workstation is connected to a network and communicates
with other computers on the network.
41. Privacy filters are used with monitors to prevent others sitting/standing nearby the
monitor from viewing the contents displayed on it.
42. Ergonomically designed I/O devices aim at achieving maximum efficiency of the
users working with them by designing them in such a way that they can be used with
maximum comfort and protect the users from accidents or medical problems caused due
to continuous usage of a device for long hours.

Questions
1. Why are I/O devices necessary for a computer system?
2. What are peripheral devices? Why are they so called?
3. Differentiate between an input device and an output device. Can a device be used as
both an input device and an output device? If no, explain why. If yes, give an example of
such a device.
4. Why are I/O devices very slow as compared to the speed of primary storage and
CPU?
5. What is an input device? Name some of the commonly used input devices.
6. What are keyboard devices? Differentiate between general-purpose and special-
purpose keyboards.
7. Describe the organization of the keys on a QWERTY keyboard.
8. Explain the use of the following types of keys found on a keyboard:
(a) Arrow keys (c) Alphanumeric keys
(b) Soft keys (d) Special function keys
9. What are soft keys on a keyboard? Why are they so called? How are they used?
10. Name some of the special function keys along with their use.
11. Give examples of two special-purpose keyboards.
12. Write short notes on:
(a) Keyboard templates
(b) Software simulated keys
(c) Keyboard buffer
(d) Foreign language keyboards
(e) Numeric keypad on a keyboard
(f) Autorepeat feature of keyboards
13. What is a keyboard buffer? How does it help in the operation of a keyboard?
14. What are software simulated keys? How do they help in faster data entry?
15. What are point-and-draw devices? Name some of the commonly used point-and-
draw devices.
16. What is a mouse? Explain how is it used to notify the system of a particular choice
out of a given set of choices on the monitor's screen.
17. What is a graphics cursor? What is its relationship with a mouse?
18. List out and describe the basic techniques used to carry out the various types of
operations possible with a mouse.
19. Differentiate between a mechanical and an optical mouse.
20. Differentiate between a serial and a bus mouse.
21. Differentiate between a wired and a cordless mouse.
22. What is the minimum number of buttons required in a mouse? How does it help
having more number of buttons than the minimum requirement?
23. What is a trackball? How is it different from a mouse?
24. Explain how a trackball is used to notify the system of a particular choice out of a
given set of choices or the monitor's screen.
25. What is a joystick? How is it different from a trackball? Give some typical uses of
a joystick.
26. Explain how an electronic pen is used as an input device.
27. Describe the working mechanism of a light pen input device.
28. Describe some of the typical applications for which writing pen with pad is suitable
as an input device.
29. What is a Personal Digital Assistant? What type of input device is most suitable for
it?
30. What is a touch screen device? Explain the technology used in making touch
screen devices.
31. Give some typical applications for which touch screen is most suitable as an input
device.
32. What is an information kiosk? Give some typical uses of an information kiosk.
33. Write short notes on:
(a) Mouse
(b) Trackball
(c) Joystick
(d) Electronic Pen
(e) Touch screen
(f) Information kiosk
(g) Personal digital assistants
34. What are data scanning devices? How do they help in improving input data
accuracy as compared t< keyboard devices?
35. What is an image scanner? Explain how it inputs a given image document.
36. What is meant by bit map representation of an image? Give the bit map representation
of the letter 'A'. Use any suitable grid size for your representation.
37. What is the minimum number of bits required to encode each grid point (pixel) in the
bit map representation of an image? How does it help having more number of bits than
the minimum requirement?
38. Differentiate between a flat-bed and a hand-held image scanner?
39. What are the limitations of an image scanner when it is used for inputting text
documents? How does an OCR device overcomes these limitations?
40. Explain how an OCR device converts the bit map images of characters to equivalent
ASCII codes.
41. Explain why an OCR device cannot be successfully used for handwriting
recognition.
42. What is an OCR device? List out some of its advantages and limitations for inputting
text documents.
43. What is an OMR device? What types of applications is it suitable for? Explain the
technique used by it for recognition of marks.
44. Differentiate between an OMR and an OCR device.
45. What are bar codes? How does a bar-code reader read bar-coded data? Give a typical
use of a bar-code reader.
46. What is the Universal Product Code (UPC)? Which input device is used for inputting
data based on UPC?
47. What is an MICR device? Which industry is the primary user of MICR?
48. Explain how an MICR device helps in faster processing of bank cheques with
greater accuracy.
49. What is the main limitation of MICR technology?
50. List out the similarities and differences between an OCR device and an MICR
device.
51. What is a digitizer? What are its two main components? What are its main areas of
application?
52. Explain how a digitizer can be used to convert a drawing into digital form for
storage in computers.
53. What is an electronic card? Give two applications where electronic cards can be
effectively used.
54. What is an automatic teller machine (ATM)? Explain how a customer can transact
with a bank using an ATM.
55. Explain how electronic cards can be used for controlling access of various
categories of people to physically secured areas.
56. What is a smart card? How is it different from a magnetic strip card?
57. Explain how smart cards can be used as electronic money.
58. What is a voice recognition device? Why do currently available voice recognition
devices have limited success?
59. Explain how a voice recognition device recognizes and acts upon a spoken input
data.
60. Differentiate between speaker-dependent and speaker-independent voice
recognition systems. Which one is more difficult to design and why?
61. Give some typical applications of voice recognition systems.
62. What is a vision-input system? Give some typical applications of vision-input
systems.
63. Explain how a vision-input device recognizes a given object and takes appropriate
action.
64. Differentiate between on-line and off-line data entry devices.
65. What is an off-line data entry device? Why is it used? Name three off-line data
entry devices.
66. Explain how data entry operation is carried out using a key-to-tape device.
67. Explain how a key-to-tape or a key-to-floppy device is used to verify the
correctness of already entered data.
(g) Optical Mark Reader (OMR)
(h) Optical Character Recognition (OCR)
(i) Automatic Teller Machine (ATM)
(j) Voice recognition devices
(k) Off-line data entry devices
(1) Magnetic-Ink Character Recognition (MICR)
(h) Key-to-tape data entry device
(i) Key-to-floppy data entry device
(j) Key-to-disk data entry device
(k) Universal Product Code (UPC)
(1) Speaker-dependent voice recognition device
(m) Speaker-independent voice recognition device
68. Write short notes on:
(a) Image scanner
(b) Bar-code reader
(c) Digitizer
(d) Electronic-card reader
(e) Smart Cards
(f) Vision-input systems
69. Write short notes on:
(a) Bit map representation of images
(b) Flat-bed scanner
(c) Hand-held scanner
(d) OCR software
(e) OCR fonts
(f) Bar codes
(g) Magnetic strip cards
70. Write short notes on:
(a) Keyboard devices
(b) Point-and-draw devices
(c) Data scanning devices
71. How are graphs arid pictures fed to a computer?
72. What is an output device? Name some of the commonly used output devices.
73. Differentiate between soft-copy and hard-copy outputs.
74. Name two output devices used for producing soft-copy output and two output
devices used for producing hard-copy output.
75. What is a computer terminal? Why is it so called?
76. What is a monitor device? Name the two basic types of monitors used today along
with their relative advantages and disadvantages.
77. Explain how a CRT monitor displays an output.
78. Why do CRT screens need to be refreshed?
79. Why is the electron beam turned off during horizontal and vertical traces?
80. Why do characters and images displayed by a monitor have to be represented as a
pattern of dots?
81. Explain the meaning of the following terms with respect to a CRT monitor:
(a) Scan line (e) Interlaced scan
(b) Horizontal trace (f) Resolution
(c) Vertical trace (g) Refresh rate
(d) Progressive scan
82. Differentiate between progressive scan and interlaced scan monitors. Which type of
monitor has better quality and why?
83. Differentiate between an alphanumeric display terminal and a graphic display
terminal.
84. Explain how a color monitor displays color images.
85. Differentiate among CGA, EGA, VGA and super VGA standards for color monitors;
86. List the following in order of increasing resolution: VGA, CGA, EGA and Super
VGA.
87. What is a video RAM? What factors normally decide its capacity?
88. A monitor has a resolution of 800x600. It supports 256 different colors. Calculate the
video RAM capacity (in bytes) required by this monitor.
89. What is a flat panel monitor? Where is it commonly used?
90. Explain how LCD monitors display images.
91. List out the relative advantages and limitations of a CRT monitor and a flat-panel
monitor.
92. Write short notes on:
(a) CRT monitor
(b) Video card
(c) Video RAM
(d) Color monitors
(e) Flat-panel monitor
(f) Attributes of CRT monitors
93. What is a printer? What are the commonly used types of printers?
94. Differentiate between impact and non-impact printers. Give their relative advantages
and disadvantages. Name few printers of both types.
95. What are the units used for measuring printer speed. Also specify which unit is used
for what type of printer.
96. What is the unit for measuring printer output quality? According to this feature,
what are the common classifications of printers?
97. Can a printer simultaneously support multiple scripts? If no, why? If yes, name few
types of printers with this capability.
98. Explain the printing mechanism of dot-matrix printers.
99. List out the key features and limitations of dot-matrix printers.
100. Explain the printing mechanism of inkjet printers.
101. List out the key features and limitations of inkjet printers.
102. List out the relative advantages and limitations of an inkjet printer and a dot-matrix
printer.
103. Explain the printing mechanism of drum printers.
104. List out the key features and limitations of drum printers.
105. Explain the printing mechanism of chain/band printers.
106. List out the key features and limitations of chain/band printers.
107. Differentiate between a drum printer and a chain/band printer. List out their relative
advantages and limitations.
108. Explain the printing mechanism of laser printers.
109. List out the key features and limitations of laser printers.
110. What is a hydra printer? How is it more useful than a normal printer?
111. Name four types of printers that are used today. Describe the print mechanism of
any one of them.
112. Write short notes on:
(a) Impact and non-impact printers
(b) Printers speed
(c) Printers output quality
(d) Color printers
(e) Dot-matrix printers
(f) InkJet printers
(g) Drum printers
(h) Chain/band printers (i) Laser printers (j) Hydra printers
113. What is a plotter? What type of users need it?
114. Explain the working mechanism of a drum plotter.
115. Explain the working mechanism of a flat-bed plotter.
116. What is a COM device? Explain how information is recorded and retrieved using a
COM device.
117. List out the advantages and limitations of a COM system as compared to a printer.
118. For what type of applications is a COM system most suitable? List out some of its
typical users.
119. What is a screen image projector? What is it typically used for?
120. What is a voice response system? Give some of its typical applications.
121. What is a voice reproduction system? How does it function? Give some of its
typical applications.
122. What is a speech synthesizer? How does it function? Give some of its typical
applications.
123. What is a device controller? Explain with a diagram how is it used to connect I/O
devices to a computer.
124. Why are I/O devices connected to a computer system through device controllers
instead of connecting them directly to the system bus?
125. Differentiate between device controllers with DMA capability and without DMA
capability. Which of the two can transfer data faster from an I/O device to the computer's
memory and why?
126. What is an I/O port? Differentiate between serial and parallel ports.
127. What is a serial port? Why is-nt so called? Explain how data is transferred from
an I/O device to the computer's system bus when the device is connected to a serial port
of the system.
128. What is a parallel port? Why is it so called? Explain how data is transferred from
an I/O device to the computer's system bus when the device is connected to a parallel port
of the system.
129. What is a SCSI interface? Explain how it helps in expanding the capability of a
computer system in having more I/O devices connected to it.
130. Define the following terms:
(a) SCSI controller
(b) SCSI bus
(c) SCSI device
131. What is an expansion slot? Explain how a SCSI interface can help in saving
expansion slots in a computer system for connecting other devices.
132. What are the advantages of a SCSI controller over a conventional device controller?
133. Differentiate among dumb, smart and intelligent terminals.
134. What is an X terminal?
135. What is a terminal emulator? In what type of scenario is it required?
136. What is a privacy filter? How does it work?
137. What are ergonomically designed devices? Give a few examples of such devices.
138. List out five features of keyboards and monitors that make computer terminals easier
to use.
139. Write short notes on:
(a) Plotter
(b) COM
(c) Screen image projector
140. Write short notes on:
(a) Device controller
(b) I/O ports
(c) SCSI interface
(d) X terminal
(d) Voice response systems
(e) Voice reproduction system
(f) Speech synthesizer
(e) Privacy filter
(f) Ergonomically designed devices
(g) Dumb, smart and intelligent terminals
141. Write the full forms of the following abbreviations:
(a) GUI
(b) CAD
(c) OCR
(d) OMR
(e) UPC
(0) MICR
(g) VDT
(h) CRT
(i) COM
(j) CGA
(k) EGA
(1) VGA
(m) LCD
(n) DMA
(o) SCSI
(P) DPI
(q) CPS
(r) LPM
(s) NLQ
(t) NTQ
Chapter 10

Computer Software

The terms hardware and software are frequently mentioned in connection with
computers. Hardware is the term given to the machinery itself and to the various
individual pieces of equipment. It refers to the physical devices of a computer system.
Thus, the input, storage, processing, control, and output devices are hardware. In fact,
what we have described so far in the previous chapters is actually the hardware of
computer systems. The term "software" will be introduced in this chapter and will be
discussed at length in the next few chapters.

WHAT IS SOFTWARE?

A computer cannot do anything on its own. It must be instructed to do a desired job.


Hence it is necessary to specify a sequence of instructions that a computer must perform
to solve a problem. Such a sequence of instructions written in a language that can be
understood by a computer is called a computer program. It is the program that controls
the activity of processing by the computer and the computer performs precisely what the
program wants it to do. When a computer is using a particular program, we say it is
running or executing that program.

The term software refers to the set of computer programs, procedures, and associated
documents (flowcharts, manuals, etc.) that describe the programs and how they are to be
used. To be precise, software means a collection of programs whose objective is to
enhance the capabilities of the hardware.

A software package is a group of programs that solve a specific problem or perform a


specific type of job. For example, a word-processing package may contain programs for
text editing, text formatting, drawing graphics, spelling checking, etc. Thus a
multipurpose computer system has several software packages, one each for every type of
job it can perform.

RELATIONSHIP BETWEEN HARDWARE AND SOFTWARE

In order for a computer to produce useful output, the hardware and software must work
together. Nothing useful can be done with the computer hardware on its own and
software cannot be utilized without supporting hardware.

To take an analogy, a cassette player and the cassettes purchased from market are
hardware. However, the songs recorded en the cassettes are its software. To listen to a
particular song, first of all that song has to be recorded on one of the cassettes which
should then be mounted on the cassette player and played. Similarly, to get a particular
job done by a computer, the relevant software should be loaded in the hardware before
processing starts.
The following important points regarding the relationship between hardware and software
are brought out by this analogy:
1. Both hardware and software are necessary for a computer to do useful job. Both are
complementary to each other.
2. The same hardware can be loaded with different software to make a computer system
perform different types of jobs just as different songs can be played using the same
cassette player.
3. Except for upgrades (like increasing the main memory and hard disk capacities, or
adding speakers, modems, etc.), hardware is normally a one-time expense whereas
software is a continuing expense. Just as we buy new cassettes for the newly released
songs or for songs whose cassettes we do not have, similarly one buys new software to be
run on the same hardware as and when need arises or funds become available.

TYPES OF SOFTWARE
A wide variety of computer software is available today. Although the range of software
available is vast and varied, most software can be divided into two major categories:
1. System software, and
2. Application software
These two types of software along with a few examples of each type are described below.
System Software
System software is a set of one or more programs designed to control the operation and
extend the processing capability of a computer system. In general, a computer's system
software performs one or more of the following functions:
1. Supports the development of other application software.
2. Supports the execution of other application software.
3. Monitors the effective use of various hardware resources such as CPU, memory,
peripherals, etc.
4. Communicates with and controls the operation of peripheral devices such as printer,
disk, tape, etc.
Thus system software makes the operation of a computer system more effective and
efficient. It he.lps the hardware components work together and provides support for the
development and execution of application software (programs). The programs included in
a system software package are called system programs and the programmers who prepare
system software are referred to as system programmers.
System software offers several advantages and conveniences to application programmers
and computer users in general. Good system software allows application packages to be
run on the computer with less time and effort. Without system software, application
packages could not be run on the computer system. Thus system software is an
indispensable part of a total computer system. A computer without some kind of system
software would be very ineffective and most likely impossible to operate.
The production of system software is a complex task that requires extensive knowledge
and considerable specialized training in computer science. System programmers are
highly trained computer professionals. Because of its technical complexity, system
software are normally developed and distributed by the computer manufacturers. The
customer who buys or leases a computer system would usually receive, in addition to the
hardware, some software needed for the effective operation of his/her computer.
Some of the most commonly known types of system software are operating systems,
programming language translators, utility programs, performance monitoring software
and communications software. They are briefly described below.

Operating Systems
Every computer has an operating system software that takes care of the effective and
efficient utilization of all the hardware and software components of the computer system.
Operating system has been discussed in greater detail in Chapter 14.

Programming Language Translators


Programming language translators are system software that transform the instructions
prepared by programmers using convenient programming languages into a form that can
be interpreted and executed by a computer system. Programming language translators
have been discussed in greater detail in Chapter 12.

Utility Programs
Utility programs (also known as utilities) are a set of programs that help users in system
maintenance tasks and in performing tasks of routine nature. Some of the tasks
commonly performed by utility programs include the following:
1. Formatting hard disks or floppy disks.
2. Reorganizing files on a hard disk to conserve storage space.
3. Taking backup of files stored on hard disk on to a tape or floppy disk.
4. Searching a particular file from a directory of hundreds of files.
5. Checking the amount of available memory.
6. Checking the amount of available storage space on hard disk.
7. Reducing the file size for more efficient transmission over a data communication
link.
8. Sorting of the records stored in a file in a particular order based on some key field(s).
9. Scanning the system for computer viruses.

Performance Monitoring Software


Performance monitoring software (also known as profiler) helps the user in analyzing the
performance of the various hardware components as well as the overall performance of a
computer system. It provides such information as the percentage of CPU utilization,
percentage of memory utilization, and number of disk accesses during any given period
of time. Such information can be effectively used by the users in optimizing their
programs so that they use the various system resources more optimally and execute
faster. It also helps users plan for upgrading the hardware resources of their computer
systems such as increasing the CPU power or the memory or hard disk capacity.
Communications Software
In a network environment (where multiple computers are integrated together by
communications network), communications software enables transfer of data and
programs from one computer system to another. Typical functions performed by
communications software include:
1. Ensuring that connectivity is properly established between the source and destination
computer systems that want to exchange information.
2. Encoding the data to be transferred at the source computer in the right format.
3. Transferring the data from the source computer to the destination computer.
4. Decoding the received data at the destination computer.
Communications software has been described in greater detail in Chapters 17 and 18.

Application Software
Application software is a set of one or more programs designed to solve a specific
problem or do a specific task. For example, an application software for payroll processing
produces pay slips as the major output and an application software for processing
examination results produces mark sheets as the major output along with some other
statistical reports. Similarly, a program written by a scientist to solve his/her particular
research problem is also an application software. The programs included in an application
software package are called application programs and the programmers who prepare
application software are referred to as application programmers.
There are literally millions of application software available for a wide range of
applications ranging from simple applications such as word processing, inventory
management, preparation «f tax returns, banking, hospital administration, insurance,
publishing, to complex scientific and engineering applications such as weather
forecasting, space shuttle launching, oil and natural gas exploration, design of complex
structures like aircrafts, ships, bridges, sky-rise buildings, etc. With so many applications
available, it is not possible to categorize them all and to cover them here. Hence just to
have a feel of what application software does, some of the most commonly known
application software are briefly described below.

Word-Processing Software
Word-Processing is a term that describes the use of computers to create, edit, view,
format, store, retrieve and print documents (written material such as letters, reports,
books, etc.). A word-processing software is an application software that enables the user
to do all these on a computer system. The need to create documents is so common in
every walk of life, whether it is at work, at school, or at home, that word-processing
software is the most commonly used application software. Word-processing software has
been discussed in greater detail in Chapter 15.

Spreadsheet Software
A spreadsheet software is a numeric data analysis tool that allows you to create a kind of
computerized ledger. A manual ledger is a book having rows and columns that
accountants use for keeping a record of financial transactions and for preparing financial
statements. Accountants use the manual ledger with pencil, erasure and hand calculator to
prepare financial statements. This is a tedious task and often takes a long time due to
several iterations of formula calculations to come out with an acceptable and satisfactory
financial statement. A spreadsheet software offers considerable ease of performing such
tasks by automating all arithmetic calculations and making it much easier to change
certain numeric values and immediately seeing the effect of these changes across the
worksheet (ledger). With spreadsheet software in place, we are no longer confined to
using pencils, erasers, and hand calculators for dealing with any task that requires
numeric data analysis of the nature mentioned above. Spreadsheet software has been
discussed in greater detail in Chapter 15.
Database Software
This application software is designed to take advantage of the tremendous capability of
computer systems in storing, organizing and selectively retrieving large volumes of data
efficiently. A database is a collection of related data stored and treated as a unit for
information retrieval purposes.
It is important here to note the difference between data and information. Data is stored in
a database whereas information is retrieved from a database. That is, data is input to any
data processing system and information is its output. In other words, data is the raw
material for a data processing system and information is the processed data.
A database concept can be best illustrated with an example. For example, a school's
student database might contain the name, sex, date of birth, current address, permanent
address, parent's occupation, marks scored in various subjects in each class already
passed, and current occupation for all the students who are either currently enrolled or
have already graduated from the school. Similarly, an individual's address database might
contain the names, addresses, and telephone numbers of all his/her friends and business
contacts. The data of one student in the student database or one person in the address
database is known as a record.
A database software is a set of one or more programs that enables users to create a
database, maintain it (add, delete and update its records), organize its data in desired
fashion (for example, sort its records alphabetically name-wise), and to selectively
retrieve useful information from it (for example, get the telephone number of the person
named Kashyap Rana from the address database, or get the names of all currently
enrolled students from the student database whose birthdays fall today).
Database software is widely used today by both large and small organizations to maintain
employee data, customer data, assets data, accounting data, etc. Even individuals find the
database software very useful for maintaining data such as list of addresses and telephone
numbers of their friends and relatives, list of household goods and other valuables, list of
various types of savings in different banks, etc. Database software has been discussed in
greater detail in Chapter 16.

Graphics Software
A graphics software enables us to use a computer system for creating, editing, viewing,
storing, retrieving and printing designs, drawings, pictures, graphs and anything else that
can be drawn in the traditional manner.

Personal Assistance Software


A personal assistance software allows us to use personal computers for storing and
retrieving our personal information, and planning and managing our schedules, contacts,
financial and inventory of important items.

Education Software
Education software allow computer systems to be used as a teaching and learning tool. A
few examples of such applications are:
1. Applications that teach young children to do mathematics, how to recognize the
alphabet, or how to read whole words and sentences. The use of a computer allows the
learning process to be made interesting by incorporating audio-visual effects in the
application. For example, use of encouraging spoken words (like excellent, marvelous,
etc.) when the correct answer is given, and display of marks obtained leads to interesting
learning process.
2. Applications that allow students to prepare for tests and entrance examinations.
These applications simulate a test or an examination by asking similar questions to the
student and guide the student when he/she answers wrongly to a question. The beauty of
these applications is that they are designed to prepare each student at his/her own
knowledge level and pace of learning. That is, the questions become tougher at the pace
with which a student provides correct answers. So the questions will soon get tougher
for a brilliant student and will slowly get tougher for an average or below average
student. Another interesting and useful feature of these applications is that they can
immediately analyze the type of questions in which a student is having difficulty and can
put forth more questions of that type to the student so that he/she gets more practice in
his/her weak areas.
3. Applications that allow an individual to take on-line examinations in which an
examinee has to use a computer during the examination. The computer presents
questions one at a time on its screen and the examinee has to click the right answer from
multiple choices presented to him/her. In some online examinations each question has a
difficulty level attached to it. It means that the examination automatically adapts itself
according to how the student answers the previous question. If he/she answers a
question correctly, he/she gets a more difficult question and vice-versa. Due to the
availability of such applications, today more and more examinations are being conducted
on-line. A few examples are GRE (Graduate Record Examination which is an aptitude
test conducted by the United States of America for those who want to seek admission in
American Universities), tests for obtaining certificates as a qualified professional in a
certain area (like the tests for becoming Microsoft Certified Professionals in various areas
of skill), etc. The beauty of these applications is that the result of the examination
(pass/fail and percentage of marks obtained) is declared to the examinee immediately
after the examination is over (before the examinee leaves the computer that he/she was
using for the examination). This is because the computer dynamically keeps updating the
score as the examinee progresses through the examination questions.
4. Applications that allow individuals to learn foreign languages. Use of such
applications has been found to be very useful as compared to the use of books because
these applications incorporate both text and sound to allow the learner to see words and
phrases on the screen as they are pronounced by the computer. The learner als9 has the
flexibility to request the computer to pronounce any word displayed on the screen by
simply selecting that word (say by clicking over it). Often these applications also have
additional features such as if the learner does not understand the meaning of a word or
phrase, he/she may point to it to quickly display a translation for it in his/her native
language.
5. Applications that allow hard-copy books and other reading material to be made
available in soft-copy form on computers. In these applications, the power of computer is
effectively utilized for quickly searching for specific facts of interest to a particular
reader. Due to this feature, several reference books such as encyclopedias and
dictionaries are now being published and made available on CD-ROMs. Many journals,
magazines and product manuals are also being published in electronic form so that users
can access and print only those articles/portions in which they are interested. A further
extension of this idea is digital library, which is a repository of large information in
digital form allowing multiple users to search and access information of their interest
from it.

Entertainment Software
Entertainment software allow computer systems to be used as an entertainment tool. A
few examples of such applications are:
1. Video Games. Today thousands of video game applications are available on
computer systems. Special audio and visual effects are used in these applications to make
the games thrilling and exciting for the users.
2. Interactive Television. These applications allow users to either use their computer
systems as an interactive television or to convert their conventional televisions into an
interactive television. An interactive TV allows users to select TV programs of their
interest from a massive video archive, view at the time they wish, and interact with the
programs via VCR-like functions, such as fast-forward and rewind. In essence, it
implements a virtual video-rental shop from which customers can borrow and view the
videos of their choice at their own convenient time. The rental shop being virtual
provides 24 hours service.
3. Game Partner. These applications allow computers to become a game partner of an
individual for playing conventional games that require two players. A good example of
such an application is the use of computers for playing chess.

LOGICAL SYSTEM ARCHITECTURE


The logical architecture of a computer system is shown in Figure 10.1. The architecture
basically depicts the relationship among the hardware, system software, application
software and users of a computer system. As shown in the figure, at the center of any
computer system is the hardware, which comprises of the physica devices/components of
the computer system. Surrounding the hardware is the system software layer that
constitutes the operating and programming environment of the computer system. That is,
the software at this layer is designed to hide the hardware details of the system from
application programmers and to coordinate the operations of the various hardware
devices for optimizing the performance of all the devices. Surrounding the system
software is the application software layer that consists of a wide range of software that
are designed to do; specific task or solve a specific problem. The final layer is the layer of
users who normally interact with the system via the user interface provided by the
application software. Different application software usually provides different user
interfaces. Hence how a particular user interacts with the computer system depends on
whicl application he/she is using. . -
HARDWARE
(Physical devices/components of the
computer system)

SYSTEM SOFTWARE
(Software that constitute the operating and
programming environment of the computer system)
APPLICATION SOFTWARE
(Software that do a specific task or solve a specific problem)
USERS
(Normally interact with the system via the user interface provided by the application
software)
Figure 10.1. Relationship among the hardware, system software, application software,
and users of a computer system.

ACQUIRING SOFTWARE
Computer software has evolved from an item of minor economic concern with first
generation digital computer to one of major concern in today's computing systems. In the
early days of computers, more than 80% of the tots computer cost was devoted to
hardware, but today more than 80% of the cost is for software. At one time application
and system software were included in the purchase price of the computer. Today,
however, software is usually not included in the purchase price of the computer. For most
computer manufacturers the purchase price of a computer includes only the hardware
along with a minimum of system software. The customs normally has to pay extra
charges for additional system software and application software that he/she may wish 1
purchase.
A desired software may be obtained today in one or more of the ways discussed below.
The relative advantage and limitations of each way of obtaining software are also
discussed below. A user must make a careful analysis of his/her requirements and the
relative advantages and limitations mentioned below before deciding on a particular
option for obtaining desired software.

Buying Pre-written Software


Thousands of pre-written software packages are available today. If you can find a
software package that meets your requirements, purchasing it is probably the best option.
The following steps are typically followed in selecting and buying a pre-written software
package by a user:
1. The user must first prepare a list of all available software packages that are meant for
performing the task(s) for which the user is looking for a software. Some of the
commonly used sources of information for preparing the lisj are advertisements and
reviews of software products published in computer magazines, and demonstrations in
retain stores that sell software packages.
2. The second step is to select only those software packages from the list prepared
above that will meet the requirements of the user. For example, not all software packages
run on all computers. So the user must select only those software packages that are
compatible with the available/planned hardware. Other factors that are commonly used
to further narrow down the selection list are the input data format accepted, the format
and contents of the output produced, the range of I/O devices supported, the file formats
supported for storage, the average response time, and the quality of the documents
supported by the software package. This step will normally reduce the list of selected
software packages to only a few candidates.
3. The third step is to choose the best one from the list of selected candidates. The
factors commonly used for this purpose are actual demonstration of the usage of the
package on user's system with his/her data, the duration and level of warranty support
provided by the software vendor, and the cost of the package as compared to other
selected candidates.
4. The final step is to find out the source from where the finally chosen software can be
purchased at the cheapest price. Possible sources for buying a software package are
directly from the producer, from a retail store, or from a mail-order distributor. Different
vendors normally offer different discount rates on the list price and selecting the best
vendor in terms of price and after-sale support is very important.
The following are the advantages and limitations of buying a pre-written software
package:
1. A pre-written software package usually costs less because its development and
maintenance costs are shared by many customers.
2. With a pre-written software package, a user can start the planned activity almost
immediately. The user need not wait for the software to be developed and tested before
the planned activity can be started. This may be very important if the development and
testing efforts involve several months.
3. Pre-written software packages are usually designed to be general purpose so that they
can meet the requirements of as many potential users as possible. Due to this feature,
many times the operating efficiency and the capability to meet the specific needs of a
user more effectively is not as good for pre-written software packages as for in-house
developed software packages.

Ordering Customized Software


Often there are situations where none of the available pre-written software packages can
meet the specific requirements of a user (an organization or an individual) either partially
or fully. In such a situation, it becomes necessary to create a customized software
package to satisfy the specific requirements. If the user has an in-house software
development team, the software package can be created in-house. However, if such a
team does not exist in-house, the user must get it created by another organization by
placing an order for it. The following steps are typically followed for this:
1. The user has to first of all list out all its requirements very carefully.
2. The user then floats a tender for inviting quotations for the creation of the requisite
software. Sometimes the user may directly contact few software houses instead of
floating a tender for quotations.
3. After the quotations are received, the user shortlists a few of them for further
interaction based on the cost quoted by them, their reputation in the market, their
submitted proposal, etc.
4. The user then personally interacts with the representative(s) of each of the shortlisted
vendors. Based on this interaction, the user makes a final choice of the vendor whom it
wants to offer the contract of creation of the requisite software.
5. The selected vendor then creates the software package and delivers it to the user.
Often the vendor has to very closely interact with the user during the software
development process.
Note that the vendor need not develop everything from scratch to meet the user's
requirements. If one or more pre-written software packages partially meet the user's
requirements, the vendor may as well use them along with its own developed software in
such a manner that the overall software package so created meets the user's requirements
fully. This will greatly help in reducing the overall development cost and time needed for
the creation of the software package.
Often the user has to order for both the hardware and the software. In this case, the user
may choose to place the order for both to a single vendor. The vendor develops the
software on the chosen hardware and delivers the software along with the hardware to the
user. This is normally referred to as an end-to-end solution or a turnkey solution.
The following are the advantages and limitations of ordering a customized software
package rather than developing it in-house:
1. In case of ordering, the user need not maintain its own software development team.
Maintaining and managing such a team is an expensive affair and may not be justified for
an organization that does not need to develop software on a regular basis.
2. It is easier to carry out changes in the software if it is developed by an in-house team.
For ordered customized software, the user needs to always depend on the vendor for
carrying out the changes and the vendor may separately charge for every request for
change.

Developing Customized Software


If none of the available pre-written software packages can meet the specific requirements
of an organization and if the organization has an in-house software development team,
the organization may very well choose to get; customized software package developed in-
house to satisfy the specific requirements. The following steps ar typically followed for
the in-house development of a software package:
1. A project team is first constituted to carry out the development activity.
2. The team studies the requirements carefully and plans the functional modules for the
software.
3. It then analyzes which of the functional modules need to be developed and which of
the functional modules' requirements can be met with an existing pre-written software.
4. For the functional modules that need to be developed, the team next plans their
programs and does the coding, testing, debugging and*documentation for the planned
programs.
5. All the modules are then tested in an integrated manner.
6. The software is then implemented, used and maintained.
The following are the advantages and limitations of developing a customized software
package in-house rather than getting it developed by an outside party:
1. It is easier to carry out changes in the software if it is developed in-house.
2. Developing software in-house means a major commitment of time, money and
resources because an in-house software development team needs to be maintained and
managed.

Downloading Public-domain Software


A public-domain software is a software that is available for free or for a very nominal
charge from the bulletin boards or user-group libraries on the Internet. Creators of these
software obtain distribution for their products by supplying free copies to bulletin boards
and user-group libraries. Their basic idea behind this is to popularize their software to as
many users as possible. Users are encouraged to copy these software and try them out.
The software can be freely shared with other users. Hence public-domain software are
also referred to as shareware or user-supported software.
Often a user may find a public-domain software suitable for his/her requirements. In this
case, he/she can obtain it for free by downloading it from the Internet.
The following are the advantages and limitations of downloading and using public-
domain software packages:
1. They are available for free.
2. They can be downloaded and used immediately. The user need not wait for the
software to be developed and tested before the planned activity can be started.
3. They may not be properly tested before release and their support is normally poor as
compared to a commercial software. Hence they may fail during operation and bug fixing
may not take place soon.

SOFTWARE DEVELOPMENT STEPS


No matter whether a software is a pre-written software, or a customized software
developed by a vendor or in-house, or a public-domain software, it has to be developed
by someone in the first place. Developing a software and putting it to use is a complex
process and involves the following steps:
1. Analyzing the problem at hand and planning the program(s) to solve the problem.
2. Coding the*program(s).
3. Testing, debugging and documenting the program(s).
4. Implementing the program(s).
5. Evaluating and maintaining the program(s).
These steps have been covered in detail in the next few chapters. Chapter 11 deals with
Step 1, Chapter 12 deal: with Step 2, and Chapter 13 deals with Steps 3, 4 and 5.

SOFTWARE ENGINEERING

What is Software Engineering?

Towards the beginning of this chapter we saw that "software" is defined as the set of
computer programs procedures, and associated documents that describe the programs and
how they are to be used. On the other hand, "engineering" is defined as the systematic
application of scientific knowledge in creating and building cost-effective solutions to
practical problems. Hence "software engineering" is that branch of engineering that deal
with the systematic application of the principles of computer science and mathematics in
creating and building cost-effective software solutions.

Need for Software Engineering


We saw that software has evolved from an item of minor economic concern with first
generation digit; computers to one of major concern in today's computing systems. With
the increased use of computers in ever walk of life, the volume of software required has
steadily increased, and the costs of obtaining this software ha\ grown even more rapidly.
With the larger-scale software products, the number of development people involved i a
software project has proportionately increased. It was found that managing the
development of large software products and maintaining them was becoming an
increasingly difficult task. The software projects were frequently faced with the problems
of missed schedules, cost overruns, and low quality software products, which were
difficult to maintain. Moreover, the use of progressively larger software products in
sensitive application where errors in software products could have severe and even life-
threatening consequences required t\ correctness and reliability of software products to be
of very high degree. These quality and productivity demamds for software products led to
the introduction of systematic practices (later on known as software engineering
practices) in the software industry.

Goals of Software Engineering


The goals of software engineering are to produce software products that have the
following properties:
1. Their correctness should be of very high degree. Correctness refers to the degree to
which the software product performs its intended, function properly, consistently, and
predictably.
2. Their usability should be of very high degree. Usability refers to the ease with
which the software product and its associated documentation are usable by the intended
audience.
3. They should be cost-effective. Cost-effectiveness means that the total development
and operational costs of a software product should be as low as possible without
compromising on the quality of the product in any way. Note that overall cost-
effectiveness also requires that a software product is capable of being readily modified
and enhanced.
It has been found that software products that meet these goals do not generally cause
unusual stress during their various phases of development and are easily adaptable to
unanticipated needs.

Principles of Software Engineering


The principles of software engineering are the generally accepted guidelines that should
be followed to produce a software product for meeting the goals of software engineering.
These guidelines are described below.

Precise Requirements Definition


The requirements of a software product must be precisely defined to ensure that the
resulting product meets the users' true needs. Ill-defined and fluid nature of software
requirements generally lead to problems in the later phases of the software life cycle.

Modular Structure
Software systems should be structured in a modular fashion so that they are easy to
program, implement and maintain. A modular design helps in distribution of different
modules to multiple programmers allowing the product to be developed in a shorter time.
It also helps in easier testing, debugging and maintenance of software products because
individual modules can be independently tested, debugged and maintained. Feature
enhancements can be done by adding new modules. Modular design also enables
software reusability because if a module already exists for a desired functionality, it can
be used as it is or with minor customization. Third party library routines are an example
of reusable software modules.

Abstraction
As far as practicable, software systems should use abstraction and information hiding.
For example, in modular design, the implementation details of each module should be
hidden inside the module and only the module interface should be made visible outside to
allow other modules to interact with the module. The concept of object-oriented
programming has been introduced to take care of this aspect of software engineering.
Abstraction helps in easy reusability of existing modules because for reusing a module
only its interface needs to be understood and not its internal details.

Uniformity
Software systems should maintain uniformity in design, coding, documentation, etc.
Uniformity ensure; consistency, which makes the software product easier to develop and
maintain as well as easier to learn and use For example, if all the graphical user interfaces
of a software product follow a uniform style (providing the same look-and-feel
throughout), it becomes much easier for a user to learn and use the software. Similarly, if
uniform coding and documentation styles are followed by all the programmers working
on the various modules of software project, it becomes much easier for someone else to
understand and maintain the modules. Several software engineering standards, such as
design standards, coding standards, documentation standards, etc. have been introduced
to take care of this aspect of software engineering.

CASE Tools
Proper software tools should be used in the various phases of a software product's life
cycle. As in other fields of engineering, software tools play an important role in software
engineering. They help in increasing professional capability and eliminate or reduce
sources of error in software products. Over the years, a large number o software tools
have been made available to aid the software developers. In fact, the popularity of these
tools resulted in the creation of a new area called CASE (Computer Aided Software
Engineering). CASE tools provide a wide range of features for creation of better and
more reliable software products within less time and with less effort. A few of the most
common features are:
1. Design specification tools allow programmers to visually design screens, menus,
database tables reports, dialog boxes, and other key components of a program. With the
individual component defined, the programmer can link the components together and
then test the operation of the program without writing even a single line of program code.
2. Code generation tools generate source code (programs) from the design specification
of a system. That is, once satisfied with the structure, design, and components of the
system, the programmer can invoke a code generator, which creates the source code for
the program automatically. Note that this automatic creation of programs by the system
leads to error-free program codes.
3. Testing and debugging tools help programmers in testing and debugging of their
programs a already described before in this chapter.
4. Source-code analysis tools help in optimizing a program by pointing out unreachable
lines of cod and functions that are never called. They also assist in carrying out program
changes consistently and uniformally by indicating what other parts of the program
would be affected by introducing a change in the program.
5. Documentation tools assist in automatic generation of technical documents for
software systems For example, automatic flowchart generation tools can create
flowcharts for already written programs Similarly, as a programmer uses a design
specification tool to design the screens, menus, reports dialog boxes, and other key
components of a program, the documentation tool collects this information for
automatically producing the system's documentation. With good CASE tools, much of
the tedious detail work of designing and writing a program and writing documents for it
can be drastically reduced. Hence CASE tools can save several hours of time to get a new
program up and running, allowing the programmer to concentrate on the important
functional parts of a program, rather than spending time writing the code to display
screens, dialog boxes, and menus. CASE tools, however, are not the answer for every
situation, and even in systems that make extensive use of CASE tools during their
production, some hand coding and manual documentation is usually necessary.

FIRMWARE
Computer software in conventional systems is supplied on storage media like CDs,
floppies, tapes, disks, etc. However, with the advancement in technology and the
reduction in hardware cost, today software is also being made available by many
computer manufacturers on read-only memory (ROM) chips. These ROM chips can be
easily plugged into the computer system and they form a part of the hardware. Such
programs (software) made available on hardware are known as firmware. Firmware often
refers to a sequence of instructions (software) that is substituted for hardware. For
example, when cost is more important than performance speed, the computer system
architect might decide not to use special electronic circuits (hardware) to multiply two
numbers, but instead write instructions (software) to cause the machine to accomplish the
same function by repeated use of circuits already designed to perform addition. This
software will be stored in a ROM chip of the computer system and will be executed
(used) whenever the computer has to multiply two numbers. Hence, this software will be
known as firmware. To be precise, firmware is software substituted for hardware and
stored in read-only memory.
Initially, only systems software was supplied in the form of firmware. But today, even
application programs are being supplied in firmware form. Dedicated applications are
also programmed in this fashion and available in firmware. Because of the rapid
improvements in memory technology, firmware is frequently a cost-effective alternative
to wired electronic circuits, and its use in computer design has been gradually increasing.
In fact, the increased use of firmware has today made it possible to produce smart
machines of all types. These machines have microprocessor chips with embedded
software.

Points to Remember
1. The term hardware refers to the physical devices of a computer system. Thus, the
input, storage, processing, control, and output devices are hardware.
2. The term software refers to a collection of programs. A program is a sequence of
instructions written in a language that can be understood by a computer. It is the program
that controls the activity of processing by the computer and the computer performs
precisely what the program wants it to do.
3. A software package is a group of programs that solve a specific problem or perform a
specific type of job.
4. The hardware and software of a computer must work together for the computer to
produce useful output. Nothing useful can be done with the computer hardware on its
own and software cannot be utilized without supporting hardware.
5. Most software can be divided into two major categories - system software and
application software. System software is a set of one or more programs designed to
control the operation and extend the processing capability of a computer system.
Application software is a set of one or more programs designed to solve a specific
problem or do a specific task.
6. A few examples of system software are operating systems, programming language
translators, utility programs, performance monitoring software, and communications
software.
7. A few examples of application software are word-processing software, spreadsheet
software, database software, graphics software, personal assistance software, education
software, and entertainment software.
8. Figure 10.1 shows the relationship among the hardware, system software, application
software, and users of a computer system.
9. A user can acquire a desired software in or more of the following ways:
• By buying pre-written software
• By ordering customized software
• By developing customized software
• By downloading public-domain software
Each of these ways of acquiring software has its own advantages and limitations.
10. Developing a software and putting it to use is a complex process and involves the
following steps:
• Analyzing the problem at hand and planning the program(s) to solve the problem.
• Coding the program(s).
• Testing, debugging and documenting the program(s).
• Implementing the program(s).
• Evaluating and maintaining the program(s).
11. Software engineering is that branch of engineering that deals with the systematic
application of the principles of computer science and mathematics in creating and
building cost-effective software solutions.
12. Firmware is software substituted for hardware and stored in read-only memory.
Questions
1. Define the terms hardware and software.
2. What is a computer program?
3. What is meant by running/executing a computer program?
4. What is a software package?
5. Hardware and software of a computer system are like two sides of a coin. Discuss.
6. Give an analogy to bring out the relationship between hardware and software of a
computer system.
7. Hardware is normally a one-time expense whereas software is a continuing
expense. Elaborate.
8. How many types of software are there? Give three examples of each.
9. Define and distinguish between application software and system software.
10. Define the following terms:
(a) System software
(b) System program
(c) System programmer
(d) Application software
(e) Application program
(f) Application programmer
11. List out some of the key functions performed by the system software of a computer
system.
12. Explain the importance of system software for a computer system.
13. What is a utility program? List out some of the tasks commonly performed by utility
programs.
14. What is a profiler? How is it useful for computer users?
15. What is a communications software? What are some of its typical functions?
16. What is a database? Give an example of a database application.
17. What is a database software? List out some of its typical uses.
18. Differentiate between data and information.
19. What is an education software? Give a few examples of such software.
20. What is an entertainment software? Give a few examples of such software.
21. Explain the relationship among the hardware, system software, application software,
and users of a computer system.
22. How does a normal user interact with the hardware of a computer? Describe the
various in-between layers.
23. What are the different ways of acquiring software? List out their relative advantages
and limitations.
24. List out the steps typically followed by a user in selecting and buying a pre-written
software package.
25. List out the steps typically followed by a user in placing an order on another
organization for the creation of a customized software.
26. List out the relative advantages and disadvantages of creating a customized software
in-house by an organization versus getting it created by another organization.
27. What is a turnkey solution?
28. List out the steps typically followed in the in-house development of a software
package.
29. What is a shareware? What are the advantages and limitations of using a shareware?
30. List out the steps typically followed in developing a software and putting it to use.
31. What is software engineering? Why is it needed?
32. List out the main goals of software engineering.
33. List out the main principles of software engineering. Explain how each of these
principles helps in achieving one or more goals of software engineering.
34. What is meant by modular structure of a software system? How does it help?
35. What is meant by abstraction in software systems? How does it help?
36. Why should software systems maintain uniformity in design, coding, documentation,
etc.? How can uniformity be ensured?
37. What are CASE tools? Hew are they useful?
38. List out some commonly used CASE tools? Explain how each one of them is useful.
39. What is a source-code generator? How is it useful?
40. What is a source-code analyzer? How is it useful?
41. CASE tools are not the answer for every situation. Discuss.
42. Write short notes on:
(a) Hardware
(b) Software
(c) Firmware
43. Write short notes on:
(a) Types of software
(b) Acquiring software
(c) Software engineering
(d) Software development steps
(e) Relationship between hardware and software
44. Write short notes on:
(a) System software
(b) Application software
(c) Principles of software engineering
(d) Relationship among the hardware, system software, application software, and users
of a computer
45. Write short notes on:
(a) Utility programs
(b) End-to-end solution
(c) Shareware
(d) CASE tools
(e) Education software
(f) Entertainment software
(g) Communications software
(h) Performance monitoring software
46. What is firmware and what is its importance to the computer system architect?
47. Why is firmware gaining popularity?
48. Differentiate among hardware, software, and firmware.
Chapter 11

Planning the Computer Program

In Chapter 10, computer software has been described as a set of computer programs. We
also saw in Chapter 10 that before writing a program for a software, one must first plan
the program. That is, to produce a correct and effective computer program, one must first
plan the logic (the various steps) of the program. If one attempts to plan the logic and
write the program at the same time, he/she will likely become so involved with the
required instruction formats that program logic will suffer. Hence, before we learn how to
write a program (next chapter), we will first learn how to plan the logic of a computer
program in this chapter.

PURPOSE OF PROGRAM PLANNING

Suppose you are asked by your teacher to solve an arithmetic problem and you are not
familiar with the steps involved in solving that problem. In such a situation, you will not
be able to solve the problem. The same principle applies to writing computer programs
also. A programmer cannot write the instructions to be followed by a computer unless the
programmer knows how to solve the problem manually.
Suppose you know the steps to be followed for solving the given problem but while
solving the problem, you forget to apply some of the steps or you apply the calculation
steps in the wrong sequence. Obviously, you will get a wrong answer. Similarly, while
writing a computer program, if the programmer leaves out some of the instructions for
the computer or writes the instructions in the wrong sequence, then the computer will
calculate a wrong answer. Thus, to produce an effective computer program, it is
necessary that the programmer write each and every instruction in the proper sequence.
However, the instruction sequence (logic) of a computer program can be very complex.
Hence, in order to ensure that the program instructions are appropriate for the problem
and are in the correct sequence, programs must be planned before they are written.

ALGORITHM

What is an Algorithm?

We saw above that planning a program basically involves defining its logic (the correct
sequence of instructions needed to solve the problem at hand). The term algorithm is
often used to refer to the logic of a program. It is a step-by-step description of how to
arrive at the solution of the given problem.
It may be formally defined as a sequence of instructions designed in such a way that if
the instructions z executed in the specified sequence, the desired results will be obtained.
The instructions, however, should precise and unambiguous and the result should be
obtained after a finite number of executional steps. The latter condition actually states
that an algorithm must terminate and should not repeat one or more instructions
infinitely. Hence, in order to qualify as an algorithm, a sequence of instructions must
possess the following characteristics:
1. Each and every instruction should be precise and unambiguous.
2. Each instruction should be such that it can be performed in a finite time.
3. One or more instructions should not be repeated infinitely. This ensures that the
algorithm w ultimately terminate.
4. After performing the instructions, that is after the algorithm terminates, the desired
results must obtained.

Sample Algorithms
To gain insight into algorithms, let us consider some simple examples.
Example 11.1.
There are 50 students in a class who appeared in their final examination. Their mark
sheets have bi given to you. The division column of the mark sheet contains the division
(FIRST, SECO> THIRD or FAIL) obtained by the student. Write an algorithm to
calculate and print the total num of students who passed in FIRST division.
Algorithm:
Step 1: Initialize Total_First_Division and Total_Marksheets_Checked to zero.
Step 2: Take the mark sheet of the next student.
Step 3: Check the division column of the mark sheet to see if it is FIRST, if no, go to
Step 5.
Step 4: Add 1 to Total_First_Division.
Step5: Add 1 to Total_Marksheets_checked.
Step 6: Is Total_Marksheets_Checked = 50, if no, go to Step 2
Step 7: Print Toral_First_Division. Step 8: Stop.
Example 11.2.
There are 100 employees in an organization. The organization wants to distribute annual
bonus to the employees based on their performance. The performance of the employees is
recorded in their annual appraisal forms. ""Every employee's appraisal form contains
his/her basic salary and the grade for his/her performance during the year. The grade is of
three categories - 'A' for outstanding performance, 'B' for good performance and 'C for
average performance. It has been decided that the bonus of an employee will be 100% of
the basic salary for outstanding performance, 70% of the basic salary for good
performance, 40% of the basic salary for average performance, and zero for all other
cases. Write an algorithm to calculate and print the total bonus amount to be distributed
by the organization.

Algorithm:
Step 1: Initialize Total_Bonus and Total_Employees_Checked to zero.
Step 2: Initialize Bonus and Basic_Salary to zero.
Step 3: Take the appraisal form of the next employee.
Step 4: Read the employee's Basic_Salary and Grade.
Step 5: If Grade = A, then Bonus = Basic_Salary. Go to Step 8.
Step 6: If Grade = B, then Bonus = Basic_Salary x 0.7. Go to Step 8.
Step 7: If Grade = C, then Bonus = Basic_Salary x 0.4. -
Step 8: Add Bonus to Total_Bonus.
Step 9: Add 1 to Total_Employees_Checked.
Step 10: If Total_Employees_Checked < 100, then go to Step 2.
Step 11: Print Total_Bonus.
Step 12: Stop.

Programmers design algorithms like these to solve complex programming problems. It


must be clear to the readers from these examples that even for very simple problems, the
development of algorithms is not so simple as it might initially appear and requires some
thinking. It may also be noted from the given examples that in order to solve a given
problem, each and every instruction must be strictly carried out in a particular sequence.
It is this fact, which a beginner to problem solving by computers finds difficult to
appreciate.

Quality of Algorithms
Given a solvable problem, there are often many methods to solve it. All of these methods
may not be equally good. Similarly, for a given problem, there may be many algorithms,
not all of equal quality. The primary factors that are often used to judge the quality of an
algorithm are:
1. Time requirement. This is the time required to execute the corresponding program
on a given computer system. The lesser is the time requirement, the better is the
algorithm.
2. Memory requirement. This is the memory space required to execute the
corresponding program on a given computer system. The lesser is the memory
requirement, the better is the algorithm.
3. Accuracy of solution. Although multiple algorithms may provide correct solutions
to a given problem, some of these may provide more accurate results than others. For
example, out of two algorithms for calculating the square root of a given number, one
might have been designed to produce results up to three decimal places, while the other
one might have been designed to produce results up to six decimal places. Obviously, the
latter algorithm is better from the point of view of accuracy of solution.
4. Generality. While there are occasions when an algorithm is needed to solve a single
isolated problem, more often algorithms are designed to handle a range of input data. A
generalized algorithm, which can handle a range of input data, is better than one, which
has been designed to solve a problem for a single input data. For instance, the algorithm
given above for Example 11.1 is not a generalized one because in Step 6 it checks if
Total_Marksheets_Checked has become equal to 50. Hence it will work only if there are
exactly 50 students data as input. The algorithm can be made general by accepting the
number of students (iV) as input and then comparing the value of
Total_Marksheets_Checked with JV instead of 50 in Step 6.

Representation of Algorithms

There are various ways in which an algorithm can be represented. Programmers normally
use one or more of the following ways to represent their algorithms:
1. As programs
2. As flowcharts
3. As pseudocodes
4. As decision tables
When an algorithm is represented in the form of a programming language, it becomes a
program. Thus any program is an algorithm although the reverse is not true.
Besides represented as programs, algorithms are often represented as flowcharts,
pseudocodes and decision tables. These are the commonly used tools used by
programmers for program planning which can often be of immense help in developing an
effective and correct algorithm for a program before it is coded into a programming
language. These program planning tools are described below. Programmers generally
select one of these tools

FLOWCHARTS

What is a Flowchart?

A flowchart is a pictorial representation of an algorithm. It is the layout, in a visual, two-


dimensional format, of the plan to be followed when the corresponding algorithm is
converted into a program by writing it in a programming language. It acts like a roadmap
for a programmer and guides him/her on how to go from the starting point to the final
point while converting the algorithm into a computer program.

A flowchart is often used by programmers "as a program planning tool for organizing a
sequence of steps necessary to solve a problem by a computer. It uses boxes of different
shapes to denote different types of instructions. The actual instructions are written within
these boxes using clear and concise statements. These boxes are connected by solid lines
having arrow marks to indicate the flow of operation, that is, the exact sequence in which
the instructions are to be executed. The process of drawing a flowchart for an algorithm is
often referred to as flowcharting.

Why Use Flowcharts?

Normally, an algorithm is first represented in the form of a flowchart and the flowchart is
then expressed in some programming language to prepare a computer program. The main
advantage of this two step approach in program writing is that while drawing a flowchart,
a programmer is not concerned with the details of the elements of programming
language. Hence, he/she can fully concentrate on the logic of the procedure. Moreover,
since a flowchart shows the flow of operations in pictorial form, any error in the logic of
the procedure can be detected more easily than in the case of a program. Once the
flowchart is ready, the programmer can forget about the logic and can concentrate only
on coding the operations in each box of the flowchart in terms of the statements of the
programming language. This will normally ensure an error-free program.

Experienced programmers sometimes write programs without drawing the flowchart.


However, for a beginner it is recommended that a flowchart be drawn first in order to
reduce the number of errors and omissions in the program. Moreover, it is a good practice
to have a flowchart along with a computer program because a flowchart often serves as a
document for the computer program and is very useful during the testing of the program
as well as while incorporating further modifications in the program.
Flowchart Symbols

Need for Flowchart Symbols

We have seen that a flowchart uses boxes of different shapes to denote different types of
instructions. The communication of program logic through flowcharts is made easier
through the use of symbols that have standardized meanings. This is because as long as
everyone uses the same basic shapes, others can readily interpret the logic. For example,
a diamond always means a decision. Hence when a programmer looks at a flowchart,
he/she can easily identify the decision points because all are indicated by a diamond-
shaped box.

Basic Flowchart Symbols

Only a few symbols are needed to indicate the necessary operations in a flowchart. These
basic flowchart symbols have been standardized by the American National Standards
Institute (ANSI). These symbols are shown in Figure 11.1 and their functions are
discussed below.
Terminal
Input/Output
Processing
Decision
Flow lines
Connectors
1. Terminal. The terminal symbol, as the name implies, is used to indicate the beginning
(Start), ending (Stop), and pauses (Halt) in the program logic flow. It is the first symbol
and the last symbol in the program logic. In addition, if the program logic calls for a
pause in the program, that also is indicated with a terminal symbol. A pause is normally
used in the program logic under some error conditions or if forms had to be changed in
the computer's line printer during the processing of that program.
2. Input/Output. The input/output symbol is used to denote any function of an
input/output device in the program. If there is a program instruction to input data from a
disk, tape, terminal, or any other type of input device, that step will be indicated in the
flowchart with an input/output symbol. Similarly, all output instructions, whether it is
output on a printer, magnetic tape, magnetic disk, terminal screen, or any output device,
are indicated in the flowchart with an input/output symbol.
3. Processing. A processing symbol is used in a flowchart to represent arithmetic and data
movement instructions. Thus, all arithmetic processes of adding, subtracting, multiplying
and dividing are shown by a processing symbol. The logical process of moving data from
one location of the main memory to another is also denoted by this symbol. When more
than one arithmetic and data movement instructions are to be executed consecutively,
they are normally placed in the same processing box and they are assumed to be executed
in the order of their appearance.
4. Decision. The decision symbol is used in a flowchart to indicate a point at which a
decision has to be made and a branch to one of two or more alternative points is possible.
Figure 11.2 shows three different ways in which a decision symbol can be used. It may be
noted from these examples that the criterion for making the decision should be indicated
clearly within the decision box. Moreover, the condition upon which each of the possible
exit paths will be executed should be identified and all the possible paths should be
accounted for. During execution, the appropriate path is followed depending upon the
result of the decision.
5. Flow lines. Flow lines with arrow heads are used to indicate the flow of operation,
that is, the exact sequence in which the instructions are to be executed. The normal flow
of flowchart is from top to bottom and left to right. Arrow heads are required only when
the normal top to bottom flow is not to be followed. However, as a good practice and in
order to avoid ambiguity, flow lines are usually drawn with an arrow head at the point of
entry to a symbol. Good practice also dictates that flow lines should not cross each other
and that such intersections should be avoided whenever possible.
6. Connectors. Whenever a flowchart becomes complex enough that the number and
direction of flow lines is confusing or it spreads over more than one page, it is useful to
utilize the connector symbol as a substitute for flow lines. This symbol represents an
entry from, or an exit to another part of the flowchart. A connector symbol is
represented by a circle and a letter or digit is placed within the circle to indicate the link.
A pair of identically labeled connector symbols is commonly used to indicate a continued
flow when the use of a line is confusing. So two connectors with identical labels serve the
same function as a long flowline. That is, they show an exit to some other chart section,
or they indicate an entry from another part of the chart. How is it possible to determine if
a connector is used as an entry or an exist point? It is. very simple - if an arrow enters
but does not leave a connector, it is an exit point and program control is transferred to the
identically labeled connector that does have an outlet. It may be noted that connectors do
not represent any operation and their use in a flowchart is only for the sake of
convenience and clarity.

Additional Flowchart Symbols


The basic flowchart symbols discussed above are sufficient to represent any program
logic. However, these symbols do not specify in particular the type of storage media to be
used, the type of I/O device to be used, or the type of processing to be done. Hence
additional flowchart symbols were later defined for incorporating such details in
flowcharts if so desired by the programmers. Some of the most commonly used
additional flowchart symbols are shown in Figure 11.3 and their functions are discussed
below.
1. Printed Document. This symbol is used to show that either the input is in the form of
printed document or the output is to be produced in hard copy form using a printer.
2. Display. This symbol is used to show that the output is to be displayed on a monitor.
3. Keyed Input. This symbol is used to show that the data is to be input using a
keyboard device.
4. Manual Input. This symbol is used to show that the data is to be input using an
input device that requires manual operation such as keyboard, voice input system, touch
screen kiosk, etc.
5. Auxiliary Operation. This symbol is used to represent an operation that is performed
by a machine that is not directly under the control of the computer system to be used for
the main processing function. However, it is important to perform the auxiliary operation
for the successful completion oi the overall processing job.
6. Manual Operation. This symbol is used to represent any offline activity to be
performed by a human being. Again it is important to perform this activity for the
successful completion of the overall processing job.
7. Online Storage. This symbol is used to represent any data stored on an online storage
device such as a disk.
8. Offline Storage. This symbol is used to represent any data stored on an offline
device storage device suet as a tape.
9. Magnetic Tape. This symbol is used to directly represent the use of magnetic tape
as a storage device for the storage of some data.
10. Magnetic Disk. This symbol is used to directly represent the use of magnetic disk as
a storage device for the storage of some data.
11. Communication Link. This symbol is used to represent data transmission from one
location t( another across a network.
12. Annotation. This symbol is used to provide additional explanatory notes to some
parts of the flowchart to make it easier to follow and understand. The explanatory note is
written inside the three sided annotation enclosure and the dotted line connecting the
annotation enclosure is drawn up to that part of the flowchart to which the annotation
corresponds.
13. Predefined Process. This symbol is used to represent a group of operations that
form a separate module and may be detailed in a separate flowchart.
14. Merge. This symbol is used to represent a process that combines two or more sets of
items into on set.
15. Extract. This symbol is used to represent a process that separates one or more
specific sets of item from a given set of items.
16. Sort. This symbol is used to represent a process that arranges a given set of items
into a specified sequence.
17. Collate. This symbol is used to represent a process that performs both merge and
extract operations. That is, it consists of a process that combines two or more sets of
items into one set and another process that separates one or more specific sets of items
from the generated set.
Printed document
Manual Input
Online Storage
Magnetic Disk
Display
Predefined Process
Sort
Auxiliary Operation
Offline Storage
Communication Links
Merge
Keyed Input
Manual Operation
Magnetic Tape
Annotation
Extract
Collate

Sample Flowcharts
A flowchart should be drawn using the symbols mentioned above. Describing an
algorithm in the form of a flowchart is not very difficult. What is required is some
common sense and a little practice. The art of flowcharting is introduced below with the
help of some simple examples.

Example 11.3.
A student appears in an examination that consists of total 10 subjects, each subject having
maximum marks of 100. The roll number of the student, his/her name, and the marks
obtained by him/her in various subjects are supplied as input data. Such a collection of
related data items that is treated as a unit is known as a record. Draw a flowchart for the
algorithm to calculate the percentage marks obtained by the student in this examination
and then to print it along with his/her roll number and name.

Solution:
The flowchart for the algorithm of this problem is shown in Figure 11.4. The first symbol
is a terminal symbol labeled "Start". It shows that this is the starting point or beginning of
our flowchart logic. It does not mean that the computer is to be turned on or that anyone
is to press a start button. The second symbol is an I/O symbol that is labeled specifically
to show that this step is "Read input data". This step will input the roll number, name, and
the marks obtained by the student from an input device into the main storage of the
computer system. The third symbol is a processing symbol, which is suitably labeled to
indicate that at this step, the computer will add the marks obtained by the student in
various subjects and then store the sum in a memory location, which has been given the
name Total. The fourth symbol is again a processing symbol. The label inside it clearly
indicates that the percentage marks obtained by the student is calculated at this stage by
dividing Total by 10 and the result is stored in a memory location, which has been given
the name Percentage. The fifth symbol is an I/O symbol and is labeled "Write output
data". This logical step in the flowchart outputs the data desired as output (roll number,
name and percentage marks obtained) on an output device such as a printer. Note that
details such as the roll number, name and the marks or percentage being input or output
are not a part of the logical steps of data input or data output operations. This information
already appears in the system design documents and will be included in the computer
program as input and output descriptions. The sixth symbol is a terminal symbol labeled
"Stop". This symbol indicates the conclusion of our logic, that is, the conclusion of the
computer program. The various symbols used in the flowchart are connected by directed
flow lines to indicate the sequence in which the instructions are to be executed.
Start
Read input data
Add marks of all subjects giving Total
Percentage = Total 110
Write output data
Stop

The logic depicted in Figure 11.4, therefore, will read the student's record, calculate the
percentage marks obtained by him/her, print one line of output, and then stop. One would
certainly not like to use a computer to solve a trivial problem such as this. However, if we
have to compute the percentage marks obtained by several students in the same
examination then we may like to take the help of a computer. The next example
illustrates how to do this.

Example 11.4.
50 students of a class appear in the examination of Example 11.3. Draw a flowchart for
the algorithm to calculate and print the percentage marks obtained by each student along
with his/her roll number and name.

Solution:
Since all the students have appeared in the same examination, so the process of
calculation and printing the percentage marks obtained by each student will basically
remain the same. The same process of reading the input data, adding the marks of all
subjects, calculating the percentage, and then writing the output data has to be repeated
for all the 50 students. Hence, an easy solution that comes to ones mind for this problem
is to repeat the intermediate four symbols of Figure 11.4 fifty times. However if that is
done, a total of 202 (50 x 4 + 2) flowchart symbols will have to be drawn. Obviously, this
will be a very time consuming and tedious job and hence is not desirable. We will now
see how to solve this problem in a simpler way.

In a situation where the same logical steps can be repeated, the flow line symbols are
used in a flowchart to indicate the repetitive nature of the logic in the form of a process
loop. Figure 11.5 illustrates a flowchart with a process loop. Note the arrow head on the
flow line that forms the loop. It points upward indicating that as soon as the "Write"
operation is over, the control will flow back to the "Read" operation. Thus, the process
loop of Figure 11.5 solves the problem of an exceedingly long flowchart by reusing the
same logical steps over and over again. However, the flowchart of Figure 11.5 is
incomplete because the process loop has introduced a new problem. The process loop
shown does not have a logical ending. It will continue to attempt to repeat those four
steps until someone manually cancels the job. This is an example of an infinite loop and
hence the flowchart of Figure 11.5 does not represent an algorithm because an algorithm
must terminate. So we have to find out a way of terminating the algorithm. This is done
by the use of a decision symbol.

Figure 11.6 shows a flowchart, which uses a decision step to terminate the algorithm. In
this flowchart, another variable Count has been introduced which is initialized to zero
outside the process loop and is incremented by 1 after processing the data for each
student. Thus, the value of Count will always be equal to the number of students whose
data has already been processed. At the decision step, the value of Count is compared
with 50, which is the total number of students who have appeared for the examination.
The steps within the process loop are repeated until the value of Count becomes equal to
50, the instruction at the decision step causes the control to flow out of the loop and the
processing stops because a terminal symbol labeled Stop is encountered. Thus, the
flowchart of Figure 11.6 is a complete and correct solution to the problem of Example
11.4.

Although the flowchart of Figure 11.6 is a correct solution to the given problem, it suffers
from two major drawbacks. The first drawback is that in order to make the decision at the
decision step, one must know the exact number of students who appeared in the
examination. Suppose the examination of Example 11.3 is a university examination in
which the total number of students who appeared for the examination is too large (say
more than ten thousand). In such a situation, the counting of the total number of input
records (data for each student) becomes a tedious job. Even then, if we do stick on
counting the input records manually and supply the number of records to be compared
against Count in the decision box and suppose while counting we make some error then
the logic will not work. If the supplied number is less than the actual number of input
records, then the computer will not process the data for last few students. And if the
supplied number is more than the actual number of input records, the computer will try to
read more records than what is supplied which will cause an error in the logic.
Start
Read input data
Add marks of all subjects giving Total
Percentage = Total 110
Write output data
Read input data

The second drawback is that the flowchart of Figure 11.6 is not a generalized solution to
the given problem. Suppose the examination is conduced every year and so we will like
to use the same program every year to process the students' data. However, the number of
students appearing in the examination may not remain the same every year. This year it
may be 50, but next year it can be 55 or 60 or anything. So if the computer program to
solve this problem was based on the flowchart of Figure 11.6, the statement concerned
with the decision step in that program will have to be changed again and again to supply
the exact number of students. This is not a good programming practice. We saw that a
good algorithm (program) should be general in nature. For example, in this case we
should write a program that need not be modified every time even if the total number of
students changes.

The flowchart of Figure 11.6 suffers from these drawbacks because in this flowchart the
process loop is being controlled by counting. When the loop has been executed 50 times,
the decision will cause execution to proceed to the "Stop", thus terminating processing.
(The reader should carefully step through the logic to ensure that the loop will be
executed exactly 50 times and not 49 or 51 times). To avoid these drawbacks, another
method can be adopted to control the process loop. In this method, the end of input data
is marked by a trailer record that is the last data record in the input is followed by a
record whose sole purpose is to indicate that the end of the input data has been reached.
Suppose the first 7 characters of the input record represents a student's roll number
(Rollno). Since 0000000 is never used as a roll number, a value of 0000000 as the first 7
characters can be used to represent the trailer record. As each input record is processed,
the Rollno can be compared with 0000000 to determine if processing is complete. The
logic of this process is illustrated in the flowchart of Figure 11.7. It is important to
recognize that the programmer would have to include instructions in the program, which
specifically compare the Rollno to 0000000 in order to determine whether to continue or
to terminate.

Start
Count = 0
Read input data
Add marks of all subjects giving Total
Percentage = Total I 10
Write output data
Add1 to Count
Is count = 50?
Yes
Stop
If no
Read input data

The concept of a trailer record centers around the notion of selecting a field (a particular
item of data) in the input record which will be used to indicate the end of data and then
selecting a trailer value also known as sentinel value which will never occur as normal
data value for that field. The roll number of 0000000 is a good example. It may also be
noted that when a trailer record is used to mark the end of input data, the decision box
used for checking the trailer value should almost always be flowcharted immediately
after the input symbol.

Start
Read input data
Is Rollno = 0000000?
If yes than
Stop
If no
Add marks of all subjects giving Total
Percentage = Total/10
Write output data
Read input data

Example 11.5.
For the examination of Example 11.3, we want to make a list of only those students who
have passed obtained 30% or more marks) in the examination. In the end, we also want to
print out the total number of students who have passed. Assuming that the input data of
all the students is terminated by a trailer record that has sentinel value of 9999999 for
Rollno, draw a flowchart for the algorithm to do the above job.
Solution:
The flowchart in Figure 11.8 is a solution to this problem. There are two decision
symbols in this flowchart. The first decision symbol checks for a trailer record by
comparing Rollno against the value 9999999 to determine if processing is complete. The
second decision symbol is used to check whether the student has passed or failed by
comparing the percentage marks obtained by him/her against 30. If the student's
Percentage is equal to or more than 30 then he/she has passed otherwise failed. Note from
the flowchart that the operation "Write output data" is performed only if the student has
passed. If the student has failed, we directly perform the operation "Read input data"
without performing the "Write" operation. This ensures that the output list provided by
the computer will contain the details of only those students who have passed in the
examination.
Start
Count= 0
Read input data
Is Rollno = 9999999?
If yes
Write count
Stop
If no
Add marks of all subjects giving Total
Percentage = Total/10
Is Percentage = > 30?
Yes
Write output data
Add1 to count
If No
Read input data

Another point to be noted in this flowchart is the use of the variable Count. This variable
has been initialized to zero in the beginning and is incremented by 1 every time the
operation "Write output data" is performed. But we have seen that the operation "Write
output data" is performed only for the students who have passed. Hence, the variable
Count will be incremented by 1 only in case of students who have passed. Thus, the value
of Count will always be equal to the number of students whose data has already been
processed and who have been identified as passed. Finally, when the trailer record is
detected, the operation "Write Count" will print out the final value of Count that will be
equal to the total number of students who have passed the examination.

Example 11.6.
Suppose the input data of each student for the examination of Example 11.3 also contains
information regarding the sex of the candidate in the field named Sexcode that can have
values M (for male) or F (for female). We want to make a list of only those female
students who have passed in second division (obtained 45% or more but less than 60%
marks). In the end we also want to print out the total number of such students. Assuming
that the input data of all the students is terminated by a trailer record that has a sentinel
value of Z for Sexcode, draw a flowchart for the algorithm to do the above job.

Solution:
The flowchart in Figure 11.9 is a solution to this problem. There are four decision
symbols in this flowchart. The first one checks for a trailer record by comparing Sexcode
against the value Z to determine if processing is complete. The second one is used to
check whether the candidate is female or not by comparing the Sexcode of that candidate
against F. Note that if the Sexcode is not F, that is, the candidate is not a female, we do
not process the data of that student and return back to perform the operation of reading
input data. This step ensures that the data of only female students will be taken for further
processing.
The last two decision symbols in the flowchart are used to check whether the student has
passed in second division or not. The first of these decisions is used to ensure that the
student has scored 45% or more marks. If she has scored less than 45% then it means that
she is not a second divisioner and hence without making any further check we return
back to the operation of reading input data. In case the student has scored 45% or more
marks then we go one step further in the logic and by using the fourth decision in the
flowchart we check whether her marks are less than 60% by comparing the Percentage
against 60. If the condition at this step turns out to be false then it means that the student
has scored 60% or more marks and hence she is a first divisioner and not a second
divisioner. So once again we return back to read a new data without writing any output
data. If the condition inside the fourth decision symbol turns out to be true then the
female candidate can be classified to be a second divisioner. Hence in this case only we
perform the operation "Write output data" and subsequently increment the value of Count
by 1.
It is suggested that the reader should go through the logic of this flowchart again and
again until he/she is convinced that the output list provided by the computer will contain
the details of only those female students who have passed in second division. The reader
should also get convinced that finally when the trailer record is detected, the operation
"Write Count" would print out the value of Count that will be equal to the total number of
female students who have passed in second division. This flowchart is an example of a
multiple-decision chart.
The flowchart of Figure 11.9 has been reproduced in Figure 11.10 to illustrate the use of
connectors. There are four exit connectors having the label 1 all of which indicate a flow
of control to the flowchart symbol having an entry connector labeled 1. This symbol is
the input symbol in the flowchart. Similarly the exit connector having a label 2 indicates
a flow of control to the entry connector labeled 2. The reader should compare the
flowcharts of Figure 11.9 and Figure 11.10 and should get convinced that both the
flowcharts represent the same logic.

A flowchart may seem simple to prepare, but you will find that much practice is needed
in order to think through a problem in discrete, logical steps, to assume nothing and to
forget nothing. Moreover, not everyone will tackle a problem in exactly the same way
and, in consequence, several different flowcharts could be drafted for the same problem.
It may also be noted that a completed flowchart is not a complete computer program. It is
only an aid to programming. For a given problem, it defines the procedure and the logic
involved. From the examples that have been discussed above, we are in a better position
to understand what this "logic" means.

Levels of Flowcharts

There are no set standards on the amount of detail that should be provided in a flowchart.
A flowchart that outlines the main segments of a program or that shows less detail is a
macro flowchart. On the other hand, a flowchart with more detail is a micro flowchart, or
detailed flowchart.

For example, let us consider the examination problem that we have already discussed. In
all the flowcharts of the examination problem, there is a processing box having the
instruction "Add marks of all subjects giving Total. In order to display how the value of
Total is computed, a detailed flowchart can be drawn as shown in Figure 11.11. In a
similar manner, the I/O boxes for the "Read" and "Write" operations can also be
converted to a detailed flowchart.

Flowcharting Rules

While programmers have a good deal of freedom in creating flowcharts, there are a
number of general rules and guidelines recommended by the American National
Standards Institute (ANSI) to help standardize the flowcharting process. Various
computer manufacturers and data processing departments usually have simila
flowcharting standards. Some of these rules and guidelines are as follows:

1. First chart the main line of logic, then incorporate detail.


2. Maintain a consistent level of detail for a given flowchart.
3. Do not chart every detail or the flowchart will only be a graphic representation, step-
by-step, of thi program. A reader who is interested in greater details can refer to the
program itself.
4. Words in the flowchart symbols should be common statements and easy to
understand. It i recommended to use descriptive titles written in designer's own
language rather than in machine oriented language.
5. Be consistent in using names and variables in the flowchart.
6. Go from left to right and top to bottom in constructing flowcharts.
7. Keep the' flowchart as simple as possible. The crossing of flow lines should be
avoided as far a practicable.
8. If a new flowcharting page is needed, it is recommended that the flowchart be broken
at an input o output point. Moreover properly labeled connectors should be used to link
the portions of th flowchart on different pages.

Advantages and Limitations of Flowcharts Advantages

The following benefits may be obtained when flowcharts are used for the purpose of
program planning:
1. Better Communication. The old saying that "a picture is worth a thousand words"
holds true for flowcharts also. Since, a flowchart is a pictorial representation of a
program, it is easier for programmer to explain the logic of a program to some other
programmer or to his/her boss through flowchart rather than the program itself.
2. Effective Analysis. A macro flowchart that charts the main line of logic of a
software system becomes a system model that can be broken down into detailed parts for
study and further analysis c the system.
3. Effective Synthesis. A group of programmers are normally associated with the
design of bi software systems. Each programmer is responsible for designing only a part
of the entire system. S initially, if each programmer draws a flowchart for his/her part of
design, the flowcharts of all the programmers can be placed together to visualize the
overall system design. Any problem in linking the various parts of the system can be
easily detected at this stage and the design can be accordingly modified. Flowcharts are
thus used as working models in the design of new programs and software systems.
4. Proper Program Documentation. Program documentation involves collecting,
organizing, storing, and otherwise maintaining a complete historical record of programs
and the other documents associated with a system. Good documentation is needed for the
following reasons:
- Documented knowledge belongs to an organization and does not disappear with the
departure (resignation/retirement) of a programmer.
- If projects are postponed, documented work will not have to be duplicated.
- If programs are modified in the future, the programmer will have a more
understandable record of what was originally done.
From what we have seen of the nature of flowcharts, it is obvious that they can provide
valuable documentation support.
5. Efficient Coding. Once a flowchart is ready, programmers find it very easy to write
the concerned program because the flowchart acts as a road map for them. It guides
them to go from the starting point of the program to the final point ensuring that no steps
are omitted. The ultimate result is an error free program developed at a faster rate.
6. Systematic Debugging. Even after taking full care in program design, some errors
may remain in the program because the designer might have never thought about a
particular case. These errors are called bugs and the process or removing these errors is
known as debugging.
Once a bug is detected, it is easier to find out the reason for that bug by going through the
logic of the program in flowchart form. A flowchart is very helpful in detecting, locating,
and removing mistakes (bugs) in a program in a systematic manner.
7. Systematic Testing. Testing is the process of confirming whether a program will
successfully do all the jobs for which it has been designed under the specified constraints.
For testing a program, different sets of data are fed as input to that program to test the
different paths in the program logic. For example, to test the complete logic of the
program for Example 11.6, the following sets of data are necessary:
- Data for a male candidate.
- Data for a female candidate who has scored less than 45%.
- Data for a female candidate who has exactly scored 45%.
- Data for a female candidate who has scored more than 45% but less than 60%.
- Data for a female candidate who has exactly scored 60%.
- Data for a female candidate who has scored more than 60%.
- And obviously in the end the trailer data having sentinel value.
A flowchart proves to be very helpful in designing the test data for systematic testing of
programs.

Limitations

In spite of their many obvious advantages, flowcharts have several limitations, which are
as follows:
1. Flowcharts are very time consuming and laborious to draw with proper symbols and
spacing especially for large complex programs. In this chapter, you have seen examples
of small program flowcharts developed for relatively small programs. You can very well
imagine how difficult would be to develop a detailed program flowchart for a program
containing over 50,000 statements.
2. Owing to the symbol-string nature of flowcharting, any changes or modifications in
the program logi will usually require a completely new flowchart. Redrawing a flowchart
being a tedious task, man programmers do not redraw or modify the corresponding
flowchart when they modify their program: This leaves the program and its flowchart in
an inconsistent state. That is, the logic used in the program and that shown in its
flowchart do not match. This defeats the purpose of use of flowchart as documentation
support for programs. To take care of this problem, many companies use software tools
that automatically generate flowcharts directly from the program code. These software
tools read the program's instructions and draw a flowchart of its logic. That is, this is a
backward approach in which flowcharts are designed from program codes mainly for
documentation purpose.
3. There are no standards determining the amount of detail that should be included in a
flowchart.
Because of such limitations, many organizations are now reducing the amount of
flowcharting used. In its place, they are using alternative tools for program analysis, two
of which are briefly discussed below.

DECISION TABLES

What is a Decision Table?

Decision tables are used to define clearly and concisely the word statement of a problem
in a tabular form. The can prove to be a powerful tool for defining complex program
logic. As the name implies, decision tables reveal what decisions or actions the computer
is to take as a result of the input data. When the computer has to make large number of
decisions or if there are a large number of different branches within a program, decision
tables a particularly useful. In these cases, decision tables are preferred to flowcharts.

Most decision tables have six parts. The basic format of a decision table is shown in
Figure 11.12. The first p< of a decision table is "Table Heading" that contains the name
and/or number of the table. For some large applications, two or more decision tables may
be used in the analysis part of program development. The second part of the table, known
as "Condition Stub", describes the conditions that could exist in the program logic. Thus
the contents of condition stub correspond to the conditions contained in the decision
symbols of a flowchart "Action stub", the third part of the decision table, contains the
action statements. These statements correspond to the statements located in non-decision
symbols of a flowchart. While the condition statements reveal the possible states of the
input data, the action statements describe the possible actions of the computer system.
The right hand side of the decision table contains the rule numbers (part 4), the actual
conditions (part 5), and the actions taken by the computer (part 6). The condition entries
correspond to the paths leading out from decision symbols.

Table Heading Decision Rules

Condition Stub Condition Entries

Action Stub Action Entries

Figure 11.12. Format of a decision table.

The steps to be followed for constructing a decision table are as follows: -


1. Properly define the problem that has to be solved by computer.
2. List out all the conditions to be tested in the problem.
3. List out the corresponding actions that should be taken with each combination of
conditions.
4. Form a decision table using the two lists.

Sample Decision Table

A decision table for the problem of Example 11.6 that was charted in Figure 11.9 is
shown in Figure 11.13. In this table, each rule number is a given condition followed by a
specific action to be taken by the computer. The six rule numbers, the six actual
conditions, and the associated actions taken by the computer system are discussed below.

Examination Problem of Example 11.6 Decision Rule Number .


1 2 1 3 4 | 576
Condition Statements
Sexcode = Z N N N N N Y
Sexcode = F Y Y Y Y N -
Percentage = > 45 Y Y N - - -
Percentage < 60 Y N - - - -

Action Taken
Calculate Percentage X
Write output data X
Add 1 to Count X
Read next student's record X X X X
Write Count X
Stop X
Figure 11.13. Decision table for the examination problem of Example 11.6.

Rule 1: The student is a female, and the percentage marks obtained is 45% or more, and
the percentage marks obtained is less than 60%. The computer should write the output
data, add 1 to Count, and then read the next student's record. It is a case of a female
student who has passed in second division.

Rule 2: The student is female, and the percentage marks obtained is 45% or more, and the
percentage marks obtained is not less than 60%. The computer should directly read the
next student's record without performing any other operation. It is the case of a female
student who has scored 60% or more marks and hence is a first divisioner and not a
second divisioner.

Rule 3: The student is a female and the percentage marks obtained is not 45% or more. A
dash (-) in this column against the last condition means that this condition is irrelevant in
arriving at the action. In fact, if Percentage is not equal to or greater than 45, then it has to
be less than 60. Percentage greater than or equal to 60 is logically impossible. Such
conditions in the decision table, which are irrelevant in arriving at an action, are known
as don't care conditions and are denoted by a dash. For this rule, the computer should
directly read the next student's record without performing any other operation. It is the
case of a female student who has scored less than 45% and hence she is not a second
divisioner.

Rule 4: The student is a female, and the other conditions are don't care conditions. The
computer should calculate Percentage after adding marks of all subjects and then proceed
to test further conditions. It is the case of a female student whose Percentage is yet to be
calculated.

Rule 5: The student is a male, and the other conditions are don't care conditions. The
computer should directly read the next student's record without performing any other
operation. It is the case of a male student.

Rule 6: In all the previous five rules, it was ascertained that the current record is not a
trailer record because all these rules have a value N (No) for the condition Sexcode = Z.
In this rule, the Sexcode is equal to Z, which indicates a trailer record, and hence the
computer should write the value of Count and then "Stop". The other conditions in this
rule are don't care conditions. It is the case of a trailer record.

In the decision table, "Y" means yes, "N" means no, "-" means don't care, and "X" means
the computer should take this action.
Advantages and Limitations of Decision Tables

Advantages
Decision tables are normally used in place of flowcharts because of the following
reasons:
1. They provide concise descriptions of logically complex situations.
2. They are easier to draw and change than flowcharts.
3. They provide more compact documentation. A small table can replace several pages
of flowcharts.
4. It is also easier to follow a particular path down one column than through several
flowchart pages.

Limitations
Decision tables, however, are not very popular and are not so widely used as flowcharts
because:
1. Large decision tables can become incomprehensible and difficult to modify.
2. Flowcharts are better able to express the total sequence of events needed to solve a
problem.
3. Flowcharts are more familiar to, and are preferred by, many programmers and
beginners.

PSEUDOCODE

What is Pseudocode?

Pseudocode is another programming analysis tool that is used for planning program logic.
"Pseudo" means imitation or false and "Code" refers to the instructions written in a
programming language. Pseudocode, therefore, is an imitation of actual computer
instructions. These pseudo-instructions are phrases written in ordinary natural language
(e.g., English, French, German, etc.) and hence cannot be understood by the computer.
Instead of using symbols to describe the logic steps of a program, as in flowcharting,
pseudocode uses a structure that resembles computer instructions. When pseudocode is
used for program planning, a programmer can concentrate solely on developing the logic
of the program without worrying about the syntax for writing the program instructions
because pseudocode does not have any syntax rules for formulating instructions. Once
the programmer is convinced that the program logic is sound, he/she can easily convert
the pseudocode into a suitable programming language that can be run on a computer.
Because it emphasizes the design of the program, pseudocode is also called Program
Design Language (PDL).

Pseudocodes for Basic Logic (Control) Structures

During the early days of program development, many programmers developed program
logics for large programs with mazes of branches (jumps from one portion of the program
to another) that altered the sequence of processing operations. Such programs are now
referred to as "spaghetti code" because their program flowcharts appeared more like a
plate of spaghetti than like logical analyses of programming problems. Understanding the
logic of such programs was very difficult for someone other than the developer and many
times even for the developer after a lapse of few months. Hence these programs were
very difficult to modify for incorporating suggested enhancements and quickly became
nightmares for those responsible for their maintenance.

This problem was soon identified as a major research area by computer scientists. They
started looking into what factors contributed to unnecessary program complexity and how
to develop program logics that are easier to comprehend resulting in easier maintenance
of the corresponding programs. As a result of the research efforts made in this area, it was
discovered that any program logic, no matter how complex, could be expressed by using
only the following three simple logic (control) structures:
1. Sequence logic,
2. Selection logic, and
3. Iteration (or looping) logic.

It was found that when programs are structured by using only these three logic structures,
they can be read from top to bottom and are easier to understand. That is, by
conceptualizing the logic of a program in the form of these three logic structures,
programmers can avoid writing spaghetti code and produce programs that are easy to
understand and maintain. It was found that this also helped in reducing program errors
and the time spent in program testing. The use of these three basic control structures
resulted in a more scientific approach to solving a programming problem and was later
termed as structured programming technique.

After realizing the advantages of structured programming technique, many organizations


now impose the use of the three basic logic structures in all their programs. It is generally
advised as good programming practices to develop program logics and write programs
using the three basic logic structures. Hence in the discussion below we will see the
pseudocodes for the three basic logic structures (flowcharts of these logic structures have
also been shown for those who are rhore comfortable with flowcharts).

Sequence Logic

Sequence logic is used for performing instructions one after another in sequence. Thus,
for sequence logic, pseudocode instructions are written in the order, or sequence, in
which they are to be performed. The logic flow of psuedocode is from the top to the
bottom. Figure 11.14 shows an example of sequence logic structure.

Process l

Process 2

(a) Flowchart
Process 1
Process 2
(b) Pseudocode
Figure 11.14. Flowchart and pseudocode for sequence structure.

Selection Logic

Selection logic, also known as decision logic, is used for making decisions. It is used for
selecting the proper path out of the two or more alternative paths in the program logic.
Selection logic is depicted as an IF...THEN...ELSE or an IF...THEN or a CASE structure.
The flowcharts of Figures 11.15, 11.16 and 11.17 respectively illustrate the logic of these
structures. Their corresponding pseudocodes are also given in these figures.

The IF... THEN... ELSE construct says that if the condition is true, then do Process 1,
else (if the condition is not true) do Process 2. Thus, in this case either Process 1 or
Process 2 will be executed depending on whether the specified condition is true or false.
However, if we do not want to choose between the two processes and if we simply want
to decide if a process is to be performed or not, then the IF...THEN structure is used. The
IF... THEN structure says that if the condition is true, then do Process 1 and if it is not
true then skip over Process 1.

The CASE structure is a multiple-way selection logic structure that allows to choose
between more than two control paths in a program logic. It allows the selection of one of
any number of statements or statement groups. It is, therefore, a generalization of the
one-way (IF...THEN) and two-way (IF...THEN...ELSE) selection logic structures. In fact,
one-way and two-way selection logic structures can be built with a multiple-way
selection logic structure. The CASE statement says that if the value of Type is equal to
Type-1 then execute Process 1, if it is equal to Type-2 then execute Process 2, if it is
equal to Type-3 then execute Process 3, and so on.
IF Condition
Yes
THEN Process 1
ELSE Process 2
ENDIF
(a) Flowchart

In all these structures, Process 1, Process 2, Process 3, etc. can actually be one or more
processes. They are not limited to a single process. ENDIF is used to indicate the end of
the IF,... THEN and IF... THEN.. .ELSE decision structures and ENDCASE is used to
indicate the end of the CASE structure.

Iteration (or Looping) Logic


Iteration logic is used to produce loops in program logic when one or more instructions
may be executed several times depending on some condition. It uses two structures called
the DO...WHILE and the REPEAT...UNTIL. They are illustrated by flowcharts in Figure
11.18 and Figure 11.19 respectively. Their corresponding pseudocodes are also given in
these figures. Both DO...WHILE and REPEAT...UNTIL are used for looping. In case of
DO...WHILE, the looping will continue as long as the condition is true. The looping
stops when the condition is not true. On the other hand, in case of REPEAT... UNITL, the
looping continues until the condition becomes true. That is, the execution of the
statements within the loop is repeated as long as the condition is not true.

Notice that in case of DO... WHILE, the condition for looping is checked at the
beginning of the loop. Hence if the condition is found to be false when the loop is first
encountered, the processes in the loop will not be executed at all (not even once). On the
other hand, in case of REPEAT... UNTIL, the condition for looping is checked at the end
of the loop. Hence the processes inside the loop will be executed at least once.

In both the DO...WHILE and REPEAT...UNITL, the loop must contain a statement that
will change the condition that controls the loop. If it does not, the looping will continue
without end, which is the case of an infinite loop. Remember that no program should
contain an infinite loop. Also note that the condition is tested at the top of the loop in the
DO...WHILE and at the bottom of the loop in the REPEAT... UNTIL. ENDDO marks the
end of a DO...WHILE structure and UNTIL followed by some condition marks the end of
the REPEAT...UNTIL structure.

Condition?
True
Process1
Process n
If false
(a) Flow chart

DO WHILE Condition
Process 1
Process n
ENDDO
(b) Pseudocode

Figure 11.18. Flowchart and pseudocode for DO...WHILE iteration structure.

Sample Pseudocode

The pseudocode version of the logic of the problem of Example 11.6 that was charted in
Figure 11.9 is shown in Figure 11.20. In the pseudocode example, the first line initializes
the value of Count to zero and the second line reads the input data of the first student.
The third line is the beginning of a loop using the DO.. .WHILE structure. It indicates
that the loop will continue so long as the trailer Sexcode is not equal to Z, that is, as long
as the trailer record is not fond. In this example, a series of decisions followed by an
instruction to read next student's record are included within the loop. The first statement
within the DO.. .WHILE loop asks, "Is the Sexcode equal to F?" If the answer is yes,
Pergentage is calculated and again the third statement within the loop asks, "Is
Percentage equal to or greater than 45?" If it is, then "Is Percentage less than 60?" This is
a series of three IF...THEN decision structures. Each one ends with an ENDIF vertically
aligned below the appropriate IF.

The two instructions - "Write output data" and "Add 1 to Count" are performed only if all
the three conditions (that of Sexcode being F, Percentage being equal to or more than 45,
and Percentage being less than 60) are found to be true (answered yes). If any of the three
conditions is not true, the logic path goes to the statement that reads the next student's
record. After the last student's record is processed, the trailer record for which the value
of Sexcode is Z is encountered. This will cause the DO...WHILE loop to stop, because
the condition (Sexcode not equal to Z) is no longer true. When the DO.. .WHILE
condition is no longer true, the next logical step will be the instruction following the
ENDDO. At this stage, the value of Count will be printed (Write Count) and finally the
program execution will stop (Stop).

Set Count to zero


Read first student record
DO WHILE Sexcode is not equal to Z
IF Sexcode = F THEN
Calculate Percentage
IF Percentage = > 45 THEN
IF Percentage < 60 THEN
Write output data
Add 1 to Count
ENDIF
ENDIF
ENDIF
Read next student record
ENDDO
Write
Count Stop

One important feature of pseudocode as a programming tool is the use of indentation.


Each statement within the DO...WHILE loop is indented, to show that it is part of the
loop. Similarly, the statements within each IF...THEN structure is indented properly to
clearly specify the statements, which are part of each structure. The use of indentation in
pseudocode is the same technique used with the various programming languages. Its sole
purpose is to clarify the logical structure of the program. With this technique, we can tell
at a glance, which statements make up each of the logic structure of the total program
logic. To fully appreciate this factor, the reader should compare the equivalent non-
indented pseudocode of Figure 11.21 with that of Figure 11.20. The difference in clarity
would be far greater if this were a longer pseudocode covering, for instance, one or more
pages.

Set Count to zero


Read first student record
DO WHILE Sexcode is not equal to Z
IF Sexcode = F THEN
Calculate Percentage
IF Percentage = > 45 THEN
IF Percentage < 60 THEN
Write output data >• Add 1 to Count
ENDIF
ENDIF
ENDIF
Read next student record
ENDDO
Write Count
Stop

Advantages and Limitations of Pseudocode

Advantages
Pseudocode has three main advantages:
1. Converting a pseudocode to a programming language is much more easier than
converting a flowchart or a decision table to a programming language.
2. As compared to a flowchart, it is easier to modify the pseudocode of a program logic
when program modifications are necessary.
3. Writing of pseudocode involves much less time and effort than drawing an
equivalent flowchart. Pseudocode is easier to write than an actual programming language
because it has only a few rules to follow, allowing the programmer to concentrate on the
logic of the program.

Limitations
Pseudocode, however, suffers from the following limitations:
1. In case of pseudocode, a graphic representation of program logic is not available.
2. There are no standard rules to follow in using pseudocode. Different programmers
use their own style of writing pseudocode and hence communication problem occurs due
to lack of standardization.
3. For a beginner, it is more difficult to follow the logic of or write pseudocode, as
compared to flowcharting.

Points to Remember

1. In order to ensure that the program instructions are appropriate for the problem at
hand and in the correct sequence, programs must be planned before they are written.
2. The term algorithm refers to the logic of a program. It is a step-by-step description
of how to arrive at a solution of the given problem.
3. The primary factors that are often used to judge the quality of an algorithm are the
time needed to execute it, the memory space required to execute it, the accuracy of the
results produced by it, and its capability to handle a range of input data instead of a single
input data (often referred to as generality property).
4. When an algorithm is represented in the form of a programming language, it
becomes a program. Thus any program is an algorithm although the reverse is not true.
5. Besides represented as programs, algorithms are often represented as flowcharts,
pseudocodes and decision tables.
6. A flowchart is a pictorial representation of an algorithm. It is often used by
programmers as a program planning tool for organizing a sequence of steps necessary to
solve a problem by a computer.
7. Decision tables are used to define clearly and concisely the word statement of a
problem in a tabular form. They can prove to be a powerful tool for defining complex
program logic.
8. Pseudocode is a programming analysis tool that allows programmers to plan program
logic by writing the program instructions in an ordinary natural language such as English.
9. Structured Programming is a more scientific approach to solving a programming
problem by using only the three basic logic (control) structures namely, sequence logic,
selection logic an iteration (or looping) logic.
10. Structured programming helps in producing programs that are easy to understand and
maintain. It also helps in reducing program errors and the time spent in program testing.
11. Sequence logic is used for performing instructions one after another in sequence.
12. Selection logic is used for selecting the proper path out of the two or more alternative
paths in the progran logic. It uses three control structures called IF.. .THEN, IF.. .THEN..
.ELSE and CASE.
13. Iteration (or looping) logic is used for producing loops in program logic when one or
more instructions ma; be executed several times depending on some condition. It uses
two control structures called DO...WHIL1 and REPEAT...UNTIL.

Questions

1. Why is it advisable to plan the logic of a program before writing it?


2. What is an algorithm? What are the characteristics necessary for a sequence of
instructions to qualify as a algorithm?
3. How do we normally judge the quality of an algorithm?
4. What are the commonly used ways to represent algorithms? Which of these can be
used for solving the corresponding problem on a computer?
5. Any program is an algorithm although the reverse is not true. Discuss this
statement.
6. What is a program planning tool? How is it useful? Name two commonly used
program planning tools.
7. What is a flowchart?
8. How does a flowchart help a programmer in program development?
9. Can a flowchart be drawn for a task if the person drawing the flowchart does not
know how to perform the task manually? Discuss.
10. What are the various basic symbols used in flowcharting? Give their pictorial
representation.
11. Describe the function of the various basic flowcharting symbols.
12. Why are there standards for the symbols used in drawing flowcharts?
13. What is a record? A trailer record?
14. What is a sentinel value? Discuss its use.
15. What is a process loop? An infinite loop?
16. Why is it necessary to avoid infinite loops in program design?
17. "A loop consists of a body, a test for exit condition, and a return provision." Discuss
this statement.
18. What is a generalized algorithm? Why should programs be general in nature?
19. Discuss the difference between loop control by counting and loop control by the use
of sentinel value. Which is preferable and why?
20. How can a counter be used to keep track of the number of times a loop has been
executed?
21. Is it possible to have more than one flowchart for a given problem? Give reasons for
your answer.
22. What is the difference between a macroflowchart and a microflowchart? Illustrate
with an example.
23. What are the various guidelines to be followed while drawing a flowchart?
24. Discuss the advantages and limitations of flowcharting.
25. Why is proper documentation of a program necessary?
26. What are program bugs? What is debugging?
27. What is meant by testing a program? How is it done?
28. What are decision tables? When are they preferred to flowcharts?
29. What are the various steps to be followed for constructing a decision table?
30. Draw the basic format of a decision table and discuss the role of each part.
31. What are don't care conditions in decision tables?
32. List out the various advantages and limitations of decision tables.
33. What is a pseudocode? Why is it so called? Give another name for pseudocode.
34. What is a spaghetti code? Why is it so called? What are its major drawbacks?
35. What are the three basic logic structures used in writing structured programs?
Discuss the use of each.
36. What is structured programming? What are its main advantages?
37. Give an example to illustrate the use of each of the three basic logic structures used
in structun programming.
38. Draw flowcharts for the two different structures used for selection logic.
39. What is the difference between the IF.. .THEN and the IF.. .THEN.. .ELSE
structures?
40. Draw flowcharts for the two different structures used for iteration logic.
41. Both DO...WHILE and REPEAT...UNTIL are used for looping. Discuss the
difference between the tv structures.
42. If the condition for looping is found to be false when the loop is encountered for the
first time, how mai times will the instructions inside the loop be executed in case of
(a) DO...WHILE loop
(b) REPEAT...UNTIL loop Give reasons for your answer.
43. What is the purpose of ENDIF and ENDDO statements?
44. What is indentation? Why is it used in writing pseudocodes?
45. Discuss the advantages and limitations of pseudocode.
46. Three numbers, denoted by the variables A, B, and C are supplied as input data.
Draw a flowchart for t logic to pick and print the largest of the three numbers.
47. Draw a flowchart of the logical steps needed to produce a printed listing of all
students over the age of 20 a class. The input records contain the name and age of the
students. Assume a sentinel value of 99 for 1 age field of the trailer record.
48. Draw a flowchart of the logical steps needed to print the name and age of the oldest
and the youngest student in a class. The input records contain the name and age of the
students. Assume a sentinel value of 99 for the age field of the trailer record.
49. The first 20 records in a data set are to be read and printed. Draw a flowchart for
the algorithm to do this job. Make sure that the processing stops after the twentieth
record.
50. Input data regarding the information of employees of a company has been supplied.
The first field of each input record contains the employee number (EmployeeNo).
Assume that the input data of all the employees is terminated by a trailer record having a
sentinel value of 99999 for EmployeeNo. Draw a flowchart for the logic to count and
print the total number of input records, that is, the total number of employees.
51. For the employees problem of Question 50, we want to count and print the number
of only male employees in the age group of 25 to 30. Assume that the input records
contain SexCode and Age fields to provide this information. Draw a flowchart for the
algorithm to perform this job.
52. Suppose that a population survey has been carried out in a given city, and that the
information received from the survey has been stored in a computer, one record per
citizen. That is, each record contains the name, address, sex, age, profession, etc., of one
citizen. We want to print the details of all the adults (aged 18 years or more) in the city
under survey. Finally, we also want to print the total number of adults. Assume a suitable
sentinel value for any field in the trailer record and draw a flowchart for the algorithm to
do this task.
53. A set of examination papers, which have been graded with scores from 0 to 100, is
to be searched to find how many of them are above 90. The total has to be printed.
Prepare a flowchart to do this job. Assume a suitable sentinel value for the trailer record.
54. Each paper in a set of examination papers includes a grade of A, B, C, D, or E. A
count is to be made of how many papers have the grade of A and how many have the
grade of E. The total count of both types have to be printed at the end. Prepare a
flowchart to perform this task. Assume a suitable sentinel value for the trailer record.
55. A shopkeeper wants to have a general program for his personal computer that will
prepare bills for each customer as and when he sells goods to them. His idea is that as
soon as the customer purchases some goods from his shop, he will supply the description,
unit price, and the quantity purchased for each item, as input to the computer. He wants
that with this information, the computer should print each item along with its unit price,
quantity purchased and the total price. Finally, the computer should also print the total
cost of all the items purchased by the customer. Assuming that a sentinel value of zero is
used for the quantity purchased field in the trailer record, draw a flowchart for the logic
to do this job.
56. An employer plans to pay bonus to each employee. Those earning Rs. 2000 or above
are to be paid 10 percent of their salary; those earning less than Rs. 2000 are to paid Rs.
200. The input records contain the employee number, name, and salary of the employees.
The output to be printed should contain the employee number, name, and the amount of
bonus to be paid to each employee. Draw a flowchart for the algorithm to do this job.
Assume a suitable sentinel value for any of the fields of the trailer record.
57. Each employee pay record includes the hours worked and the pay rate. The gross pay
is to be determined as hours worked times pay rate and is to be printed for each
employee. For all hours worked in excess of 40, the overtime rate, which is 1.5 times the
regular rate, is to be paid. Draw a flowchart for the problem logic to do this. Assume a
suitable sentinel value for any of the input fields of the trailer record.
58. A data file contains a set of examination scores and is followed by a trailer record
with a value of-1. Draw a flowchart for the logic to calculate and print the average of the
scores.
59. The data file of Question 58 is expanded to include several sets of data, each
requiring calculation of average. Each data set is followed by a trailer record with a value
of -1; however, the last data set followed by a trailer record with a value of-2. Draw a
flowchart for the logic to perform this task.
60. Suppose five numbers denoted by the variables A, B, C, D, and E are supplied as
input. Draw a flowchart for the logic to print these numbers in descending order of
magnitude.
61. Draw a flowchart to add up all the even numbers between 0 and 100. Before ending,
print the result of 1 calculation.
62. Draw a flowchart for the logic to find out whether a given triangle ABC is isosceles.
Assume that the angles of the triangle are supplied as input. Print the answer as yes or no.
63. Draw a flowchart for the logic to find out whether a given triangle ABC is a right
angled triangle. Assume that the sides of the triangle are supplied as input data. Print the
answer as yes or no.
64. Draw a flowchart for the logic to find out whether a given quadrilateral ABCD is a
rectangle. Assume that all the four angles and four sides of the quadrilateral are supplied
as input data. Print the answer as yes or no.
65. Draw a flowchart for the logic to convert a number from base 10 to a new base
using the division-remainder technique.
66. Draw a flowchart for the logic to convert a number to decimal from another base.
67. Construct a decision table to solve the problem described in Question 46.
68. Construct a decision table to solve the problem described in Question 51.
69. Construct a decision table to solve the problem described in Question 54.
70. Construct a decision table to solve the problem described in Question 62.
71. Construct a decision table to solve the problem described in Question 63.
72. Write the pseudocode to solve the problem described in Question 47. .
73. Write the pseudocode to solve the problem described in Question 48.
74. Write the pseudocode to solve the problem described in Question 51.
75. Write the pseudocode to solve the problem described in Question 54.
76. Write the pseudocode to solve the problem described in Question 55.
77. Write the pseudocode to solve the problem described in Question 56.
78. Write the pseudocode to solve the problem described in Question 57.
79. Write the pseudocode to solve the problem described in Question 61.
80. Write the pseudocode to solve the problem described in Question 62.
Chapter 12

Computer Languages

This chapter continues with the development of computer programs that was
begun in Chapter 11. Once the planning for a computer program has been done,
the next step in its development is to write the specific steps for solving the
problem at hand in a language and form acceptable to a computer system. A
language that is acceptable to a computer system is called a computer language or
programming language, and the process of writing instructions in such a language
for an already planned program is called programming or coding. The goal of this
chapter is to introduce some of the common computer languages used in writing
computer programs.

ANALOGY WITH NATURAL LANGUAGES

A language is a means of communication. We use a natural language such as


English to communicate our ideas and emotions to others. Similarly, a computer
language is a means of communication used to communicate between people and
the computer. With the help of a computer language, a programmer tells a
computer what he/she wants it to do.
All natural languages (English, French, German, etc.) use a standard set of words
and symbols (+, -, :,;, <, >, etc.) for the purpose of communication. These words
and symbols are understood by everyone using that language. We normally call
the set of words allowed in a language, the vocabulary of that particular language.
For example, the words we use in English form the vocabulary of English
language. Each word has a definite meaning and can be looked up in a dictionary.
In a similar manner, all computer languages have a vocabulary of their own. Each
word of the vocabulary has a definite unambiguous meaning, which can be looked
up in the manual meant for that language. The main difference between a natural
language and a computer language is that natural languages have a large
vocabulary but most computer languages use a very limited or restricted
vocabulary. This is mainly because a programming language by its very nature
and purpose does not need to say too much. Each and every problem to be solved
by a computer has to be broken down into discrete (simple and separate), logical
steps which basically comprise of four fundamental operations - input and output
operations arithmetic operations, movement of information within the CPU and
memory, and logical or comparison operations.

Each natural language has a systematic method of using symbols of that language
which is defined by the grammar rules of the language. These rules tell us how to
use the different words and symbols allowed in the language. Similarly, the words
and symbols of a particular computer language must also be used as per set rules,
which are known as the syntax rules of the language. In case of a natural language,
people can use poor or incorrect vocabulary and grammar and still make
themselves understood. However, in the case of a computer language, we must
stick to the exact syntax rules of the language if we want to be understood
correctly by the computer. As yet, no computer "is capable of correcting and
deducing meaning from incorrect instructions. Computer languages are smaller
and simpler than natural languages but they have to be used with great precision.
Unless a programmer adheres exactly to the syntax rules of a programming
language, even down to the punctuation mark, his/her instructions will not be
understood by the computer.

Programming languages have improved over the years, just as computer hardware
has improved. They have progressed from machine-oriented languages that use
strings of binary Is and Os to problem-oriented languages that use common
mathematical and/or English terms. However, all computer languages can be
broadly classified into the following three categories:
1. Machine Language
2. Assembly Language
3. High-level Language

We shall now examine the nature and characteristics of these three types of
languages.

MACHINE LANGUAGE

Although computers can be programmed to understand many different computer


languages, there is only one language understood by the computer without using a
translation program. This language is called the machine language of the
computer. The machine language of a computer is normally written as strings of
binary Is and Os. The circuitry of a computer is wired in such a way that it
immediately recognizes the machine language instructions and converts them into
the electrical signals needed to execute them.
A machine language instruction normally has a two-part format as shown in
Figure 12.1. The first part of an instruction is the operation code that tells the
computer what function to perform, and the second part is the operand that tells
the computer where to find or store the data or other instructions that are to be
manipulated. Thus, each instruction tells the computer what operation to perform
and the length and locations of the data fields that are involved in the operation.
Every computer has a set of operation codes called its instruction set. Each
operation code (or opcode) in the instruction set is meant for performing a specific
basic operation or function. Typical operations included in the instruction set of a
computer are as follows:
1. Arithmetic operations
2. Logical operations
3. Branch operations (either conditional or unconditional) for transfer of control
to the address given in the operand field
4. Data movement operations for moving data between memory locations and
registers
5. Data movement operations for moving data from or to one of the computer's
input/output devices.
Figure 12.1 shows atypical single-address machine language instruction. Although
some computers are designed to use only single-address instructions, many
computers are designed to use multiple-address instructions that include the
addresses of two or more operands. For example, the augend and addend may be
the two operands of an addition operation.

OPCODE (operation code) OPERAND (Address/Location)


Figure 12.1. Instruction format.

We already know that all computers use binary digits (Os and Is) for performing
internal operations. Hence most computers' machine language instructions consist
of strings of binary numbers. For example, a typical program instruction to print
out a number on the printer might be
101100111111010011101100
The program to add two numbers in memory and print the result might look
something like the following:

001000000000001100111001
001100000000010000100001
011000000000011100101110
101000111111011100101110
000000000000000000000000

This is obviously not a very easy to use language, partly because it is difficult to
read and understand and partly because it is written in a number system with
which we are not familiar. But it will be surprising to note that some of the first
programmers, who worked with the first few computers, actually wrote their
programs in binary form as above.

Since human programmers are more familiar with the decimal number system,
most of them will prefer to write the computer instructions in decimal, and leave
the input device to convert these to binary. In fact, without too much effort, a
computer can be wired so that instead of using long strings of 1 s and 0s we can
use the more familiar decimal numbers. With this change, the preceding program
appears as follows:
10001471
14002041
30003456
50773456
00000000

This set of instructions, whether in binary or decimal, which can be directly


understood by a computer without the help of a translating program, is called a
machine code or machine language program. Thus, a machine language program
need not necessarily be coded as strings of binary digits (Is and Os). It can also be
written using decimal digits if the circuitry of the computer being used permits
this.

Advantages and Limitations of Machine Language

Programs written in machine language can be executed very fast by the computer.
This is mainly because machine instructions are directly understood by the
computer and no translation of the program is required. However, writing a
program in machine language has several disadvantages, which are discussed
below:
1. Machine dependent- Because the internal design of every type of computer is
different from every other type of computer, the machine language also differs
from computer to computer. Hence, suppose after becoming proficient in the
machine language of a particular computer, a company decides to change to
another computer, its programmers will have to learn a new machine language and
would have to rewrite all the existing programs.
2. Difficult to program. Although machine language programs are directly and
efficiently executed by the computer, it is difficult to program in machine
language. It is necessary for the programmer either to memorize the dozens of
operation code numbers for the commands in the machine's instruction set or to
constantly refer to a reference card. A programmer is also forced to keep track of
the storage locations of data and instructions. Moreover, a machine language
programmer must be an expert who knows about the hardware structure of the
computer.
3. Error prone. For writing programs in machine language, since a programmer
has to remember the opcodes and must also keep track of the storage locations of
data and instructions, it becomes very difficult for him/her to concentrate fully on
the logic of the problem. This frequently results in making errors while
programming in machine language.
4. Difficult to modify. It is difficult to correct or modify machine language
programs. Checking machine instructions to locate errors is very difficult and time
consuming. Similarly, modifying a machine language program at a later date is so
difficult that many programmers would prefer to code the new logic afresh instead
of incorporating the necessary modifications in the old program.
In short, writing a program in machine language is so difficult and time consuming
that it is rarely used today.

ASSEMBLY LANGUAGE

We saw above that programming in machine language is difficult and error-prone


mainly because of the following reasons:
1. A programmer needs to write numeric codes for the instructions in the
computer's instruction set.
2. A programmer needs to write the storage locations of data and instructions in
numeric form.
3. A programmer needs to keep track of the storage locations of data and
instructions while writing a machine language program.

Introduction of assembly language in 1952 was the first step towards making
programming task easier. This was m achieved by overcoming the above listed
limitations of machine language programming in assembly language in the
following manner:
1. By using alphanumeric mnemonic codes instead of numeric codes for the
instructions in the instruction set. For example, using ADD instead of 1110
(binary) or 14 (decimal) for the instruction to add, using SUB instead of 1111
(binary) or 15 (decimal) for the instruction to subtract, and so on. With this
feature, the instructions in the instruction set can be much easily remembered and
used by the programmers.
2. By allowing storage locations to be represented in the form of alphanumeric
addresses instead of numeric addresses. For example, the memory locations 1000,
1001 and 1002 may be represented as FRST, SCND and ANSR respectively in an
assembly language program. With this feature, a programmer can much easily
remember and use the storage locations of the data and instructions used in an
assembly language program.
3. By providing additional instructions, called pseudo-instructions, in the
instruction set, which are used for instructing the system how we want the
program to be assembled inside the computer's memory. For example, there may
be pseudo-instructions for telling the system things like:

STAR PROGRA AT 0000


T M
STAR DATA AT 1000
T
SET ASIDE AN ADDRESS FOR FRST
SET ASIDE AN ADDRESS FOR SCN
D
SET ASIDE AN ADDRESS FOR ANS
R

With this feature, a programmer need not keep track of the storage locations of the
data and instructions while writing an assembly language program. That is, he/she
need not even tell the computer where to place each data item and where to place
each instruction of a program.

A language, which allows instructions and storage locations to be represented by


letters and symbols instead of numbers, is called an assembly language or
symbolic language. A program written in an assembly language is called an
assembly language program or a symbolic program.

Assembler
During the discussion of machine language, we saw that a computer can directly
execute only machine language programs that use numbers for representing
instructions and storage locations. Hence an assembly language program must be
converted (translated) into its equivalent machine language program before it can
be executed on the computer. This translation is done with the help of a translator
program known as an assembler. The assembler of a computer system is a system
software, supplied by the computer manufacturer that translates an assembly
language program into an equivalent machine language program of the computer.
It is so called because in addition to translating an assembly language program
into its equivalent machine language program, it also, "assembles" the machine
language program in the main memory of the computer and makes it ready for
execution.

The process of translating an assembly language program into its equivalent


machine language program with the use of an assembler is illustrated in Figure
12.2. As shown in the figure, the input to the assembler is the assembly language
program (often referred to as a source program) and its output is the machine
language program (often referred to as an object program). Since the assembler
translates each assembly language instruction into an equivalent machine language
instruction, there is a one-to-one correspondence between the assembly language
instructions of a source program and the machine language instructions of its
equivalent object program. Note that during the process of translation of a source
program into its equivalent object program by the assembler, the source program
is not being executed. It is only being converted into a form that can be executed
by the computer's processor.

Assembly language program -► input Assembler -► Machine language program


(Source Program) -► One-to-one correspondence -► (Object Program)

Figure 12.2. Illustrating the translation process of an assembler.

You must have noticed from the discussion above that in case of an assembly
language program, the computer not only has to run the program to get the answer,
but it also must first run the assembler (program) to translate the original assembly
language program into its equivalent machine language program. This means that
the computer has to spend more time in getting the desired answer from an
assembly language program as compared to a machine language program.
However, assembly language programming saves so much time and effort of the
programmer that the extra time and effort spent by the computer is worth it.

Assembly language programming and translation of an assembly language


program into its equivalent machine language program can be best illustrated with
the help of an example. For this, let us assume that the computer uses the
mnemonics given in Figure 12.3 for the operation codes mentioned against each.
For simplicity, here we have considered only five operation codes that will be used
in writing our example program. Like this there can be more than hundred
operation codes available in the instruction set of a particular computer.

Mnemonic Opcode Meaning

HLT 00 Halt, used at the end of program to stop


CLA 10 Clear and add into A register
ADD 14 Add to the contents of A register
SUB 15 Subtract from the contents of A register
STA 30 Store A register
Figure 12.3. A subset of the set of instructions supported by a computer.

We will write a simple assembly language program for adding two numbers and
storing the result. The program is shown in Figure 12.4. To get an idea of how
the assembler will convert this program into an equivalent machine language
program, let us follow its instructions one-by-one. Notice that the first five
instructions of the program are pseudo-instructions for telling the assembler what
to do. They are not part of the main program to add the two numbers.

The first instruction of the assembly language program tells the assembler that the
instructions for the ma program (to add two numbers) should start at memory
location 0000. Based on this directive, the assembler w load the first instruction
for the main program (which happens to be CLA FRST in this example) at memo
location 0000 and each following instruction will be loaded in the following
address (that is, ADD SCND will loaded at location 0001, STA ANSR at location
0002, and HLT at location 0003).

START PROGRA AT 0000


M
START DATA AT 1000
SET ASIDE AN ADDRESS FOR FRST
SET ASIDE AN ADDRESS FOR SCND
SET ASIDE AN ADDRESS FOR ANSR
CLA FRST
ADD SCND
STA ANSR
HLT
Figure 12.4. A sample assembly language program for adding two numbers and
storing the result.

The second instruction of the assembly language program tells the assembler that
the data of the program should start at memory location 1000. The next three
instructions tell the assembler to set aside addresses for data items FRST, SCND
and ANSR. Based on these four directives, the assembler sets up a mapping table
somewhere in the computer memory, which looks something like the one shown
in Figure 12.5. That is, the assembler picks up the first free address in the data area
of the program, which is location 1000, and calls it FRST; it picks up the next free
address in the data area, which is location 1001, and calls it SCND; and finally it
picks up the next free address in the data area, which is location 1002, and calls it
ANSR.

Symbolic name Memory location

FRST 1000
SCND 1001
ANSR 1002
Figure 12.5. Mapping table set up by the assembler for the data items of the
assembly language program of Figure 12.4.

The next instruction of the assembly language program is CLA FRST, which the
assembler translates into 10 1000 by translating CLA into 10 with the help of
Figure 12.3 and FRST into 1000 with the help of Figure 12.5. Similarly, the
assembler will translate the instruction ADD SCND into 14 1001, and the
instruction STA ANSR into 30 1002. Finally it translates the next instruction HLT
into 00, thus providing the complete machine language program for the given
assembly language program. The resulting machine language program is shown in
Figure 12.6.
Memory Contents Comments
location Opcode Address
0000 10 1000 Clear and add the number stored at FRST to A
register
0001 14 1001 Add the number stored at SCND to the contents
of A register
0002 30 1002 Store the contents of A register into ANSR
0003 00 Halt
-
-
-
1000 Reserved for FRST

1001 Reserved for SCND


1002 Reserved for ANSR
Figure 12.6. The equivalent machine language program for the assembly
language program given in Figure 12.4.

Advantages of Assembly Language over Machine Language

Assembly languages have the following advantages over machine languages:


1. Easier to understand and use. Due to the use of mnemonics instead of
numeric op-codes and symbolic names for data locations instead of numeric
addresses, assembly language programs are much easier to understand and use as
compared to machine language programs. Assembly language programming also
saves a lot of time and effort of the programmer because it is easier to write as
compared to machine language programs.

2. Easier to locate and correct errors. Because of the use of mnemonic op-codes
and symbolic names for data locations, and also because programmers need not
keep track of the storage locations of the data and instructions, fewer errors are
made while writing programs in assembly language, and those that are made are
easier to find and correct. Additionally, assemblers are designed to automatically
detect and indicate errors for use of an invalid mnemonic op-code or a name that
has never been defined. For example, suppose an assembly language program
instruction reads ADD AREA, and we forget to define AREA in the program, the
assembler will look through its table to find AREA and not finding it will indicate
the error.
3. Easier to modify. Because they are easier to understand, it is easier to locate,
correct, and modify instructions of an assembly language program than a machine
language program. Moreover, insertion or removal of certain instructions from the
program does not require change in the address part of the instructions following
that part of the program. This is required in case of machine language.

4. No worry about addresses. One of the greatest advantage of assembly language


is that programmers need not keep track of the storage locations of the data and
instructions while writing an assembly language program. The importance of
this advantage can be best illustrated with an example. Suppose we have written a
long machine language program involving many instructions and several
references to itself within the program, such as looping, branching, and so on. At
the very end we may suddenly discover that we have left out an instruction in the
middle. If we insert that instruction, we will have to go through the entire program
to check and modify (if necessary) all references to other instructions. This is
certainly a tedious job. But if we write the same program in assembly language,
we merely add the extra instruction, and the assembler will take care of
automatically modifying the references suitably.
5. Easily relocatable. The availability of pseudo-instructions for instructing the
system how we want the program to be assembled inside the computer's memory
makes assembly language programs easily relocatable because their location can
be easily changed merely by suitably changing the pseudo-instructions. This is
not easily possible with machine language programming. This feature can be best
illustrated with the help of an example. Suppose that an assembly language
program starts at address 1000 and we suddenly find that we have another
program to be used with this program and this program also starts at location
1000. Obviously, one of the two programs will have to be rewritten to be moved to
somewhere else. In machine language, this can be a complicated job. But in case
of assembly language, we merely have to suitably change the pseudo-instructions
for assembling the program for one of the two programs. For example, we change
the following pseudo-instructions for one of the programs: to the following
pseudo-instructions:

START PROGRAM AT 1000


START DATA AT 2000
START PROGRAM AT 3000
START DATA AT 4000

and run the assembly language program once again through the assembler. The
equivalent machine language program will this time start at memory location 3000
instead of 1000, and there will be no conflict with the other program. In other
words, assembly language programs can be easily moved from one section of the
memory to another.
6. Efficiency of machine language. In addition to the above mentioned advantages,
an assembly language program also enjoys the efficiency of its corresponding
machine language program because there is one-to-one correspondence between
the instructions of an assembly language program and its corresponding machine
language program. In other words, an assembly language program will be just as
long as the resulting machine language program. So leaving out the translation
time required by the assembler, the actual execution time for an assembly
language program and its equivalent machine language program (written
independently) will be the same.

Limitations of Assembly Language

The following limitations of machine language are not solved by using assembly
language:
1. Machine dependent. Because each instruction of an assembly language
program is translated into exactly one machine language instruction, assembly
language programs are machine dependent. That is, assembly languages differ
from computer to computer and an assembly language program can be executed
only on the computer in whose assembly language it has been written. Thus, a
decision to change to another computer will require learning a new language and
the conversion of all existing programs into the assembly language of the new
computer.
2. Knowledge of hardware required. Since assembly languages are machine
dependent, an assembly language programmer must have a good knowledge of the
characteristics and the logical structure of his/her computer in order to write good
assembly language programs.
3. Machine level coding. In case of an assembly language, instructions are still
written at the machine-code level. That is, one assembly language instruction is
substituted for one machine language instruction. Thus writing assembly language
programs is still time-consuming and not very easy.

Typical Uses of Assembly Language

Due to the above mentioned limitations of assembly languages, programmers


rarely write programs of any significant size in assembly language today. Today
assembly language programming is done only when a program's execution
efficiency is very important. Assembly language programming helps in producing
compact, fast, and efficient code because it gives the programmer total control of
the computer's CPU, memory and registers. Hence, assembly language
programming is mainly used today to fine-tune important parts of programs
written in a higher-level language. High-level language programs that are
candidates for this type of fine-tuning are those whose execution consumes a
substantial part of the total computing resources at their installations, and hence
offer real payoffs for any improvement in execution time. In such circumstances, a
clever programmer who is familiar with the compiler-generated code for the high-
level language program, and also with the purpose of the program at hand, is very
likely to be able to improve it significantly by rewriting in assembly language
some small but critical section of it. It would not be very unusual for the
programmer to be able to improve the program’s performance by an order of
magnitude by rewriting a few dozen, or a few hundred, assembly language
instructions.

Assembly Languages with Macro Instructions

In general, assembly languages are termed one-for-one in nature, that is, each
assembly language instruction will result in one machine language instruction.
However, quite often a certain set of machine language or assembly language
instructions have to be used over and over. For example, three instructions, one
after the other, might be needed to print out a value on a particular computer.
These three instructions, always in the same order, might be used over and over in
the same program. Instead of forcing the programmer to write out the set of three
instructions every time he/she wants to print a value, we might as well design the
assembler (program) in such a way so as to take care of these instructions. Every
time the programmer gave the PRINT instruction, for example, the assembler
would translate it into three machine language instructions instead of one, thus
supplying the complete set of instructions required for printing.

Any instruction, such as PRINT, which gets translated into several machine
language instructions, is called a macro instruction. There might be many such
macro instructions permitted by a particular assembler. Thus, to speed up the
coding process, assemblers were developed that could produce a variable amount
of machine language instructions for each macro instruction of the assembly
language program.

The use of macro instructions adds much work to the computer because the
translation process becomes more than just changing each word into a number.
The assembler must be able to supply the missing steps as well, but it means a
tremendous saving of work for the programmer. The programmer gets relieved of
the task of writing an instruction for every machine operation performed. Thus the
use of macro instructions reduces the length of the programs, cuts down on errors,
and simplifies programming.

The macro instruction capability was developed very early in the evolution of
computer languages. In fact, it is this concept of multiple machine instructions
from one macro instruction around which today's machine-independent high-level
languages are designed.
HIGH-LEVEL LANGUAGE

In the discussion above we saw that both machine and assembly languages have
the following limitations:
1. They are machine dependent. A machine language program or an assembly
language program cannot be executed on any computer other than the one for
which it is written.
2. They require the programmers to have a good knowledge of the internal
structure of the computer being used. Hence only people with sound hardware
knowledge could become good machine language or assembly language
programmers.
3. It is difficult, error prone and time consuming to write programs in machine
language or assembly language because they deal with machine-level coding
requiring one instruction to be written for each machine-level operation.

Due to these limitations, machine and assembly languages are often referred to as
low-level languages. High-level programming languages were designed to
overcome the above listed limitations of low-level programming languages. That
is, high-level languages are characterized by the following features:
1. They are machine independent. That is, a program written in a high-level
language can be easily ported and executed on any computer that has the translator
software for the high-level language.
2. They do not require the programmers to know anything about the internal
structure of the computer on which the high-level language«*programs will be
executed. In fact, since high-level languages are machine independent, a
programmer writing a program in a high-level language may not even know on
which computer will his/her program be executed. This allows the programmers
to mainly concentrate on the logic of the problem rather than be concerned with
the details of the internal structure of the computer.
3. They do not deal with the machine-level coding. Rather they deal with high-
level coding enabling the programmers to write instructions using English words
and familiar mathematical symbols and expressions. Each statement of a high-
level language is normally a macro instruction that gets translated into several
machine language instructions. This is one-to-many translation and not one-to-one
as in the case of assembly language. For example, let us consider the same
problem of adding two numbers (FRST and SCND) and storing the sum in ANSR.
We have already seen that three low-level (machine/assembly) instructions are
required for performing this job. However, if we use a high-level language, say
FORTRAN for instance, to instruct the computer to do this job, only one
instruction need be written:
ANSR = FRST + SCND
This instruction is obviously very easy to understand and write because it
resembles the familiar algebraic notation for adding two numbers: a = b + c.

The advent of high-level languages has enabled the use of computers to solve
problems even by non-expert users. This has allowed many users, without any
background in computer science and engineering, to become computer
programmers. This in turn has resulted in the creation of a large number of
computer applications in diverse areas, leading to the use of computers today in
every walk of life.

Compiler

We saw that a computer can directly execute only machine language programs.
Hence a high-level language program must be converted (translated) into its
equivalent machine language program before it can be executed on the computer.
This translation is done with the help of a translator program known as a compiler.
Thus, a compiler is a translator program (much more sophisticated than an
assembler) that translates a high-level language program into its equivalent
machine language program. A compiler is so called because it compiles a set of
machine language instructions for every program instruction of a high-level
language.

The process of translating a high-level language program into its equivalent


machine language program with the use of a compiler is illustrated in Figure 12.7.
As shown in the figure, the input to the compiler is the high-level language
program (often referred to as a source program) and its output is the machine
language program (often referred to as an object program). Since high-level
language instructions are macro instructions, the compiler translates each high-
level language instruction into a set of machine language instructions rather than a
single machine language instruction. Hence there is one-to-many correspondence
between the high-level language instructions of a source program and the machine
instructions of its equivalent object program. Note that during the process of
translation of a source program into its equivalent object program by the compiler,
the source program is not being executed. It is only being converted into a form
that can be executed by the computer's processor.

High-level language program -►input -►complier-►output-►Machine language


program
(Source Program) -► One-to-many correspondence-► (Object Program)

A compiler can translate only those source programs, which have been written in
the language for which the compiler is meant. For example, a FORTRAN
compiler is only capable of translating source programs, which have been written
in FORTRAN. Therefore, each computer requires a separate compiler for each
high-level language that it supports. That is, to execute both FORTRAN and
COBOL programs on a computer, this computer must have a FORTRAN compiler
and a COBOL compiler. This is illustrated in Figure 12.8.
Program PI in high-level language LI -►Compiler for language LI -► Machine
code for PI
Program P2 in high-level language L2 -►Compiler for language L2-► Machine
code for P2
A computer supporting languages LI and L2
Figure 12.8. Illustrating the requirement of a separate compiler for each high-level
language supported by a computer.

Also note that an object program for one computer will not be the same as the
object program for another computer. Hence it is necessary that each computer
must have its own "personal" compiler for a particular language, say LI. Figure
12.9 illustrates how machine-independence is achieved by using different
compilers to translate the same high-level language program to machine language
programs of different computers.

Compilers are large programs, which reside permanently on secondary storage.


When a source program is to be translated, the compiler and the source program
are copied from secondary storage into the main memory of the computer. The
compiler, being a program, is then executed with the source program as its input
data. It generates the equivalent object program as its output, which is normally
saved in a file on secondary storage. Whenever there is a need to execute the
program, the object program is copied from secondary storage into the main
memory of the computer and executed. Note that there is no need to repeat the
compilation process every time you wish to execute the program. This is because
the object program stored on secondary storage is already in machine language.
You simply have to load the object program from the secondary storage into the
main memory of the computer, and execute it directly. Also note that compilation
is necessary whenever we need to modify the program. That is, to incorporate
changes in the program, you must load the original source program from
secondary storage into the main memory of the computer, carry out necessary
changes in the source program, recompile the modified source program, and create
and store an updated object program for execution.

In addition to translating high-level language instructions into machine language


instructions, compilers also automatically detect and indicate certain types of
errors in source programs. These errors are referred to as syntax errors and are
typically of the following types:
1. Illegal characters
2. Illegal combination of characters
3. Improper sequencing of instructions in a program
4. Use of undefined variable names

A source program containing one or more errors detected by the compiler will not
be compiled into an object program. In this case, the compiler will generate a list
of coded error messages indicating the type of errors committed. This error list is
an invaluable aid to the programmer in correcting the program errors. As shown in
Figure 12.10, the programmer uses this error list to re-edit the source program for
removing the errors and creates a modified source program that is recompiled. As
shown in the figure, the process of editing the source program to make necessary
corrections and recompiling the modified source program is repeated over and
over again until the source program is free of all syntax errors. Also notice from
the figure that the compiler generates the object program only when there are no
syntax errors in the source program.

A compiler, however, cannot detect logic errors. It can only detect grammatical
(syntax errors) in the source program. It cannot know ones intentions. For
example, if one has wrongly entered -25 as the age of a person, when he/she
actually intended +25, the compiler cannot detect this. Programs containing such
errors will be successfully compiled and the object code will be obtained without
any error message. However, such programs, when executed, will not produce
correct results. So logic errors are detected only after the program is executed and
the result produced does not tally with the desired result.

START
Edit source program
Source program
Compile source program
Syntax errors detected?
No
Generate object program
Object program
Stop
If yes
Generate list of coded error messages
Edit source program

Figure 12.10. Illustrating recompilation of a source program until it is free of all


syntax errors.

Linker
A software often consists of several thousands, even several millions, of lines of
program code. For software of this size, it is impractical to store all the lines of
program code in a single source program file due to the following reasons:
1. The large size of the file would make it very difficult, if not impossible, to
work with. For example, it might not be possible to load the file for compilation
on a computer with limited main memory capacity. Again, while editing the file,
it could be very tedious and time-consuming to locate a certain line of code.
2. It would make it difficult to deploy multiple programmers to work
concurrently towards the development of the software for completing it within a
specified time limit.
3. Any change in the source program, no matter how small, would require the
entire source program to be recompiled. Recompilation of large source programs
is often a time-consuming process.
To take care of these problems, a modular approach is generally adapted to
develop reasonably sized software. In this approach, the software is divided into
functional modules and separate source programs are written for each module of
the software. Often there is no need to even write source programs for some of the
modules because there might be programs available in a program library, which
offer the same functionality. These library programs are maintained in their object
code form.

When modular approach is used for developing a software, the software consists
of multiple source program files. Each source program file can be modified and
compiled independent of other source program files to create a corresponding
object program file. In this case, a program called a linker is used to properly
combine all the object program files (modules) of the software, and to convert
them into the final executable program, which is sometimes called a load module.
That is, a linker takes object program files (modules) and fits them together to
assemble them into the program's final executable form.
The process of compiling the multiple source program files of a modularly
developed software and linking them to create the executable program (load
module) is illustrated in Figure 12.11. Note that since converting the source
programs into an executable program is a two-step process, when the software is
modified, there is no need to recompile all the source programs. Rather, only the
changed source programs need to be recompiled to produce new object programs
for them. The linker can then be executed to create a new executable program by
reassembling the newly created and the old object programs and library modules.

Linkers are supplied as a part of the development environment (which consists of


a set of program development tools) of a computer system that includes a
compiler. One can also purchase third-party linkers that can sometimes improve
the performance of a program over the standard linkers provided as a part of the
system's development environment.
Interpreter

An interpreter is another type of translator used for translating programs written in


high-level languages. It takes one statement of a high-level language program,
translates it into machine language instructions, and then immediately executes the
resulting machine language instructions. That is, in case of an interpreter, the
translation and execution processes alternate for each statement encountered in the
high-level language program. This differs from a compiler, which merely
translates the entire source program into an object program and is not involved in
its execution. As shown in Figure 12.12, the input to an interpreter is the source
program, but unlike a compiler, its output is the result of program execution
instead of an object program.

After compilation of the source program, the resulting object program is


permanently saved for future use and is used every time the program is to be
executed. So repeated compilation (translation of the source code) is not necessary
for repeated execution of a program. However in case of an interpreter, since no
object program is saved for future use, repeated interpretation (translation plus
execution) of a program is necessary for its repeated execution. Note that since an
interpreter translates and executes a high-level language program statement-by-
statement, not only the entire program must be reinterpreted for its repeated
execution, but even a program statement must be reinterpreted (translated and
executed) every time it is encountered during program execution. For example,
during the execution of a program, each instruction in a loop will have to be
reinterpreted every time the loop is executed.

As compared to compilers, interpreters are easier to write because they are less
complex programs than compilers. They also require less memory space for
execution than compilers.

The main advantage of interpreters over compilers is that a syntax error in a


program statement is detected and brought to the attention of the programmer as
soon as the program statement is interpreted. This allows the programmer to make
corrections during interactive program development. Therefore, interpreters make
it easier and faster to correct programs.

The main disadvantage of interpreters over compilers is that they are slower than
compilers when running a finished program. This is because each statement is
translated every time it is executed from the source program. In case of a compiler,
each statement is translated only once and saved in the object program. The saved
object program can be executed many times as and when needed, and no
translation of any statement is required during the execution of the program.
Because the interpreter does not produce an object program, it must perform the
translation process each time a program is executed.

To combine the advantages of both interpreters and compilers, sometimes the


prograrn development environment of a computer system provides both a compiler
and an interpreter for a high-level language. In these cases, the interpreter is used
to develop and debug programs. Then, after a bug-free state is reached, the
programs are compiled to increase their execution speed. The object program
produced by the compiler is subsequently used for routine processing.

Assemblers, compilers, and interpreters are also referred to as language processors


since they are used for processing a particular language instructions.

Advantages and Limitations of High-level Languages

Advantages of High-level Languages

High-level languages enioy the following advantages over assembly and machine
languages:

1. Machine independence. A program written in a high-level language can be


executed on many different types of computers with very little or practically no
effort of porting it on different computers. This means that a company changing
computers, even to one from a different manufacturer, will not be required to
rewrite all the programs that it is currently using. This also means that a
commercial software will have a larger market because it need not be restricted to
one type of computer. Thus, the time and effort spent on software development
gets better rewarded with high-level language programming.

2. Easier to learn and use. High-level languages are easier to learn because they
are very similar to the natural languages used by us in our day-to-day life. They
are also easier to use because a programmer need not know anything about the
internal structure of the computer for programming in a high-level language.

3. Fewer errors. While programming in a high-level language, a programmer


need not worry about how and where to store the instructions and data of the
program, and need not write machine-level instructions for the steps to be carried
out by the computer. This allows the programmer to concentrate more on the
logic of the program under development. All these factors lead to fewer
programming errors during program development. Furthermore, compilers and
interpreters are designed to automatically detect and indicate syntax errors.
Hence syntax errors, if any, in the program can be easily located and corrected by
the programmer.

4. Lower program preparation cost. Writing programs in high-level languages


requires less time and effort, which ultimately leads to lower program preparation
cost. Generally, the cost of all phases of program preparation (coding, debugging,
testing, etc.) is lower with a high-level language than with an assembly language
or with a machine language. Moreover, the returns on the investment made in
developing a software are more when the software is developed using a high-level
language because this makes the same software usable on many different types of
computers.

5. Better documentation. The statements of a program written in a high-level


language are very similar to the natural language statements used by us in our day-
to-day life. Hence they can be easily understood by a programmer familiar with
the problem domain. As a result, very few or practically no separate comment
statements are required in programs written in high-level languages. Due to this
reason, high-level languages are also sometimes referred to as self-documenting
languages.

6. Easier to maintain. Programs written in high-level languages are easier to


maintain than assembly language or machine language programs. This is mainly
because they are easier to understand and hence it is easier to locate, correct, and
modify instructions as and when desired. Insertion or removal of certain
instructions from a program is also possible without any complication. Thus,
major changes can be incorporated with very little effort.

Limitations of High-level Languages

The two main limitations of high-level languages are as follows:

1. Lower efficiency. Generally, a program written in a high-level language has


lower efficiency than one written in an assembly language or a machine language
to do the same job. That is, programs written in high-level languages take more
time to execute and require more main memory space. Hence, when a program's
efficiency is very important, its performance critical parts are written in assembly
language and non-critical parts are written in a high-level language.

2. Less flexibility. Generally, high-level languages are less flexible than assembly
languages because they do not normally have instructions or mechanism to control
the computer's CPU, memory and registers. An assembly language provides the
programmers access to all the special features of the machine they are using.
Certain types of operations, which are easily programmed using the machine's
assembly language, are impractical to attempt using a high-level language. This
lack of flexibility means that some tasks cannot be done in a high-level language,
or can be done only with great difficulty.
In most cases, the advantages of high-level languages far outweigh the
disadvantages. Most computer installations use a high-level language for most
programs and use an assembly language for doing special tasks that cannot be
done easily otherwise.

OBJECT-ORIENTED PROGRAMMING LANGUAGES

What is Object-Oriented Programming (OOP)?

Soon after the advent of first few programming languages, it was realized by the
people working in the computer industry that programming is a difficult and time
consuming task. Hence researchers have been continuously working towards
developing better and better programming languages to make programming
simpler, easier, and faster. The goal of the designers of every new programming
language was to introduce some aspects or concepts in their programming
language that will help in achieving the above mentioned objectives. Object-
Oriented Programming (often referred to as OOP, pronounced "oop") is one such
concept used in programming languages. The concept of OOP was first introduced
in 1967 by the developers of a programming language named Simula67. This
concept started gaining popularity in 1980s with the development of another
programming language named Smalltalk, which made extensive use of this
concept. Today this concept has been made part of almost all major programming
languages and is being used quite widely in software development.
The basic idea behind OOP is that programming languages are used for simulating
real-world problems c computers. Because much of the real world is made up of
objects, a simulation of such a world must include simulated objects. Hence the
essence of OOP is solving problems by identifying the real-world objects of the
problem and the processing required of those objects, and then creating
simulations of those objects, the processes, and the required communications
between the objects.

Fundamental Concepts of OOP

The most essential part of support for OOP is the object mechanism. That is, an
OOP language must ha^ mechanisms to define, create, store and manipulate
objects, and some mechanism to allow different objects communicate with each
other. The basic concepts used in OOP languages to support the object
mechanism a: described below.

Object
An object is the primitive element of a program written in an OOP language. Each
object consists of a set < procedures (known as methods) and some data. It stores
the data in variables and responds to messages received from other objects by
executing the procedures (methods). A method is a collection of operations that
specifics the reaction of the object when it receives a message that corresponds to
that method.

A program written in a pure OOP language is a collection of objects that


communicate with each other. Virtually everything, from items as simple as the
integer constant 8 to a complex file-handling system, are objects. As objects, they
are treated uniformly. They all have local memory, inherent processing ability, the
capability to communicate with other objects, and the ability to inherit
characteristics from ancestors.

Each object can be viewed as an abstract data type because it is an autonomous


entity with its private data and methods. Note that an object contains both
functions (procedures/methods) and data that describe the characteristics of the
object. In other words, an object encapsulates both data and functions.

Method

A method of an object defines the set of operations that the object will execute
when a message corresponding to the method is received by the object. In a sense,
methods are like function definitions, complete with parameters and the capability
of returning values. The binding of a message to a method is dynamic. The entire
collection of methods of an object is called the message protocol, or message
interface, of the object. Figure 12.13 illustrates the object model used in OOP.

Message

The mechanism to support communication between objects is through messages.


That is, all computing in a program written in an OOP language is done by
sending a message to an object to invoke one of its methods. A reply to a message
is an object, which returns the requested information, or simply notifies the sender
that the requested processing has been completed.

There is a fundamental difference between a message sent to an object and a


subprogram call. In the former case, the object executes the appropriate method
with its own local data, whereas in the latter case the data to be processed is
usually sent along with the subprogram call to the subprogram code unit.

Class

A class is a description of one or more similar objects. The class concept is similar
to "type" in the conventional procedure-oriented languages. For example, if
"integer" is a type (class), then "8" is an instance (object) of type (class) "integer".
Similarly, "Person-1" and "Person-2" can be two instances (objects) of a class
"Person".

Multiple instances of a class can be created which are known as the objects of the
class. Each object has its own local data and represents a different instance of its
class. Since all the objects of a class share the same methods, the only difference
between two objects of the same class is the state of their local variables. Also
note that there can be two categories of object variables - class variables and
instance variables. Class variables are variables stored in the class whose values
are shared by all instances (objects) of the class. Instance variables are variables
for which local storage is available in the instances (objects).

Object-oriented programming languages also support class hierarchies. Sub-


classes of a given class are refinements of it, inheriting the functionality and local
variables of the parent-class, or super-class. Sub-classes can add new local
variables and methods and can modify or hide inherited methods.

Inheritance

In OOP, inheritance is a mechanism for sharing code and behavior. It allows a


programmer to reuse the behavior of a class in the definition of new classes. We
saw above that a program written in an object-oriented language may have a large
hierarchy of classes. In fact, good programming in an object-oriented language
depends, to a large extent, in creating sub-classes of existing classes because this
leads to potential reuse of existing code.

In a hierarchy of classes, a sub-class inherits all of the instance variables, instance


methods, and class methods of its super-class/parent-class. The sub-class can also
have its own instance variables, which must have different names than the variable
names in its ancestor classes. Finally, the sub-class can define both new methods
and methods that already exist in an ancestor class. When a sub-class has a method
whose name or protocol is the same as an ancestor class, the sub-class method
hides that of the ancestor class. Access to such a hidden method is normally
provided by prefixing the message with the pseudo-variable "super". This causes
the method search to begin in the super-class rather than locally.
Inheritance need not get limited to one parent-class. The child class can inherit
from multiple parent classes. This is called multiple inheritance.

Figure 12.14 describes persons by an inheritance hierarchy of classes (representing


behaviors). The person class has male and female as its sub-classes. The male
class has person as its super-class and boy and man as its sub-classes. The
instances Ram, Shyam, Mohan, Seeta, Geeta each have a unique base class.

Figure 12.15 illustrates the concepts of object, class and inheritance with the help
of an example. In the exampl object 'a' is an instance of class 'A' and object 'b' is
an instance of class 'B'. Both A and B define behavior t operations shared by their
instances, and have instance variables that cause a private copy to be created for
each instance for the class or sub-class. The instance 'a' of class 'A' has a copy of
A's instance variables and a pointer to its base class. The instance 'b' of class 'B'
has a copy of the instance variables of both class 'B' and its superclass 'A' and a
pointer to the base class of 'B'. The representation of class 'B' has a pointer to its
super-class 'A', while class 'A' has no super-class pointer, since it has no super-
class.

When object 'b' receives a message to execute a method, it looks first in the
methods of class 'B'. If found, the method is executed using the instance variables
of 'b' as data. Otherwise, the pointer to its super-class is followed. If it finds the
method in class 'A', it executes it on the data of 'b'. Otherwise, it searches A's
superclass if there is one. If 'A' has no super-class and the method has not been
found, an error is reported.

Procedure-oriented versus Object-oriented Programming

Conventional procedure-oriented programming languages use procedural


abstractions that encapsulate sequences of operations into procedures (also known
as functions, subroutines, or subprograms). On the other hand, object-oriented
programming languages encapsulate data as well as sequences of operations into
abstract entities called objects, providing a stronger encapsulation mechanism than
procedures. Hence object-oriented programming provides a more powerful
modeling tool than procedure-oriented programming.

Notice that both procedures and objects can be considered to be server modules
that may be called by clients to get certain actions performed. However, the basic
difference between the two is in their roles. The role of procedures is to transform
input data specified by parameters into values, while the role of objects is to serve
as a repository of data (the current system state) and to respond (perform the
requested action) in a manner determined by the current system state. For
example, the response of a bank to a withdrawal request depends on the value of
the current balance.

The procedure-oriented programming paradigm has strong organizing principles


for managing actions and algorithms, but has weak organizing principles for
managing shared data. Object-oriented programming paradigm has strong
organizing principles both for managing actions and algorithms and for managing
shared data because it provides the capability to restrict applicable operations to
those associated with a specific object or class. Inheritance provides further
strength to this capability by allowing classes to be classified by factoring out
properties common to several sub-classes into a super-class.

Advantages of OOP

Object-oriented programming paradigm typically has the advantages mentioned


below over conventional procedure-oriented programming paradigm.

Natural Modeling

OOP resembles the real worlds more closely than the conventional procedural
programming. Hence it serves as more natural modeling tool for programming real
world problems. Object-oriented design (often referred to a OOD) involves the
identification and implementation of different classes of objects and their
behaviors. The objects of the system closely correspond to the real world objects,
as is observed and understood by the brain The effort required in the conventional
procedural languages, for the translation or transformation of the fact perceived by
the brain into some other form suitable to the system, gets greatly reduced with
OOP. Hence designing and implementing a system is much easier in OOP.

Modular Design

In OOP, objects are autonomous entities in the sense that the behavior of each
object is defined and implemente in the object itself and is independent of the
implementation of other objects. This independence of each object naturally
provides the facility of modular system design. Object-oriented design (OOD), is
an approach to software design in which the modular decomposition of a system is
based on the classes of objects the system manipulates, not on the function the
system performs. Modular design eases the development and maintenance of
software systems.

Abstraction
Abstraction is the principle that states that programs should not make assumptions
about implementations and internal representations. In OOP, each object can be
viewed as a shielded and encapsulated entity because its data is private to itself
(hidden from other objects) and its interaction with other objects is only through
its message interface. Any object can be requested for any required information or
service by sending the suitable message t it. The requester gets what it asked for
without the need to bother about how the object provides the information or
service. The 'how' part, that is, the implementation details are internal to the
object, the supplier. Thus OOP provides a high degree of abstraction, which gives
an opportunity to the programmers to concentrate more o problem specification
rather than be taken away by the implementation details.

Dynamic Binding

In conventional programming languages, the operators, functions, etc. are bound


to their respective operations at the time of compilation. This is called static
binding. However, in OOP, the binding of operator to an operation takes place at
run time. This is called dynamic binding. To have an understanding of this
concept, let us consider the following situation. A class named 'shape' has been
defined along with a collection of sub-classes for different kinds of shapes, such as
circles, triangles, rectangles, etc. If objects of these sub-classes need to be
displayed, the display method must be defined within the class of the particular
kind of shape, for each kind o shape will require different display code. Suppose
that a linked list of objects of various shapes is constructed and code is written to
display each object on the list. Then the message to 'display shape' is the same for
each object on the list, but it must be dynamically bound to the 'display_shape'
method in the proper object. Naturally the same message 'display_shape' sent to
different objects has got different responses, which is term& polymorphism.
Languages that provide this sort of dynamic binding are called polymorphic
languages. Dynamic binding allows abstract data types to be truly generic because
it enables a single operator to have more than one operation.

Code Reusability

In OOP, inheritance provides an effective method of code reuse because the


common operations defined and implemented in a class can be accessed by all the
classes and instances down the whole class hierarchy. That is, as and when new
classes inherit from existing classes, the code developed in super-classes gets
reused. This feature leads to tremendous saving of programming effort.

Ease of Maintenance
The modular design and code reusability features also help in making software
systems easy to maintain. This is because by making a change in a super-class, in
effect all its sub-classes are changed at once, without the tedium of identifying and
implementing the same changes at a number of places. Moreover, if changes are
made in one sub-class to get distinctions, the code in the super-class and the other
sub-classes remains safe.

Evolution of OOP Languages

The first object-oriented programming language, named Simula 67, was released
in 1967. Its language primitives included objects, classes, and inheritance. It was
used extensively for simulation and other applications, primarily in Europe.
However, the programming language community did not pay too much attention
to OOP until the Software Concepts Group at Xerox PARC (Palo Alto Research
Center) released a language known as Smalltalk in the 1970s. Smalltalk 80, a
version of Smalltalk released in 1980, caught the public imagination because of its
implementation on personal computers and its interactive graphical interface that
permitted browsing and the display of objects in multiple windows. Smalltalk was
actually the basis for both the Apple Macintosh graphical user interface and
Windows.

Starting in the mid-1980s, OOP became a popular term, and object-oriented


dialects of existing programming languages began to appear, like Object-Pascal,
Objective C, and C++. C++ has proven to be a popular object-oriented
programming language because of its connection with C and its support by AT&T
Bell Labs. The OOP philosophy has now got extended to almost all popular
programming languages including Visual Basic and Java.

SOME HIGH-LEVEL LANGUAGES

A large number of high-level languages have been developed since the first ones
in the early 1950s. By now, more than 1000 high-level languages have been
developed, but many of them are no longer in use. Only a handful have been truly
significant, and even fewer have been widely used. In this section, we will briefly
describe some popular high-level languages. Our primary objective here is to
provide some insight into these languages rather than to provide detailed
knowledge required to write programs in these languages.

Why So Many High-level Languages?

Since high-level languages are machine independent, you must be wondering why
so many high-level languages were developed, and why many of them are in use
today, instead of developing and improving just one good high-level language. For
an answer to this question, recall that one of the objectives of high-level languages
is that they should be easier to learn and use by the intended users. Computer
programs are written to solve a very diversified class of problems, such as,
systems-related problems, scientific and engineering problems, business and
commercial problems, graphics problems, etc. The language statements and
notations used in a particular problem domain may be quite different from those
used in other problem domains. If we try to incorporate all types of statements and
notations for solving all classes of problems in a single high-level language, the
features of that high-level language will become too vast and difficult to master.
Such a language will be very difficult to learn and use. Moreover, designing an
efficient compiler for such a language will also be a very tedious task. Hence it is
more logical to have different high-level languages for different problem domains.
The statements and notations used in a particular high-level language are
especially picked up to be useful for solving particular types of problems. For
example, a""scientist using a science-oriented language can use scientific
formulae, and a businessman with a business-oriented language can use business
terms. This makes a high-level language, for a particular problem domain, easier
to learn and use by the users dealing with problems in that problem domain. Hence
today many different high-level languages exist and are in use because each was
designed for different specific purposes. We will see in the discussion below that
different high-level languages have different purposes and areas of applicability.

FORTRAN

FORTRAN stands for FORmula TRANslation. It is one of the oldest high-level


language. It was designed to solve scientific and engineering problems and is
currently the most popular language amongst scientists and engineers. It was
originally developed by John Backus and his team at IBM (International Business
Machine Corporation) for its 704 computer in 1957. Since then it has undergone
several revisions and has been evolving into a wider and more useful language
with time.

The original version of FORTRAN that was developed by John Backus and his
team was soon followed by a version that was popular as FORTRAN II. The next
popular advanced version was FORTRAN IV. In order to make FORTRAN
language machine independent (that is, to allow a program that was written for one
computer system to be run on another computer system), FORTRAN IV was
standardized by American National Standards Institute (ANSI) in the year 1966.
With this, FORTRAN became the first standardized language.

In 1977, an updated version of FORTRAN IV, called FORTRAN 77, was released
and standardized by ANSI. This version was oriented towards structured
programming approach and had several new features for this. Some of the
important ones are:
1. Character string handling.
2. Better constructs for expressing program loops.
3. An IF statement with an optional ELSE clause.

FORTRAN 90 is the latest version of FORTRAN standardized by ANSI. It again


has many new features as compared to FORTRAN 77. Some of the important ones
are:
1. A collection of built-in functions for array operations. These include
DOTPRODUCT, MATMUL TRANSPOSE, MAXVAL, MINVAL, PRODUCT,
and SUM, whose meanings are obvious from their names to users from the
scientific and engineering community.
2. Facility to dynamically allocate and deallocate arrays. This is a radical
departure from earlier FORTRANs, which all supported only static data.
3. Use of pointer variables that facilitate two distinct kinds of uses - (a) they allow
indirect addressing (can be used to point to other data items), which is heavily
used in assembly language programming, and (b) they provide a method of
dynamic storage management (programmers can allocate a piece of dynamic
storage and set a pointer to its address).
4. Addition of new control statements to facilitate easier programming. These
include CASE statement for multiple options selection, EXIT statement for
prematurely departing from a loop, and CYCLE statement for transferring control
to the bottom of a loop but not out.
As FORTRAN language is oriented towards solving problems of a mathematical
nature, it has been designed as an algebra-based programming language. Any
formula or mathematical relationships that can be expressed algebraically can
easily be expressed as a FORTRAN instruction, for example, A = B + C - D. To
illustrate the nature of FORTRAN programs, a simple FORTRAN program to
compute and print the sum of 10 numbers is given in Figure 12.16.

C FORTRAN PROGRAM TO COMPUTE


C THE SUM OF 10 NUMBERS
SUM = 0
DO 50 I =1,10
READ (5, 10) N
SUM = SUM + N
50 CONTINUE
WRITE (6, 20) SUM
10 FORMAT (F6.2)
20 FORMAT (IX, 'THE SUM OF GIVEN NUMBERS = ', F10.2)
STOP
END
It can be seen from the example of Figure 12.16 that a FORTRAN program
consists of a series of statements for input/output, calculation, logic/comparison,
etc. The words READ, WRITE, DO, CONTINUE, STOP, END, etc. in the
statements mean exactly what one would expect.

In the given example, the first two lines that begin with the character C are
comment statements. Comment statements are used in programs for the purpose of
documentation or explanation designed to assist anyone reading the source
program listings. Comments do not form a part of the program logic and are
ignored by the computer. In the third statement of the program, the value of SUM
is initialized to zero. The next statement starts a DO loop. This loop ends in the
line having label 50, which is a CONTINUE statement. Inside the loop, values of
N are read and added to SUM one by one. After the computer loops 10 times,
reading and accumulating the sum of 10 numbers, the computer goes out of the
loop and drops down to the next statement. This is the WRITE statement which
prints the message: THE SUM OF GIVEN NUMBERS = followed by the
computed value of SUM. The next statement, which is a STOP statement tells the
computer to stop the execution of the program. Finally, the END statement tells
the computer that there are no more instructions or statements in the program. The
data for this program is contained in a separate file and is not shown in the
program

COBOL

COBOL stands for COmmon Business Oriented Language. As its name implies, it
was designed specifically for business data processing applications. Today it is the
most widely used programming language for business-oriented applications.
Business data processing applications deal with storing; retrieving, and processing
corporate accounting information, and to automate such functions as inventory
control, billing, and payroll.

The initial work on the design of COBOL language was started in 1959 under the
leadership of retired Navy Commodore and Mathematician Grace Hopper. The
language specifications of COBOL were later worked out in 1959-1960 by a
committee of the Conference on DAta SYstems Languages (CODASYL) as a joint
effort of computer users, manufacturers, and the United States Government. After
the language specifications were defined by this committee, the various
manufacturers wrote the COBOL compilers for their computers. An ANSI
COBOL standard was first published in 1968. Revised versions of this standard
were published by ANSI in 1974 and 1985, which were known as COBOL 74 and
COBOL 85. As long as these standards are followed, a COBOL program can be
run on any computer system with an ANSI COBOL compiler. Visual COBOL is
an object-oriented version of the language.

COBOL language continues to evolve even today. COBOL 2002, the new
COBOL standard, has the following new features:
1. Free format, which allows statements to be positioned anywhere on the line.
The older versions of COBOL had the concept of A and B margins. The A margin
started at column 8 and was used to start a new division, section, or paragraph.
The B margin started at column 12 and was used to start any sentence. Compiler
directives allow the programmer to switch between fixed format (of older
versions) and free format (of new version) in a single program.
2. Inline comments, which allows comments to be positioned anywhere on a line
after the two consecutive characters. In older versions of COBOL, comment
statements had to be on a separate line with an asterisk (*) in column 7.
3. Common exception handling, which specifies predefined exceptions that will
be raised when a runtime exception occurs. The older versions of COBOL did not
prescribe the resultant action for runtime errors such as, subscripting with a value
larger than the size of a table.
4. Several new data types, which allow more flexible programming. Some of
these are boolean, national, and pointer. A boolean data item can have a value of
either 0 or 1. A national data type allows the use of extended character sets, such
as Unicode or Kanji, for foreign language support. A pointer data item can be used
to point to other data items.
5. Conditional compilation of certain code segments, which allows programmers
to tailor programs for different environments. For example, Figure 12.17
illustrates how the >> define and evaluate compiler directives can be used to tailor
a program based on the value of operating system, which is obtained from the
operating environment.
6. Automatic data validation, which allows the programmer to specify
constraints with the data description so that the value of input data gets
automatically validated. Figure 12.18 illustrates how constraints can be specified
with a data description.
7. Call statement enhancements, which allow COBOL programs to interoperate
with other programming languages. With these enhancements, COBOL can now
easily make use of application programming interface written for C and other
programming languages. >>define operating_system as parameter
>>evaluate operating_system
>>when "unix"
*>>code specific to Unix
>>when "win2000"
*>code specific to Windows 2000
>>when other
display "The specified operating system is unknown to the program"
>> end_evaluate

8. File sharing and record locking, which allow the programmer to describe a file
with one of the following sharing attributes: "all other", "no other", and "read
only". These sharing attributes describe the types of access that a user will allow
for other users who access the file simultaneously. A sharing attribute specified
with the "open" statement overrides the type of sharing allowed while the file
remains open. Users can choose between automatic or manual record locking for a
shared file.

9. Object-oriented features, which allow object-oriented concepts such as class,


object, inheritance, etc. to be used while writing COBOL programs.

COBOL was designed to have the appearance and structure of a business report
written in English. Thus, a COBOL program is constructed from sentences,
paragraphs, sections and divisions. All COBOL programs must have the following
four divisions:
1. Identification Division, which specifies the program and its author.
2. Environment Division, which specifies the computer and the peripherals used
to compile and execute the program. If the program is to be processed on a
different computer, this division will have to be rewritten.
3. Data Division, which specifies the structure and format of the input and output
data files as well as all storage locations used to hold intermediate results and
other values during processing.
4. Procedure Division, which contains the sequence of operations to be
performed by the program.
The nature of COBOL programs is illustrated in Figure 12.19 with the help of a
simple COBOL program to compute and print the sum of given numbers. It can be
easily seen from this example that COBOL programs are verbose but easy to read.
COBOL is often referred to as a self-documenting language. Self-documenting
languages are those that do not require much explanation in order to be understood
by someone reading the program instructions. The self-documenting aspect of
COBOL is made possible by its following features:
1. Its English-like commands.
2. Its English-like sentences and paragraph structure.
3. Its very generous maximum symbolic field-name length of 30 characters.
With a field-name length of up to 30 characters, the name can clearly identify the
field and its purposes. COBOL programmer should ensure that the used field-
names are meaningful, so that the self-documenting feature of the language is not
lost.

The main drawback of COBOL is that it is a verbose language. Writing a COBOL


program is somewhat tedious and time consuming because of all the extra words
needed in its statements. However, over the years, this drawback has been taken
care of to a large extent in the following manner:
1. A rich set of libraries of COBOL business applications modules and programs
has been made available today by many vendors. COBOL programmers often
make use of these library programs in their applications for faster development.
2. Automatic program generators for COBOL programs have also been
developed and made available by some vendors. These software packages are
capable of generating 70 to 80% of the code needed in a particular application
program from the application's specifications. The programmer has to manually
write only 20 to 30% of the code needed to tie the program elements together and
to create a customized problem solution for the application. The use of a COBOL
program generator can significantly reduce the time and effort needed to code new
COBOL programs.

BASIC

BASIC stands for Beginners All-purpose Symbolic Instruction Code. It was


developed in the year 1964 by Professor John Kemeny and Thomas Kurtz at
Darmouth College in the United States. Their main objectives for developing a
new programming language were as follows:
1. It should be an interactive language that permits direct communication
between the user and the computer during the preparation and use of programs.
2. It must be easy for non2science students to learn and use the language.
In order to meet these objectives, the designers took the following approach in the
design of BASIC language:
1. It was designed to use terminals as the method of computer access. Before
this, most programs were entered into computers through either punched cards or
paper tape.
2. It was designed as an interpreted language (unlike FORTRAN and COBOL
which were compiled languages) so that programmers could create, run, test and
debug a program in interactive mode.
3. It was designed with very few statements and grammatical rules so that it
could be easily learnt and used by beginner programmers.
The language translator used for BASIC is an interpreter instead of a compiler.
This allows a programmer to check for syntax errors and immediately correct it as
the program is entered. It also makes the language simple and easy to implement
and use.
Because of its simplicity to implement, learn and use, BASIC was the first high-
level language to be implemented on personal computers when they were
introduced. Today, BASIC is available in almost all personal computers and even
in some pocket calculators. This fact makes it one of the most widely installed
computer languages in the world.
Though simple and easy to learn, BASIC is quite flexible and reasonably
powerful. It can be used for both business and scientific applications. Users of
BASIC range from school students to scientists and engineers to business
managers. It is also used to teach programming basics to beginners.
A minimal version of BASIC was standardized by ANSI in 1978. But this
standard is so simple that it has been extended in virtually every available BASIC
dialect. Today, BASIC has many dialects including BASICA, QBASIC, and
Visual Basic. Microsoft's Visual Basic supports object-oriented features and
methods. Furthermore, note that although BASIC began as an interpreted
language, several new dialects of BASIC have added compilers. Microsoft's Quick
BASIC and Visual Basic produce compiled programs.
A BASIC program to compute and print the sum of 10 numbers is given in Figure
12.20. It can be observed from this example that a BASIC program is made up of a
series of statements. Each statement starts with a statement number and a key
word, followed in most cases by some type of action. For example, in the
statement, "40 LET S = S + N", 40 is the statement number, LET is the key word,
and S = S + N is the action. The first two statements of the program, which are
REM statements, are remarks being made for the purpose of explaining or
documenting a program step. They have no effect on the program logic. A
remark/comment statement must have a line number, the key word REM, and any
remark that the programmer wishes to make. In our example, the remark statement
was used to name the program. The two LET statements are assignment
statements. The READ and PRINT statements read input data and print output
result respectively. The FOR and NEXT statements control the loop that is meant
for adding the 10 numbers one-by-one. The two DATA statements in the program
are used to furnish the input data. The END statement stops the program.
5 REM PROGRAM TO COMPUTE
6 REM THE SUM OF 10 NUMBERS
10 LETS = 0
20 FORI=lTO10
30 READ N
40 LET S = S + N
50 * NEXT I
60 PRINT "THE SUM OF GIVEN NUMBERS :
70 DATA 4, 20, 15, 32, 48
80 DATA 12, 3, 9, 14,44
90 END;

Pascal

Named after the famous seventeenth-century, French mathematician, Blaise


Pascal, this language was first developed in the year 1971 by Professor Nicklaus
Wirth of Federal Institute of Technology in Zurich, Switzerland. His main
objective was to develop a language that can allow beginners to learn good
problem solving and programming practices. To meet this objective, Pascal was
developed based on the concepts associated with structured programming. That is,
it was designed in such a way that complete Pascal programs could be written
without the use of any GO TO statement. Special control statements for selection
and looping structures were provided for this purpose. To make programs
structured, Pascal programs are composed of blocks. Each block of statements
starts with a Begin statement and ends with an End statement.

Due to the above mentioned features, Pascal is widely recognized as a language


that encourages programmers to write well-structured, modular programs and
instills good programming practices in a programmer. Owing to this reason, it is
recognized as an educational language and is used to teach programming to
beginners.

Pascal was standardized by ANSI in 1983. Since then several dialects of Pascal
have been made available on different computer systems. An object-oriented
version of Pascal is also available. Pascal is suitable for both scientific and
business applications because it has features to manipulate, not only numbers, but
also vectors, matrices, strings of characters, sets, records, files and lists.

A Pascal program to compute and print the sum of 10 numbers is given in Figure
12.21. The first line of the program contains the name of the program which is
SUMNUMS. This is followed by two comment lines. Any comment can be placed
within the symbols (* and *). Then, all the variables are declared. The variables
SUM and N are declared as real and hence they can be assigned any real number.
Similarly, the variable I, that has been declared to be an integer variable can be
assigned any integer value. The heart of the program starts with the word BEGIN
and ends with the word END. First, the variable SUM is initialized to zero. The
next statement starts a DO loop that reads and computes the sum of the 10
numbers. Finally, the statement having WRITELN prints the result of the
computation.

PROGRAM SUMNUMS (INPUT, OUTPUT);


(* PROGRAM TO COMPUTE THE SUM OF 10 NUMBERS *)
(* DECLARATION OF VARIABLES *) VAR SUM, N : REAL; VAR I: INTEGER;
(* MATN PROGRAM LOGIC STARTS HERE *)
BEGIN
SUM := 0;
FORI:= 1 TO 10 DO
BEGIN
READ (N); SUM := SUM + N; END;
WR1TELN ('THE SUM OF GIVEN NUMBERS=', SUM);
END;

PL/1

PL/1 stands for Programming Language One. It was designed by IBM in 1964.
The main objective of the designers was to design a universal programming
language that could be used for programming any kind of application. Note that
during those days, FORTRAN was used for scientific applications and COBOL
was used for business applications. To meet the objective mentioned above, PL/1
was designed to have the following features:
1. Features similar to COBOL for programming business applications.
2. Features similar to FORTRAN for programming scientific applications.
3. Other features such as string manipulation, list processing, pointer data type,
concurrent execution of tasks and exception handling, for systems programming
and other types of applications.
With all these features, PL/1 became one of the most versatile and most powerful
of the programming languages. However, it could not become the most commonly
used language because with so many features included in it, it also became a
sophisticated language to learn and use. It is enormous by any standards and is not
easy to learn in its totality. Furthermore, the complexity of the language makes a
compiler and support packages for the full language quite large. Because of its size
and heritage, the language has so far been available primarily on IBM systems and
is not very widely used or accepted.
A PL/1 standard was produced by ANSI in the year 1976. A subset of this full
standard, known as PL/l-G was also made available for use with personal
computers.
A PL/1 program to compute and print the sum of 10 numbers is given in Figure
12.22. It can be seen from this example, that the basic element of a PL/1 program
is a statement. Each statement is terminated with a semicolon (;) and several
statements may be combined to form a procedure. A procedure may represent an
entire small program (as in this example) or a block or module of a more complex
program. Because of its modular structure, a beginner needs only a small part of
the language in order to write programs for a particular type of application.
Moreover, modular procedure blocks and other features of the language allow the
use of the various concepts of structured programming.
SUMNUMS: PROCEDURE OPTIONS (MAIN);
/* PROGRAM TO COMPUTE THE SUM OF 10 NUMBERS */
DECLARE (SUM, N) FIXED;
DECLARE I FIXED;
SUM = 0;
DO 1= 1 TO 10;*
GET (N);
SUM = SUM + N; END;
PUT EDIT ('THE SUM OF GIVEN NUMBERS = ', SUM) (A, F5);
END;

SOME MORE HIGH-LEVEL LANGUAGES

The high-level programming languages that were discussed above are not
necessarily the most important or most popular languages. These languages were
presented in some detail to give you a better understanding of computer
programming and nature of high-level languages in general. There are several
other programming languages, which are equally important and popular. Some of
these languages are described in this section.

C and C++

C language was developed in 1972 at AT&T's Bell laboratories, USA by Dennis


Ritchie and Brian Kernighan. Their objective was to develop a language which
will have the virtues of high-level programming languages (mainly machine
independence) with the efficiency of an assembly language. To meet this
objective, C language was designed to have the following features:
1. It was developed as a compiled language (uses compiler as its translator) so
that C language programs could be easily ported to other computers equipped with
a C compiler.
2. It supports pointers with pointer operations. This feature allows the
programmers to directly access the memory addresses where variables are stored
and to perform bit-level manipulation of data stored in memory or processor
registers. Pascal and PL/1 also supported pointers, but restricted their use. C
language has minimal restrictions on the use of pointers allowing greater
flexibility to programmers in writing efficient programs.
3. It supports user-defined data types for greater flexibility in programming.
4. It supports modular and structured programming concepts. That is, while
writing a C program to solve a problem, the problem may be broken down into
smaller tasks, a function may be written (or used) to solve each task, and the C
program may become a group of functions that are linked together to produce the
problem solution. It also supports a rich library of functions, which can be
directly used by programmers for efficient coding of their applications.
5. It is a small and concise language providing only the bare essential features so
that a C language program can be translated by a language translator into an
efficient machine language code.
Due to its features mentioned above, C soon became the language of choice of
systems programmers who wanted to write portable systems software and
commercial software packages like operating systems, compilers, spreadsheet,
word processing, and database management systems. In fact, the first major use of
C was to write an operating system known as UNIX. Today C is extensively used
by all types of programmers for programming various different types of
applications.

Although conciseness and flexible use of pointers make C a very powerful


language, they also make C a language which is difficult to learn and comprehend.
Beginner programmers often find it difficult to understand and use the flexibility
offered by pointers in programming a solution. Moreover, its conciseness feature
allows brief programs to be written for carrying out complex computations. Often
such programs are difficult to understand and modify, particularly when they make
extensive use of pointers.

For several years after its development, the only standard for C was a book on C
written by its developers Kemighan and Ritchie. An ANSI standard for C was
produced in 1989. A new version of C name C++ (pronounced "C plus plus") was
developed by Bjarne Stroustrup at Bell Labs in the early 1980s. The evolution o1
C++ continued during the first half of 1980, and the first widely available
implementation appeared in 1985. C++ is so called because ++ is an operator in C
that increments a variable by 1. Therefore, the C language ii incremented to its
next level with C++.

C++ contains all the elements of the basic C language but has been expanded to
include numerous object-oriented programming features. The most essential part
of support for object-oriented programming is the class/object mechanism, which
is the central feature of C++. C++ provides a collection of predefined classes,
along with the capability of user-defined classes.
C++ being a superset of C is an extremely powerful and efficient language. But
C++ is also more difficult learn than C because learning C++ means learning
everything about C, and then learning object-oriented design and its
implementation with C++.
Over the years, C++ has become a very popular language. It is said that in a few
more years C++ may replace because more and more C programmers are
migrating to C++ every year. Another factor in favor of the future popularity of
C++ is that it is almost completely downward compatible with C (meaning that C
programs can be, for the most part, compiled as C++ programs), and in most
implementations it is possible to link C++ code with code.

Java

Java is a language primarily used for Internet-based applications. Its development


started at Sun Microsystems 1991 by a team led by James Gosling. The language
was formally announced in May 1995, and its j commercial release was made in
early 1996.
The main objective of the developers of Java was to design a language with the
following features:
1. The compiled code should be machine-independent (recall that the compiled
code of other high-level languages is machine dependent).
2. The developed programs should be simple to implement and use even in
consumer electronics products like TV set-top boxes, hand-held devices,
telephones, and VCRs.
Java was designed to have these features in the following manner:
1. Java uses the concept of just-in-time compilation in which Java programs are
typically compiled into machine-independent byte-code, which is interpreted by
the Java runtime system at program execution time.
2. Java was developed as a small subset of C++ features to keep it simple and
easy to use. Several of the complex features of C++ such as pointer and multiple
inheritance are not part of Java. Due to this, Java is considered to be a "clean"
object-oriented language.

Before the innovation of Java, Internet applications were static in nature because
they offered visually static pages of information. The advent of Java and its use in
Internet applications transformed the static pages into a more dynamic one that
allows users to interact with what appears on the screen. Hence, Java brings
animation and interactivity to Internet-based applications.

The use of Java is not only limited to Internet-based applications. It can also be
used to develop anything from spreadsheets to tutorials to interactive games. It can
also be used in embedded systems, as in consumer electronics products such as
hand-held devices, telephones, and VCRs.

Software developed to allow the user to observe and interact with Java programs
has been named HotJava.

Ada

Ada is a multi-purpose language developed for and used primarily by the U.S
Department of Defense (DOD) for military applications. It was developed in 1980
at Honeywell Computer Company by a group of scientists headed by Ichbiah. It is
named in the honor of Lord Byron's daughter Ada Augustha Lovelace. Ada used
to work with Charles Babbage and is considered to be the first programmer
because she wrote the first computer program for the mechanical computer
(Analytical Engine) developed by Charles Babbage in 1842. Ada was standardized
by ANSI in 1983.
The main objective of the developers of Ada was to design a language with the
following features:
1. It should be suitable for writing applications that deal with multiple
concurrent processes because this feature is very common in military applications.
2. The language should have good error-handling capability.
3. The language should support the use of data abstraction in program design.
4. It should be possible to write generic procedures that can be easily reused.
Ada was designed to have these features in the following manner:
2. For error handling, Ada has excellent facilities for exception handling, which
allows the programmer to gain control after run-time errors have been detected.
3. For data abstraction, Ada uses the concept of packages, which provide the
means for encapsulating specifications for data types, data objects, and
procedures. Packages are specified or written into the declarative part of the
program, which is typically at the top part of an Ada program. Then various
procedural statements in the program can access the packages and use it.
4. For generic procedures, Ada allows functions (or subroutines) to be written
with parameters whose data type can be decided when the function is to be used.
For example, it is possible to write a sort procedure that uses an unspecified type
for the data to be sorted. Such a generic procedure must be instantiated for a
specified data type before it can be used. This is done with a statement that causes'
the compiler to generate a version of the procedure with the given type. The
availability of such generic procedures increases the range of program units that
might be reused.
With all these features, Ada turned out to be an extremely powerful and flexible
language. However, with a very large number of features, it also turned out to be
an extremely complicated language. The development of a compiler for the
language is an extremely difficult task. It is also very difficult for a programmer to
master the language because it is too large and too complex. Due to these reasons,
Ada could not become a very popular language in-spite of its rich features.

ALGOL

ALGOL stands for ALGOrithmic Language. As the name implies, ALGOL was
designed for specifying algorithms, primarily of scientific nature, which was the
primary computer application area at that time. It was designed by an international
group comprising of scientists and mathematicians from Europe and the United
States. The first version of the language was released in 1958, and it was known as
ALGOL 58. Later on, it was revised in 1960 and this revised version, known as
ALGOL 60, was the most widely used version of the language. The latest and the
most powerful version of the language is ALGOL 68 that was released in 1968.

Scientific applications being the main area of use, ALGOL was designed as an
extension of FORTRAN. That is. it generalized many of FORTRAN'S features
and added several new constructs and concepts to make the language more flexible
and powerful. Some of the main features of ALGOL are as follows:
1. It allows variable names to be of any length, as opposed to then FORTRAN'S
restriction to six characters.
2. It allows arrays to have any number of dimensions, as opposed to then
FORTRAN'S limitation to no more than three.
3. It allows programmers to specify the lower bound of arrays, whereas in
FORTRAN it was implicitly.
4. It supports nested IF statements, which was not the case in FORTRAN.
5. It has a "for" statement to do what FORTRAN'S "DO" statement does, but
then it also has a "do statement to allow a sort of subprogram process, complete
with parameters.
6. It formalized the concept of data type.
7. It added the idea of compound statements, which are program statements
composed of multiple simple statements.
8. It introduced the concept of block structure. This allowed the programmer to
localize parts of programs by introducing new data environments, or scopes. For
example, in the following code segment
begin
integer total, index;
end;
the begin-end pair forms a block in which the variables total and index are local
variables. They are not visible, nor do they have storage associated with them
when control is outside the block.
9. It allows semi-dynamic arrays for which the subscript range or ranges are
specified by variables, so that the size of the array is set at the time storage is
allocated to the array which happens when the declaration is reached during
execution. For example, the following code segment illustrates the use of this
feature:

procedure addelement (listlen, newelement);


value listlen;
integer listlen, newelement;
begin
integer array [1 : listlen] list;
end
end;
addelement;

ALGOL succeeded in becoming the only acceptable formal means of


communicating algorithms, and it remained for over 20 years the sole language for
publishing algorithms. However, ALGOL never became a popular programming
language. Some of the main reasons for its lack of acceptance and wide-spread
usage are:
1. Some of its features turned out to be too flexible, making its understanding
difficult and implementation inefficient.
2. With its vast and flexible features, development of a compiler for the language
became an extremely difficult task.
3. The language was primarily designed as a way of expressing algorithms, and
input/output statements were not made a part of the language. The lack of I/O
facilities made it very difficult to interface a program with the outside world.
4. IBM, the largest computer manufacturer during those days, did not favor and
support ALGOL on its systems early in its existence.
RPG
RPG stands for Report Program Generator. As the name implies, it is a language
designed to generate the output reports resulting from the processing of common
business applications. The language was developed by IBM as a result of their
customer requests for an easy and economic mechanism for producing reports. It
was launched in the year 1961 for use on the IBM 1401 computer. The later
version of RPG, called RPG II, greatly improved the language and gave it
additional capabilities.
RPG is considered different from other programming languages. Instead of writing
instructions or statements, the programmer uses very detailed coding sheets to
write his/her specifications about input, calculations, and output. These sheets
specify exactly what is to be done, and then the computer uses them to generate
the necessary instructions to perform the desired applications. Thus, RPG is easier
to learn and use as compared to COBOL. Owing to these reasons, it is well suited
for applications where large files are read, few calculations are performed, and
output reports are created. However, RPG has restricted mathematical capability
and cannot be used for scientific applications.

RPG is primarily used to process business applications on small computers.

LISP

LISP stands for LISt Processing. It was developed in 1959 by John McCarthy of
MIT. His goal was to develop a language that will be good at manipulating non-
numeric data, such as symbols and strings of text. Such data handling capability is
needed in compiler development, and in Artificial Intelligence (AI) applications
that deal with the idea of using computers for modeling human information
storage and retrieval, along with other fundamental processes, of the brain. This
capability was provided in the form of list processing feature that allow computers
to process symbolic data in lists (collection of non-contiguous memory cells that
are chained together with pointers). A list having four data elements is shown in
Figure 12.23.
LISP is a functional programming language and is very different from other
imperative languages like FORTRAN, COBOL, and Pascal. All computation in a
functional programming language is accomplished by applying functions to
arguments. There need not be any assignment statements or even variables that are
used the way those of the imperative languages (to store values that change during
program execution).

Due to its powerful list processing capability, LISP is extensively used in the areas
of pattern recognition, artificial intelligence, and for simulation of games. It totally
dominated AI applications area for almost a quarter of a century. Even today, it is
the most widely used language for AI applications.

SNOBOL

SNOBOL stands for StriNg Oriented symBOlic Language. It is another language


used for non-numeric applications. As the name implies, the language was
basically designed to manipulate strings of characters. It has powerful string
manipulation features that facilitate various types of operations on strings of
characters such as string comparisons, splitting of a string, combining two strings,
etc. Thus, this language has been widely accepted for applications in the area of
text processing.

PROLOG
PROLOG stands for PROgramming in LOGic. Logic programming deals with the
use of a formal logic notation to communicate some computational process to a
computer. Predicate calculus is the notation used in current logic programming
languages.
:

PROLOG is a non-procedural language and is very different from other procedural


languages like FORTRAN, COBOL, and Pascal. In a. procedural programming
language, the programmer gives detailed instructions on how to do the job at hand.
On the other hand, in a non-procedural programming language, the programmer
only specifies what is to be done and leaves it to the system to figure out the
methodology to do the job at hand. What is needed to provide this capability is a
concise means of supplying the computer with both the relevant information and a
method of inference for computing desirable results. PROLOG uses predicate
calculus for supplying the basic form of communication to the computer, and the
proof method named resolution, for the inference technique. Notice that a non-
procedural programming language allows the programmer to concentrate on the
problem specification. Non-procedural programming languages are also known as
problem-oriented or specification-oriented languages.
PROLOG was developed in early 1970s by a group consisting of scientists from
the University of Aix-Marseille and the University of Edinburgh. Its first
interpreter was developed at Marseille in 1972. It started with a lot of promise for
use in the development of expert systems (intelligent computer systems).
However, as of now it is not very widely used mainly because of the following
two major limitations of logic programming languages:
1. As of now logic programming languages have proven to be highly inefficient.
2. It has been found that logic programming languages can be effectively utilized
for only a few relatively small areas of application.

CHARACTERISTICS OF A GOOD PROGRAMMING LANGUAGE

In the previous section, we have seen that there are some high-level languages,
which are very popular, and there are others, which could not become so popular
in-spite of being very powerful. There might be many reasons for the success of a
language, but one obvious reason is the characteristics of the language. Several
characteristics believed to be important with respect to making a programming
language good are briefly described below.
1. Simplicity. A good programming language must be simple and easy to learn
and use. For example, BASIC is liked by many programmers only because of its
simplicity. Thus, a good programming language should provide a programmer
with a clear, simple, and unified set of concepts which can be easily grasped. It
is also easy to develop and implement a compiler or an interpreter for a
programming language that is simple. However, the power needed for the
language should not be sacrificed for simplicity. The overall simplicity of a
programming language strongly affects the readability of the programs written in
that language, and programs that are easier to read and understand are also easier
to maintain.
2. Naturalness. A good language should be natural for the application area it has
been designed. That is, it should provide appropriate operators, data structures,
control structures, and a natural syntax in order to facilitate the users to code their
problem easily and efficiently. FORTRAN and COBOL are good examples of
scientific and business languages respectively that posses high degree of
naturalness.
3. Abstraction. Abstraction means the ability to define and then use
complicated structures or operations in ways that allow many of the details to be
ignored. The degree of abstraction allowed by a programming language directly
affects its writability. For example, object-oriented languages support high
degree of abstraction. Hence writing programs in object-oriented languages is
much easier. Object-oriented languages also support reusability of program
segments due to this feature.
4. Efficiency. The programs written in a good programming language are
efficiently translated into machine code, are efficiently executed, and acquire as
little space in the memory as possible. That is, a good programming language is
supported with a good language translator (a compiler or an interpreter) that gives
due consideration to space and time efficiency.
5. Structuredness. Structuredness means that the language should have
necessary features to allow its users to write their programs based on the concepts
of structured programming. This property of a language greatly affects the ease
with which a program may be written, tested, and maintained. Moreover, it forces
a programmer to look at a problem in a logical way so that fewer errors are created
while writing a program for the problem.
6. Compactness. In a good programming language, programmers should be
able to express intended operations concisely. A verbose language can tax the
programmer's sheer writing stamina and thus reduce its usefulness. COBOL is
generally not liked by many programmers because it is verbose in nature and lacks
compactness.
7. Locality. A good programming language should be such that while writing a
program, a programmer need not jump around visually as the text of the program
is prepared. This allows the programmer to concentrate almost solely on the part
of the program around the statement currently being worked with. COBOL lacks
locality because data definitions are separated from processing statements, perhaps
by many pages of code.
8. Extensibility. A good programming language should also allow extension
through simple, natural, and elegant mechanisms. Almost all languages provide
subprogram definition mechanisms for this purpose, but there are some languages
that are rather weak in this aspect.
9. Suitability to its Environment. Depending upon the type of application for
which a programming language has been designed, the language must also be
made suitable to its environment. Foi example, a language designed for real time
applications must be interactive in nature. On the other hand, languages used for
data processing jobs like pay-roll, stores accounting, etc., may be designed to be
operative in batch mode.

SELECTING A LANGUAGE FOR CODING AN APPLICATION

One is often faced with the situation of selecting a programming language out of
the many options available for coding an application. The following factors
generally influence the selection process:
1. Nature of the application. The language should be suitable for the application
area. For example FORTRAN is suitable for scientific and engineering
applications, while COBOL is suitable for business applications.
2. Familiarity with the language. If there are multiple languages that are found
suitable for the application area, then the language selected should be one that is
best known to the programmers who are going to code the application.
3. Ease of learning the language. If there are multiple languages that are found
suitable for the application area, and if the programmers are not familiar with any
of them, then the language, which is easier to learn and use, should be selected.
4. Availability of program development tools. Before selecting a language, one
must also find out whether the language is well supported with good program
development tools like compiler, interpreter, debugger, linker, etc. The time and
effort needed for coding the application can be greatly reduced if the selected
language is supported with good program development tools.
5. Execution efficiency. If the execution efficiency of the application is
important, one many use an assembly language instead of a high-level language
for coding the application. This is because an assembly language program written
by a clever programmer usually has a shorter production run time and takes less
storage space than does a program of the same application written in a high-level
language.
6. Features of a good programming language. Finally, the features of a good
programming language discussed in the previous section often influence the
selection process.

OTHER RELATED CONCEPTS

Subprogram

Suppose we are writing a program for solving a trigonometric problem. In the


problem solution, suppose we need to calculate the square root of three numbers at
three different places in the program. We could of course write the steps required
for the calculation of square root each time we need them in the program. But a
much easier way of handling the problem would be to write these steps once and
then refer to them each time we need them. Every programming language provides
a way to do this by defining subprograms. A subprogram is a program written in
such a way that it can be brought into use in other programs and used whenever
needed, without rewriting. A subprogram is referred to by different names in
different programming languages. For example, other names used to refer to
subprograms are subroutines, subprocedures, and functions.

The structure of a subprogram is shown in Figure 12.24. It consists of a header and


a body. The subprogram header, which is the first line of a subprogram, provides a
name for the subprogram and it may optionally specify a list of parameters (also
known as arguments). The subprogram name is used by other programs to refer to
the subprogram when they want to use the subprogram. The parameters are
specific variable names, numeric values, or other data that you want the
subprogram to use as it executes the instructions in its body. The list of parameters
is optional because there may be subprograms for which you do not need or want
to pass any arguments. The subprogram body contains the set of instructions that
perform the intended task of the subprogram.
Once created, a subprogram can be used by other programs as often as needed. At
whatever points in a program the function performed by the subprogram is
required, a statement to call the subprogram is inserted by the programmer.
Typically, the subprogram call statement contains the name of the subprogram
followed by the list of parameters enclosed within a pair of parentheses. If you do
not need or want to pass any arguments to the subprogram, the empty parentheses
are still required normally to distinguish the statement as a subprogram call. For
example, a statement to call the subprogram which calculates the square root of a
number may be
a = sqrt (b);
Different programming languages may have different syntax for writing the call
statement for calling a subprogram.

Set of instructions that perform the intended task


Subprogram header
Subprogram body

While executing a program that has one or more subprogram call statements, when
the computer encounters a subprogram call statement, the control flow jumps to
wherever the subprogram's code is, executes the statements in the subprogram
body, then returns to that statement of the calling program which is immediately
after the call statement. The flow of control in case of a subprogram call is
illustrated in Figure 12.25. Note that the subprogram itself need never be written
again, nor need it appear more than once in a program, no matter how often its
services may be required.

Subprograms may be intrinsic or programmer-written. Intrinsic subprograms


(commonly referred to as built-in-functions) are those provided with the language
so that the programmer need only call them in a program to have them
automatically invoked. There are many functionalities such as those for finding
square roots, sines, cosines, logarithms, etc., which are used over and over again
by many programmers in their programs. Such functionalities are usually supplied
along with a programming language in the form of built-in-functions. On the other
hand, programmer-written subprograms are written and used as and when they are
needed.
Subprograms can also return a value to the calling program. This makes it
convenient to use a subprogram to set the value of a variable. For example, in case
of our subprogram to calculate the square root of a number, you supply the
number as its parameter,, and the, subprogram calculates and returns the square
root of the number. Based on this criterion, subprograms are often categorized into
two basic types: procedures and functions. A procedure is a subprogram that
performs an action but returns no value. For example, a procedure might print a
value or update a data structure. On the other hand, a function is a subprogram that
returns a single value, as do mathematical functions like sine, cosine, absolute,
square root. Both functions and procedures are widely used in general-purpose,
high-level programming languages.

Subprograms have the following distinct advantages:

1. They make it easier to write programs because the programmer can write less
code. The same code can be called from many places in a program, instead of
being duplicated everywhere it is needed.
2. Since only one copy of a subprogram's code is kept in the system instead of
duplicating it everywhere it is needed, this leads to shorter source programs and
their executable codes for programs that make use of subprograms. This leads to
saving of storage space in the system and requirement of less memory space
during the execution of a program.
3. Subprograms allow programs to be built in a modular fashion, which is
essential to the construction of large software systems.
4. Modular design of software systems in the form of subprograms also provides
the capability of compiling parts of a program (individual subprograms) without
compiling the whole program (all subprograms used by the program). With such
a capability, only the modules (subprograms) of a system that are being changed
need to be recompiled during development or maintenance of the software system.
Newly compiled and previously compiled modules (subprograms) are collected
and put together by a program called linker. Without this capability, every change
to a software system would require a complete recompilation. In a large system,
this is costly.
5. Creating a subprogram for the task in question will obviate the need to do it
again. This promise gives its author incentive to invest great care in generalizing
it, debugging it, optimizing its performance, documenting it, and otherwise
perfecting it. Thus subprograms often are very well written and documented parts
of a program.

Preprocessor

A standard programming language is often extended to support features needed by


a specific user group. For example, a user group frequently dealing with a special
type of input data or a special type of input device may like to have statements to
directly accept this input. In this case, a standard language, which is most suitable
for the user group applications, can be extended to have statements to support this.
With this extension, the users can program their applications more easily.
However, since the extended features (additional statements) are not supported in
the original standard language, a language processor is needed that translates the
additional statements (extensions to the standard language) into a sequence of
statements of the standard language before the program can be successfully
compiled by the standard language compiler. Such a language processor is known
as a preprocessor.

As shown in Figure 12.26, a preprocessor accepts as input a source program


written in an extended language (with the added features) and produces an output
source program that is acceptable to the compiler of the standard language
(without the added features). The preprocessor reads each statement in the input
source program and parses it to see if its syntax pertains to the added statements
(extended features). If not, the preprocessor leaves the statement unchanged. If so,
the preprocessor generates a sequence of statements in the standard language for
the current statement 4o produce the same effect. Note that the output source
program generated by the preprocessor will be longer than the input source
program because the preprocessor generates a sequence of statements for each
statement in the extended language.

As shown in the figure, preprocessing inevitably requires two translation passes -


the first pass translates the source program in extended language to a standard
language source program by using the preprocessor, and the second pass translates
the standard language source program to executable object code by using the
standard language compiler. But in most cases of preprocessing, the user is given
the feel of one-pass translation through creation of a library of system commands
that, when invoked, runs through the multiple operations in response to a short
sequence of keystrokes or one click of a picking device.

Scripting Languages

Command statements are used to instruct a computer to do some job. For example,
a "run" or "exec" statement may be used to execute a program and a "copy"
statement may be used to copy a file from one storage device 1 another. Often a
user needs to execute a set of commands to perform a particular task. For example,
to perform task, the user may be required to execute two independent programs,
and after execution of the first program he/she may be required to copy the output
file of the first program on to a device from which the second program expects the
input. So in this case, the user needs to specify two execute commands for
executing the two programs and a copy command before the second execute
command. A scripting language is a programming language that allows
programmers to integrate several such commands into a single command so that
the programmer need not type all the commands every time he/she needs to
perform the intended task. A program written in a scripting language is commonly
referred to as a script. Scripting languages support variables and simple control
structures to allow programmers to write scripts, which can conditionally execute
or repeat the execution of certain commands. With these features, scripting
languages may be used to define complex commands execution patterns.

Another common use of scripting languages is in specifying execution


environment setup for applications that are quite complex, yet flexible enough* to
be "used in a variety of contexts. For an individual run of such an application,
programmers must configure a setup to customize the application for its current
run. This setup can be specified in the form of a script written in a scripting
language. The script integrates individual commands into a single command that
can be used to drive application execution.

A scripting language is interpreted, rather than compiled. Hence a script can


interact with a running program and change during the run. In addition to
controlling a running program, scripts can preprocess and post process data.
Scripting languages typically let programmers invoke individual application
components directly. Application components are individual programs, such as
data format converters and visualizers that carry out specific data processing tasks
and can be used in different contexts
.
Some commonly known scripting languages are Unix Shell Script, Perl, Tel, and
Python. A typical script looks like the one shown in Figure 12.27.

users = 'who I we —1'


if test $users -gt 10
then echo "More than 10 users logged on"
fi
Figure 12.27. A typical script. The first line of the script sets the variable 'users'
equal to the value produced by the pipeline of commands 'who I we -F. This is in
fact a count of the number of users currently logged on to the system. This value is
then compared with the number 10, and if it is greater, then the message is
displayed.

Fourth-Generation Languages (4GLs)

Some people in the computer field like to identify the major developments in
programming language area by generations. According to them, machine
languages, assembly languages, and high-level languages are identified as first-
generation, second-generation, and third-generation languages respectively. Every
new generation of language brought significant improvement in programmer
productivity by making programming languages more and more user-friendly.
Studies indicate that the move from first-generation machine languages to second-
generation assembly languages brought approximately a seven-to-one
improvement in programmer productivity. A much more significant improvement
in programmer productivity was found in the move from second-generation
assembly languages to third-generation high-level languages. The efforts for the
search of new programming languages which could further improve programmer
productivity continued even after the advent of third-generation high-level
languages. The result of these efforts has been the fourth-generation languages,
which claim programmer productivity improvements of 200% to 1000% over
third-generation high-level languages.

There is a major shift in fourth-generation languages as compared to the languages


of previous generations. All previous-generation languages were procedural
languages whereas fourth-generation languages are nonprocedural languages. A
procedural language (such as COBOL, FORTRAN, BASIC) is one that requires
the programmer to spell out the steps in the processing procedures needed to
achieve a desired result. On the other hand, a non-procedural language allows the
user to simply specify "what" the output should be without describing all the
details of "how" the data should be manipulated to produce that result. With this
type of flexibility provided by fourth-generation languages, many computer users
often find it easier and quicker to write a program themselves than to depend on a
professional programmer who will write a program for generating the desired
report. Fourth-generation languages are so user-friendly that with a day or two of
training and practice, a computer-competent user can learn to write programs,
make inquires, and generate the desired reports on his/her own.
Fourth-generation languages use high-level English-like instructions. They require
the programmer to specify only "what" to do, not "how" to do it. Most of the
procedure portion (steps to carry out the intended task) of a fourth-generation
language program is generated automatically by the language processor of the
4GL. Fourth-generation language features include limited mathematical
capabilities, automatic report formatting, sequencing, and record selection by
criteria.

A typical fourth-generation language program looks like the one shown in Figure
12.28. The result of the execution of the fourth-generation language program of
Figure 12.28 is shown in Figure 12.29.

Some commonly known fourth-generation languages are ADR's Ideal, Software


AG's Natural 2, Cinmon's Mantis, Mathematica Products Group's RAMIS II, and
Information Builders' FOCUS.

1. FILE IS STUDENTSINFO
2. LIST BY ROLLNO: NAME SEX PHY CHEM MATH
3. SELECT CLASS = 8
4. TITLE: "MARKS OBTAINED BY THE STUDENTS OF CLASS 8"
5. COLUMN HEADINGS: "ROLL, NUMBER"; "STUDENT,
NAME"; "SEX"; "MARKS IN, PHYSICS"; "MARKS IN,
CHEMISTRY"; "MARKS IN, MATHEMATICS"

Figure 12.28. A typical fourth-generation language program.

MARKS OBTAIN BY THE STUDENTS OF 8


ED CLASS
ROLL STUDEN SEX MARKS MARKS IN MARKS IN
T IN
NUMBER NAME PHYSICS CHEMISTRY MATHEMATIC
S
001 P. K. M 85 • 89 96
Sinha
002 N. C. Rao M 72 76 77
003 S. S. F 86 82 94
Pawar

Figure 12.29. Result of the execution of the fourth-generation language program


of Figure 12.28 (only few records are shown here just to illustrate the nature of
output).

Points to Remember
1. A language that is acceptable to a computer system is called a computer
language or programming language, and the process of writing instructions in such
a language for an already planned program is called programming or coding.
2. All computer languages can be broadly classified into three categories,
namely machine language, assembly language and high-level language.
3. A programming language that can be understood by a computer without using
a translation program is called the machine language of the computer. It is
normally written as strings of binary Is and Os.
4. A language which allows instructions and storage locations to be represented
by letters and symbols instead of numbers is called an assembly language or
symbolic language. A program written in an assembly language is called an
assembly language program or a symbolic program.
5. An assembler is a translator program that translates (converts) an assembly
language program (source program) into its equivalent machine language program
(object program).
6. Machine and assembly languages are often referred to as low-level languages
because they are machine dependent, they require the programmers to have a good
knowledge of the internal structure of the computer being used, and they deal with
machine-level coding requiring one instruction to be written for each machine-
level operation. High-level programming languages overcome these limitations
of low-level programming languages.
7. A compiler is a translator program that translates (converts) a high-level
language program (source program) into its equivalent machine-language program
(object program).
8. In addition to translating high-level language instructions into machine
language instructions, compilers also automatically detect and indicate certain
types of errors in source programs. These errors are referred to as syntax errors. A
compiler, however, cannot detect logic errors in source programs.
9. A linker is a software that takes multiple object program files (modules) of a
software and fits them together to assemble them into the program's final
executable form, which is sometimes called a load module.
10. An interpreter is a translator program that translates (converts) a high-level
language program into its equivalent machine-language program. However, unlike
a compiler which merely translates the entire source program into an object
program and is not involved in its execution, an interpreter takes one statement of
the source program, translates it into machine language instructions, and then
immediately executes the resulting machine language instructions before taking
the next statement for translation. No object program of the source program is
generated by the interpreter.
11. Object-oriented programming (OOP) deals with solving problems by
identifying the real-world objects of the problem and the processing required of
those objects, and then creating simulations of those objects, their processes, and
the required communications between the objects.
12. Conventional procedure-oriented programming languages use procedural
abstractions that encapsulate sequences of operations into procedures (also known
as functions, subroutines, or subprograms). On the other hand, object-oriented
programming languages encapsulate data as well as sequences of operations into
abstract entities called objects, providing a stronger encapsulation mechanism than
procedure. Hence object-oriented programming provides a more powerful
modeling tool than procedure-oriented programming.
13. Today many different high-level languages exist and are in use because each
was designed for different specific purposes. Some of these are FORTRAN,
COBOL, BASIC, Pascal, PL/1, C, C++, Java, Ada, ALGOL, RPG, LISP,
SNOBOL and PROLOG.
14. Several characteristics believed to be important with respect to making a
programming language good are simplicity, naturalness, abstraction, efficiency,
structuredness, compactness, locality, extensibility, and suitability to its
environment.
15. The factors that generally influence the process of selecting a programming
language out of the many options available for coding an application are nature of
the application, familiarity with the language, ease of learning the language,
availability of program development tools, execution efficiency, and features of a
good programming language.
16. A subprogram is a program written in such a way that it can be brought into
use in other programs and used whenever needed, without rewriting. Other
names used to refer to subprograms are subroutines, subprocedures, and
functions.
17. Subprograms are often categorized into two basic types: procedures and
functions. A procedure is a subprogram that performs an action but returns no
value, while a function is a subprogram that returns a single value.
18. Subprograms may be intrinsic or programmer-written. Intrinsic subprograms
(commonly referred to as built-in-functions) are those provided with the language
so that the programmer need only call them in a program to have them
automatically invoked. On the other hand, programmer-written subprograms are
written and used as and when they are needed.
19. A standard programming language is often extended to support features
needed by a specific user group. However, since the extended features (additional
statements) are not supported in the original standard language, a language
processor is needed that translates the additional statements (extensions to the
standard language) into a sequence of statements of the standard language before
the program can be successfully compiled by the standard language compiler.
Such a language processor is known as a.preprocessor.
20. Command statements are used to instruct a computer to do some job. A
scripting language is a programming language that allows programmers to
integrate several such commands into a single command so that the programmer
need not type all the commands every time he/she needs to perform the intended
task. A program written in a scripting language is commonly referred to as a
script.
21. Fourth-generation languages (4GLs) are very high-level programming
languages that use English-like instructions. They require the programmer to
specify only "what" to do, not "how" to do it. Most of the procedure portion (steps
to carry out the intended task) of a fourth-generation language program is
generated automatically by the language processor of the 4GL.
22. A procedural language (such as COBOL, FORTRAN, BASIC) is one that
requires the programmer to spell out the steps in processing procedures needed to
achieve a desired result. On the other hand, a nonprocedural language (such as
4GLs) allows the user to simply specify "what" the output should be without
describing all the details of "how" the data should be manipulated to produce that
result.

Questions

1. What is a programming language? Why is it so called?


2. What is meant by coding a program?
3. Discuss the analogy between a computer language and a natural language.
4. How does a computer language differ from a natural language?
5. What is meant by syntax rules of a programming language?
6. Name the three categories of computer languages in order of their ease of
usage.
7. What is a machine language? Why is it required?
8. What are the advantages and limitations of machine language?
9. When is a computer language called machine dependent? What is the main
disadvantage of such a language?
10. A machine language instruction has two-part format. Identify these parts and
discuss the function of each.
11. Explain why machine language programming is difficult and error-prone.
12. It is said that machine language programming is difficult and error-prone.
Explain how assembly languages overcome these limitations of machine
languages.
13. What is a mnemonic? How is it helpful in case of computer languages?
14. What is an assembly language? What are its advantages over machine
language?
15. What is an assembler?
16. What is the difference between a source program and an object program?
17. List out the advantages of assembly language over machine language.
18. List out the limitations of machine language which are not overcome by the
use of assembly language.
19. List out some of the typical uses of assembly language.
20. What is a macro instruction? How does it help in reducing a programmer's
job?
21. Why are machine and assembly languages often referred to as low-level
languages?
22. List out the main characteristic features of high-level languages. Name ten
high-level languages.
23. Why are high-level languages easier to learn and use?
24. What is a compiler? Why is it required? A computer supports five high-
level languages. How many compilers will this computer have?
25. It is said that an assembly language is "one-for-one" but a high-level
language is "many-for-one". Explain what this means.
26. Illustrate the machine independence characteristic of a high-level language.
27. Differentiate between syntax errors and logic errors found in computer
programs. Which type of error more difficult to detectand correct? Give reasons
for your answer.
28. While writing a program, a programmer erroneously instructed the computer
to calculate the area of rectangle by adding the width to its length (that is, AREA =
LENGTH + WIDTH) instead of multiplying the length and the width. Would you
expect the language processor to detect this error? Explain why.
29. A programmer eliminates all language processor errors from his/her
program and then runs it to get print results. The programmer therefore concludes
that the program is complete. Comment.
30. What type of errors in a program can be detected by a compiler? What type
of errors cannot be detected?
31. What is a linker? Why is it required?
32. Differentiate between the compilation and linking processes of a software.
33. Differentiate among source programs, object programs, library modules, and
load module of a software; system.
34. Explain the differences among assemblers, compilers, interpreters, and
linkers.
35. What is an interpreter? How does it differ from a compiler?
36. What are the two approaches commonly used to translate high-level
languages into machine language Discuss the relative advantages and
disadvantages of the two approaches.
37. What advantages do compilers have over interpreters?
38. What advantages do interpreters have over compilers?
39. When would you prefer to use a compiler than an interpreter?
40. When would you prefer to use an interpreter than a compiler?
41. What are the advantages and limitations of high-level languages as
compared to machine and assembly languages?
42. What is object-oriented programming?
43. It is said that the most essential part of support for object-oriented
programming is the object mechanism What are the basic concepts used in
object-oriented programming languages to support the object mechanism?
44. With reference to object-oriented programming languages define the
following terms:
(a) Object (e) Message protocol
(b) Method (f) Multiple inheritance
(c) Class (g) Instance of a class
(d) Inheritance
45. Give a suitable example to illustrate the concepts of object, class and
inheritance used in object-oriented programming languages.
46. Differentiate between procedure-oriented and object-oriented programming
paradigms.
47. List out the advantages of object-oriented programming paradigm over
procedure-oriented programming paradigm.
48. What is polymorphism in the context of programming languages? Explain
with an example.
49. Since high-level languages are machine independent, one good high-level
language should have been sufficient for use on all computer systems. In-spite of
this fact, why are there so many high-level languages in use today?
50. Briefly describe the development and use of the following programming
languages:
(a) FORTRAN (h) Ada
(b) COBOL (i) RPG
(c) BASIC (j) ALGOL
(d) Pascal (k) SNOBOL
(e) C (1) LISP
(f) C++ (m) PROLOG
(g) PL/1
51. What is meant by standardization of a language? Why is it important?
52. What are comment statements? Why are they used in a program? How are
they treated by a language processor?
53. Name the four divisions of a COBOL program. What is the purpose of each
division?
54. What is a self-documenting language? Illustrate with an example?
55. Why is COBOL often referred to as a self-documenting language?
56. The main drawback of COBOL is that it is a verbose language. How/has this
drawback been taken care of now to a large extent?
57. List out some of the program preparation techniques that are often included
under the term "structured programming".
58. In Java, the compiled code is machine independent. Explain how is this
achieved.
59. What is HotJava?
60. What characteristics are desirable for a good programming language?
61. What factors generally influence the process of selecting a programming
language out of the many options l available for coding an application?
62. Would you be equally likely to choose FORTRAN or COBOL for
programming a given problem? Why?
63. What is a subprogram? How do subprograms help in program writing?
64. Subprograms are often categorized into two basic types: procedures and
functions. Differentiate between the two types.
65. What is a built-in-function? Give few examples of built-in-functions.
66. Illustrate with an example the flow of control in case of subprogram calls.
67. What is a preprocessor? Explain how a source program written in an
extended language is converted into its equivalent executable object code.
68. What is a scripting language? What is a script? Explain with an example.
69. What are fourth-generation languages? How are they different from
conventional high-level languages?
70. Differentiate between a procedural language and a non-procedural language.
71. Give the full form of the following:
(a) FORTRAN (f) ALGOL
(b) COBOL (g) LISP
(c) BASIC (h) SNOBOL
(d) PL/1 (i) OOP
(e) RPG (j) 4GL
Chapter 13

System Implementation and Operation

In the previous two chapters, we have discussed the analysis, design, and coding
phases of software development. After the computer programs have been
prepared, the developed software along with the associated hardware enters the
implementation and operation phase. The goal of this chapter is to describe the
main activities of the implementation and operation phase, which include testing
and debugging of programs, complete documentation of the system, changeover to
the new system, and system modification and maintenance.

TESTING AND DEBUGGING

Definition of Testing and Debugging

So long as computers are programmed by human beings, computer programs will


be subject to errors. Program errors are known as bugs, and the process of
detecting and correcting these errors is called debugging. In general, testing is the
process of making sure that the program performs the intended task, and
debugging is the process of locating and eliminating program errors. Testing and
debugging are important steps in program development. They are also time-
consuming steps. In fact, for large programs, the time spent in testing and
debugging often exceeds the time spent in coding the program.

Types of Program Errors

In general, there are two types of errors that occur in a computer program - syntax
errors and logic errors. They are briefly described below.

Syntax Errors

Syntax errors result when the rules or syntax of the programming language are not
followed. Such program errors typically involve incorrect punctuation, incorrect
word sequence, undefined terms, or misuse of terms. For example, the FORTRAN
statement C = (A + B/2 has a syntax error because of the missing closing
parenthesis which should be placed in the appropriate place depending on the logic
of the program.

All syntax errors in a program must be found and corrected before it will run. That
is, a program cannot be successfully compiled and executed until all its syntax
errors have been corrected.
Logic Errors
A logic error is an error in planning the program's logic. Such errors cause the
program to produce incorrect output. That is, a program which is free of syntax
errors but has one or more logic errors will be successfully compiled and executed
but will not produce correct output. The problem is that since the program contains
logic errors, the logic being followed during its execution will not be correct and
hence the program will not produce the desired results. For example, if a
FORTRAN instruction should be "A = B + C" but has been coded as "A = E - C",
it is an example of a logic error because the output produced by the program will
not be correct.

Testing a Program

In case of a logic error, since no language rules have been violated, the computer
does not know that an error ha been made. Hence it will not produce any error
message for a logic error. Thus identifying logic errors in program is the
responsibility of the program development and testing team. The team tests the
program to determine whether or not it contains any logic error. The testing
procedure involves running the program to process input test data and comparing
the produced results with the known correct results. If the results generate for the
test data do not match with the known correct results, it is assumed that the
program contains one or mo: logic errors.

Logic errors are typically due either to missing logic or to incorrect logic. If the
logic is incorrect, the result generated from the test data will be wrong. These
errors are the easiest of the logic errors to find. Errors caused by missing logic
result from logical situations that the program was not designed to handle. As an
example suppose that a numeric field is to be used in an arithmetic process and
that the data entry operator enters a value for the field that is not numeric. The
program logic should determine that the data are not numeric prior attempting the
arithmetic process. If that logic is missing and nonnumeric data is used in an
arithmetic operation, the program will fail. This type of logic error can be difficult
to find. The only way for this error to occur is for nonnumeric data to be entered
into a numeric field. It is possible for the program to be used for weeks, months, or
years before this happens and the error in program logic shows up.
In order to completely test the program logic, the test data must test each logical
function of the program. Hence, the selection of proper test data is important in
program testing. In general, the test data selected for testing a program should
include:
1. All types of possible valid data. This will test the generally used program
paths and will ensure that the program has been correctly designed to handle all
types of input data that falls within the scope of the program.
2. All types of possible invalid data (such as incorrect, incomplete, or
inappropriate data). This is necessary to test the error-handling capabilities of the
program (how the program reacts in case of abnormal and unusual input data).
Good programs should be able to produce appropriate error messages instead of
hanging (not continuing with its execution) or generating meaningless output.

If a program runs successfully with the test data and produces correct results, it is
normally released for use. However, even at this stage errors may still remain in
the program. In case of a complex program, there may be thousands of different
possible paths through the program and it may not be practical or even possible to
trace through all these paths during testing. There are certain errors in complex
software systems that remain dormant for months and years together and hence it
is impossible to certify that such systems are free of all logic errors.. Hence if a
software is going to be sold commercially, instead of releasing it directly in the
commercial market, it is first released to a selected set of users. This release
version of the software is known as beta version. The selected set of users use the
beta version of the software for an identified period of time and report any bugs
found in the software to the company that is developing the software. The use of
beta version of the software by the selected set of users for identifying errors that
might have been overlooked during the regular testing phase is known as beta
testing. After beta testing, the reported bugs (if any) are fixed and then the
software is released to the commercial market. Note that even at this stage, the
software may contain certain errors.

Debugging a Program for Syntax Errors

Syntax errors and logic errors are collectively known as bugs and the process of
eliminating these errors is known as debugging. As compared to logic errors,
syntax errors are much easier to eliminate because almost all language processors
are designed to detect syntax errors. The language processors print error messages
on the source listing of a program that indicate each program statement with errors
and give hints as to the nature of the error. These error messages are very useful
and are used by the programmers to rectify all syntax errors in their programs.
Thus, it is a relatively easy task to detect and correct syntax errors.
It should be noted that in high-level languages, such as FORTRAN and COBOL, a
single error often causes multiple error messages to be generated. There are two
reasons for multiple error messages. One is that high-level language instructions
often require multiple machine steps. The other reason is that symbolic
instructions are often dependent upon other instructions and if an instruction
containing an error is one that defines a field name, all instructions in the program
using that field name will be listed as errors. The error message will say that a
field being used is not a defined name. In such a case, removal of the single error
will result in the removal of all associated error messages.
Debugging a Program for Logic Errors

Unlike syntax errors, the computer does not produce any error message for logic
errors in a program. Hence logic errors are much more difficult to eliminate than
syntax errors. However, once the testing of a program indicates the presence of
logic error in it, one or more of the following methods may be used to locate and
correct logic errors.

Doing Hand Simulation of the Program Code

One approach is to take a printout of the source code of the program and go
through its execution manually with the test data input that produced incorrect
results. In the manual execution, you follow the same sequence of paths, which the
computer would have followed for the test data keeping track of the changes in the
values of the various variables that you come across during the execution. The
cause of the problem is very likely to be detected before you complete the manual
execution.
Manual execution of a program is a tedious process requiring lot of concentration.
Hence this method is normally used only for simple and small programs.

Putting Print Statements in the Program Code

Another approach is to put several print or write statements at appropriate


locations in the program so that the values of different variables can be
printed/displayed to indicate intermediate computations results. The program is re-
compiled and executed with these statements. These statements print/display the
values of intermediate computations telling you what is happening during the
execution of the program. The cause of the problem is very likely to be detected
by doing a proper analysis of the printed/displayed intermediate results. Once the
errors have been found and corrected, these print or write statements are removed
from the program.

Using a Debugger

This is the most commonly used approach. A debugger is a software tool that
assists the programmer in following the program's execution step-by-step by
allowing him/her to display intermediate calculation results and field values
whenever desired. In effect, a debugger helps the programmer in debugging the
program logic much more easily than having to put (and later remove) print/write
statements into the program's source code. Almost all modern programming
language processors are supported with some kind of debugger.
When using a debugger for debugging program logic, you can move either from
statement to statement or from one checkpoint to another, pausing the execution of
the program as needed to examine the values of key variables or machine registers.
Most debuggers support two kinds of checkpoints called breakpoints and
watchpoints. They are briefly explained below:
1. Breakpoint. A breakpoint is a point at which the debugger stops during
program execution and awaits your further command. When it stops you may
instruct it to display the current values of key variables or machine registers. A
debugger provides you the flexibility of setting or removing breakpoints after any
program statement. You may even set multiple breakpoints, and set or remove
breakpoints when the program execution stops and waits for your further
command at a breakpoint.
2. Watchpoint. Suppose a program contains a variable named "radius" whose
initial value of 5 is not supposed to change during execution of the program or
after some point in the program. But during debugging of the program you
discover that its value is changing and you want to know the exact point in the
program where its value gets changed. In such a situation, you can tell the
debugger that "radius" is a watch variable. That is, you are telling the debugger to
keep track of the variable "radius" and the moment its value changes, stop and
give me control. The debugger will immediately stop after the statement that
causes the value of the variable "radius" to change and will await your further
command.

Both kinds of checkpoints are very helpful in detecting logic errors in programs.
Using Memory Dump

This approach is normally used when the program "hangs up" during a test run. In
this approach, a printout of the contents of main memory and registers is taken at
the time when the program hangs up. This printout is called a memory dump or
storage dump. The memory dump lists the instructions and data held in the
computer's main memory in their raw form, that is, their binary or equivalent
hexadecimal or octal form. The cause of the problem is very likely to be detected
by doing a proper analysis of this listing.

Difference Between Testing and Debugging

Since both testing and debugging deal with program errors, many people often
confuse between these two terms. The discussion above has clearly indicated that
testing and debugging are two separate tasks. The points listed in Figure 13.1
further clarify the difference between the two.
SI. Testing Debugging
No.
1 Testing is the process of Debugging is the process of eliminating errors
validating the correctness of a in a program. Its' objective is to detect the
program. Its objective is to exact cause of and remove known errors in the
demonstrate that the program program.
meets its design specifications.
2 Testing is complete when all Debugging is complete when all known errors
desired verifications against in the program have been fixed. Note that
specifications have been debugging process ends only temporarily
performed. because it must be restarted whenever a new
error is found in the program.
3 Testing is a definable process Debugging being a reactive process cannot be
which can and should be planned planned ahead of time. It must be carried out
and scheduled properly. as and when errors are found in a program.
4 Testing can begin in the early Debugging can begin only after the program is
stages of software development. coded. The approach used for debugging
Although the test runs of a largely depends on the personal choice of the
program can be done only after programmer and the type of problem in the
the program is coded, but the program.
decision of what to test, how to
test, and with what kind of data to
test, can and should be done
before the coding is started.
Figure 13.1. Difference between testing and debugging.

DOCUMENTATION

What is Documentation?

Documentation is the process of collecting, organizing, storing, and otherwise


maintaining a complete historical record of programs and other documents used or
prepared during the different phases of the life cycle of a software. A software
cannot be considered to be complete until it is properly documented. In fact,
documentation is an on-going process that starts in the study phase of the software
and continues till its implementation and operation phase. Moreover,
documentation is a process that never ends throughout the life of the software. It
has to be carried out from time to time as and when the software is modified
during its maintenance phase.

Need for Documentation


Proper documentation of a software is necessary due to the following reasons:
1. It solves the problem of indispensability of an individual for an organization.
In large organizations, over the years, the designer and developer of a software
may not be in the same organization. In such cases, even if the person who has
designed or programmed the software, leaves the organization, the documented
knowledge remains with the organization, which can be used for the continuity of
the software.
2. Maintainability of computer software is a cause of major concern to
organizations dealing with computerized systems. The key to maintenance is
proper and dynamic documentation. A well documented software is easy to
modify and maintain in the future. It is easier to understand the logic of a program
from the documented records rather than its code. System flowcharts, program
flowcharts, or comments used within the programs prove to be very helpful in this
regard.
3. Documented records are quite helpful in restarting a software project that was
postponed due to some reason or the other. The job need not be started from
scratch and the old ideas may still be easily recapitulated which saves lot of time
and avoids duplication of work.

Forms of Documentation

The three commonly used forms of documentation for documenting a software are
comments, system manual and user manual. They are briefly described below.
Note that all three forms of documentation are necessary to properly and
completely document a software.

Comments

Comments are very useful aid in documenting a program. From maintenance point
of view, comments have been considered to be a must. Comments are used within
a program to assist anyone reading the source program listing. They are used to
explain the logic of the program. They do not contain any program logic and are
ignored (not translated) by the language processor.

Comments should be used intelligently to improve the quality and


understandability of the program. They should not be redundant, incorrect,
incomplete, or written in such a way that cannot be understood by anyone else. For
example, a redundant comment for the statement N = N + 1 would be
"INCREMENT N BY 1". Useful comments are those which describe the meaning
of a group of statements such as "READ. AND ECHO PRINT THE INPUT
DATA". In other words, comments should mediate between the program and the
problem domain.
Almost all high-level languages provide the facility of writing comments along
with the source code of a program and it is suggested that programmers should
liberally use this facility for proper documentation of their programs.

System Manual

A good software must be supported with a standard system manual that contains
the following information:
1. A statement of the problem clearly defining the objectives of developing the
software and its usefulness to various categories of users.
2. A broad description of the software specifying the scope of the problem, the
environment in which it functions, its limitations, the form and type of input data
to be used, and the form and type of output required.
3. Specific program names along with their description and purpose.
4. Detailed system flow charts and program flow charts cross-referenced to the
program listing.
5. Narrative description of the program listings, the processing and calculations
performed and the control procedures.
6. A source listing of all the programs together with full details of any
modifications made since.
7. Description and specifications of all input and output media required for the
operation of various programs.
8. Specimen of all input forms and printed outputs.
9. File layout, that is, the detailed layout of input and output records.
10. The structure and description of test data and test results, storage dumps, trace
program printouts, etc., used to debug the programs.

User Manual

A good software package must be supported with a good user manual to ensure the
smooth running of the package. It is the user who will perform the regular
processing after the software is released and not the programmer who has
developed the package. Hence, the user manual must contain the following
information:
1. Set up and operational details of each program.
2. Loading and unloading procedures.
3. Starting, running, and terminating procedures.
4. A description and example, of any control statements that may be used.
5. All console commands along with errors and console messages that could
arise, their meaning, reply and/or operation action.
6. List of error conditions with explanations for their re-entry into the system.
7. List of programs to be executed before and after execution of each
program.384
I Foundations of Computing
8. Special checks (if any) and security measures, etc.
Documentation Standard
The importance of software documentation cannot be over emphasized. There
have been too many problems in the past with poorly documented software. The
result is usually errors and problems with the software at a later date. It is very
difficult to incorporate modifications in such software and hence they are very
expensive to maintain. Owing to these reasons several computer organizations
have developed strict documentation standards. These standards describe in detail
how documentation is to be performed, how to choose meaningful program
variable names, how to design the GUI for the software, how and up to what detail
to include comments in program code, and what diagrams, charts, reports, outputs,
etc. are necessary for documentation to be completed successfully.

CHANGEOVER TO THE NEW SYSTEM

Once the software is thoroughly tested and all known errors have been removed,
the software along with the associated hardware is deployed at site for use by the
intended users. At this stage, the old system (manual system in most cases), if any,
is phased out and the new system is phased in.

Changeover Operations

The changeover process normally involves the following operations:


1. Imparting system and user training to the members of the organization in
which the new system is deployed. The system training is imparted to those
members who will be responsible for managing and maintaining the system. The
user training is imparted to those members who will be operating the system
and/or using the results produced by the system. Anyone else who will be affected
by the new system should also receive some training to become familiar with the
changes.
2. Replacing all old operation procedures by new ones. This may involve
discarding of old forms, manual registers, etc.
3. Replacing of all old input and output devices with those of the new system.
4. Defining the roles of different members and assigning the responsibilities to
them as per the requirements of the new system.
5. Converting data in all currently existing files into a form acceptable to the
new system. This may involve inputting of data stored in manual registers and
hard-copy files through the input devices of the new system. It is important to
consolidate the files and eliminate duplicate records in them while converting
them to the new form. File inconsistencies or any errors in existing files must
also be detected and removed.

Changeover Methods

The three normally followed methods to carry out the changeover process are
immediate changeover, parallel run and phased conversion. Each of these methods
has its own advantages and disadvantages. No single method is suitable for
converting all types of systems and the choice of a particular method largely
depends upon the prevailing conversion circumstances. These methods are briefly
described below.

Immediate Changeover

As shown in Figure 13.2(a), in this method, a suitable cut-off data is decided and
the complete new system is put to operation from that day onwards, while the
operation of the old system is completely abandoned from the cutoff date.

It has been found that most systems pose some problem or the other during the
changeover process. Hence the method of immediate changeover is generally
considered to be risky because any failure in the new system during the
changeover phase may cause total breakdown of those operations of the
organization that are related to the new and the old system. The work cannot
progress at all because the operation of the old system has already been stopped.

This method, however, is preferred in those situations where available manpower


and changeover time is less, and the system is not so critical that some operational
problems during the changeover process would lead to a disaster.

Parallel Run

As shown in Figure 13.2(b), in this method, both the old and the new systems are
parallely operated with the same data for the initial three or four cycles. During
this overlapping period of complete operation of the two systems, the results
produced by the new system are compared with those produced by the old system
to develop confidence in the new system. Some discrepancies may be discovered.
Often these are due to inaccuracies in the old system that were not recognized
before as inaccuracies. Some discrepancies may also be due to missing program
logic for which no programming was provided or due to mistakes in the
programming itself. These must be corrected by further debugging before the
conversion is complete.
This method is considered to be one of the safest ways to deploy a new system
because of the availability of old system as a backup. There is no interruption of
work if there are problems with the new system because the old system is still in
operation and the problems found in the new system can be corrected while the old
system is still being used.

This method, however, is very expensive because additional manpower is needed


during the overlapping period for the operation of two systems in parallel. Due to
the requirement of additional manpower, the organization is under considerable
strain during the period of parallel operation, and organizational breakdowns tend
to occur if the period of parallel operation is long. Hence parallel operation must
not be carried on any longer than needed to establish confidence in the new
system. Continuing them too long is a sign of weakness in the new system.

Due to the reason mentioned above, this method is not preferred in situations
where manpower resource is scarce. It is also not used in situations where the new
system differs to a great extent from the old system in the functions that it
performs and its input and output.

Phased Conversion

As shown in Figure 13.2(c), in this method, the complete changeover to the new
system takes place incrementally over a period of time. The new system is
gradually implemented part by part and the old system is gradually phased out.
The results produced by each part of the new system are compared against the
results of the old system. Any discrepancies or errors found are checked and
removed. Once confidence is developed in a particular part of the new system, that
part of the new system is phased in and the corresponding part (operations) of the
old system is phased out. This approach is continued for each and every part of the
new system. Thus, over a period of time, the new system is gradually phased in,
while the old system is gradually phased out.

This method is not as expensive as the parallel run method because the changeover
process being gradual can usually be handled with existing manpower. Moreover,
there is no danger of interruption of work if there are problems with the new
system because the corresponding part of the old system is still in operation. The
users also get sufficient time to become acquainted with the new system. Hence,
they can confidently handle the new system when the complete system is handed
over to them.

This method, however, cannot be used in situations where the time period supplied
for conversion process is very less or when the new system significantly differs
from the old system.
SYSTEM EVALUATION

Once the new system is implemented and put in operation, it is necessary to


evaluate the system to verify whether or not it is meeting its objectives. These
objectives of the system are clearly stated during its problem analysis and system
planning phase. The post implementation system evaluation is normally carried
out by people who have an independent view point and are not responsible for the
development and maintenance of the system. While evaluating a system, the
following points are normally considered:
1. Performance Evaluation. The performance of the new system is evaluated
and compared with the performance of the old system. In general, the new system
should be at least as efficient as the old one in performance. In case of any slack,
the reason is analyzed and if possible, necessary changes are incorporated in the
new system to rectify it.
2. Cost Analysis. It should be analyzed whether the cost estimate done for the
various phases of the project during the planning phase in the beginning match
with the actual cost incurred in each phase or not. If discrepancies are found, the
cost analysis will help in finding out the reasons. This type of analysis proves to be
quite helpful in making correct cost estimates for the new systems that will be
designed in future.
3. Time Analysis. It should be analyzed whether the time estimate done for the
various phases of the project during the planning phase in the beginning match
with the actual time taken in each phase or not. If discrepancies are found, the time
analysis will help in finding out the reasons. This type of analysis proves to be
quite helpful in making correct time estimates for the new systems that will be
designed in future.
4. User Satisfaction. People are the final evaluators of any system put in
operation. Hence, it should be found out whether the users are satisfied with the
new system or not. How useful is the system for them? How enthusiastic are they
about the service they receive? Do they receive outputs in time to take necessary
action? The morale of people using or affected by a system is a good measure of
the success of the system.
5. Ease of Modification. Sooner or later, all systems need to be modified due to
one or more of the reasons mentioned in the next section. Thus, the ease with
which a system can be modified to incorporate the suggested changes is also an
important parameter to judge the quality of the system.
6. Failure Rate. Another parameter that is commonly used to judge the quality of
a system is its failure rate. A system, which frequently fails cannot meet its
objectives successfully and hence is of poor quality.

SYSTEM MAINTENANCE
No matter how good the new system is, how well it was installed, and how well it
may be currently operating sooner or later it will need to be modified due to one or
more of the following reasons:
1. Changes in business conditions or operations of the organization using the
system.
2. Changes in organizational policies or enforcement of new laws.
3. Changes in user needs such as demand for additional features, or additional
reports and outputs from the system.
4. Changes in technology such as availability of new and more powerful
processors, more efficient storage, more convenient input/output devices, new
system software, etc.
System maintenance is an important phase of the overall life cycle of a
computerized system and its importance should not be under estimated. In fact,
several studies have shown that, on an average, the maintenance cost of a
computerized system is two to four times more than the initial development cost.
This means that more than half of the programming tasks in this world involve
program maintenance. Due to this reason, in some organization there are
programmers who do nothing but maintain production programs.
Frequent change is disrupting and disturbing. Therefore, some control over
changes is required. One method o achieving this control is to have all requests for
change evaluated by a change control board. This board should be made up of the
principal users of the system, a system analyst, and data processing personnel who
are familiar with the system. Normal maintenance operations need not be
approved by the change control board, but these operations should be recorded and
summarized for periodic reporting to the board. Examples of maintenance
activities are modifying the format of a report or rewriting a part of a computer
program component to improve ii efficiency. Major changes are those that
significantly alter the system or require extensive personnel, hardware or software.
An example of a major change would be conversion of a system from Unix to
Windows environment.
When programs are modified, it is important to make sure that program
documentation is also changed accordingly. Without the existence of proper
documentation that is consistent with the programs, future changes would be very
difficult and costly to accomplish.

Points to Remember

1. Testing is the process of making sure that the program performs the intended
task.
2. Program errors are known as bugs, and the process of detecting and correcting
these errors is called debugging.
3. There are two types of errors that occur in a computer program - syntax errors
and logic errors. Syntax errors result when the rules or syntax of the programming
language are not followed. Logic errors are errors in planning the program's
logic. Such errors cause the program to produce incorrect output.
4. As compared to logic errors, it is relatively easier to detect and correct syntax
errors because the language processors print error messages on the source listing
of a program that indicate each program statement with errors and give hints as to
the nature of the error.
5. The commonly used methods for locating and correcting logic errors are
doing hand simulation of the program code, putting print statements in the
program code, using a debugger, and using memory dump.
6. A commercial software is first released to a selected set of users. This release
version of the software is known as beta version. The use of beta version of the
software by the selected set of users for identifying errors that might have been
overlooked during the regular testing phase is known as beta testing.
7. A debugger is a software tool that assists the programmer in following the
program's execution step-by-step by allowing him/her to display intermediate
calculation results and field values whenever desired.
8. When a program hangs up during a test run, a printout of the contents of main
memory and registers is taken to analyze the cause of the problem. This printout is
called a memory dump or storage dump.
9. Documentation is the process of collecting, organizing, storing, and otherwise
maintaining a complete historical record of programs and other documents used or
prepared during the different phases of the life cycle of a software. The three
commonly used forms of documentation for documenting a software are program
comments, system manual and user manual.
10. Once the software is thoroughly tested and all known errors have been
removed, the software along with the associated hardware is deployed at site for
use by the intended users. At this stage, a changeover from the old system to the
new system takes place. The three normally followed methods to carry out the
changeover process are immediate changeover, parallel run and phased
conversion. Figure 13.2 illustrates the three methods.
11. System evaluation is the process of evaluating a system (after it is put in
operation) to verify whether or not it is meeting its objectives. The points normally
considered for evaluating a system are performance evaluation, cost analysis, time
analysis, user satisfaction, ease of modification and failure rate.
12. System maintenance is the process of incorporating changes in an existing
system to enhance, update or upgrade its features. On an average, the maintenance
cost of a computerized system is two to four times more than the initial
development cost.

Questions

1. What are the two types of errors that can occur in a computer program?
Give an example of each to illustrate their nature.
2. Differentiate between syntax errors and logic errors in computer programs.
3. Will a program run if there are syntax errors in it? Give reasons for your
answer.
4. Will a program run if there are logic errors in it? Give reasons for your
answer.
5. What is testing of a program? Why should a program be tested?
6. What are the different types of test data that should be selected for testing a
program?
7. Why is it not possible for a very complex software system to certify that it is
error free?
8. What is a beta version of a commercial software? What is beta testing?
9. How are syntax errors detected and corrected?
10. How are logic errors detected and corrected?
11. Is it easier to detect a syntax error or a logic error in a program? Give
reasons for your answer.
12. What is a program bug? What is debugging?
13. In high-level languages, a single syntax error often causes multiple error
messages to be generated. Explain why.
14. Describe the various methods that may be used to locate and correct logic
errors.
15. What is a debugger? How does it help a programmer?
16. In the context of debugging of a program, what is a checkpoint? What are
the two commonly supported types of checkpoints in modern debuggers? How are
they useful?
17. Differentiate between a breakpoint and a watchpoint in the context of
program debugging.
18. What is a memory dump? How is it useful for a programmer?
19. Differentiate between testing and debugging.
20. Testing is a definable process, which can and should be planned and
scheduled properly. Discuss.
21. Testing can begin in the early stages of software development while
debugging can begin only after the program is coded. Discuss.
22. What is software documentation? Why is it needed?
23. Describe the different types of documentation normally used for
documenting a software system.
24. What are program comments? Why are they needed?
25. What is a system manual of a software system? What type of information
does it typically contain?
26. What is a user manual of a software system? What type of information does
it typically contain?
27. What is documentation standard? Why is it needed?
28. What type of operations is normally carried out in the system changeover
process?
29. Describe the three different methods of system changeover along with their
advantages and disadvantages.
30. Immediate changeover is a risky method of deploying a new system.
Explain why.
32. In what situations is the parallel run method of deploying a new system not
preferred?
33. Why is system evaluation needed? What are the main parameters normally
used to evaluate a new system?
34. Why do we need to modify a system if it is currently operating well?
35. Why is system maintenance considered an important process in the overall
life cycle of a computerized system?
36. How can frequent program modifications be controlled?
Chapter 14

Operating Systems

In the last few chapters we have dealt with the planning, coding, operation, and
maintenance of software systems. In the next few chapters, we will have a look at
some of the commonly used software in today's computer systems. In this chapter,
you will learn about a very important and special type of software that falls under
the category of system software. This system software is known as operating
system. In the next chapter you will learn about some commonly used application
software packages.

An operating system is an important part of almost every computer system. The


goal of this chapter is to introduce concepts related to operating systems and to
show how this particular system software helps in the overall operation and usage
of a computer system.

WHAT IS AN OPERATING SYSTEM?

An operating system (often referred to as OS) is an integrated set of programs that


controls the resources (the CPU, memory, I/O devices, etc.) of a computer system
and provides its users with an interface or virtual machine that is more convenient
to use than the bare machine. According to this definition, the two primary
objectives ol an operating system are as follows:

1. Making a computer system convenient to use. A computer system consists of


one or more processors, main memory and many types of I/O devices such as
disks, tapes, terminals, network interfaces, etc. Writing programs for using these
hardware resources correctly and efficiently is an extremely difficult job, requiring
in-depth knowledge of the functioning of the resources. Hence to make computer
systems usable by a large number of users, it became clear several years ago that
some way is required to shield programmers from the complexity of the hardware
resources. The gradually evolved solution to handle this problem is to put a layer
of software on top of the bare hardware, to manage all parts of the system, and
present the user with an interface or virtual machine that is easier to program and
use. This layer of software is the operating system.

The logical architecture of a computer system is shown in Figure 14.1. As shown


in the figure, the hardware resources are surrounded by the operating system layer,
which in turn is surrounded by a layer of other system software (such as
compilers, editors, command interpreter, utilities, etc.) and a set of application
programs (such as commercial data processing applications, scientific and
engineering applications, entertainment and educational applications, etc.).
Finally, the end users view the computer system in terms of the user interfaces
provided by the application programs.

Users
Other System Software and Application Programs
Operating System
Computer Hardware

The operating system layer provides various facilities and services that make the
use of the hardware resources convenient, efficient, and safe. A programmer
makes use of these facilities in developing an application, and the application,
while it is running, invokes the required services to perform certain functions. In
effect, the operating system hides the details of the hardware from the programmer
and provides the programmer with a convenient interface for using the system. It
acts as an intermediary between the hardware and its users, providing a high-level
interface to low-level hardware resources, and making it easier for the programmer
and for application programs to access and use those resources.

2. Managing the resources of a computer system. The second important objective


of an operating system is to manage the various resources of the computer system.
This involves performing such tasks as keeping track of who is using which
resource, granting resource requests, accounting for resource usage, and mediating
conflicting requests from different programs and users.

Executing a job on a computer system often requires several of its resources such
as CPU time, memory space, file storage space, I/O devices, and so on. The
operating system acts as the manager of the various resources of a computer
system and allocates them to specific programs and users to execute their jobs
successfully. When a computer system is used to simultaneously handle several
applications, there may be many, possibly conflicting, requests for resources. In
such a situation, the operating system must decide which requests are allocated
resources to operate the computer system efficiently and fairly (providing due
attention to all users). The efficient and fair sharing of resources among users
and/or programs is a key goal of most operating systems.

Main Functions of an Operating System

We saw that an operating system provides certain services to programs and to the
users of those programs. The; specific services provided will, of course, differ
from one operating system to another, but there are some common types of
functions that we can identify. The main functions provided by most operating
systems of today are as follows:
1. Process Management. A process is a program in execution. During
execution, a process needs certain resources such as CPU time, memory space,
files, and I/O devices. At a particular instance of time, a computer "system
normally consists of a collection of processes. The process management module
of an operating system takes care of the creation and deletion of processes,
scheduling of various system resources to the different processes requesting them,
and providing mechanisms for synchronization and communication among
processes.
2. Memory Management. To execute a program, it must be loaded, together with
the data it accesses, in the main memory (at least partially). To improve CPU
utilization and to provide better responses time to its users, a computer system
normally keeps several programs in main memory. The memory management
module of an operating system takes care of the allocation and deal location of
memory space to the various programs in need of this resource.
3. File Management. All computer systems are used for storage, retrieval and
sharing of information. A computer normally stores such information in units
called files. Processes can read information from files and can create new files
for storing newly generated information. Information stored ii files is made
persistent by storing them on a secondary storage media such as a magnetic disk.
Files provide a natural and easy means of information sharing. That is, a file can
be created by on application-and then shared with different applications at a later
time. The file management module of an operating system takes care of file-
related activities such as organization, storing, retrieval, naming, sharing, and
protection of files. It allows programs to use a set of operations that characterize
the file abstraction and free the programmers from concerns about the details of
space allocation and layout of the secondary storage device.
4. Device Management. A computer system normally consists of several I/O
devices such as terminal, printer, disk, and tape. The device management module
of an operating system takes care of controlling all the computer's I/O devices. It
keeps track of I/O requests from processes, issue commands to the I/O devices,
and ensures correct data transmission to/from an I/O device. It also provides an
interface between the devices and the rest of the system that is simple and easy to
use. Often, this interface is device independent, that is, the interface is same for all
types of I/O devices.
5. Security. Computer systems often store large amounts of information, some
of which is highly sensitive and valuable to their users. Users can trust the system
and rely on it only if the various resources and information of a computer system
are protected against destruction and unauthorized access. The security module of
an operating system ensures this. This module also ensures that when several
disjoint processes are being executed simultaneously, one process does not
interfere with the others, or with the operating system itself.
6. Command Interpretation. A user communicates with the operating system,
for using the various system resources, via a set of commands provided by the
operating system. The operating system also provides a simple language, known
as command language (CL) or job control language (JCL using which a user can
put several commands together from the command set to describe the resource
requirements of the job. The command interpretation module of an operating
system takes care of interpreting user commands, supplied individually or in the
form of command language, and directing the system resources to handle the
requests. With this mode of interaction with the system, the user is usually not too
concerned with the hardware details of the system, or with how the operating
system will direct the hardware to handle certain requests.

In addition to the above listed major functions, an operating system also performs
few other functions such as keeping an account of which users (or processes) use
how much and what kinds of computer resources, maintenance of log of system
usage by all users, and maintenance of internal time clock.

MEASURING SYSTEM PERFORMANCE

The efficiency of an operating system and the overall performance of a computer


system is usually measured in terms of the following:
1. Throughput. Throughput is the amount of work that the system is able to do
per unit time. It is measured as the number of processes that are completed by the
system per unit time. For example, if n processes are completed in an interval of t
seconds, the throughput is taken as n/t processes per second during that interval.
Throughput is normally measured in processes/hour. Note that the value of
throughput does not depend only on the capability of a system, but also on the
nature of jobs being processed by the system. For long processes, throughput
may be one process/hour; and for short processes, throughput may be 100
processes/hour.
2. Turnaround time. From the point of view of an individual user, an important
criterion is how long it takes the system to complete a job submitted by him/her.
Turnaround time is the interval from the time of submission of a job to the system
for processing to the time of completion of the job. Although higher throughput is
desirable from the point of view of overall system performance, individual users
are more interested in better turnaround time for their jobs.
3. Response time. Turnaround time is usually not a suitable measure for
interactive systems, because in an interactive system a process can produce some
output fairly early during its execution and can continue executing while previous
results are being output to the user. Thus another measure used in case of
interactive systems is response time, which is the interval from the time of
submission of a job to the system for processing to the time the first response for
the job is produced by the system.
In any computer system, it is desirable to maximize throughput and to minimize
turnaround time and response time.

PROCESS MANAGEMENT

A process (also called job) is a program in execution. The main objective of the
process management module of an operating system is to manage the processes
submitted to the system in such a manner so as to minimize the idle time of the
various processors (CPU, I/O processors, etc.) of the computer system. In this
section, we will learn about some of the mechanisms commonly used in modern
operating systems to achieve this objective. We will also see how these
mechanisms have gradually evolved from the early days of computers.

Process Management in Early Systems

In early computer systems, a job was typically executed in the following manner:
1. A programmer would first write the program on paper.
2. It was then punched on cards or paper tape along with its data.
3. The deck.of cards or the paper tape containing the program and data was then
submitted at tin reception counter of the computer centre.
4. An operator would then take the card deck or paper tape and manually load it
into the system from card reader or paper tape reader. The operator was also
responsible for loading any other software resource (such as a language compiler)
or setting hardware devices required for the execution of the job. Before loading
of the job, the operator had to use the front panel switches of the compute system
to clear the main memory to remove any data remaining from the previous job.
5. The operator would then set the appropriate switches in the front panel to run
the job.
6. The result of execution of the job was then printed on the printer, which was
brought by the operator to the reception counter, so that the programmer could
collect it later.

The same process had to be repeated for each and every job to be executed by the
computer. This method of job execution was known as the manual loading
mechanism because the jobs had to be manually loaded one after another by the
computer operator in the computer system. Notice that in this method, job-to-job
transition was n automatic. The manual transition from one job to another caused
lot of computer time to be wasted since the computer remained idle while the
operator loaded and unloaded jobs and prepared the system for a new job. In order
to reduce this idle time of the computer, a method of automatic job-to-job
transition was devised. In this method, known as batch processing, when one job
is finished, the system control is automatically transferred back to the operating
system which automatically performs the housekeeping jobs (such as clearing the
memory remove any data remaining from the previous job) needed to load and run
the next job. In case of bat processing systems, jobs were typically executed in
the following manner:
1. Programmers would prepare their programs and data on card decks or paper
tapes and submitted them at the reception counter of the computer centre.
2. The operator could periodically collect all the submitted programs and would
batch them together and then load them all into the input device of the system at
one time.
3. The operator would then give a command to the system to start executing the
jobs.
4. The jobs were then automatically loaded from the input device and executed
by the system one-by-one without any operator intervention. That is, the system
would read the first job from the input device, execute it, print out its result on the
printer, and then repeat these steps for each subsequent job till all the jobs in the
submitted batch of jobs were over.
5. When all the jobs in the submitted batch were processed, the operator would
separate the printed output for each job and keep them at the reception counter so
that the programmers could collect them later.

The batch processing mechanism helped in reducing the idle time of a computer
system to a great extent because transition from one job to another did not require
any operator intervention. Another major time saving made possible by batch
processing was reduction in set-up time by batching of similar jobs together by the
operator. For example, if all FORTRAN compilation jobs are batched together, the
system needs to load the FORTRAN compiler only once for processing all these
jobs.

The obvious question is how the computer separates one job from another from a
batch of jobs for automatic job-to-job transition. Moreover, how does the system
know which compiler or what hardware devices are to be used by a particular job
when there is no operator intervention? To facilitate all these, control statements
and job control languages (JCLs) were introduced along with the concept of batch
processing. The control statements are used by the operating system to identify a
new job and to determine what resources are needed by the job during its
execution. These control statements are written in a language known as the job
control language. Usually every program and data sets are preceded and followed
by JCL statements.

When a program is prepared for a computer run, it is necessary to prepare the job
control statements and place them in proper order along with the program, before
the program is fed to the computer system. Thus, each program has, besides the
program itself, a set of instructions called JCL instructions, which instruct the
operating system on the identity and requirements of the job. JCL statements tell
the operating system things such as the name of the job, the user's name and
account number, the I/O devices to be used during processing, the assembler or
compiler to be used if language translation is required, and so on. Figure 14.2
shows a sample deck of cards prepared for the compilation and execution of a
COBOL program in a batch processing system.

Notice from the figure that in order to distinguish a control card from data or
program cards, they are identified by a special character or pattern on the card.
Several systems used the dollar-sign character ($) in the first column to identify a
control card, while IBM's JCL used slash marks (//) in the first two columns. Other
systems used some other characters or codes. The basic idea in selection of these
special characters or codes was that no program or data card should have these
characters or code.
SEND
Data for program
$RUN
$LOAD
COBOL program
$COBOL
$JOB, ONGC05839, USER=SINHA

Multiprogramming

In case of both manual loading and batch processing of jobs, the jobs are loaded
into the system and processed one at a time. That is, once loaded, a job will remain
in the main memory until its execution is completed and the next job will be
loaded only after the completion of the previous job. As shown in Figure 14.3, in
such a situation, the job which is currently loaded and is being executed will be the
sole occupant of the user's area of the main memory (the operating system always
resides in a part of the main memory) and it will have the CPU exclusively
available for itself. The situation shown in Figure 14.3 is that of a uniprogramming
system in which only one job is processed by the system at a time and all the
system resources are exclusively available for the job until it completes.

It was observed that a job does not need the CPU for the entire duration of its
processing. This is because in addition to doing computation (for which CPU is
needed), a job often needs to perform I/O operations (such as reading or writing
some data to a tape or disk, waiting for some data to be input from the keyboard,
and printing some results) during the course of its processing. In fact, depending
on the CPU utilization during the course of processing, jobs are broadly classified
into the following two types:
1. CPU-bound jobs. These jobs mostly perform numerical calculations, with
little I/O operations. They are so called because they heavily utilize the CPU
during the course of their processing. Programs used for scientific and engineering
computations usually fall in this category of jobs.

2. I/O-bound jobs. These jobs normally input vast amount of data, perform very
little computation, and output large amount of information. They are so called
because during the course of their processing, their CPU utilization is very low
and most of the time they perform I/O operations. Programs used for commercial
data processing applications usually fall in this category of jobs.

In a uniprogramming system, the CPU will be idle whenever the job that is
currently being processed by the system performs I/O operations. With CPU-
bound jobs, the CPU idle time may not be significant, but for I/O-bound jobs the
CPU may be idle 80 to 90% of the time. Moreover, since I/O devices are slower
than the CPU by 20 to 100 times, the CPU idle time is significant even for CPU-
bound jobs that perform little I/O. The concept of multiprogramming was
introduced to minimize the idle time of the CPU by organizing multiple jobs in the
system so that the CPU always has something to execute. How this is done is
explained below.

Multiprogramming is the name given to the interleaved execution of two or more


different and independent programs by the same computer. In Figure 14.3 we have
been introduced to the notion of having two programs in the main memory at the
same time - the operating system for overall system control and the user program
for performing user's job. In multiprogramming, this concept is carried one step
further by placing two or more user programs in the main memory and executing
them concurrently. With multiple user programs simultaneously residing in the
main memory, when a user program that was executing (using the CPU) starts
performing I/O operations, the CPU is allocated to another user program in the
main memory that is ready to use the CPU instead of allowing the CPU to be idle.
The CPU switches from one program to another almost instantaneously. Thus in
multiprogramming several user programs share the time of the CPU to kept it
busy.

It is important to note here that multiprogramming is not defined to be the


execution of instructions from several programs simultaneously. Rather, it does
mean that there are a number of programs available to the CPU (stored in the main
memory) and that a portion of one is executed, then a segment of another, and so
on. Although two or more user programs reside in the main memory
simultaneously, the CPU is capable of executing only one instruction at a time.
Hence at any given time, only one of the programs has control of the CPU and is
executing instructions. Simultaneous execution of more than one program with a
single CPU is impossible. In some multiprogramming systems, only a fixed
number of jobs can be processed concurrently (multiprogramming with fixed
tasks) (MFT), while in others the number of jobs can vary (multiprogramming
with variable tasks) (MVT).

A typical scenario of jobs in a multiprogramming system is shown in Figure 14.4.


At the particular time instance shown in the figure, job A is not utilizing the CPU
since it is busy writing output data on to the disk (I/O operations). Hence the CPU
is being utilized to execute job B, which is also present in the main memory. Job
C, also residing in the main memory, is waiting for the CPU to become free.
Actually, as shown in Figure 14.5, in case of multiprogramming all the jobs
residing in the main memory will be in one of the following three states -running
(it is using the CPU), blocked (it is performing I/O operations) and ready (it is
waiting for CPU to be assigned to it). In our example, jobs A, B and C are in
blocked, running and ready states respectively. Since job C is in the ready state, as
soon as the execution of job B is completed or job B requires doing I/O operation,
the CPU will start executing job C. In the meanwhile, if job A completes its output
operation, it will be in the ready state waiting for the CPU. Thus in
multiprogramming, the CPU will never be idle as long as there is always some job
to execute. Note that although many jobs may be in ready and blocked states, only
one job can be running at any instant.

The area occupied by each job residing simultaneously in the main memory is
known as a memory partition. The actual number of partitions, and hence jobs,
allowed in the main memory at any given time varies depending upon the
operating system in use. Moreover, those jobs awaiting entry into main memory
are queued on a fast secondary storage device such as a magnetic disk. The first
job from this queue will be loaded into the main memory as soon as any one of the
jobs already occupying the main memory is completed and the corresponding
memory partition becomes free.

Requirements of Multiprogramming Systems

Multiprogramming systems have better throughput than uniprogramming systems


because the CPU idle time is drastically reduced. However, multiprogramming
systems are fairly sophisticated because they require the following additional
hardware and software features:
1. Large memory. For multiprogramming to work satisfactorily, large main
memory is required to accommodate a good number of user programs along with
the operating system.
2. Memory protection. Computers designed for multiprogramming must provide
some type of memory protection mechanism to prevent a job in one memory
partition from changing information or instruction of a job in another memory
partition. For example, in Figure 14.4 we would not want job A to inadvertently
destroy something in the completely independent job B or job C. In a
multiprogramming system this is achieved by the memory protection feature, a
combination of hardware and software, which prevents one job from addressing
beyond the limits to its own allocated memory area.
3. Job status preservation. In multiprogramming, when a running job gets
blocked for I/O processing the CPU is taken away from this job and is given to
another job that is ready for execution. At a later time the former job will be
allocated the CPU to continue its execution. Notice that this requires preserving
of the job's complete status information when the CPU is taken away from it and
restoring this information back before the CPU is given back to it again. To enable
this, the operating system maintains a process control block (PCB) for each loaded
process. A typical process control block is shown in Figure 14.6. With this
arrangement, before taking away the CPU from a running process, its status is
preserved in its PCB, and before the process resumes execution when the CPU is
given back to it at a later time, its status is restored back from its PCB. Thus the
process can continue execution without any problem.

process identifier
process state
program counter
values of various CPU
registers
accounting and scheduling information
I/O status information

4. Proper job mix. A proper mix of I/O-bound and CPU-bound jobs is required
to effectively overlap the operations of the CPU and I/O devices. If all the loaded
jobs need I/O at the same time, the CPU will again be idle. Hence the main
memory should contain some CPU-bound and some I/O-bound jobs so that at least
one job is always ready to utilize the CPU.
5. CPU scheduling. In a multiprogramming system, often there will be situations
in which two or more jobs will be in the ready state waiting for CPU to be
allocated for execution. When more than one process is in the ready state when
the CPU becomes free, the operating system must decide which of the ready jobs
should be allocated the CPU for execution. The part of the operating system
concerned with this decision is called the CPU scheduler, and the algorithm it uses
is called the CPU scheduling algorithm.

Multitasking
Technically speaking, multitasking, is the same as multiprogramming. That is,
multitasking is the system's capability to concurrently work on more than one task
(job or process). This means that whenever a task (job or process) needs to
perform I/O operations, the CPU can be used for executing some other task (job or
process) that is also residing in the system and is ready to use the CPU.

Many authors do not distinguish between multiprogramming and multitasking


because both the terms refer to the same concept. However, some authors prefer to
use the term multiprogramming for multi-user systems (systems that are
simultaneously used by many users such as mainframe and server class systems),
and multitasking for single-user systems (systems that are used by only one user at
a time such as a personal computer or a notebook computer). Note that even in a
single-user system, it is not necessary that the system works Only on one job at a
time. In fact, a user of a single-user system often has multiple tasks concurrently
processed by the system. For example, while editing a file in the foreground, a
sorting job can be given in the background. Similarly, while compilation of a
program is in progress in the background, the user may be reading his/her
electronic mails in the foreground. In this manner, a user may concurrently work
on many tasks. In such a situation, the status of each of the tasks is normally
viewed on the computer's screen by partitioning the screen into a number of
windows. The progress of different tasks can be viewed on different windows in a
multitasking system.

Hence for those who like to differentiate between multiprogramming and


multitasking, multiprogramming is the concurrent execution of multiple jobs (of
same or different users) in a multi-user system, while multitasking is the
concurrent execution of multiple jobs (often referred to as tasks of same user) in a
single-user system.

Multithreading

Threads are a popular way to improve application performance. In traditional


operating systems, the basic unit of CPU utilization is a process. Each process has
its own program counter, its own register states, its own stack, and its own address
space (memory, area allocated to it). On the other hand, in operating systems, with
threads facility, the basic unit of CPU utilization is a thread. In these operating
systems, a process consists of an address space and one or more threads of control
[see Figure 14.7(b)]. Each thread of a process has its own program counter, its
own register states, and its own stack. But all the threads of a process share the
same address space. Hence they also share the same global variables. In addition,
all threads of a process also share the same set of operating system resources, such
as open files, signals, accounting information, and so on. Due to the sharing of
address space, there is no protection between the threads of a process. However,
this is not a problem. Protection between processes is needed because different
processes may belong to different users. But a process (and nence all its threads) is
always owned by a single user. Therefore, protection between multiple threads of
a process is not necessary. If protection is required between two threads of a
process, it is preferable to put them in different processes, instead of putting them
in a single process.

Threads share a CPU in the same way as processes do. At a particular instance of
time, a thread can be in any one of several states - running, blocked, ready, or
terminated. Due to these similarities, threads are often viewed as miniprocesses. In
fact, in operating systems with threads facility, a process having a single thread
corresponds to a process of a traditional operating system [see Figure 14.7(a)].
Threads are often referred to as lightweight processes and traditional processes are
referred to as heavyweight processes.

Motivations for Using Threads

The main motivations for using a multithreaded process instead of multiple single-
threaded processes for performing some computation activities are as follows:
1. The overheads involved in creating a new process are, in general,
considerably greater than those of creating a new thread within a process. This is
mainly because when a new process is created, its address space has to be created
from scratch, although a part of it might be inherited from the process's parent
process. However, when a new thread is created, it uses the address space of its
process that need not be created from scratch.
2. Due to the sharing of address space and other operating system resources
among the threads of a process, the overhead involved in CPU switching among
peer threads is very small as compared to CPU switching among processes having
their own address spaces. This is the reason why threads are called lightweight
processes.
3. Resource sharing can be achieved more efficiently and naturally between
threads of a process than between processes because all threads of a process share
the same address space.
4. Finally, the use of threads is also motivated by the fact that a set of threads
using a shared address space is the most natural way to program many
applications. For example, in an application that uses the producer-consumer
model, the producer and the consumer processes must share a common buffer.
Therefore, programming the application in such a way that the producer and
consumer are two threads of the same process makes the software design simpler.

Multiprocessing
Up to this point we have considered systems with a single CPU. However, we
have already seen that the use of I/O processors improves the efficiency of a
computer system by making possible concurrent input, processing, and output
operations. The CPU can perform arithmetic and logical operations on parts of one
or more programs while I/O operations are concurrently carried out by I/O
processors on other parts of programs. Figure 14.8 shows the architecture of a
computer with its CPU, memory and I/O processors.

The idea of use of I/O processors to improve the performance of a computer


system was carried one step further by designing systems that make use of more
than one CPU. Such systems are called multiprocessing systems. The term
multiprocessing is used to describe interconnected computer configurations or
computers with two or more CPUs that have the ability to simultaneously execute
several programs. In such a system, instructions from different and independent
programs can be processed simultaneously by different CPUs or the CPUs may
simultaneously execute different instructions from the same program. The basic
organization of a typical multiprocessing system is shown in Figure 14.9.

Tightly and Loosely Coupled Multiprocessing Systems

Multiprocessing systems are basically of two types - tightly-coupled systems and


loosely-coupled systems. In tightly-coupled systems, there is a single system-wide
primary memory that is shared by all the processors. On the other hand, in loosely-
coupled systems, the processors do not share memory, and each processor has its
own local memory. In contrast to the tightly-coupled systems, the processors of
loosely-coupled systems can be located far from each other to cover a wider
geographical area.

Difference between Multiprogramming and Multiprocessing

Multiprogramming is the interleaved execution of two or more processes by a


single-CPU computer system. On the other hand, multiprocessing is the
simultaneous execution of two or more processes by a computer system having
more than one CPU. To be more specific, multiprogramming involves executing a
portion of one program, then a segment of another, etc., in brief consecutive time
periods. Multiprocessing, however, makes it possible for the system to
simultaneously work on several program segments of one or more programs.

Advantages and Limitations of Multiprocessing

Multiprocessing systems typically have the following advantages:


1. Better Performance. Due to multiplicity of processors, multiprocessor
systems have better performance than single-processor systems. That is, the
multiple processors of such a system can be utilized properly for providing shorter
response times and higher throughput than a single-processor system. For
example, if there are two different programs to be run, two processors are
evidently more powerful than one because the programs can be simultaneously run
on different processors. Furthermore, if a particular computation can be partitioned
into a number of subcomputations that can run concurrently, in a multiprocessor
system all the subcomputations can be simultaneously run with each one on a
different processor. However, the speed-up ratio with n processors is not n, but
less than n. This is because when multiple processors cooperate to execute the
programs or subprograms, a certain amount of overhead is incurred in keeping
everything working correctly. This overhead, plus contention for shared
resources, lowers the expected gains from additional processors.

2. Better Reliability. Due to multiplicity of processors, multiprocessor systems


also have better reliability than single-processor systems. In a properly designed
multiprocessor system, if one of the processors breaks down, the other
processor(s) automatically takes over the system workload until repairs are made.
Thus a complete breakdown of such systems can be avoided. For example, if a
system has 4 processors and one fails, then the remaining 3 processors can be
utilized to process the jobs submitted to the system. Thus, the entire system runs
only 25% slower, rather than failing altogether. This ability of a system to
continue providing service proportional to the level of non-failed hardware is
called graceful degradation feature.

Multiprocessing systems, however, require a very sophisticated operating system


to schedule, balance, and coordinate the input, output, and processing activities of
multiple processors. The design of such an operating system is a complex and time
taking job. Moreover, multiprocessing systems are expensive to procure and
maintain. In addition to the high charge paid initially, the regular operation and
maintenance of these systems is also a costly affair.

Time-sharing

Time-sharing is a mechanism to provide simultaneous interactive use of a


computer system by many users in such a way that each user is given the
impression that he/she has his/her own computer. It uses multiprogramming with a
special CPU scheduling algorithm to achieve this.

A time-sharing system has many (even hundreds of) user terminals simultaneously
connected to the same computer. Using these terminals, multiple users can
simultaneously work on the system. The multiprogramming feature allows
multiple user programs to simultaneously reside in the main memory. The special
CPU scheduling algorithm used in a time-sharing system allocates a very short
period of CPU time one-by-one to each user process, beginning from the first user
process and proceeding through the last one, and then again beginning from the
first one. This short period of time during which a user process gets the attention
of the CPU is known as a time slice, time slot, or quantum and is typically of the
order of 10 to 100 milliseconds. That is, when the CPU is allocated to a user
process, the user process will use the CPU until the allotted time slice expires (the
system's clock sends an interrupt signal to the CPU after every time slice), or until
the process needs to perform some I/O operation, or if the execution of the process
is over during this time period. Notice here that in a time-sharing system, the CPU
is taken away from a running process when the allotted time slice expires, even
though the process can continue to run. Hence the process state diagram of a time-
sharing system is as shown in Figure 14.10 (compare this with the process state
diagram of Figure 14.5).

Now let us see how the CPU scheduling algorithm mentioned above gives an
impression to each user that he/she has his/her own computer. Let us assume that
the time slice of a time-sharing system is 10 milliseconds. That is the CPU
scheduling algorithm of this system allocates 10 milliseconds to each user process
one-by-one in a circular fashion (when the last process is over, it comes back to
the first process). Suppose the processing speed of the system's CPU is of the
order of 500 million instructions per second. That is, it can execute 500 x 106 x 10-
3
x 10 = 5x106 = 5 million instructions in 10 milliseconds. This is large enough for
substantial progress of a single user process. Now suppose there are 100 user
terminals in this time-sharing system and 100 users are simultaneously using the
system. Then if 10 milliseconds is allocated to each user process one-by-one, a
particular user will get the CPU's attention once in every 10 x 100 milliseconds =
1 second. As human reaction time is normally of the order of a few seconds, a
particular user will not notice any delay in executing his/her commands and will
normally feel that he/she is the sole user of the system. In this manner, each user is
given the impression that he/she has his/her own computer, whereas actually a
single computer is shared among many uses.

Requirements of Time-sharing Systems

Time-sharing systems typically require the following additional hardware and


software features:
1. A number of terminals simultaneously connected to the system so that
multiple users can simultaneously use the system in interactive mode.
2. A relatively large memory to support multiprogramming.
3. Memory protection mechanism to prevent one job's instructions and data from
other jobs in a multiprogramming environment.
4. Job status preservation mechanism to preserve a job's complete status
information when the CPU taken away from it and restoring this information back
before the CPU is given back to it again.
5. A special CPU scheduling algorithm that allocates a very short period of CPU
time one-by-one to each user process in a circular fashion.
6. An alarm clock mechanism to send an interrupt signal to the CPU after every
time slice.

Advantages of Time-sharing Systems

Although time-sharing systems are complex to design, they provide several


advantages to their users. The main advantages of time-sharing system are as
follows:
1. Reduces CPU idle time. It will be waste of precious CPU time to allow a
single user to use a large computer interactively because his/her speed of thinking
and typing is much slower than the processing speed of a computer. While a
particular user is engaged in thinking or typing his/her input, a time-sharing
system can service many other users. In this manner, time-sharing systems help in
reducing the CPU idle time to a great extent, increasing the system throughput.
2. Provides advantages of quick response time. The special CPU scheduling
algorithm used in time-sharing systems ensures quick response time to all users.
This feature allows users to interact with the system more rapidly while working
on their problem. For example, a time-sharing system can be effectively used for
interactive programming and debugging to improve programmers efficiency.
Multiple programmers can simultaneously proceed step-by-step, writing, testing
and debugging portions of their programs or trying out various approaches to a
problem solution. The great benefit of such a system is that errors can be
encountered, corrected, and work can continue immediately for all the
simultaneous users of the system. This is in contrast to a batch system in which
errors are corrected offline and the job is resubmitted for another run. The time
delay between job submission and return of the output in a batch system is often
measured in hours.
3. Offers good computing facility to small users. Small users can gain direct
access to much more sophisticated hardware and software than they could
otherwise justify or afford. In time-sharing systems, they merely pay a fee for
resources used and are relieved of the hardware, software, and personnel problems
associated with acquiring and maintaining their own installation.

MEMORY MANAGEMENT
Other than the CPU, the main memory is an important resource of a computer
system that must be properly managed for the overall system performance. The
memory management module of an operating system takes care of this
requirement. Its job is to keep track of which parts of memory are in use and
which parts are not in use, to allocate memory to processes when they need it and
deallocate when they are done. In this section we will discuss about a number of
different memory management schemes used in earlier and modern operating
systems.

Uniprogramming Memory Model

The uniprogramming memory model is used in uniprogramming systems in which


only one job is processed by the system at a time and all the system resources are
exclusively available for the job till it completes. As shown in Figure 14.11, in this
memory management scheme, the operating system resides in one part of the
memory and the entire remaining part of the memory is available for use by the
currently active user process.

In this scheme, the operating system loads a program to be executed from disk into
the user area of the memory and executes it. When the process finishes, the
operating system cleans up the user area of the memory and then loads the next
program to be executed.
Although this memory management scheme is simple and easy to implement, it
does not lead to proper utilization of the available main memory resource. This is
because whatever memory space is not occupied by the currently active user
process remains unusued for the entire duration of the process's execution. Hence
this memory management scheme is now used only on very small or dedicated
computer systems.

Multiprogramming Memory Models

We saw that in a multiprogramming system multiple user processes need to


simultaneously reside in the main memory. The two memory management
schemes used to facilitate this are multiprogramming with fixed number of
memory partitions and multiprogramming with variable number of memory
partitions. They are described below.

Multiprogramming with Fixed Number of Memory Partitions

In this scheme, the user area of the memory is divided into a number of fixed-sized
partitions. The partitions may be of equal or unequal size, but the size, of each
partition is fixed. Figure 14.12 shows a multiprogramming memory model with n
equal-sized partitions. Each partition may contain exactly one process. Thus, the
degree of multiprogramming is bounded by the number of partitions. That is, at a
time only n processes can be loaded in the system.

All new jobs are put into an input queue. When a partition is free, the next job
from the input queue is picked up and loaded into the free partition. When a
process terminates, the partition occupied by it becomes free for use by another
process waiting in the input queue. Note that if the system uses unequal-sized
partitions, when a partition becomes free, the process closest to the front of the
input queue that fits in it could be loaded into this partition.
This scheme of memory management was used in IBM OS/360 mainframe
systems for several years. It was called MFI (Multiprogramming with a Fixed
number of Tasks). It is no longer in use.

Multiprogramming with Variable Number of Memory Partitions

In the scheme described above, since the partitions are of fixed size, any space in a
partition that is in excess of actual memory requirement of the process loaded into
it is lost (remains unused) till the process terminates. On an average, 50% of the
memory may remain unused due to this reason. To overcome this problem of
under utilization of memory, the scheme with variable number of memory
partitions was introduced. In this the scheme, number, size, and location of the
partitions vary dynamically as processes come and go.

This memory management scheme is illustrated in Figure 14.13 with an example.


Initially, all memory in the user area is available for user processes. When a
process arrives, only as much memory as is needed by it is allocated to it, keeping
the rest available to satisfy future requests. As processes come and go, memory
partitions get allocated and deallocated, each partition being exactly of the size of
the memory required by the process to which it is allocated. Since the memory
requirement of different processes is generally different, as processes come and
go, various sizes of free memory blocks get created throughout the memory. The
operating system maintains a table to keep track of which parts of memory are free
and which are occupied. When a new process arrives, the operating system
searches for a free block that is large enough for this process. If the free block is
too large, it is split into two parts. One part is large enough to meet the memory
requirement of the process and is allocated to the process. The other part contains
the remaining memory that is entered as a smaller free block in the operating
system table. When a process terminates, it releases the partition allocated to it. If
the released partition is adjacent to a free block or blocks, it is merged with the
free block or blocks to create a larger free block. In this manner, the number, size,
and location of the partitions vary dynamically as processes come and go.

Memory Fragmentation
External Fragmentation

Notice from Figure 14.13 that as processes come and go in a system that uses the
scheme of variable number of memory partitions, the free memory blocks get
broken into smaller pieces scattered throughout the memory. External
fragmentation is a situation when enough total free memory space exists to satisfy
the memory need of a process, but still the process cannot be loaded because the
available free memory is not contiguous (is fragmented into multiple free blocks
of memory). For example, in case of Figure 14.13(h), if the sizes of free blocks
Free 1, Free 2 and Free 3 are 400K, 100K and 100K respectively, then the total
available free memory is 600K. Now if a new process arrives whose memory
requirement is 500K, it cannot be loaded because 500K of contiguous free
memory space is not available. Thus this is an example of external fragmentation.
The amount of unusable memory area due to external fragmentation depends on
the total size of main memory and the average memory requirement of the
processes. However, statistical analysis indicates that as much as one-third of
memory may be unusable due to external fragmentation.

Internal Fragmentation

Internal fragmentation is a situation when a process is allocated more memory


than its actual memory requirement and the additional memory allocated to the
process remains unutilized because it is neither used by the process to which it is
allocated nor it can be allocated to any other process for use. Internal
fragmentation may occur in the following situations:
1. When the system uses fixed number of fixed-sized memory partitions, any
space in a partition that is in excess of the actual memory requirement of the
process loaded into it is an internally fragmented memory space. Figure 14.14
illustrates this situation with an example. Note that, on an average, 50% of the
memory may remain unused in such systems due to internal fragmentation.
2. When the system uses variable number of variable-sized memory partitions, it
may happen that there is a free block of size 200K and a new process arrives
whose memory requirement is 199.5K. If we allocate exactly the requested size of
memory, we will be left with a free block of size 0.5K. Considering the overhead
involved in keeping track of this 0.5K free block, the general approach is to
allocate such small memory areas as part of the process's memory request. Thus,
the allocated memory may be slightly larger than the requested memory, and the
additional memory that gets allocated to a process in this way is an internally
fragmented memory space.

Paging
We saw in the discussion above that memory compaction is a mechanism used to
solve the problem of external fragmentation. We also saw that memory
compaction is an expensive operation requiring lot of CPU time because it
involves copying memory contents from one memory location to another to make
scattered free space contiguous. Paging is another mechanism used to solve the
problem of external fragmentation. It is considered to be better than the memory
compaction mechanism because it solves the problem of external fragmentation
without the need to make scattered free space contiguous. Rather it allows a
process's memory to be noncontiguous, thus allowing a process to be allocated
physical memory wherever free memory blocks are available. Because of its
advantage over memory compaction mechanism, paging mechanism (in its various
forms) is used in many modern operating systems. How this mechanism works is
explained below.

In this mechanism, the physical memory of a computer system is partitioned into


fixed-sized blocks called page frames. The total memory requirement of a process
(including its instructions and data) is also partitioned into blocks of the same size
called pages. Page sizes are typically of the order of 1 Kilobytes to 8 Kilobytes
and vary from one system to another. Now when a process is to be loaded into the
memory, its pages are loaded into the free page frames wherever free page frames
are available and a mapping table (called page table) is maintained by the
operating system to keep track of which page of the process is loaded into which
page frame of the memory. Atypical example to illustrate this is shown in Figure
14.15. Notice from the figure that the page frames allocated to the pages of the
process need not be contiguous.

To ensure correct memory addressing, in case of paging every address generated


by the CPU is divided into two parts consisting of a page number and a page
offset. The page table is used to obtain the corresponding page frame number from
the page number, and the page offset is added to the base address of the page
frame number to define the physical memory address that is sent to the memory
unit.

Notice that there is no external fragmentation problem in a system that uses the
paging scheme because free pa frames allocated to a process can be anywhere in
the memory (need not be contiguous). However, the paging scheme leads to some
unutilized memory space due to internal fragmentation because the unit of
memory allocation is a page frame. If the memory requirements of a process do
not happen to fall on page boundaries, the last page frame allocated to the process
will not be completely full.

For example, if the page size used is 2048 bytes, and a process's memory
requirement is 23,548 bytes, the process will need 11 pages plus 1020 bytes. As
the unit of memory allocation is a page frame, the process will be allocated 12
page frames, resulting in an internal fragmentation of 2048 - 1020 = 1028 bytes.
On an average, internal fragmentation leads to wastage of one-half page per
process in case of paging scheme. Hence, the larger is the page size, the larger will
be the memory wastage due to internal fragmentation. This suggests the use of
small page sizes. However, the smaller the page size, the larger will be the page
tables and the overhead involved in maintaining them. Hence these two factors
have to be properly balanced to decide a suitable page size.

Virtual Memory

What is Virtual Memory?

In all the memory management schemes discussed till now, a process was loaded
into the main memory for execution only when sufficient free memory
(contiguous or non-contiguous) was found to be available to load the entire
process. These schemes suffer from the following two main limitations:
1. A process cannot be loaded and has to keep waiting for its execution to start
until sufficient free memory for loading the entire process becomes available.
This may delay a process's turnaround time to a great extent.
2. A process cannot be loaded (and hence executed) in a system whose main
memory size is less than the total memory required by the process.

Virtual memory is a memory management scheme that overcomes the above


mentioned limitations by allowing the execution of processes that might not be
completely loaded in the main memory. That is, it does not require the entire
process to be in memory before the process can execute.

How is Virtual Memory Realized?

The three basic concepts used for the realization of virtual memory are:
1. On-line secondary storage. It is a secondary storage device whose capacity is
much larger than the main memory capacity and which is always kept on-line to
the system. A high-speed disk storage is usually used for this purpose.
2. Swapping. Swapping is the process of transferring a block of data from the
on-line secondary storage to main memory or from main memory to the on-line
secondary storage. When data is transferred from on-line secondary storage to
main memory, it is called swapping in of data, and when data is transferred from
main memory to on-line secondary storage, it is called swapping out of data.
3. Demand paging. Demand paging is a scheme similar to that of paging scheme
with an additional facility of swapping in of pages of a process as and when they
are needed during the execution of the process, rather than loading all the pages
before starting the process's execution. When there is no free page frame in the
memory to accommodate a page that needs to be swapped in to continue the
process's execution, a page-replacement algorithm is invoked to create one for the
accessed page. It deals with the process of selecting a victim page that is residing
in the memory but is not currently being used. The selected victim page is
swapped out to free the page frame it is occupying, which is then used to hold the
accessed page of the process.

Hence in a virtual memory system, all processes are partitioned into pages and
reside on the on-line secondary storage. The physical memory is also partitioned
into page frames of the same size. Now instead of swapping in the entire process
before its execution can start, a swapping algorithm (called demand paging) is
used that swaps in only those pages of a process that are currently needed in the
memory for continuing the process's execution.

This idea is based on the observation that since the instructions of a program are
executed one-by-one, all parts of the program are not needed simultaneously in the
memory.

Based on the way virtual memory is realized, virtual memory is also often
described as a hierarchy of two storage systems - one of them is a low cost, large
capacity, low speed system (on-line disk storage), and the other is a high cost,
small capacity, high speed system (main memory). The operating system manages
the two storage systems in such a way that the users of the system feel that they
have access to a single, large, directly addressable and fast main memory. That is,
from the point of view of applications programmers, the effective (or virtual) size
of the available main memory appears to be unlimited.

Advantages and Disadvantages of Virtual Memory

Advantages

Virtual memory typically has the following advantages:

1. It enables separation of logical memory and physical memory. With this


mechanism, a very large virtual memory can be provided for programmers on a
system having smaller physical memory. That is, the logical address space is no
longer constrained by the physical memory size of the system.
2. It enables the execution of a process on a system whose main memory size is
less than the total memory required by the process.
3. It enables a process's execution to be started even when sufficient free memory
for loading the entire process is not available. This helps in greatly improving the
process's turnaround time.
4. With virtual memory, a program would no longer be constrained by the
amount of physical memory that is available. This makes programming task much
easier, since the programmer no longer needs to worry about the size limitations of
the physical memory available, but can concentrate instead on the problem to be
programmed.
5. An analysis of the execution of real programs shows that programs often do
not execute all parts of their code during a typical execution run. For example,
depending on the data, a large part of the code may be skipped on some condition
check and may never be executed during that execution run. Similarly, certain
options and features of a program, such as those for handling unusual error
conditions, may be rarely used, and are generally not needed during most
execution runs of the program. With virtual memory mechanism, since the parts
of a program are loaded on demand, the parts that are not needed during a
particular execution run of a program may never get loaded. This in turn leads to
less I/O activity than in the case when the whole program is loaded before
execution. With less I/O, each user program would run faster leading to better
throughput, turnaround time, and response time.
6. Virtual memory enables a process's execution to be started even when
sufficient free memory for loading the entire process is not available. Due to this,
virtual memory can be effectively used to simultaneously accommodate program
segments of a large number of users in the main memory. This increases the
degree of multiprogramming resulting in increased CPU utilization and system
throughput.

Disadvantages

Virtual memory typically has the following disadvantages:


1. It is difficult to implement because it requires algorithms to support demand
paging.
2. If used carelessly, it may substantially decrease performance instead of
increasing performance. This happens when page-fault rate is very high for a
process. That is, the process spends more time in swapping out and swapping in
of pages than in its execution.

FILE MANAGEMENT

A file is a collection of related information. Every file has a name, its data, and
attributes. The name of a file uniquely identifies it in the system and is used by its
users to access it. A file's data is its contents. The contents of a file is a sequence
of bits, bytes, lines, or records whose meaning is defined by the file's creator and
user. The attributes of a file contain other information about the file such as the
date and time of its creation, date and time of last access, date and time of last
update, its current size, its protection features (who can access the file and in what
way), etc. The list of attributes maintained for a file varies considerably from one
system to another.

The file management module of an operating system takes care of file-related


activities such as structuring, accessing, naming, sharing, and protection of files.
In this section we will discuss about the important concepts used for file
management in various operating systems.

File Structure

Files can be structured in many ways. However, the two popular types of file
structures used by operating systems are files as unstructured sequence of bytes
and files as sequence of fixed-length records. The two types of file structures are
briefly described below.

Files as Unstructured Sequence of Bytes

As shown in Figure 14.16(a), in this case the operating system treats a file as
nothing more than byte sequences. That is, all file access operations at operating
system level deal with the number of bytes to be read, written or skipped. No
interpretation of the bytes is made by the operating system. This type of file
structuring scheme provides maximum flexibility, but minimal support. That is,
each application program must include its own code to interpret an input file into
the appropriate structure. This type of file structure is used in two of the most
popular operating systems, UNIX and MS-DOS.

Files as Sequence of Fixed-Length Records

As shown in Figure 14.16(b), in this case the operating system treats a file as a
sequence of fixed-length records. Each record has some internal structure defined
by the creator of the file. In this case all file access operations at operating system
level deal with the number of records to be read, written or skipped. This type of
file structure was commonly used in olden days operating systems. For example,
when the 80-column punched paper cards were popular as input media, and 132
column printers were popular as output device, many operating systems based
their file systems on input files consisting of 80-character records and output files
consisting of 132-charaeter records. The most recent operating system that used
this type of file structuring scheme was CP/M.

File Access Methods


To use the information stored in a file, it must be accessed and read into computer
memory. The two commonly supported file access methods at operating system
level are sequential and random access. They are briefly described below.
1. Sequential Access Files. Sequential access files are normally used with
sequential access storage media such as magnetic tape. Information stored in a
sequential access file can be accessed only sequentially. That is, a process can read
the bytes or records in the file in the order in which they are stored, starting at the
beginning. Reading of bytes or records randomly or out of order is not possible. A
sequential file can, however, be rewound and read as often as needed.
2. Random Access Files. Random access files are normally used with random
access storage media such as magnetic or optical disks. Unlike a sequential
access file, information stored in a random access file can be accessed randomly
irrespective of the order in which the bytes or records are stored. For example, in a
record-oriented file, a specific record can be directly accessed by specifying the
value of its key field, rather than reading the records one-by-one from the
beginning and comparing its key field value with the value of the key field of the
desired record till the desired record is found. Similarly, in a byte-oriented file, it
is possible to directly go to the nth byte of the file without the need to read all the
(n-1) bytes before it.
Random access files are essential for many applications. For example, in a railway
reservation system, the information about all the tickets booked on a particular
train may be stored in a single file. If a customer wants to cancel an already
booked seat, the reservation program must be able to access the specific record for
that seat without having to read the records for hundreds of other booked seats
first, so that the booking service can be fast enough.
All operating systems do not support both sequential and random access files.
Some support only sequential access files, some support only random access files,
while there are some which support both. Those, which support files of both types,
normally require that a file be declared as sequential or random when it is created;
such a file can be accessed only in a manner consistent with its declaration. Most
modern operating system support only random access files.

File Operations

An operating system provides a set of operations to deal with files and their
contents. A typical set of file operations provided by an operating system may be
as follows (the actual set varies from one operating system to another):
1. Create. Is used to create a new file.
2. Delete. Is used to delete an existing file that is no longer needed.
3. Open. An already existing file must be opened before using it. This operation
is used to open an existing file when a user wants to start using it.
4. Close. When a user has finished using a file, the file must be closed using this
operation.
5. Read. Is used to read data stored in a file.
6. Write. Is used to write new data in a file.
7. Seek. This operation is used with random access files to first position the
read/write pointer to a specific place in the file, so that data can be read from, or
written to, that position.
8. Get attributes. Is used to access the attributes of a file.
9. Set attributes. Is used to change the user-settable attributes (such as, protection
mode) of a file.
10. Rename. Is used to change the name of an existing file.
11. Copy. Is used to create a copy of a file, or to copy a file to an I/O device such
as a printer or a display.

File Naming

When a file is created, it is given a name, which can be later used to access the
file. The rules for naming files vary from one operating system to another. For
instance, consider the following examples:
1. MS-DOS allows only up to 8 characters for a file name, Macintosh allows up
to 31 characters, and Microsoft Windows allows up to 255 characters. With
longer file names, users have greater flexibility in assigning more descriptive and
meaningful names to their files.
2. Some operating systems allow only letters and numbers to be used in file
names, whereas others also allow special characters (sometimes barring a few) to
be used in file names. Hence names like letter3 Jrom Ram, reminder2_to_Sham
are often valid file names.
3. Some operating systems (such as Unix) distinguish between upper case letters
and lower case letters, whereas others (such as MS-DOS) do not. Thus the file
names Sinha, sinha and SINHA will be treated as different and can be assigned to
three different files in Unix, but they will be treated as same in MS-DOS and
cannot be assigned to three different files.
4. Many operating systems support file names having two or more parts, with the
different parts separated by a period. For example, MS-DOS supports two-part file
names in which the first part can have 1 to 8 characters, and the optional second
part can have 1 to 3 characters (such as letter.txt). In Unix, a file may have more
than two parts, as inprog.cz, where .c and .z are used to indicate that it is a C
language program file that has been compressed using the Ziv-Lempel
compression algorithm. In such file names, the second and subsequent parts are
called file extensions. File extensions usually indicate something about the file and
are often used by applications to check for the intended type of file before
operating on it. For example, a C language compiler may actually insist that the
files it is to compile end in 4c, and it may refuse to compile them if they do not.
Some applications automatically supply their own extensions, such as .doc (for a
Microsoft Word file) or .wk4 (for a Lotus 1-2-3 file). Some typical file extensions
and their meanings are shown in Figure 14.17.

File extension Its meaning


.bas Basic source program file
.c C source program file
.ftn Fortran source program file
.pas Pascal source program file
.obj Object file (compiler output, not yet
linked)
.bin Executable binary program file
.lib Library of .obj files used by the
linker
.dat Data file
.hip Text file for HELP command
.man Online manual page file
.txt General text file
.bak Backup file
.doc Microsoft word document file
.wav Microsoft windows sound file
.wk4 Lotus 1-2-3 spreadsheet file
.xls Microsoft Excel spreadsheet file
.jpg JPEG graphics file
.gif GIF graphics file

Figure 14.17. Some typical file extensions and their meaning.

Directories

Directories are used by operating systems to map file names to their corresponding
file attributes and file data, and also to provide greater flexibility to users in file
naming. How directories help in achieving these objectives is briefly explained
below.

Directory Contents

A directory has a number of entries, one per file. As shown in Figure 14.18, each
entry contains a file name, the attributes of the file or pointer to the data structure
containing the attributes, and pointer to the file data (disk address where the file
data is stored).

File File attributes or pointer to data Pointer to file


Name structure containing file data (Disk
attributes address)

Figure 14.18. Typical contents of a directory. There is one entry per file.

When a new file is created, an entry for it is created in the directory, and when a
file is deleted, its corresponding entry is deleted from the directory. When an
existing file is opened for use, the operating system searches its corresponding
entry in the directory and then extracts its attributes and disk addresses, and loads
them in a table in main memory. All subsequent references to the file use this
information in main memory.

Directory Organization

The number of directories used and the way these directories are organized varies
from one system to another. The following three types of organizations are
commonly used:
1. Single directory. This is the simplest organization. As shown in Figure
14.19(a), in this case, a single directory contains entries for all the files in the
system. Although this organization is simple to implement, it has significant
limitations when the number of files increases or when there are more than one
users. As the number of files increases, it becomes difficult to remember the
names of all the files in order to create new files with unique names. Similarly, in
a system having multiple users, if two users choose the same file name, the system
will not accept the file name of the user who did so later than the other user
because it violates the unique-name rule. Such conflicts and confusions make this
directory organization unsuitable for multi-user systems. Hence it is used only by
the most primitive microcomputer operating systems. This organization is
popularly known as flat directory structure.
2. One directory per user. As shown in Figure 14.19(b), in this organization,
there is a separate directory for each user. The names of all the files belonging to a
particular user are listed in his/her directory. As a file name needs to be unique
only within a directory, different users can have files with the same name. This
overcomes the limitation of file name conflicts among users in case of single
directory organization. However, this organization is still not very satisfactory for
users with many files because it becomes difficult for a user to remember the
names of all the files created over a period of time when the number of files in the
user's directory becomes large. This organization is popularly known as two-level
directory structure.
3. Multiple directories per user. As shown in Figure 14.19(c), in this
organization also, there is a separate directory for each user. However, each user
can create and use as many sub-directories or sub-sub-directories, or sub-sub-sub-
directories, and so on to group his/her files in natural ways. For example, a user
may like to group his/her files project-wise, in which case a sub-directory may be
created for each project and all files pertaining to a particular project can be listed
within the corresponding project's sub-directory. As a file name needs to be
unique only within a directory, the same user can have files with the same name in
different sub-directories. This feature provides greater flexibility to a user in
naming his/her files because the files can be grouped together in logical ways and
the user can remember the file name along with the group name to which it
belongs even when the number of files for a user becomes large. This organization
is popularly known as tree-structured hierarchical directory structure.

Disk Space Allocation Methods

Files are normally stored on disks for permanent storage. A disk normally contains
many files. Disk space allocation methods deal with how to allocate space to
multiple files on disk so as to meet the following two objectives:
1. Disk space is effectively utilized, and
2. Desired piece of information can be quickly accessed from files.
The three commonly used methods for disk space allocation are contiguous,
linked, and indexed. They are described below. However, before that, it is
important to note that operating systems divide the total disk storage space into
equal sized blocks (see Figure 14.20). The size of a block is normally a multiple of
page size in systems that use paging mechanism for memory management. Disk
space is allocated to files in units of blocks. It is possible to read a block from the
disk, to modify the block, and write it back into the same place.

Contiguous Allocation

In this method, each file occupies a set of contiguous blocks on the disk. Thus if a
disk has 2K blocks, a file of size 1 IK will be allocated 6 contiguous blocks. As
shown in Figure 14.21, in this method, the disk addresses in the directory indicate
the starting block number and the total number of blocks allocated to each file.
Contiguous disk space allocation has the following advantages:
1. It is simple to implement.
2. Its performance is excellent because the entire file can be read from the disk in
a single operation.
3. It easily supports both sequential and direct access because all the blocks
allocated to a file contiguous.
File File attributes Disk address
Name Starting Total number
block of
number blocks !
A — 0 3
B — 19 6
C — 29 8
D — 5 4
Directory
File 'A' Occupies 3 blocks numbered 0, 1 and 2.
File 'B' occupies 6 blocks numbered 19, 20, 21, 22, 23 and 24.
File 'C occupies 8 blocks numbered 29, 30, 31, 32, 33, 34, 35 and 36.
File 'D' occupies 4 blocks numbered 5, 6, 7 and 8.

Figure 14.21. Illustrating allocation of disk blocks to files in contiguous allocation


method.

This method, however, has the following drawbacks:


1. It suffers from external fragmentation problem. External fragmentation is a
situation when enough total free disk blocks exist to satisfy the disk space
requirement of a file, but still the file cannot be stored because the available free
disk blocks are not contiguous. The amount of unusable disk space due to external
fragmentation depends on the total disk space and the average disk space
requirement of the files. However, statistical analysis indicates that as much as
one-third of disk space may be unusable due to external fragmentation. To take
care of this problem, systems which use contiguous disk space allocation method
often provide the facility of disk compaction which moves files to bring all free
blocks together. Disk compaction is a time consuming operation and may take
several hour. Hence it is usually performed at night when the system is otherwise
idle.
2. Another problem with this method is in determining how much space is needed
for a file when it is created so that appropriate number of contiguous blocks can be
found and allocated to the file. In general, it is difficult to estimate the size of an
output file. If the size is over estimated, it will lead to unused disk space due to
internal fragmentation. On the other hand, if the size is under estimated, the file
will have to be moved completely to a new area on the disk when the file size
grows beyond the originally estimated size. This often leads to external
fragmentation problem and slower file access operations.

Linked Allocation
In this method, the set of disk blocks allocated to a file are linked together in the
form of a linked list of blocks as shown in Figure 14.22. The first word of each
disk block is used as a pointer to the next one, and the rest of the words in the
block are used to store file data. Note that the disk blocks allocated to a file may
be scattered anywhere on the disk. As shown in Figure 14.22, in this method, the
disk address in the directory indicates the number of the first block allocated to
each file.
Linked disk space allocation method has the following advantages:
1. There is no external fragmentation in this method. Every disk block can be
used. Since there is no loss of disk space due to external fragmentation, there is no
need to implement disk compaction facility.
2. There is no need to determine and declare the total anticipated size of a file at
the time of its creation. A file can freely grow at any time since new disk blocks
required to be allocated to the file may be anywhere on the disk.

The method, however, has the following drawbacks:


1. The method can be used effectively only for sequential-access files. Random
access of files in this method is extremely slow. For example, to access some data
from the ih block of a file, we must start at the first block and follow the pointers
until we get to the ith block. This is slow because each access to a pointer requires
accessing a new block that requires a disk read operation.
2. Another problem is reliability. Since the blocks allocated to a file are linked
together by pointers scattered all over the disk, if a pointer were lost due to disk
corruption, all file data beyond that disk block would become inaccessible. This
would lead to garbage blocks, blocks that are neither free nor being used, and
would require implementation of a garbage collection algorithm. This algorithm
searches for garbage blocks and adds them to the list of free disk blocks.

Indexed Allocation
In this method also, the disk blocks allocated to a file may be scattered anywhere
on the disk. However, unlike linked allocation in which the set of blocks allocated
to a file are linked together in a linked list, in this method the pointers to the set of
blocks allocated to a file are stored together in a special block known as index
block. Thus, each file has its own index block, which is an array of disk block
addresses. The i'h entry in the index block points to the i'h block of the file. As
shown in Figure 14.23, in this method, the disk address in the directory indicates
the number of the index block allocated to each file.

Indexed disk space allocation method has the following advantages:


1. There is no external fragmentation in this method. Every disk block can be
used. Since there is loss of disk space due to external fragmentation, there is no
need to implement disk compaction facility.
2. There is no need to determine and declare the total anticipated size of a file at
the time of its creation. A file can freely grow at any time since new disk blocks
required to be allocated to the file may be anywhere on the disk.
3. The method can be effectively used for both random-access and sequential-
access files. Once the index block of a file has been loaded into the memory
(which is done when the file is opened for use), the block corresponding to any
part of the file can be directly accessed by using the information in index block.

The method, however, has the following drawbacks:


1. It suffers from wastage of disk space especially when most files are small. This
is because each file is allocated one index block irrespective of the number of data
blocks allocated to the file. Hence if a file has one or two data blocks, an entire
index block is used for storing just one or two pointers, leaving the index block
area largely unused.
One way to take care of this problem is to have enough space in the directory so
that the first few (say n) block addresses can be stored in the directory itself. So
for small files, all the necessary information is right in the directory. An index
block is allocated for a file only when the file requires more than n blocks for
storing its data.
2. It suffers from the problem of handling very large files. This is because if the
index block has space that is sufficient for storing only m disk block addresses,
then how can we store files whose size is larger than m disk blocks? This problem
is often taken care of by using the method of multilevel index. In this method, one
of the addresses in the index block is the address of a disk block called the second-
level index block. This block contains pointers to additional disk blocks allocated
to the file. This approach could be continued to a third or fourth level, but two
levels of indexes are generally sufficient.

DEVICE MANAGEMENT

For processing data, a computer must first input data and programs for which it
needs input devices. Similarly, to produce the results of processing, it needs output
devices. Chapter 9 provided a description of several of these I/O devices. The
device management module of an operating system takes care of controlling all the
I/O devices of a computer system and provides a simple and easy to use interface
to these devices. How these requirements are taken care of by an operating system
is described below.

Controlling I/O Devices

We saw in Chapter 9 that device controllers are used for connecting I/O devices to
a computer system. Each device controller is in charge of a specific type of device
such as disk drives, tape drives, printers. A device controller maintains some local
buffer storage and is responsible for moving data between the I/O device it
controls and its local buffer storage. Each device controller also has a few registers
that it uses for communicating with the CPU. On some computers, these registers
are part of the regular memory address space. This scheme is called memory-
mapped I/O. On other computers, a special address space is used for I/O, with
each device controller allocated a certain portion of it.

To perform an I/O operation, the operating system writes the relevant commands
and their associated parameters into the appropriate controller's registers. After
having finished loading the commands into the controller's registers, the CPU
resumes with its normal operation. The device controller then examines the
contents of these registers and performs necessary actions for the requested I/O
operation. For example, the action for a read request will be to transfer data from
the specified input device to its local buffer.

Once the transfer of data from input device to the controller's local buffer is
complete, one of the following two methods is used to transfer the data from the
controller's local buffer to the appropriate memory area of the computer:

1. Non-DMA Transfer. In this method, as soon as the transfer of data from input
device to the controller's local buffer is complete, the controller causes an interrupt
to allow the operating system to gain control of the CPU. When the CPU is
interrupted, it stops what it is currently doing and routine for handling the interrupt
is located. On execution of the instructions of the interrupt service routine by the
CPU, the data gets transferred from the local buffer of the device controller to
main memory. Once this transfer of data is completed, the CPU can then resume
with the computation that it was doing when it was interrupted.

DMA Transfer. In the method of non-DMA transfer, the CPU is involved in the
transfer of data from the device controller's buffer to the main memory. That is,
the operating system executes the interrupt service routine, which reads one byte
or word at a time from the device controller's buffer and stores it in memory.
Involvement of the CPU in reading and storing one byte or word at a time wastes
CPU time. To free the CPU from doing this low-level work, many device
controllers support direct memory access (DMA) mechanism. In this method,
when the operating system writes the relevant commands-and their associated
parameters into the controller's registers, the command parameters also include the
memory address from/to where data is to be transferred and the number of bytes to
be transferred. Now after the controller has read the data from the device into its
buffer, it copies the data one byte or word at a time from its buffer into the main
memory at the specified memory address without the involvement of the CPU.
The device controller causes an interrupt only after the entire data has been
transferred to the memory. Note that in this case when the operating system starts
after the interrupt, it does not have to copy the data from the device controller's
buffer to memory, since the data is already there. So it can directly continue
performing the subsequent operations.

Simple and Easy User Interface to I/O Devices

Ease of use is an important goal of all operating systems. To meet this objective, it
is important to provide simple and easy user interface to all I/O devices. This is
achieved by organizing the software for using I/O devices as a series of layers,
with the lower layers designed to hide the internal details of the devices from the
upper layers, and the upper layers designed to present a nice, clean, uniform
interface to the users. As shown in Figure 14.24, the I/O software is typically
structured into the following four layers:

1. Interrupt Handlers. As mentioned above, the device controller causes an


interrupt after it has completed transfer of data either from the device to its buffer
(in non-DMA transfer) or from the device to memory (in DMA transfer). This
interrupt is actually caused by the interrupt handler software. The interrupt handler
sends an interrupt signal to the appropriate device driver to wake it up so that it
can take the further course of action.

2. Device Drivers. There is a device driver for each type of device connected to
the system. For example, a system normally has a disk driver for disks, a printer
driver for printers, a tape driver for tapes, and so on. The device driver contains
all device-dependent code. A device driver accepts abstract I/O requests from the
device-independent software layer above it, and translates it into commands for
the appropriate device controller. It then writes these commands and their
associated parameters into the controller's registers.

3. Device-independent Software. This layer of software performs the I/O


functions that are common to all devices, and provides a uniform interface to the
user-level software. It takes care of mapping symbolic device names on to the
appropriate device driver. Some I/O devices, such as disks, are sharable in the
sense that they can be used by many users at the same time. Other devices, such
as tapes and printers, have to be dedicated to a single user until that user has
finished using it. The device-independent software layer handles both shared and
dedicated devices in such a manner that avoids problems.

4. User-level Software. This layer of software contains the standard I/O system
calls in the form of library procedures. The users use these system calls, such as
read, write, print, send, and receive for performing the desired I/O operations.

SECURITY
We saw towards the beginning of this chapter that security in computer systems
deals with protecting the various resources and information of a computer system
against destruction and unauthorized access. A total approach to computer security
involves both external and internal security. External security deals with securing
the computer system against external factors such as fires, floods, earthquakes,
stolen disks/tapes, leaking out of stored information by a person who has access to
the information, and so on. For external security, the commonly used methods
include maintaining adequate backup copies of stored information at places far
away from the original information, using security guards to allow the entry of
only authorized persons into the computer center, allowing the access to sensitive
information to only trusted employees/users, and so on. Internal security, on the
other hand, mainly deals with the following aspects:
1. User authentication. Once a user is allowed physical access to the computer
facility, the user's identification must be checked by the system before the user can
actually use the facility. This requirement is taken care of by user authentication
mechanisms.
2. Access control. A computer system contains many resources and several
types of information. Obviously, not all resources and information are meant for
all users. Therefore, even when a user passes the authentication phase and is
allowed to use the computer facility, a way is needed to prohibit the user from
accessing those resources/information that he/she is not authorized to access. This
requirement is taken care of by access control mechanisms.
3. Cryptography. A third type of internal security is often used to protect
unauthorized access of information that is highly critical in nature. That is, even if
a user somehow manages to gain access to some information that he/she is not
authorized to access, a way is needed to ensure that the user cannot make use of
that information. This requirement is taken care of by cryptography mechanisms.

Below we will discuss about the commonly used mechanisms for providing these
three different types of internal security in computer systems.

User Authentication

User authentication deals with the problem of verifying the identity of a user
(person or program) before permitting access to the requested resource. That is, an
authentication mechanism prohibits the use of the system (or some resource of the
system) by unauthorized users by verifying the identity of a user making a request.

Authentication basically involves identification and verification. Identification is


the process of claiming a certain identity by a user, while verification is the
process of verifying the user's claimed identity. Thus, the correctness of an
authentication process relies heavily on the verification procedure employed.
The three basic approaches to user authentication are as follows:
1. Proof by Knowledge. In this approach, authentication involves verifying
something that can only be known by an authorized user. Authentication of a user
based on the password supplied by him/her is an example of proof by knowledge.
Authentication methods based on the concept of proof by knowledge are again of
two types - direct demonstration method and challenge-response method. In the
direct demonstration method, a user claims his/her identity by supplying
information (like typing in a password) that the verifier checks against pre-stored
information. On the other hand, in the challenge-response method, a user proves
his or her identity by responding correctly to the challenge questions asked by the
verifier. For instance, at the time of initially registering in a system as a user, the
user picks a function, for example, x + 18. When the user logs in, the system
randomly selects and displays a number, say 105, in which case the user must type
123 for authentication to be successful.

2. Proof by Possession. In this approach, a user proves his/her identity by


producing some item that can only be possessed by an authorized user. The
system is designed to verify the produced item to confirm the claimed identity.
For example, a plastic card with a magnetic strip on it that has a user identifier
number written on it in invisible, electronic form may be used as the item to be
produced by the user. The user inserts the card in a slot meant for this purpose in
the system's terminal, which then extracts the user identifier number from the card
and checks to see if the card produced belongs to an authorized user. Obviously,
security can be ensured only if the item to be produced is unforgeable and safely
guarded.

3. Proof by Property. In this approach, the system is designed to verify the


identity of a user by measuring some physical characteristics of the user that are
hard to forge. The measured property must be distinguishing, that is, unique
among all possible users. For example, a special device (known as a biometric
device) may be attached to each terminal of the system that verifies some physical
characteristic of the user, such as the person's appearance, fingerprints, hand
geometry, voice, signature. In deciding the physical characteristic to be measured,
an important factor to be considered is that the scheme must be phycologically
acceptable to the user community. Biometric systems offer the greatest degree of
confidence that a user actually is who he/she claims to be, but they are also
generally the most expensive to implement. Moreover, they often have user
acceptance problems because users see biometric devices as unduly intrusive.
In practice, a system may use a combination of two or more of these
authentication methods. 'For example, the authentication mechanism used by
automated cash-dispensing machines in banks usually employs a combination of
the first two approaches. That is, a user is allowed to withdraw money only if he or
she produces a valid identification card and specifies the correct password
corresponding to the identification number on the card.

To provide good security with password-based authentication, it is important that


passwords are kept secret and passwords are chosen in such a manner that they are
difficult to guess.

Access Control

Once a user or a process has been authenticated, the next step in security is to
devise ways to prohibit the user or the process from accessing those
resources/information that he/she/it is not authorized to access. This issue is called
authorization and is dealt with by using access control mechanisms.

When talking about access control in computer systems, it is customary to use the
following terms:
1. Objects. An object is an entity to which access must be controlled. An object
may be an abstract entity, such as a process, a file, a database, a tree data structure,
or a physical entity, such as a CPU, a memory segment, a printer, and a tape drive.
Each object has a unique name that differentiates it from all other objects in the
system. An object is referenced by its unique name. In addition, associated with
each object is a "type" that determines the set of operations that may be performed
on it. For example, the set of operations possible on objects belonging to the type
"data file" may be Open, Close, Create, Delete, Read, and Write, whereas for
objects belonging to the type "program file," the set of possible operations may be
Read, Write, and Execute.
2. Subjects. A subject is an active entity whose access to objects must be
controlled. That is, entities wishing to access and perform operations on objects
and to which access authorizations are granted are called subjects. Examples of
subjects are processes and users.
3. Protection rules. Protection rules define the possible ways in which subjects
and objects are allowed to interact. That is, protection rules govern the subjects'
access to objects. Therefore, associated with each (subject, object) pair is an access
right that defines the subset of the set of possible operations for the object type
that the subject may perform on the object. The complete set of access rights of a
system defines which subjects can perform what operations on which objects. At
any particular instance of time, this set defines the protection state of the system at
that time.
With the above mentioned concepts, access to objects by subjects is controlled in
the following manner. Suppose a subject S requests for an access r on object O,
where r belongs to the set of operations that may be performed on 0. To validate
this access request, the access control modules of the security system check
whether access r is permitted for subject £ on object O in the current protection
state of the system. If yes, the access is permitted; otherwise the access is denied.

Cryptography

Cryptography is a means of protecting private information against unauthorized


access in those situations where it is difficult to ensure access control. The basic
idea behind this security technique is that if it is not possible to ensure access
control, it is better to prevent comprehension of information.

Basic Concepts and Terminologies

Two primitive operations employed by cryptography are encryption and


decryption. Encryption (also called enciphering) is the process of transforming an
intelligible information (called plaintext or cleartext) into an unintelligible form
(called ciphertext). Decryption (also called deciphering) is the process of
transforming thi information back from ciphertext to plaintext.

Encryption is basically a mathematical function (encryption algorithm) having the


following form:
C = E(P, Ke)
where P is the plaintext to be encrypted, Ke is an encryption key, and C is the
resulting ciphertext. Decryption o C is performed by a matching function
(decryption algorithm) that has the following form:
P=D(C,Kli)
where Kd is the decryption key. Note that the decryption function D is the inverse
of the encryption function L Therefore we have
D (E (P, Ke),
=P

To prevent the plaintext from being easily revealed, it must be possible to


transform a given plaintext into a large variety of possible ciphertexts selected by
a specific parameter. The keys Ke and Kd serve as this parameter. Tha is, the
function parts remain the same but the keys are changed as often as necessary.

The above described general structure of a cryptosystem is illustrated in Figure


14.25.

Symmetric and Asymmetric Cryptosystems


There are two broad classes of cryptosystems - symmetric and asymmetric. In a
symmetric cryptosystem, either both the encryption key (Ke) and decryption key
(Kd) are the same or one is easily derivable from the other Usually, a common key
(K) is used for both enciphering and deciphering. For security, it is important that
the ke of a symmetric cryptosystem be easily alterable and must always be kept
secret. This implies that the key i known only to authorized users. Symmetric
cryptosystems are also known as shared-key or private-key cryptosystems.

In an asymmetric cryptosystem, on the other hand, the decryption key (Kd) is not
equal to the encryption key (Ke Furthermore, it is computationally impractical to
derive Kd from Ke. Because of this property, only Kd needs to b kept secret and Kc
is made publicly known. Asymmetric cryptosystems are also known as public-he
cryptosystems.
The Data Encryption Standard (DES) cryptosystem is the best known and the most
widely used symmetric cryptosystem today. On the other hand, the Rivest-Shamir-
Adleman (RSA) cryptosystem is the first published and practically the most
satisfactory asymmetric cryptosystem today.

COMMAND INTERPRETATION

The command interpretation module (known as command interpreter) of an


operating system serves as an interface for the user to communicate with the
computer via its operating system. It provides a set of commands using which the
user can give instructions to the computer for getting some job done by it. The
commands supported by the command interpretation module are known as system
calls. When a user gives instructions to the computer by using these system calls,
the command interpreter takes care of interpreting these commands and directing
the system resources to handle the requests. Thus the command interpreter hides
the hardware details of the system from the user. In this manner, it greatly
contributes to the 'ease of use' objective of an operating system.

The two broad categories of user interfaces supported by various operating


systems are command-line interface and graphical user interface. They are briefly
described below.

Command-line Interface

This is the textual user interface in which the user gives instructions to the
computer by typing commands. That is, to enter a command, the user uses the
keyboard to type words and symbols. For example in Unix, the user has to type
"del report.txt" to delete the file named report.txt. If the User types a command
incorrectly, the command interpreter will respond with a message indicating that it
did not understand the command. When this happens, the user has to just retype
the command correctly.

There is no problem in typing simple commands as illustrated in the example


above. However, users often need to give detail instructions to the computer about
their jobs when they submit them for execution. For example, while submitting a
job for execution, a user may need to supply the following information:

1. His/her identification for security and accounting purposes.


2. The software and hardware resource requirements of the job.
3. The I/O device requirements of the job.
4. The directories in which the data files to be used by the job are stored.
5. The action, which the system should take in exceptional conditions, such as
when the input data is missing or incorrect, or when an I/O device malfunctions.

To facilitate this, systems, which support command-line interface, also support


some type of command language (CL) or job-control language (JCL). Users can
write codes in the JCL to give instructions to the system. These coded statements
tell the operating system such things as the name of the job, the user's name and
account number, the I/O devices to use during processing, the compiler to use if
language translation is needed, where to find the data files, and so on. The
command interpreter is designed to interpret the codes written in JCL and invoke
appropriate system actions.

Graphical User Interface

User interface plays an important role in ease of use. The more intuitive the user
interface of a system is, the easier it is to use. An intuitive user interface allows a
user to use the system effectively even if he/she has never seen it before. That is,
how the user interface works is very obvious to any user. Such an user interface is
called user friendly.

Graphical user interface or GUI (pronounced "gooey") is a user-friendly interface


that is much easier to learn and use than a command-line interface. Unlike
command-line interface in which commands are textual, GUI commands are
graphical (pictorial). As shown in Figure 9.3 (refer to Chapter 9), a GUI provides
to the user a screen full of graphic icons (small images on the screen) or menus
and allows the user to make a rapid selection from the displayed icons or menus to
give instructions to the computer. A point-and-draw device is normally used to
rapidly point to and select a particular graphic icon or menu item from the multiple
options displayed on the screen. For example, we saw that in a system that uses
command-line interface, to delete a file named report.txt we need to type a
command like "del report.txt.'" However, in a system that uses GUI, the same
operation can be performed simply by using a mouse to drag the icon that
represents the file until it is superimposed on an icon shaped like a trash can. Then
releasing the mouse button that was used for dragging the file, causes the file to
disappear into the bulging trash can.

Shell

The command interpreter of an operating system that serves as its user interface is
often referred to as the shell because it forms the outer layer of an operating
system covering the other modules of the operating system. The shell can be a
command-line interface or GUI. It is also possible to have many different shells
for the same operating system. For example, an operating system can have a
command-line shell as well as a GUI shell allowing the users to switch from one
shell to another. Beginners often find it convenient to work with GUI shell,
whereas advanced users find it more convenient to work with command-line shell.
Some operating systems also support multiple command-line shells. It is like
supporting multiple JCLs and allowing the user to use a language that he/she is
most comfortable with. For example, many Unix operating systems support three
command-line shells known as C shell, Bourne shell, and Korn shell.

Operating System Structure

We have studied about the various components of an operating system in the


sections above. We will now have a look at how these components are put
together to form an operating system.

Layered Structure

Most modern operating systems organize their components into a number of layers
(levels), each built on top of lower layers. The bottom layer (layer 0) is the
hardware, and the highest layer (layer n) is the user interface. The number of in-
between layers and their contents vary from one operating system to another. How
this is decided is explained below.

The main advantage of the layered approach is modularity. The layers are selected
such that each layer uses the functions and services provided by its immediate
lower layer. This approach greatly simplifies the design and implementation of the
system because each layer is implemented using only those operations provided by
its immediate lower level layer.

Kernel
The kernel of an operating system is its central controlling part that implements
the most primitive of the system's functions. It is the only part of an operating
system that a user cannot replace or modify. The precise interpretation of the
system's functions that are part of the kernel varies from one operating system to
another. However, typical operating system kernels contain basic functions that
are required for process management, memory management, device management,
and low-level security features like access control. In some systems, the kernel is
larger and provides for more than these functions, whereas in others, it is smaller.
Monolithic Kernel versus Microkernel

The two commonly used models for kernel design in operating systems are the
monolithic kernel and the microkernel. In the monolithic kernel model, most
operating system services such as process management, memory management,
device management, file management, and security are provided by the kernel. As
a result, the kernel has a large, monolithic structure.

On the other hand, in the microkernel model, the main goal is to keep the kernel as
small as possible. Therefore, in this model, the kernel is a very small nucleus of
software that provides only the minimal facilities necessary for implementing
additional operating system services. The only services provided by the kernel in
this model are low-level device management, a limited amount of low-level
process management, and some memory management. All other operating system
services, such as file management, additional process and memory management
activities, and security are implemented as user-level server process. Each server
process has its lown address space and can be programmed separately.

Resident and Non-Resident Operating System Modules

With all the functionalities of an operating system implemented, it becomes a large


software. Obviously, all the functionalities of an operating system are not needed
all the time. As the main memory capacity of a system is limited, it is customary to
always keep in the system's memory only a very small part of the operating system
and to keep its remaining part on an on-line storage device such as hard disk.
Those modules of an operating system that are always kept in the system's main
memory are called resident modules and those that are kept onjlard disk are called
non-resident modules. The non-resident modules are loaded into the memory on
demand, that is, as and when they are needed for execution.

The system kernel should not be confused with the resident modules of the
operating system. The two are not necessarily the same. In fact, for most operating
systems they are different. The following two criteria normally determine whether
a particular operating system module should be resident:
1. Its frequency of use, and
2. Whether the system can operate at all without it.
For example, file directories can be maintained on disk and loaded into the
memory when required. Status information for inactive processes can similarly be
swapped out on disk. In fact, the resident part of an operating system is a subset of
its kernel.

OTHER RELATED CONCEPTS

Few other concepts related to operating systems are briefly described below.

Real-time Operating Systems

For many applications, successful processing means that the application produces
correct results when its processing completes. However, in real life, we often
come across situations in which it is not only sufficient to obtain correct results,
but the results must be produced within some specified time frame (deadline) to be
useful.

A few examples of such applications are:


1. An aircraft must process accelerometer data within a certain period (say every
20 milliseconds) that depends on the specifications of the aircraft. Failure to do so
could cause the aircraft to go away from its right course or may even cause it to
crash.
2. Failure to respond in time to an error condition in a nuclear reactor thermal
power plant could result in a melt-down.
3. Failure to respond in time to an error condition in the assembly line of an
automated factory could result in several product units that will have to be
ultimately discarded.
4. A request for booking a ticket in a computerized railway reservation system
must be processed within the passenger's perception of a reasonable time (say 3
minutes).

Systems that are designed for processing such applications are called real-time
systems. That is, a real-time system is a system that must satisfy the requirement
of producing the desired results before a certain deadline. If it delivers the correct
result, but after the deadline, the system is regarded as having failed. Thus timely
production of the result of processing is as important as its correctness in a real-
time system.

Operating systems that are designed to handle the processing requirements of real-
time systems are called real-time operating systems. The goals of CPU scheduling
in traditional timesharing computer systems are optimal throughput, optimal
resource utilization, and fairness. In contrast, the main goal of CPU scheduling in
real-time systems is to allow as many time-critical processes as possible to be
processed in time to meet their deadlines.

Network and Distributed Operating Systems

Over the past few decades, advancements in microelectronic technology have


resulted in the availability of fast, inexpensive computer, and advancements in
communication technology have resulted in the availability of cost-effective and
highly efficient computer networks. The net result of the advancements in these
two technologies is that the price-performance ratio has now changed to favor the
use of interconnected multiple computers in place of a single, high-speed
computer. Computer systems consisting of interconnected, multiple computers are
called distributed computing systems. That is, a distributed computing system is a
collection of computer systems interconnected by a communication network in
which each computer has its own local memory and other peripheral devices, and
the communication between any two computers of the system takes place by
passing messages over the communication network.

The operating systems commonly used for distributed computing systems can be
broadly classified into two types - network operating systems and distributed
operating systems. The three most important features commonly used to
differentiate between these two types of operating systems are system image,
autonomy, and fault tolerance capability. These features are explained below.

1. System Image. The most important feature used to differentiate between the
two types of operating systems is the image of the distributed computing system
from the point of view of its users. In case of a network operating system, the
users view the distributed computing system as a collection of distinct machines
connected by a communication subsystem. That is, the users are aware of the fact
that multiple computers are being usecf. On the other hand, a distributed
operating system hides the existence of multiple computers and provides a single-
system image to its users. That is, it makes a collection of networked machines
appear to its users as a virtual uniprocessor by providing similar type of user
interface as provided by centralized operating systems.
2. Autonomy. In a network operating system, each computer of the distributed
computing system has its own local operating system (the operating systems of
different computers may be the same or different), and there is essentially no
coordination at all among the computers except for the rule that when two
processes of different computers communicate with each other, they must use a
mutually agreed on communication protocol. Each computer functions
independently of other computers in the sense that each one makes independent
decisions about the creation and termination of their own processes and
management of local resources. Notice that due to the possibility of difference in
local operating systems, the system calls for different computers of the same
distributed computing system may be different in this case.
On the other hand, with a distributed operating system, there is a single system-
wide operating system and each computer of the distributed computing system
runs a part of this global operating system. The distributed operating system
tightly interweaves all the computers of the distributed computing system in the
sense that they work in close cooperation with each other for the efficient and
effective utilization of the various resources of the system. That is, processes and
several resources are managed globally (some resources are managed locally).
Moreover, there is a single set of globally valid system calls available on all
computers of the distributed computing system.
3. Fault tolerance capability. A network operating system provides little or no
fault tolerance capability in the sense that if 10% of the machines of the entire
distributed computing system are down at any moment, at least 10% of the users
are unable to continue with their work. On the other hand, with a distributed
operating system, most of the users are normally unaffected by the failed machines
and can continue to perform their work normally, with only a 10% loss in
performance of the entire distributed computing system. Therefore, the fault
tolerance capability of a distributed operating system is usually very high as
compared to that of a network operating system.

In short, both network operating systems and distributed operating systems deal
with multiple computers interconnected together by a communication network. In
case of a network operating system the user views the system as a collection of
distinct computers, but in case of a distributed operating system the user views the
system as a "virtual uniprocessor".

Deadlock

There are several resources in a system for which the resource allocation policy
must ensure exclusive access by a process. For example, a printer needs to be
exclusively allocated to a process till the process finishes using it because its
simultaneous use by two or more processes will lead to garbled printed output.
Since a system consists of a finite number of units of each resource type (for
example, three printers, six tape drives, four disk drives, two CPUs, etc.), multiple
concurrent processes normally have to compete to use a resource. In this situation,
the sequence of events required to use a resource by a process is as follows:

1. Request. The process first makes a request for the resource. If the
requested resource is not available, possibly because it is being used by another
process, the requesting process must wait until the requested resource is allocated
to it by the system.
2. Allocate. The system allocates the resource to the requesting process as soon
as possible. It maintains a table in which it records whether each resource is free
or allocated and, if it is allocated, to which process. If the requested resource is
currently allocated to another process, the requesting process is "added to a queue
of processes waiting for this resource. Once the system allocates the resource to
the requesting process, that process can exclusively use the resource by operating
on it.
3. Release. After the process has finished using the allocated resource, it
releases the resource to the system. The system table records are updated at the
time of allocation and release to reflect the current status of availability of
resources.
The request and release of resources are system calls, such as request and release
for devices, open and close for files, and allocate and free for memory space.
Notice that of the three operations, allocate is the only operation that the system
can control. The other two operations are initiated by a process.
With the above mentioned pattern of request, allocation, and release of resources,
if the total request made by multiple concurrent processes for resources of a
certain type exceeds the amount available, some strategy is needed to order the
assignment of resources in time. Care must be taken that the strategy applied
cannot cause a deadlock, that is, a situation in which competing processes prevent
their mutual progress even though no single one requests more resources than are
available. It may happen that some of the processes that entered the waiting state
(because the requested resources were not available at the time of request) will
never again change state, because the resources they have requested are held by
other waiting processes. This situation is called deadlock, and the processes
involved are said to be deadlocked. Hence, deadlock is the state of permanent
blocking of a set of processes each of which is waiting for an event that only
another process in the set can cause. All the processes in the set block permanently
because all the processes are waiting and hence none of them will ever cause any
of the events that could wake up any of the other members of the set.

A deadlock situation can be best explained with the help of an example (see Figure
14.26). Suppose that a system has two tape drives T } and T2 and the resource
allocation strategy is such that a requested resource is immediately allocated to the
requesting process if the resource is free. Also suppose that two concurrent
processes P1 and P2 make requests for the tape drives in the following order:
1. P1 requests for one tape drive and the system allocates Tj to it.
2. P2 requests for one tape drive and the system allocates T2 to it.
3. P1 requests for one more tape drive and enters a waiting state because no tape
drive is presently available.
4. P2 requests for one more tape drive and it also enters a waiting state because
no tape drive is presently available.
From now on, Pi and P2 will wait for each other indefinitely, since Pi will not
release 7) until it gets T2 to carry out its designated task, that is, not until P2 has
released T2, whereas P2 will not release T2 until it gets 7). Therefore, the two
processes are in a state of deadlock. Note that the requests made by the two
processes are totally legal because each is requesting for only two tape drives,
which is the total number of tape drives available in the system. However, the
deadlock problem occurs because the total requests of both processes exceed the
total number of units for the tape drive and the resource allocation policy is such
that it immediately allocates a resource on request if the resource is free.

Spooling

Spooling stands for Simultaneous Peripheral Operation On-Line. It is a


mechanism to deal with the following issues:
1. To reduce the speed mismatch between slow I/O devices and CPU for better
utilization of the-CPU.
2. To convert mutually exclusive I/O devices into non-mutually exclusive I/O
devices so that they can be simultaneously used by multiple processes in a
multiprogramming system.
How spooling helps in dealing with these issues is explained below.

Dealing with Speed Mismatch

The speed mismatch between a slow I/O device such as a printer and the CPU is
normally of the order of few thousand. Thus, while a slow I/O device is
inputting/outputting a few bytes to/from the main memory, the CPU can perform
several thousands of operations. As a result, during reading/writing of data from/to
memory, the CPU is idle for a large percentage of I/O time. Spooling reduces the
idle time of the CPU by placing all data that comes from an input device or goes to
an output device on a magnetic disk (see Figure 14.27). The primary reason for
doing this is to keep the program and data readily available to the fast and
expensive CPU on a high speed I/O medium such as a disk. Reading/writing of
data from/to a disk is much faster than reading/writing from/to a slow I/O device
resulting in considerable reduction in CPU idle time during I/O operations
involving slow devices.

In most computer systems, special low-cost I/O processors are used for spooling
the input data from a slow input device on to the disk or for outputting the spooled
output data from the disk on to the slow output device. These I/O processors
function independent of the main processor (CPU). This enables the main high-
speed, expensive CPU to be fully devoted to main computing jobs. The process of
spooling is transparent to the user programs. In general, spooling makes better use
of both the main memory and the CPU.

Dealing with Mutually Exclusive I/O Devices

There are several I/O devices that have to be used in dedicated mode for correct
system operation. Such devices are called mutually exclusive devices. Printer is a
typical example of such a device. For effective utilization of such devices, an
operating system often converts them into non-mutually exclusive virtual devices
by using spooling. For this, the operating system creates a special process, called a
daemon, and a special directory, called a spooling directory. Now when a process
makes a request to use the printer, instead of allocating the printer to the process,
the operating system opens a file for the process's output data in the spooling
directory, which is stored on the disk. All output data to be printed on the printer
by the process is written in this file. The file ii closed when the process completes
printing. The daemon then actually prints the file from the disk on to the printer.
The daemon is the only process having permission to print the files in the spooling
directory on to the printer. By protecting the printer against direct use by the users,
the problem of having someone keeping it open unnecessarily long is eliminated.

Printer is not the only device that can benefit from spooling in this manner. For
example, file transfer over a network often uses a network daemon. To send a file
somewhere, the system puts it in a network spooling directory on the disk. Later
on, the network daemon takes it out from the directory and transmits it.

Note that in both the examples discussed above, spooling allows a dedicated
device such as printer and network to be simultaneously shared by multiple users.
This is because spooling being transparent to users, users get an impression that
they are directly inputting/outputting their data from/to the dedicated device, not
via the daemon process.

OS CAPABILITY ENHANCEMENT SOFTWARE

There are several tasks of a routine nature that many users often need to perform
on their computer system. For example, program compilation, sorting of file
contents in a particular order, and taking backup of important files are tasks of
such nature. Not all computer users can write their own programs for performing
these tasks. Even if they could write, it would clearly be wasteful if each user
spent a lot of time developing programs for these tasks. This gap between the
functionality of an operating system and the needs of users for these frequently
used routines created a market for a special category of software that enhance the
capability of an operating system. These software are either supplied by the
operating system vendor, or third-party software vendors, or may be a
combination of both these sources. They are normally grouped into three
categories - translating programs, library programs, and utility programs. They are
briefly described below.

Translating Programs

Translating programs, also known as language processors, are system programs


that translate a source program written by the user to an object program, which is
meaningful to the hardware of the computer. These include the assembler and the
various compilers and interpreters available with the system. Often the program
development tools used for testing and debugging of programs are also included in
this category of software.
Library Programs

Library programs consist of frequently used functions and operations. For


example, in the area of scientific applications, the commonly used library
programs include those that compute mathematical functions such as sine, cosine,
square root, exponential, and logarithm of numbers; and those that perform
mathematical operations such as matrix multiplication, matrix inversion, statistical
analysis, and conversion of numbers from one base to another (such as binary to
decimal and decimal to binary). Similarly, in the area of string processing, the
commonly used library programs include those that perform such operations as
string comparison, string copy, string concatenation, and calculation of the length
of a given string. Library programs commonly used for file manipulation include
those that perform such operations as sorting the file contents to arrange its data in
a specified sequence, merging the contents of two or more sorted files into one file
containing all the items of all the original files in sorted order, concatenating of
two files to create a single file out of their contents, searching for some specific
data from a file, and file editing.

Like this, there can be a very large number of library programs available in a
system. A librarian program usually controls the storage and use of the library
programs in the system library. It maintains a program directory for this purpose
and also facilitates the addition of new programs- to the library, or deletion of
unwanted or old programs from the library whose new, updated versions might
have been added to the library.

Utility Programs

Utility programs assist the users with system maintenance tasks such as disk
formatting, disk compaction, removing file fragmentation problem, data
compression, data backup, and scanning the system for computer viruses. Few of
the frequently used utility programs are briefly described below.
Disk Formatting Utility

In the section on file management we saw that different operating systems


organize and use the available storage space on a disk in different ways. For
example, some use contiguous allocation, some use linked allocation, and others
use indexed allocation. Moreover, the block size may be different for different
operating systems, and certain areas of the disk may be reserved by the operating
system for storing system-related information (not for user files). Hence, whenever
a new disk (which may be a hard disk, floppy disk, or optical disk) is to be used
with a system, it must be formatted properly according to the requirements of the
associated operating system. The disk formatting utility allows a user to perform
this task with great ease.

Disk Compaction Utility

This utility is useful for those systems that use the method of contiguous allocation
of disk blocks to files. We saw that in this method, almost 30% of the disk space
may remain unused due to external fragmentation problem after the system has
been in continuous use for some time. Disk compaction utility allows a user to
perform disk compaction, which moves files to bring all free blocks together. Disk
compaction is a time consuming operation and may take several hours. Hence it is
usually performed at night when the system is otherwise idle.

Data Compression Utility

This utility uses a compression algorithm to transform files into a fraction of their
normal size so that they occupy less storage space on disk or can be transferred
across a network in less time. The utility has an associated decompression
algorithm that is used to bring back a compressed file into its normal form and size
when accessed by a user. Several modem manufacturers build data-compression
techniques into their modems to reduce data-transfer times. Similarly, several disk
drives have data-compression techniques built into them to allow more files to be
stored in the available disk space. The compression and decompression of data
happens automatically that is transparent to the users. The time required to
compress and decompress the data is so small that it is not noticeable. Often the
amount of space saved by using this technique is significant - it can effectively
double the capacity of a disk.

Data Backup Utility

Data stored in a computer system can be damaged or lost in several ways such as a
disk crash, a virus, a hardware malfunction, or simply an accidental erasure by its
owner. So it is always suggested to keep backup of important data. A backup
utility is used to create copy of data on some storage media such as floppy disk,
CD-ROM, or magnetic tape that can be stored off-line away from the computer
system. When some data stored on-line gets damaged or lost, it can be restored
from the backup media. It is not necessary that the backup media is always kept
off-line. In today's era of computer networks, some backup devices are kept on-
line at a place away from the main computer system and the data backup is done
automatically by the computer system on this device.

Antivirus Utility

A computer virus is a piece of code attached to a legitimate program that, when


executed, infects other programs in the system by replicating and attaching itself
to them. In addition to this replicating effect, a virus normally does some other
damage to the system, such as corrupting/erasing files. Therefore, due to its
spreading nature, a virus can cause severe damage to a system.

A typical virus works as follows. The intruder writes a new program that performs
some interesting or useful function (such as some game or utility) and attaches the
virus to it in such a way that when the program is executed the viral code also gets
executed. The intruder now sends this infected program by mail to other users of
the system or offers it for free or for a nominal charge on floppy disks. Now if
anyone uses the infected program, its viral code gets executed. When the viral
code of the infected program executes, it randomly selects an executable file on
the hard disk and checks to see if it is already infected. Most viruses include a
string of characters that acts as a marker showing that the program has been
infected. If the selected file is already infected, the virus selects another executable
file. When an uninfected program is found, the virus infects it by attaching a copy
of itself to the end of that program and replacing the first instruction of the
program with a jump to the viral code. When the viral code is finished executing,
it executes the instruction that had previously been first and then jumps to the
second instruction so that the program now performs its intended function. Notice
that a virus spreads because every time an infected program is executed, it tries to
infect more programs. Also notice that a virus does not infect an already infected
file in order to prevent an object file from growing ever longer This allows the
virus to infect many programs without noticeably increasing disk space usage.

When a computer system suffers from virus infection, it has to be cured. Antivirus
utilities are often used to cure a computer from virus infection. These utilities first
identify the virus type with which the computer is infected by matching its marker
against the markers of well-known viruses. Once the type is known, the original
programs are restored from their infected versions by applying a detailed
knowledge of the infection method used by the virus. For example, in viruses that
modify jump instructions at the beginning of the host program, recovering can be
done simply by restoring the original jump to the start of the host program code.
However, notice that these utilities can only cure specific known viruses. They
cannot cure a newly encountered type of virus. A good antivirus utility can
normally cure several hundred types of viruses and its power can be regularly
improved by frequently updating it as new viruses are discovered.

SOME POPULAR OPERATING SYSTEMS

In this section we will have a look at some real operating systems that are in
popular use. The operating systems described are Unix, DOS, Windows, Windows
NT, and Linux. Many of these systems are continuously evolving. Therefore new
features keep getting added in their new versions. Hence instead of presenting a
detailed description of the features of each of these systems, only their overall
characteristics and some of their most interesting aspects have been presented.

Unix

Unix is a multi-user, time-sharing operating system. It is a very popular operating


system and can be used on a wide variety of computers ranging from notebook
computers to super computers. Although it can be used on a wide variety of
systems, it is especially prevalent on RISC workstations such as those from Sun
Mircosystems, Hewlett-Packard, IBM, and Silicon Graphics.

Development of Unix

Unix was developed in the early 1970s at Bell Laboratories by Ken Thompson and
Dennis Ritchie for a small PDP-11 computer. It was the first operating system to
be written in a high-level language C. The normal practice till then was to use
assembly language for writing operating systems due to which operating systems
were system dependent. That is, they were usable only on the system for which
they were developed. However, since Unix was written in C language, moving it
to a new machine, known as porting it, was much easier. This was an important
reason for its large popularity and availability on a wide variety of systems.

BSD Unix and Other Unix Versions

The ease with which Unix could be modified led to the initiation of Unix-based
development activities at many universities and research laboratories. The most
influential of the non-AT&T development groups was the group at the University
of California at Berkeley. This group ported Unix to the VAX computer and
produced the Berkeley Software Distributions (BSD) versions of Unix. Among the
improvements made by this group in t original Unix version, the notable ones were
support for virtual memory, demand paging, a new shell (called csh), and the
TCP/IP network protocols. BSD version also added several OS capability
enhancement software to Unix, including a new text editor (called vi editor),
Pascal and Lisp compilers, and many more.

Over the years, as Unix grew in popularity, many computer vendors have ported it
on their systems and have enhanced and maintained their own versions of Unix.
This has resulted in the creation of a wide variety of Unix, and Unix-like operating
systems. For example, Unix supported on IBM systems is called AIX, Unix
supported systems supplied by Sun Microsystems is called Solaris, Unix supported
on systems supplied by DEC (Digital Equipment Coporation) is called Ultrix, and
Unix supported on systems supplied by HP (Hewelett Packard) is called HP-Unix.

Structure of Unix

The Unix operating system is structured in the following three layers:


1. Kernel. This layer has all the modules for process, memory, file, device, and
security management.
2. Shell. This layer has the command interpreter. Unix basically provides a
command-line interface (some vendors have added GUI to their new versions of
Unix). There are a large number of very useful commands provided by the shell.
Every command is designed to do a single, very specific task. To do larger, more
complex tasks, users can easily combine several commands in the form of a shell
script to produce exactly the result they want. The shell script can even be stored
in a file, which can be made an executable file, which when executed will act like
a new shell command.
An interesting service provided by the shell layer is called pipe, which allows
users to send the output of one program to the input of another program without
storing the output of the first program in a temporary file. For example, entering:
who/sort
invokes the command who, which displays the names of all currently logged in
users, and pipes its output to sort. The result is a sorted list of currently logged in
users. A pipeline is a connection of two or more programs through pipes. The
length of a pipeline can be arbitrarily long, and the programs used in forming
pipelines are called filter programs (or just filters) because they act as data filters,
transforming the data passed on to the next program in the pipeline.
3. Utilities. This layer has all the OS capability enhancement software including
language compilers, text editors, text processing programs, and a wide variety of
utilities and tools. Over the years, a rich set of very powerful tools has been added
to this layer, which allows effective program development and system
management. Because of this, Unix is often referred to by many of its users as a
complete programming environment, not just an operating system.

MS-DOS

MS-DOS stands for Microsoft Disk Operating System. It is a single-user operating


system for IBM and IBM-compatible personal computers. It was introduced in
1981 jointly by Microsoft and IBM and was the most popular operating system for
personal computers in the 1980s. Its popularity started reducing in the 1990s with
the launch of Microsoft Windows operating system.

Structure of MS-DOS

MS-DOS is structured in the following three layers:


1. BIOS. BIOS stands for Basic Input Output System. It contains device
drivers for the standard devices such as keyboard, disk, floppy, printer, and display
monitor. It also contains the basic low-level services such as time-of-day and
system configuration analysis. Having the hardware-dependent services in BIOS
ensures that the other higher-level operating system services can be offered in a
hardware-independent manner, enabling those operating system services to be
easily portable to other machines.
The BIOS is usually supplied by the computer manufacturer, rather than by
Microsoft, and is generally located, in part, in a ROM, which is a non-erasable
memory. When the computer's power is switched on, control is transferred by
hardware to the bootstrap procedure of the BIOS in ROM. The bootstrap
procedure carries out some hardware tests to check whether the memory and other
hardware devices are functioning properly. If the hardware test passes
successfully, the bootstrap procedure loads into the memory a small portion of the
operating system from the disk. This part of the operating system then loads the
rest of the memory resident portions of the operating system into memory from the
disk. This step-by-step process of loading the operating system into memory is
known as booting the system.
2. Kernel. This layer contains all the modules for process management, memory
management, and file management. These modules are written in machine-
independent manner so that they can be easily ported to other machines.
3. Shell. This layer has the command interpreter. MS-DOS provides a
command-line interface. The MS-DOS shell, known as command.com, has about
70 commands that are partitioned into two categories - internal commands and
external commands. Internal commands are those that are always memory
resident, whereas external commands are those, which normally reside on disk and
are loaded into the memory whenever they have to be executed. Obviously,
external commands are executed much more slowly than internal ones. Later a
GUI known as DOS shell was also added to this layer, which was largely a menu-
driven user interface.
To give an idea of what the shell commands look like and what they do, some of
the shell commands are given in Figure 14.28. Both the MS-DOS and Unix
versions have been given to show that the commands names normally signify their
task so that they can be easily remembered and used. Moreover, note that the
commands are usually short so that you have to type only a few characters to
invoke a task. Most of these commands require arguments, which are specific
pieces of information required to complete the command. For example, the del
command requires the name of the file you want to delete.

Limitations of MS-DOS

In spite of its wide popularity in the 1980s, MS-DOS could not continue to be
popular like Unix for a long period. The following are some of the reasons often
quoted for its failure:
1. It was a single user, single task operating system (did not support
multitasking). That is, it assumed that only one user uses the machine and runs
only one program at a time.
2. Since it was a single user, single task operating system, it did not have any
protection features to protect two or more programs stored in memory from one
another.
3. It had lintited program addressability to 640 Kbytes. That is, it was designed,
to support programs whose maximum size was 640 Kbytes. At first, this was not
a problem, since those days machines had only 64 Kbytes of RAM in it, but when
later models came out with up to 16 megabytes, the inability to run programs
larger than 640 Kbytes became a major limitation.
4. It was designed for the 16-bit CPUs that Intel was making in the early and
middle 1980s. It could not take advantage of the 32-bit CPUs that were later made
by Intel.
5. It restricted the user to eight-character file names with three-character
extensions. Due to the lack of flexibility of using long file names, users often
found it inconvenient to choose appropriate file names. No major operating system
places this restriction on its users.
6. It had a command-line interface that some people found difficult to use and
hard to learn.
i
Command Name Task Description
In MS-DOS In Unix
copy cp Copy a file
del or erase rm Delete/Erase/Remove a file
rename or ren mv Rename a file or move it from its old name to
new name
dir Is Display a directory listing
mkdir or md mkdir Create/Make a new directory
chdir or cd cd Change the current working directory
rmdir rmdir Remove an empty directory
date date Display or change the current date
type cat Display (type/catenate) contents of a file
Figure 14.28. Illustrating some of the shell commands.

Microsoft Windows

Microsoft Windows operating system was developed by Microsoft to overcome


the limitations of its own MS-DOS operating system. The first successful version
of this operating system was Windows 3.0, which was released in 1990. The
subsequently released versions were Windows 95, Windows 98, and Windows
2000. The numbers associated with these released versions indicate their year of
release. The main features of Microsoft Windows are as follows:
1. Its native interface is a GUI. Hence it is easier for a new user to learn and use
the system.
2. Microsoft Windows was designed to be not just an operating system but also a
complete operating environment. That is, Microsoft Windows programs conform
to a standard way of working. For example, a Microsoft Windows word
processor works similarly the way a Microsoft Windows spreadsheet (or any other
type of Windows program) works. This means that the experience gained by
learning one Windows program is useful while using any other Microsoft
Windows program.
3. It is a single-user, multitasking operating system. That is, a user may run more
than one program at a time. For example, while editing a file in the foreground, a
sorting job can be given in the background. The monitor's screen can be
partitioned into multiple windows and the progress of different programs can be
viewed on different windows.
4. It allows file names to contain up to 255 characters as well as some
punctuation marks, such as periods, commas, and semicolons.
With these features, Microsoft Windows became an operating system of choice for
most personal computer users after 1990. However, good GUIs require powerful
processors, large primary memory, large hard disks, and a fast, high-resolution
monitor. Hence Microsoft Windows requires all these on your computer for
successful installation and for running most Windows applications. The actual
system configuration required varies from one Windows version to another and
also depends on the application.

Microsoft Windows NT
Microsoft Windows NT is a multi-user, timesharing operating system developed
by Microsoft. It was designed to have Unix-like features so that it can be used for
powerful workstations and network and database servers. Its main features are as
follows:
1. Unlike Unix, its native interface is a GUI. The look and feel of Microsoft
Windows NT's GUI is similar to that of Microsoft Windows's GUI.
2. It supports multiprogramming and is also designed to take advantage of
multiprocessing on systems having multiple processors.
3. It has built-in networking and communications features so that any computer
with Microsoft Windows NT can be made to work as a network client or server.
4. It provides strict system security.
5. It has a rich set of tools for software development and system administration.
6. It can run Microsoft Windows applications and many Unix applications
directly.
7. Its design is based on a microkernel so that it can be easily ported to many
different types of machines, and its features can be easily enhanced by users.
8. It is a true 32-bit operating system in the sense that it can make full use of the
32-bit architectures of the processors and the memory and I/O bus to provide fast
processing capability.

Linux

Linux is an open-source operating system enhanced and backed by thousands of


programmers world-wide. It is a multi-tasking operating system that was
originally designed to be used on personal computers. The name "Linux" is
derived from its inventor Linus Torvalds. Linus was a student at the University of
Helsinki, Finland in early 1990s when he wrote the first version of a Unix-like
kernel as a toy project. He later posted the code on the Internet and asked
programmers across the world to help him build it into a working system. The
result was Linux. Torvalds holds the copyright, but permits free distribution of the
source code. That is, he oversees development of the kernel and owns its
trademark. When someone submits a change or a feature, Torvalds and his core
team of kernel developers review the merit of adding it to the source code.

Linux Development Process

Linux being an open-source operating system, various parties are involved in its
development process. The key roles played by the various participants are as
follows:
1. The open-source development community (programmers across the world)
develops the source code for the operating system kernel and submits it to the core
team of kernel developers headed by Torvalds. This team reviews the merit of
adding the submitted change or feature in the kernel and incorporates it into the
kernel if so decided. This is how the kernel evolves and matures to become better
day-by-day.
2. Application vendors and programmers download the freely available kernel
and develop all typds of application software for it.
3. Distribution companies package and sell various Linux versions.
4. Hardware vendors bundle Linux on their systems and supply their systems
along with the Linux operating system and a set of application software.
5. End users run Linux and applications to meet their processing needs.
Linux Distribution Versions

The way Linux is developed and distributed, has caused the operating system to
fragment into multiple commercial flavors. Today there are close to 200 Linux
distribution versions. Some of the most popular distribution versions include
Caldera OpenLinux eServer, Red Hat, SuSE, TurboLinux Server, Linux-
Mandrake, Connectiva, and Red Flag. These versions are available from
commercial vendors who make money by selling their implementation, as well as
installation, maintenance, and other services. Linux is also distributed by the non-
profit Debian organization, whfch is developing a free operating system and
related software.
The existence of multiple Linux distribution versions frees users from being
locked into one vendor. It also creates healthy competition, which furthers
innovation. Additionally, the different versions of Linux have always catered to
slightly different markets. For example, the SuSE version is for users in banking
and telecommunications industries, and the Connectiva version has been focused
towards South American market.

The main differences among various distribution versions include the set of tools,
library version, number and quality of applications, documentation, support, and
service.

Linux Distribution and Installation

Linux has traditionally been organized as a series of floppy disks - the A series
containing the basic system, the D series containing the compilers and program
development tools, the N series containing the modules for networking features,
and so on. The total series comes in about 50 floppy disks. However, not every
user needs the entire set of floppy disks. For example, you do not need the N series
floppy disks, if you do not want networking features.

Linux can be installed on a computer system either as the only operating system or
along with other popular operating systems such as MS-DOS or Microsoft
Windows. When multiple operating systems are installed on the same machine,
you can boot the machine by choosing the appropriate operating system at the time
of booting. The Linux boot manager, Linux Loader (LiLo) is used for this purpose.
If you are working with MS-DOS or Microsoft Windows, you do not even need to
reboot in order to start Linux, you can simply use the command LOADLIN to start
Linux directly from the MS-DOS command-line interface.

Advantages and Limitations of Linux

The following advantages are often quoted in favour of Linux:


1. One of the biggest advantages of Linux is its price. The system, as such, is
free, and can be copied and distributed without restrictions.
2. It has a rich set of features, which continues to grow rapidly because
thousands of enthusiastic developers continuously keep extending and improving
its features.
3. For those familiar with Unix, which is one of the oldest and the most popular
operating system, learning and using Linux is a simple matter because many of the
Unix features and tools are supported on Linux.
|Critics of Linux, however, quote that it has the following limitations:
1. The biggest obstacle to implementing Linux is the perceived lack of
commercial support and service. Most enterprises are reluctant to consider Linux
today due to lack of vendor commitment and a full framework of global service
and support.
2. As of today, Linux offers limited support for databases containing more than a
terabyte of data.
3. As of today, there are relatively few commercial Linux-based applications
because of commercial vendors' misconceptions about the open source
community. They think that they have to give the product away or publish their
source code. However, more and more commercial vendors are gradually
realizing that developing software for Linux is like developing for other platforms.
4. Another reason for the availability of relatively few commercial Linux-based
applications is the existence of so many Linux distribution versions. As of today,
there is a lack of standard among various Linux distribution versions for such
things as what are the file formats to be used, how and where to keep the system
files, how and where to add new programs to menus, etc. Due to this, a
commercial software developed for Linux must be tested on every version of
Linux it runs and on every version of the libraries and services it requires. To
enhance application portability to the various Linux distribution versions, most
commercial Linux software vendors and distributors are participating in
developing a base set of libraries, application programming interfaces, a file-
system hierarchy standard, and interoperability measures called the Linux
Standard Base (LSB).

Points to Remember
1. An operating system (often referred to as OS) is an integrated set of programs
that controls the resources (the CPU, memory, I/O devices, etc.) of a computer
system and provides its users with an interface or virtual machine that is more
convenient to use than the bare machine.
2. The main functions provided by most modern operating systems are
process management, memory management, file management, device
management, security, and command interpretation.
3. The efficiency of an operating system and the overall performance of a
computer system are usually measured in terms of its throughput, turnaround time,
and response time.
4. Throughput is the amount of work that the system is able to do per unit time.
It is measured as the number of processes that are completed by the system per
unit time.
5. Turnaround time is the interval from the time of submission of a job to the
system for processing to the time of completion of the job.
6. Response time is the interval from the time of submission of a job to the
system for processing to the time the first response for the job is produced by the
system.
7. A process (also called job) is a program in execution. The main objective of
the process management module of an operating system is to manage the
processes submitted to the system in such a manner so as to minimize the idle time
of the various processors (CPU, I/O processors, etc.) of the computer system.
8. In the batch processing method of job execution, job-to-job transition is
automatic. This helps in reducing the idle time of a computer system to a great
extent because transition from one job to another does not require any operator
intervention.
9. Control statements are used by the operating system to identify a new job and
to determine what resources are needed by the job during its execution. These
control statements are written in a language known as the job control language
(JCL).
10. In a uniprogramming system only one job is processed by the system at a time
and all the system resources are exclusively available for the job until it completes.
11. CPU-bound jobs mostly perform numerical calculations, with little I/O
operations. They heavily utilize the CPU during the course of their processing.
12. I/O-bound jobs normally input vast amount of data, perform very little
computation, and output large amount of information. Their CPU utilization is
very low.
13. Multiprogramming is the name given to the interleaved execution of two or
more different and independent programs by the same computer.
14. In some multiprogramming systems, only a fixed number of jobs can
be processed concurrently (multiprogramming with fixed tasks) (MFT), while in
others the number of jobs can vary (multiprogramming with variable tasks)
(MVT).
15. In a multiprogramming system, the area occupied by each job residing
simultaneously in the main memory is known as a memory partition.
16. The part of the operating systerrKhat is concerned with deciding which of the
ready jobs should be allotted the CPU for execution is called the CPU scheduler,
and the algorithm it uses is called the CPU scheduling algorithm.
17. Multitasking is the concurrent execution of multiple jobs (often referred to as
tasks of same user) in a single-user system.
18. In operating systems with threads facility, a process consists of an address
space and one or more threads of control. Each thread of a process has its own
program counter, its own register states, and its own stack. But all the threads of a
process share the same address space. Threads are often referred to as lightweight
processes and traditional processes are referred to as heavyweight processes.
19. The term multiprocessing is used to describe interconnected computer
configurations or computers with two or more CPUs that have the ability to
simultaneously execute several programs. In such a system, instructions from
different and independent programs can be processed simultaneously by different
CPUs or the CPUs may simultaneously execute different instructions from the
same program.
20. Time-sharing is a mechanism to provide simultaneous interactive use of a
computer system by many users in such a way that each user is given the
impression that he/she has his/her own computer. It uses multiprogramming with
a special CPU scheduling algorithm to achieve this.
21. The memory management module of an operating system manages the main
memory of the system. Its job is to keep track of which parts of memory are in use
and which parts are not in use, to allocate memory to processes when they need it
and deallocate when they are done.
22. The uniprogramming memory model is used in uniprogramming systems in
which only one job is processed by the system at a time and all the system
resources are exclusively available for the job till it completes.
23. In a multiprogramming memory model, multiple user processes can
simultaneously reside in the main memory. The two memory management
schemes used to facilitate this are multiprogramming with fixed number of
memory partitions and multiprogramming with variable number of memory
partitions. In the former scheme, the user area of the memory is divided into a
number of fixed-sized partitions. On the other hand, in the latter scheme, the
number, size, and location of the partitions vary dynamically as processes come
and go.
24. External fragmentation of memory is a situation when enough total free
memory space exists to satisfy the memory need of a process, but still the process
cannot be loaded because the available free memory is not contiguous (is
fragmented into multiple free blocks of memory).
25. Internal fragmentation is a situation when a process is allocated more memory
than its actual memory requirement and the additional memory allocated to the
process remains unutilized because it is neither used by the process to which it is
allocated nor it can be allocated to any other process for use.
26. Paging is a memory management scheme used to solve the problem of
external fragmentation of memory. It does this by allowing a process's memory to
be noncontiguous, thus allowing a process to be allocated physical memory
wherever free memory blocks are available.
27. Virtual memory is a memory management scheme that allows the execution
of processes that might not be completely loaded in the main memory. The three
basic concepts used for the realization of virtual memory are on-line secondary
storage, swapping and demand paging.
28. A file is a collection of related information. Every file has a name, its data,
and attributes.
29. The file management module of an operating system takes care of file-related
activities such as structuring, accessing, naming, sharing, and protection of files.
30. Directories are used by operating systems to map file names to their
corresponding file attributes and file data, and also to provide greater flexibility to
users in file naming.
31. Disk space allocation methods deal with how to allocate space to multiple
files on disk. The three commonly used methods for disk space allocation are
contiguous, linked, and indexed.
32. The device management module of an operating system takes care of
controlling all the I/O devices of a computer system and provides a simple and
easy to use interface to these devices.
33. Security in computer systems deals with protecting the various resources and
information of a computer system against destruction and unauthorized access.
34. External security deals with securing the computer system against external
factors such as fires, floods, earthquakes, stolen disks/tapes, leaking out of stored
information by a person who has access to the information, and so on.
35. Internal security mainly deals with the mechanisms for user authentication,
access control, and cryptography.
36. User authentication deals with the problem of verifying the identity of a user
(person or program) before permitting access to the requested resource. The three
basic approaches to user authentication are proof by knowledge, proof by
possession, and proof by property.
37. Access control mechanisms are used to prohibit a user/process from accessing
those resources/information that he/she/it is not authorized to access.
38. Cryptography is a means of protecting private information against
unauthorized access in those situations where it is difficult to ensure access
control. The basic idea behind this security technique is that if it is not possible to
ensure access control, it is better to prevent comprehension of information.
39. The command interpretation module (known as command interpreter) of an
operating system serves as an interface for the user to communicate with the
computer via its operating system. The two broad categories of user interfaces
supported by various operating systems are command-line interface and graphical
user interface.
40. The kernel of an operating system is its central controlling part that
implements the most primitive of the system's functions. It is the only part of an
operating system that a user cannot replace or modify.
41. Those modules of an operating system that are always kept in the system's
main memory are called resident modules and those that are kept on hard disk are
called non-resident modules. The non-resident modules are loaded into the
memory on demand, that is, as and when they are needed for execution.
42. A real-time system is a system that must satisfy the requirement of producing
the desired results before a certain deadline. Operating systems that are designed
to handle the processing requirements of real-time systems are called real-time
operating systems.
43. Computer systems consisting of interconnected, multiple computers are called
distributed computing systems.
44. The operating systems commonly used for distributed computing systems can
be broadly classified into two types - network operating systems and distributed
operating systems. In case of a network operating system the user views the
system as a collection of distinct computers, but in case of a distributed operating
system the user views the system as a "virtual uniprocessor".
45. Deadlock is the state of permanent blocking of a set of processes each of
which is waiting for an event that only another process in the set can cause. All
the processes in the set block permanently because all the processes are waiting
and hence none of them will ever cause any of the events that could wake up any
of the other members of the set.
46. Spooling (Simultaneous Peripheral Operation On-Line) is a mechanism to
reduce the speed mismatch between slow I/O devices and CPU, and to convert
mutually exclusive I/O devices into non-mutually exclusive I/O devices.
47. The gap between the functionality of an operating system and the needs of
users for frequently used routines is often bridged by a special category of
software known as OS capability enhancement software. These software are
normally grouped into three categories - translating programs, library programs,
and utility programs.
48. Unix is a multi-user, time-sharing operating system. It is a very popular
operating system and can be used on a wide variety of computers ranging from
notebook computers to super computers.
49. MS-DOS stands for Microsoft Disk Operating System. It is a single-user
operating system for IBM and IBM-compatible personal computers. It was
introduced in 1981 jointly by Microsoft and IBM and was the most popular
operating system for personal computers in the 1980s.
50. Microsoft Windows operating system was developed by Microsoft to
overcome the limitations of its own MS-DOS operating system. The first
successful version of this operating system was Windows 3.0, which was released
in 1990. The subsequently released versions were Windows 95, Windows 98, and
Windows 2000. It became an operating system of choice for most personal
computer users after 1990.
51. Microsoft Windows NT is a multi-user, timesharing operating system
developed by Microsoft. It was designed to have Unix-like features so that it can
be used for powerful workstations and network and database servers.
52. Linux is an open-source operating system enhanced and backed by thousands
of programmers world-wide. It is a multi-tasking operating system that was
originally designed to be used on personal computers.

Questions

1. What is an operating system? Why is it necessary for a computer system?


2. What are the two primary objectives of having an operating system in a
computer system? Explain how an operating system helps in meeting these
objectives.
3. What is a 'virtual machine'? Explain how an operating system helps in
converting a computer system into a virtual machine.
4. Draw the logical architecture diagram of a computer system. Explain the
role of an operating system in this architecture.
5. Explain the role of an operating system as a resource manager of a computer
system.
6. "The operating system tends to isolate the hardware from the users". Discuss
this statement.
7. "The operating system acts as the manager of the various resources of a
computer system". Discuss this statement.
8. List out the various functions normally performed by an operating system.
9. Explain the role of an operating system with respect to the following
functions:
(a) Process management (d) Device management
(b) Memory management (e) Security
(c) File management (f) Command interpretation
10. What are the main parameters normally used for measuring the performance
of a computer system?
11. Define the following terms: -
(a) Throughput
(b) Turnaround time
(c) Response time
12. Differentiate among the following terms:
(a) Throughput
(b) Turnaround time
(c) Response time
13. What is a process in a computer system? What is the main objective of the
process management module of an operating system?
14. How was a job typically executed in early computer systems? What was
the major drawback in this approach of job execution?
15. What is batch processing? How are jobs typically executed in a batch
processing system?
16. Explain how batch processing mechanism helped in overcoming the main
drawback of manual loading mechanism used for processing jobs in early
computer systems.
17. Explain how the computer separates one job from another from a batch of
jobs for automatic job-to-job transition in a batch processing system.
18. What are control statements? Why are they needed?
19. Do all computers use the same types of JCL statements? Why?
20. You want to compile and execute a FORTRAN program. In plain English,
list out the necessary JCL statements you will prepare for this jpb. .,
21. What is the difference between a uniprogramming system and a
multiprogramming system? What are their relative advantages and disadvantages?
22. Define multiprogramming. Explain how multiprogramming ensures effective
utilization of main memory and CPU.
23. Differentiate between I/O-bound and CPU-bound jobs.
24. List out some of the hardware and software facilities required for a
multiprogramming system to work satisfactorily.
25. What is a memory partition?
26. Explain how CPU is switched from one job to another in a
multiprogramming system and how is it ensured that a temporarily suspended job
will execute correctly when the CPU is given back to it after some time.
27. What is a process control block? Why is it needed? What does it typically
contain?
28. What is multitasking? What are the similarities and differences (if any)
between multiprogramming and multitasking?
29. What are threads? Differentiate between a single-threaded process and a
multi-threaded process.
30. What are the main motivations for using a multithreaded process instead of
multiple single-threaded processes for performing some computation activities?
•1. Differentiate between multiprogramming and multithreading.
>2. What is multiprocessing? Draw the basic organization diagram of a typical
multiprocessing system.
33. Differentiate between tightly-coupled and loosely-coupled multiprocessing
systems.
34. How is multiprocessing different from multiprogramming?
35. Discuss the advantages and limitations of multiprocessing systems.
36. Can multiprocessing and multiprogramming be part of the same system?
Give reasons for your answer.
37. What is time-sharing? What is a time-slice?
38. In a timesharing system, explain how each and every user feels that he/she is
the sole user of the computer system.
39. What are the three different states in which all users of a timesharing system
fall? Illustrate how a particular user switches from one state to another.
40. Is multiprogramming used in a time-sharing system? Give reasons for your
answer.
41. List out some of the hardware and software requirements of a time-sharing
system.
42. List out some of the main advantages of time-sharing systems.
43. Why are timesharing systems considered to be most suitable for program
development and testing?
44. Multiprogramming and timesharing both involve multiple user processes in
the computer concurrently. What is the basic difference between the two concepts?
45. Differentiate among the following terms:
(a) Multiprogramming (d) Multithreading
(b) Multitasking (e) Timesharing
(c) Multiprocessing
46. What is the main objective of the memory management module of an
operating system?
47. Differentiate between uniprogramming and multiprogramming memory
models. What are their relative advantages and disadvantages?
48. Differentiate between multiprogramming with fixed number of memory
partitions and multiprogramming with variable number of memory partitions.
49. What is memory fragmentation problem? Differentiate between internal
and external fragmentation of memory.
50. What is internal fragmentation of memory? Illustrate with an example.
51. What is external fragmentation of memory? Illustrate with an example.
52. What is paging? Illustrate paging mechanism with the help of an example.
53. Does paging mechanism suffer from internal fragmentation or external
fragmentation of memory? Give reason for your answer.
54. What is a virtual memory? Why is it so called? How is it useful?
55. Explain the three basic concepts used for the realization of virtual memory.
56. What is swapping? How does it help in memory management?
57. What is a page replacement algorithm? What is a victim page?
58. List out the advantages and disadvantages of virtual memory.
59. If virtual memory is used carelessly, it may substantially decrease
performance instead of increasing performance. Discuss.
60. What is a file? Differentiate between a file's data and its attributes.
61. What is a file name? Why is it used?
62. What are the typical jobs performed by the file management module of an
operating system?
63. Describe the two popular types of file structures used by operating systems.
64. Describe the two commonly supported file»0ccess methods at operating
system level.
65. Differentiate between sequential access and random access files.
66.. List out some of the typical file operations provided by an operating system
and mention what each operation is used for.
67. What is a file extension in a file name? What are file extensions typically
used for? List out some typical file extensions and their meaning.
68. What is a directory? What does a directory typically contain?
69. Describe the three commonly used types of directory organizations. Discuss
their relative advantages and disadvantages.
70. Describe the three commonly used methods for disk space allocation.
Discuss their relative advantages and disadvantages.
71. What are the typical jobs performed by the device management module of
an operating system?
72. What is memory-mapped I/O?
73. Explain the non-DMA and DMA methods of transferring data from a device
controller's local buffer to the appropriate memory area of the computer. Which
method is better and why?
74. How does an operating system provide simple and easy user interface to all
I/O devices?
75. Draw a diagram showing the various layers in which the I/O software for
device management is typically structured. Explain the functions performed by the
software module at each of these layers.
76. What are the typical jobs performed by the security module of an operating
system?
77. Differentiate between external security and internal security requirements of
a computer system.
78. What are the various security aspects that an operating system normally
needs to deal with as part of the internal security of a computer system?
79. Differentiate between user authentication and access control requirements of
a computer system.
80. What is cryptography? How does it help in improving the security of a
computer system?
81. What is user authentication? Describe the three commonly used
approaches for user authentication in modern computer systems.
82. Differentiate between direct demonstration and challenge-response methods
of user authentication.
83. What is a biometric device? What is it used for? Why are biometric devices
not very popular?
84. What is access control? Define the following terms with respect to access
control:
(a) Object
(b) Subject
(c) Protection rules
85. Explain how a process's request for accessing an object is validated by the
system.
86. What is cryptography? What is the basic idea behind this security
technique?
87. Define the following terms with respect to cryptography:
(a) Encryption (c) Plaintext
(b) Decryption (d) Cipher text
88. Draw a diagram illustrating the general structure of a cryptosystem.
Explain the roles of various components of this diagram.
89. Differentiate between symmetric (private-key) and asymmetric (public-key)
cryptosystems.
90. What are the typical jobs performed by the command interpretation module
of an operating system?
91. What is a command interpreter? How does it contribute to the 'ease of use'
objective of an operating system?
92. What are system calls? How are they used?
93. Briefly describe the features of the two types of user interfaces commonly
supported in modern operating systems.
94. Differentiate between command-line interface and graphical user interface.
List out their relative advantages and disadvantages.
95. What is a job control language (JCL)? Why is it needed?
96. What is a shell? Why is it so called? Can an operating system have many
different shells? Give reason for your answer.
97. Why do most modern operating systems use the layered structure for
organizing their various modules?
98. What is a kernel of an operating system? What basic functions of an
operating system are typically part of the kernel?
99. Differentiate between the monolithic kernel and microkernel approaches of
structuring the modules of an operating system.
100. Differentiate between resident and non-resident operating system modules.
What are the main criteria for deciding whether a particular operating system
module should be resident or non-resident?
101. What is a real-time system? Give some examples of applications that
require real-time systems for their processing.
102. What is a distributed computing system? Give an example of an
application that uses a distributed computing system.
103. What are the two common types of operating systems used for distributed
computing systems? What are the important features commonly used to
differentiate between these two types of operating systems?
104. What is a deadlock? Give an example to illustrate a deadlock situation.
105. What is spooling? How does it help in improving the performance of a
computer system?
106. Explain how spooling can be used to convert a mutually exclusive I/O
device into a shared resource.
107. What are OS capability enhancement software? Name a few types of
software that fall in this category.
108. What are translating programs? Name a few types of software that fall in
this category.
109. What are library programs? Give a few examples of such programs. What is
a librarian program?
110. What are utility programs? Give a few examples of frequently used utility
programs.
111. Write short notes on:
(a) Disk formatting utility (d) Data backup utility
(b) Data compaction utility (e) Antivirus utility
(c) Data compression utility
i 12. What is a computer virus? How does a typical virus works? When a
computer system suffers from virus infection, how is it cured?
113. Name four popular operating systems. Describe the main features of any two
of them.
114. What was the main reason for the large popularity and availability of Unix
on a wide variety of systems?
115. Describe the structure of the Unix operating system.
116. Explain the concept of pipe in Unix. What is a pipeline?
117. Describe the structure of MS-DOS.
118. What is a BIOS? Where does it normally reside? Who usually supplies it?
119. What is meant by booting of a system? Explain how an MS-DOS system is
booted.
120. Differentiate between internal and external commands of MS-DOS.
121. What are some of the main reasons for the failure of MS-DOS?
122. List out some of the key features of Microsoft Windows.
123 List out some of the key features of Microsoft Windows NT.
124. List out some of the key features of Linux. Explain the development process
of Linux.
125. List out some of the key limitations of Linux.
126. Write short notes on the following:
(a) Objectives of an operating system
(b) Functions of an operating system
(c) Parameters for measuring system performance
127. Write short notes-on the fallowing:
(a) Batch processing
(b) Multiprogramming
(c) Multitasking
(d) Multiprocessing
(e) Multithreading
(f) Timesharing
128. Write short notes on the following:
(a) Process control block
(b) Deadlock problem
(c) Motivations for using threads
(d) Tightly-coupled and loosely-coupled multiprocessing systems
(e) CPU bound and I/O bound jobs
129. Write short notes on the following:
(a) Uniprogramming memory model
(b) Multiprogramming memory model
(c) Memory fragmentation
(d) Paging mechanism
(e) Virtual memory
130. Write short notes on the following:
(a) File structures
(b) File access methods
(c) File naming
(d) File operations
131. Write short notes on the following:
(a) Directory contents
(b) Directory organization
(c) Linked allocation method of disk space
(d) Indexed allocation method of disk space
(e) Contiguous allocation method of disk space
132. Write short notes on the following:
(a) Memory-mapped I/O
(b) DMA transfer
(c) Interrupt handler
(d) Device driver
133. Write short notes on the following:
(a) User authentication
(b) Access control
(c) Cryptography
134. Write short notes on the following:
(a) Challenge-response method of user authentication
(b) Direct demonstration method of user authentication
(c) Biometric devices
(d) Symmetric and asymmetric cryptosystems
135. Write short notes on the following:
(a) GUI
(b) JCL
(c) Shell
(d) Kernel
(e) Command-line interface
136. Write short notes on the following:
(a) Monolithic kernel versus Microkernel
(b) Resident and non-resident operating system modules
137. Write short notes on the following:
(a) Spooling
(b) OS capability enhancement software
(c) Real-time operating systems
(d) Distributed operating systems
138. Write short notes on the following:
(a) Translating programs
(b) Library programs
(c) Utility programs
(d) Computer virus
Chapter 15

Application Software Packages

This chapter provides greater detail of some of the most commonly known
application software packages, which were introduced in Chapter 10. Out of the
ones discussed in Chapter 10, we have chosen to provide additional details of only
those application software that are readily available as pre-written software
packages and are most widely used packages. In particular, the details of the
following application software packages have been provided:
1. Word-processing package .
2. Spreadsheet package
3. Graphic? package
4. Personal Assistance package

Each of these pre-written software packages is available from multiple vendors.


However, the features of a particular type of software package from different
vendors are more or less same irrespective of the vendor. Only their mode of
operation may vary from one vendor's package to that of another. Hence in this
chapter we will mainly concentrate on the general features of the packages rather
than their mode of operation. Once you are familiar with the features, the mode of
operation can be easily learnt for the specific software package that you have to
use by using its operation manual.

WORD-PROCESSING PACKAGE

What it is?

Word-processing is a term that describes the use of hardware and software to


create, edit, view, format, store, retrieve and print documents (written material
such as letters, reports, books, etc.). A word-processing package enables us to do
all these on a computer system.

Commonly Supported Features


Today's word-processing packages normally support the features described below.

Entering Text
A word-processing package allows you to enter text with the computer's keyboard.
The text to be entered is typed on the keyboard. Every character typed gets
immediately displayed on the computer's screen. While entering text, you need not
worry about moving to the next line as your text approaches the end of the current
line. The word wrap feature of word-processing software determines when the
current line is full, and the text that follows is automatically moved to the next
line. Since the software recognizes when to begin a new line and automatically
moves words to the next line, the only time you have to press the Enter key is at
the end of a paragraph. The word-wrap feature maintains the format of the lines of
a paragraph continuously and automatically. This feature is very useful for people
with fast typing speeds because they can go on entering text at their speed without
the need to keep track of where to end a line.

Editing Text

This feature allows you to make changes in an already entered document. Changes
that might have required extensive retyping a few years ago with a typewriter can
now be made on the screen with a few keystrokes with a word-processing
package.

While editing, you can use either insert mode or typeover mode. In insert mode,
new characters typed get inserted in the text at the position of the cursor. That is,
characters to the right of the cursor move to the right to make room for the new
characters as they are typed. In typeover mode, the new characters typed replace
(type over) the existing characters at the position of the cursor.

While editing you can also delete unwanted text. Few characters or words at the
cursor position are normally deleted with the use of Delete key (to delete
characters to the right of the cursor) or Backspace key (to delete characters to the
left of the cursor). However, a block of text (say a few lines, or a few sentences, or
an entire paragraph or page) is deleted by first selecting (highlighting) it with the
use of a mouse or a combination of keys and then deleting it all at once by
pressing the Delete key. Whenever some text is deleted, the text following the
deleted text is automatically moved over to fill the space generated by the deleted
text.

Text editing feature also supports cut-and-paste facility that allows you to move a
block of text from one place to another within a document or even between
documents. Sometimes a block of text may be used at several locations in a
document, or in several documents. In such situations, a slightly modified version
of this facility, known as copy-and-paste facility, is used in which the block of text
is copied at desired positions but not deleted from its original position.

Formatting Page Style

This feature allows you to define the page layout format for a document.
Definition of a page layout format many include things such as:
1. Space to be left for left, right, top, and bottom page margins.
2. The default spacing between two lines (such as single space, double space, 1.5
space, etc.).
3. Automatic numbering of pages with page number style (such as 1, 2, 3, ..., or
1/10, 2/10, 3/10, ..., 1 of 10, 2 of 10, 3 of 10, ..., etc.) and page number position
(top center, top left and right, bottom center, bottom left and right, etc.).
4. Automatic placement of header and footer labels on each page (such as the
header labels used in this book).
5. Setting text in multiple columns, one or more columns of text on a single
page. The multi-column option is frequently used in newsletter and newspaper
printing.

It is also possible to create and store multiple standard page format styles (called
style sheets) for different categories of documents like memos, letters, reports,
books, etc. Most word-processing software come with a few pre-stored style
sheets. The basic idea is to save time and effort of re-creating a page format every
time you have to create a new document. When you create a new document, you
simply choose a style sheet from the list of pre-stored style sheets depending on
the document type. All the page format specifications defined in the chosen style
sheet automatically apply to the new document. You can even modify a few
specifications of a style sheet that you want differently from the standard
specifications in the style sheet. This can be done much faster than defining all the
format specifications afresh.

The beauty of a word-processing package is that you can change page format
specifications as often as needed. There is no need to re-type the document if it is
to be printed with a different page format. For example, a document prepared with
multi-column page format can be converted to a single-column page format just by
changing the page format style. The document is printed according to the most
recent format specifications.

Formatting Text

A word-processing package not only allows you to format page styles but it also
has features for formatting portions of text to improve the general appearance and
readability of a document. Text formatting features normally include things such
as:
1. Selection of an appropriate font. A font is a complete set of characters with
the same style and size. A word-processing package comes with several standard
fonts such as Times, Helvetica, Palatino,etc. Different fonts may be applied to
different portions of the same document. For example, chapter heading, section
heading and the running text of a book may have three different fonts. A particular
font should be used only if your word-processing package as well as your printer
supports that font. Figure 15.1 shows a few different font types.
2. Selection of an appropriate font size. Font size is measured in points. A point
is 1/72 of an inch, and the size refers to the distance from the top of the tallest
character to the bottom of the character that extends the lowest (such as y, p or q).
Different font sizes may be applied to different portions of the same document.
For example, chapter heading, section heading and the running text of a document
usually use three different font sizes. Figure 15.2 shows a few different font sizes.

This sentence is written in Times New Roman font.


This sentence is written in Helvetica font.
This sentence-is written in Palatino font.
This sentence is written in Courier New font.
This sentence is written in Antique Olive font.

3. Selecting an appropriate font style. Commonly used font styles are italic, bold
and underline. They are normally used to highlight individual words or phrases or
portions of text in a document. Figure 15.3 illustrates their use in a document.

This sentence is written in italic style.


This sentence is written in bold style.
This sentence is written in underline style.
You can even make individual words italic, bold, or underline.

4. Selecting an appropriate justification. Justification is the alignment of text on


the left or the right margin, or on both margins. In case of left-justification,
beginnings of lines are aligned with the left margin of the pate. This style is also
known as ragged right because the ends of lines at the right edge just end where
the last word ends. In case of right-justification, ends of lines are aligned with both
the right margin of the page. In case of full-justification all the lines are properly
aligned with both the left and right margins of the page. A world-processing
software accomplishes this by making micro adjustment of space between the
words, and sometimes even between the characters on a line. In case of center-
justification of a particular line, it is placed at the center of a line with equal
spacing both on its left and right ends. Center-justification is commonly used for
titles or headings. Figure 15.4 illustrates the use of various types of justification of
text.
The term hardware refers to the physical devices of a computer system. Thus, the
input, storage, processing, control, and output devices are hardware. The term
software refers to a collection of programs. A program is a sequence of
instructions written in a language that can be understood by a computer. It is the
program that controls the activity of processing by the computer and the computer
performs precisely what the program wants it to do.
(a) Example of left-justified (ragged-right) text.
The term hardware refers to the physical devices of a computer system. Thus, the
input,
storage, processing, control, and output devices are hardware. The term software
refers to a collection of programs. A program is a sequence of instructions written
in a language that can be understood by a computer. It is the program that controls
the activity of processing by the computer and the computer performs precisely
what the program wants it to do.
(b) Example of right-justified text.

The term hardware refers to the physical devices of a computer .system. Thus, the
input, storage, processing, control, and output devices are hardware. The term
software refers to a collection of programs. A program is a sequence of
instructions written in a language that can be understood by a computer. It is the
program that controls the activity of processing by the computer and the computer
performs precisely what the program wants it to do.
(c) Example of full-justified text.

Introduction to Hardware and Software


The term hardware refers to the physical devices of a computer system. Thus, the
input, storage, processing, control, and output devices are hardware. The term
software refers to a collection of programs. A program is a sequence of
instructions written in a language that can be understood by a computer. It is the
program that controls the activity of processing by the computer and the computer
performs precisely what the program wants it to do.
(d) Example of centered text heading.

5. Indenting text appropriately wherever desired such as at the beginning of a


paragraph, or to set aside some portion of text from the main text in a document,
or to enter text in tabular form. Tab stops are normally used for indentation. Tab
stops are typically pre-defined at every fourth or fifth character, or at every Vi-
inch from the left margin of a page layout. Most word-processing packages allow
you to or at every ½-inch from the left margin of a page layout. Most word-
processing packages allow you to change or define new tab stop positions. The
Tab key on the keyboard allows you to move the cursor to the next tab stop while
entering text. Figure 15.5 illustrates a few uses of indentation.
A software package is a group of programs that solve a specific problem or
perform a specific type of job. For example, a word-processing package may
contain programs for text editing, text formatting, drawing graphics, spelling
checking, etc. Thus a multipurpose computer system has several software
packages, one each for every type of job it can perform.
(a) Example of paragraph indentation.
A software package is a group of programs that solve a specific problem or
perform a specific type of job.
For example, a word-processing package may contain programs for text editing,
text formatting, drawing graphics, spelling checking, etc.

Thus a multipurpose computer system has several software packages, one each for
every type of job it can perform.
(b) Example of indenting some portion of text to set it aside from the main text.

6. Creating numbered or bulleted list of items. As shown in Figure 15.6, this


feature allows descriptive items to be presented as a numbered or bulleted list for
better comprehension and readability. Each item in the list has a separate number
or bullet or some other symbol attached to its beginning. The numbers or symbols
are automatically inserted by the word-processing software as soon as you press
the Enter key.

Some of the typical features found in a grammar checker are:


1. It highlights the use of double words (such as for for).
2. It highlights phrases with redundant words (such as very highest).
3. It highlights the misuse of capital letters (such as PraDeep or PradeeP).
(a) Example of numbered list of items.
In general, a computer's system software performs one or more of the following
functions:
• Supports the development of other application software.
• Supports the execution of other application software.
(b) Example of bulleted list of items.

Entering Mathematical Symbols

Several scientific and engineering documents often use mathematical symbols. A


word-processing package allows you to enter not only plain text but also complex
mathematical equations. Almost all word-processing packages support the use of a
wide range of mathematical symbols to enable this. Figure 15.7 shows the use of a
few mathematical symbols.

Displaying Documents

Word-processing packages allow you to display the contents of the document, you
are currently working on, on the screen of the computer's monitor. With the
contents displayed on the screen, the text cursor can be moved to any position in
the document for editing the text. In case of a large document that cannot
completely fit on the or screen, you can browse through the document by scrolling
a line at a time, a screen at a time, or a page at a time, by using suitable keys on
the keyboard.
Based on this feature, word-processing packages are of two types — one with
WYSIWYG (pronounced "wiz-ee-wig") facility and the other one with ordinary
text display facility. WYSIWYG is an acronym for "What You See Is What You
Get", and word-processing packages with this facility can display a document on
the screen in a form that closely resembles what the printed document will look
like. These word-processing packages employ high-resolution graphics. On the
other hand, word-processing packages with ordinary text display facility can
display only ordinary text. Hence the embedded codes that the user has supplied
for formatting the text are also displayed along with the document's contents as
ordinary text. That is, the result of formatting is not visible on the screen and
appears only on the printed document. However, such word-processing packages
normally provide preview facility that permits you to see what the document will
look like (almost, if not exactly) when it is printed. Today, most of the popular
word-processing packages are of WYSIWYG type.

Saving, Retrieving and Deleting Documents

One of the most important features of a word-processing package is to save a


document on a secondary storage and to retrieve it later at any time for reuse. At
the time of saving a document for the first time, you must specify a file name for
the document. The document is later retrieved for reuse by specifying its file
name. You may even permanently remove the document from the secondary
storage by deleting it when you feel that it is no more useful for you or when you
have created and saved a new version of it.
When you are editing a document, you should save it at frequent intervals so that
you do not lose the updates made to it in case of a power failure. This is because
any power failure wipes out all work that has not been saved. To take care of this
problem, some word-processing packages offer an automatic save feature that
saves the document you are currently working on after every few minutes.

Printing Documents

All word-processing packages support printing feature to allow users to print their
documents on a printer for generating a hard copy of their documents. Some of the
commonly supported printing facility in almost all modern word-processing
packages and printers are:
1. Selective printing of a single page, specific pages, a range of pages, or the
whole document.
2. Single-sided or double-sided printing. Single-sided printing prints only on one
side of a paper, while double-sided printing prints on its both sides.
3. Portrait and landscape modes of printing. In portrait mode the printed lines are
parallel to the shorter edge of the paper (like in this book), whereas in landscape
mode the printed lines are parallel to the longer edge of the paper.
4. Previewing a document before printing it. This facility shrinks down the pages
of your document so that an entire page or even facing pages can be displayed on
the screen at once in almost the same form as it will appear when printed. This is
especially useful for seeing how margin and other settings will finally appear in
your document without having to print the document first. This avoids wastage of
paper.

Importing Text, Graphics and Images

Most modern word-processing packages permit the integration of text, graphics


and images. That is, in addition to entering text, you can also draw illustrative
diagrams and graphs to support the textual matter in a document. While working
on a document, you can even import text, graphics and images from some other
document into your document. This feature often helps in saving tremendous time
and effort because the user need not spend time in creating a piece of text,
diagram, graph or image that can be easily obtained from somewhere else. In
addition to importing, many word-processing packages also have document
conversion facility that enables an imported document that was prepared using a
different word-processing package, to be converted into a document compatible
with the user's word-processing package.

Searching and Replacing Text String

All modern word-processing packages provide search facility that enables you to
quickly search for all occurrences of a specific word, phrase, or groups of
characters in a document. For example, you might have used the months
November and December at several places in your document. If you want to
ensure that the current month name appears at all places in the document, you can
use the search facility to enable you to do this quickly.

In addition to providing this simple search capability, word-processing packages


also support search-and-replace facility. This facility enables you to perform
selective or global replacement of a specific word, phrase, or groups of characters
with a new set of characters. For example, suppose a document contains the name
Pradip at several places. If we realize later that this is the wrong spelling of the
name and it should be Pradeep instead of Pradip, we can use the search-and-
replace facility to change all occurrences of Pradip to Pradeep in the document.

Checking Spelling
Most modern word-processing packages come with an electronic dictionary and a
spell checker to allow you to ensure that your document does not contain any mis-
spelled word. A spell checker looks up every word in your document against the
pre-stored -words in the electronic dictionary and alerts you if no match is found
for a particular word in the dictionary. In such a situation, the spell checker
highlights the word and waits for you action. You may choose to do either of the
following:

1. You can correct the spelling.


2. If you do not know the correct spelling, you can ask the spell checker to give
you a list of words with similar spelling and choose the correct word from the list.
3. If the word is spelled correctly but has been highlighted simply because it is
not present in the electronic dictionary (for example, names of people and
companies, abbreviations, acronyms, etc.), you can instruct the spell checker to
ignore the word, or to add it to the dictionary.

Unfortunately, spell checkers are not yet smart enough to check for the improper
use of correctly spelled words. For example, it will not flag "form" when the word
should be "from".

Checking Grammar and Style

Similar to a spell checker, some advanced word processing packages come with a
grammar checker that enables you to correct grammatical mistakes and use of
improper writing styles in your document. Some of the typical features found in a
grammar checker are:
1. It highlights the use of double words (such as for for).
2. It highlights phrases with redundant words (such as very highest).
3. It highlights the misuse of capital letters (such as PraDeep or PradeeP).
4. It highlights text having subject and verb mismatches (such as she were).
5. It highlights punctuation errors (such as , .).
6. It highlights sentences written in the passive voice rather than the active voice
(such as "The book was given by Mohan" is in passive voice whereas "Mohan
gave the book" is in active voice).

Using Thesaurus

Some advanced word-processing packages come with an electronic thesaurus. A


thesaurus provides a list of synonyms for a word (alternative words with similar
meanings). While creating a document, if you feel that a word is being used too
often or a word that you have used does not seem to be quite right, you can select
the word and take help of the thesaurus for suggesting a list of viable alternatives.
As soon as you select a preferred word from the suggested list of words, the
original word is automatically replaced with it.

Creating Table-of-Contents and Index

Some advanced word-processing packages also allow you to create table-of-


contents and index of key words for a large document such as a book, a manual, or
a report. With the help of a simple command, you can automatically create for
your document a table-of-contents with page numbers for chapters and various
levels of headings, much like the one in the front matter of this book. Similarly,
with the help of another command you can automatically create for your document
an alphabetical index of key words that lists the page numbers for each occurrence
of a key word, much like the one in the back matter of this book.

Using Mail-Merge

Often we need to send a letter to many persons. For example, a letter that is to be
sent to all the participants of a workshop/seminar. The mail-merge feature found
in some advanced word-processing packages allows you to create a file containing
the letter and another file containing the list of names and addresses of the
participants and then to merge the indicated name and address fields from the file
containing the list into the proper locations in the letter as the letters are printed.
Figure 15.8 shows a typical example of how to indicate the name and address
fields on the letter to be substituted with actual names and addresses of the
participants when the letters are printed. This feature enables printing of
personalized letters for each participant on the list.

& First Name & & Last Pradeep Sinha Pune University Pune,
Name& &Address& 411007
&City&, &Zip &
Dear &First Name&, Dear Pradeep,
(a) A typical example of indicate the (b) This is how the name and address
how to name and address the letter. get printed on the letter.
fields on
Figure 15.8. An example of mail-merge feature.

SPREADSHEET PACKAGE

What it is?
A spreadsheet package is a numeric data analysis tool that allows us to create a
kind of computerized ledger. A manual ledger is a book having rows and columns
that accountants use for keeping a record of financial transactions and for
preparing financial statements. Accountants use the manual ledger with pencil,
erasure and hand calculator to prepare financial statements. This is a tedious task
and often takes a long time due to several iterations of formula calculations to
come out with an acceptable and satisfactory financial statement. A spreadsheet
package offers considerable ease of performing such tasks by automating all
arithmetic calculations and making it much easier to change certain numeric
values and immediately seeing the effect of these changes across the worksheet
(ledger). With spreadsheet software in place, we are no longer confined to using
pencils, erasers, and hand calculators for dealing with any task that requires
numeric data analysis.

Whereas paper ledgers were tools for accountants, spreadsheet packages are tools
for anyone who needs to record, organize, or analyze numbers as rows and
columns of data. That is, a spreadsheet package is useful for any numerical
analysis problem whose data can be organized as rows and columns. Some typical
uses of spreadsheets packages are:
1. For maintaining and analyzing inventory, payroll, and other accounting
records by accountants.
2. For preparing budgets and bid comparisons by business analysts.
3. For recording grades of students and carrying out various types of analysis of
the grades by educator
4. For analyzing experimental results by scientists and researchers.
5. For tracking stocks and keeping records of investor accounts by stockbrokers.
6. For creating and tracking personal budgets, loan payments, etc. by
individuals.
This list is by no means exhaustive and is given here only to give an idea of how
flexible and versatile tool is spreadsheet package.

Commonly Supported Features

An example of a sample spreadsheet is shown in Figure 15.9. Some of the key


features of spreadsheet package are explained below with the help of this example.

Rows and Columns

A spreadsheet is organized in a tabular form with rows and columns. The rows are
identified by numbers, whereas the columns are identified by letters. Single letters
are used to identify the first 26 columns and double letters are used for subsequent
columns (A, B, ..., Z; AA, AB, ..., AZ; BA, BB, ..., BZ; ...). A large spreadsheet
may have hundreds of rows and hundreds of columns.
Cells

The intersection of a row and a column is called a cell. A cell is identified by its
address, which is a combination of its column letter and row number (such as F4,
C18). Data are stored in cells.

Range of Cells

Many spreadsheet operations involve a range of cells instead of a single cell. For
instance, in Figure 15.9, the contents of cell E5 is equal to the sum of the contents
of cells B5, C5 and D5, which is a range of three cells in a row. A range of cells
may involve many cells and entering every individual cell for an operation to be
performed on them may be cumbersome and time taking. To take care of this
problem, all spreadsheet packages allow the use of following types of cell ranges:

1. Row Range. It is used to include a set of adjacent cells in the same row. For
example, the range B5..D5 refers to the cells B5, C5 and D5.
2. Column Range. It is used to include a set of adjacent cells in the same
column. For example, the range C5..C9 refers to the cells C5. C6. C7. C8 and C9.
3. Block Range. It is used to include a set of adjacent cells in a rectangular group
of cells. For example, the range B5..D9 refers to the cells B5, B6, B7, B8, B9, C5,
C6, C7, C8, C9, D5, D6, D7, D8 and D9.

Notice that a particular range is indicated by the addresses of the endpoint cells
separated by two periods (B5..D9) oracolon(B5:D9).

Cell Contents

Different types of data can be entered into a cell. The four commonly used types
of cell data are:
1. Label. A label is any string of alphanumeric text. Labels are used either to
enter alphanumeric values in cells (such as in cells A5 to A9 of Figure 15.9) or to
enter descriptive data or titles to make the contents easier to understand (such as in
the cells in rows 1 and 3 of Figure 15.9). Notice from the figure that the label in
cell Bl extends across columns C, D, E and F. This is possible when the adjacent
cells are blank, otherwise the text gets truncated after the column width.
2. Numeric Value. A numeric value is a number on which the spreadsheet can
perform calculations. For example, in the spreadsheet of Figure 15.9, cells B5..D9
contain numeric values.
3. Formula. A formula may include numbers, mathematical operators (such as
+, -, *, /, etc.), mathematical functions supported by the spreadsheet (such as
SUM, AVG, MIN, MAX, etc.), and cell addresses. For example, cell E9 contains
the formula @SUM(B9..D9) which means that the sum of the numeric values of
cells B9, C9 and D9 should be displayed in cell E9. The same result could have
also been obtained by entering the formula B9+C9+D9 in cell E9. Cell F9 of the
spreadsheet of Figure 15.9 also contains a formula, which is E9/3 and calculates
the percentage marks obtained by the student named J. Smith. Notice that in case
of formula entry, the contents displayed in the cell is not the formula itself but the
result of formula calculation.
4. Date and Time. Although not used in the spreadsheet of Figure 15.9, the date
and/or time contents type is normally used in a spreadsheet to display the actual
date and time whenever the spreadsheet is opened for use, or if calculations are to
be made based on date or time. For example, in case of a spreadsheet used for
interest calculation, it is required to figure out the number of days between two
dates. Cell entries with data type as date are helpful for such applications.

Relative and Absolute Cell Addresses

When a formula entered in a cell has references to other cells (contains cell
addresses), by default, the references are relative to the cell with the formula in it.
For example, cell E5 contains the formula @SUM(B5..D5) that adds the contents
of cells B5, C5 and D5. This formula can be entered once in cell E5 and then
copied in cells E6, E7, E8 and E9. Because the cell address is relative, this
copying will result in cell E6 having the formula @SUM(B6..D6), cell E7 having
the formula @SUM(B7..D7), and so on. Similarly, the formula +E5/3 can be
entered once in cell F5 and then copied in cells F6, F7, F8 and F9. Notice that the
facility of relative cell addressing can be of great help in creating a spreadsheet
quickly by entering the formulas once and copying them to other cells as in the
example of Figure 15.9.

If a formula requires a cell address, which should not change even when the
formula is copied to other cells, you can use absolute cell addressing to
accomplish this. Depending on the requirement, a cell reference can be made fully
or partially absolute as follows:
1. Precede both the column letter and the row number of the cell with a dollar
sign ($) to make both column and row references absolute. For example, $A$2 is a
reference to cell A2 that is absolute as to both row and column. When copied at
any other cell location, it will always reference the cell A2.
2. Precede only the column letter of the cell with a dollar sign ($) to make only
the column reference absolute. For example, $A2 is a cell reference that is
absolute as to column only. When copied at any other cell location, it will
reference the cell in column A of the current row. That is, if a formula entered in
cell A2 containing $A2 is copied in cell El2, this cell reference in the formula in
cell E12 will refer to cell A12.
3. Precede only the row number of the cell with a dollar sign ($) to make only
the row reference absolute. For example, A$2 is a cell reference that is absolute as
to row only. When copied at any other cell location, it will reference the cell in
row 2 of the current column. That is, if a formula entered in cell A2 containing
A$2 is copied in cell El2, this cell reference in the formula in cell E12 will refer to
cell E2.

Spreadsheet Commands

All spreadsheet packages come with a set of commands to enable you to perform
many different operations. For example, copy and move commands enable you to
copy/move the contents of one or more cells to some other cells. Insert and delete
commands enable you to add/remove a column or row anywhere in your
spreadsheet. Format commands enable you to control the way cell contents are
displayed. Formatting features include specifying the width of columns, the
number of decimal places in a non-integer numerical value, automatic insertion of
a dollar sign and commas to separate thousands for currency amounts (such as
$6,852), the use of right- or left-justified values or labels, etc. Save and retrieve
commands enable you to store the format and data of an already created
spreadsheet on a disk, and to retrieve it later for updates and analyses. Print
command enables you to generate a hard copy of all or part of a spreadsheet.

Spreadsheet Graphics

Most spreadsheet packages come with presentation graphics feature, which


enables you to create graphs and charts from numerical data stored in a
spreadsheet. As shown in Figure 15.10, the most popular types of graphs and
charts supported for graphical representation of numerical data are line graphs, bar
charts and pie charts. This feature is very useful in presenting spreadsheet data in
easier to understand visual forms because most people find it difficult to interpret
a table of numbers.

GRAPHICS PAKCAGE

What it is?
Graphics packages enable us to use a computer system for creating, editing,
viewing, storing, retrieving and printing designs, drawings, pictures, graphs and
anything else that can be drawn in the traditional manner.

Commonly Supported Features

Graphics packages normally support the following features:


1. Draw designs
2. Paint drawings and pictures
3. Present graphs
4. Drag-and-drop graphic objects
5. Import graphic objects
6. Screen capture

Each of these features may be provided as a separate graphics package (such as


design package, paint package, presentation package, etc.), or they may be
integrated together in a single graphics package, or they may be included in some
other application package (for example, a word-processing package may have a
design package included in it to enable users to draw figures in their documents, or
a spreadsheet package may have a presentation package included in it to enable
users to present numerical data in the form of graphs). No matter how they are
supported, the features remain the same and our main interest here is to know
about these features rather than how they are supported. What each of these
features enables us to do is briefly described below.

Draw Designs

This feature enables users to draw graphics objects, such as lines, circles,
rectangles, arcs, etc., to create diagrams and designs. Users need not worry about
drawing straight lines or exact circles. The system automatically makes the lines,
circles, arcs, etc. smooth and properly connected to each other. The system also
allows users to move, copy, delete, rotate, tilt, flip horizontally or vertically,
increase or decrease the size of the graphic objects. With all these facilities, users
can draw complex designs with great ease.

In fact, computer-aided design (CAD) is an area that is mainly based on this


feature of graphics software, deals with the integration of computers and graphics
design packages for the purpose of automating the design and drafting process.
CAD systems are used by architects and engineers to create architectural
drawings, product designs, landscaping plans, and many different types of
engineering drawings. They enable designers to work much faster than they once
worked in the era of manual drafting, creating in few hours designs that used to
take several days.
Paint Drawings and Pictures

This feature enables users to create and modify drawings and pictures in the form
of images. Unlike the draw feature (discussed above), which uses vector graphics
for composing graphic objects, the paint feature uses raster graphics for
composing graphic images. In vector graphics, the design is composed of patterns
of lines, points, circles, arcs, and other geometric shapes (vectors) which can be
easily represented by few geometric parameters (for example, a line is represented
by recording the x and y coordinates of two points, and a circle is represented by
recording the x and y coordinates of a point and the radius of the circle). On the
other hand, in raster graphics, the image is composed of patterns of dots called
pixels (picture elements). That is, a painting software ere image by turning
individual screen pixels on or off. Because the image is mapped on to the screen
based on binary bits, this technique is called bit mapping and an image represented
in this manner is called a bit-mapped image. The number of bits needed to
describe a pixel increases with the monitor's resolution and the number of colors
that can be presented. Obviously, vector graphics takes up much less storage space
than raster graphics for the same drawing. However, raster graphics for provides
more flexibility in drawing complex shapes and representation of colors. That is,
painting software give the users a greater range of creativity than drawing software
provide.

Present Graphs

This feature enables users to create graphs and charts from numerical data. The
numerical data to be converted into a graph or chart may be imported from another
software, such as a spreadsheet or a database. Among the most popular types of
graphs and charts used for graphical representation of numerical data are line
graphs, bar charts and pie charts (see Figure 15.10). Line graphs contain one or
more lines connecting data points plotted on a horizontal and vertical axes. Bar
charts use one or more bars on a horizontal and vertical axes to show values by the
lengths of the bars. Sometimes^ bar is^divided into component parts; and the sum
of all the parts equals the total length of the stacked bar. Pie charts use one or more
circles divided into sectors to show the component parts of a whole. Single circles
can be used, or several can be drawn to compare changes in the component parts
over time. Regardless of the type of representation used, a user can vary colors,
add and delete lines and headings, change scales and edit the graphs or charts
suitably to get the desired results. Some presentation graphics software also have
animation capability that enables users to make the graph or chart dynamically
change on the screen to depict increase or decrease of figures over time.
Presentation graphics software is very useful for analysts and decision makers
because it allows them to gain a better understanding of the relationships, changes,
and trends that are buried in their numeric data. This helps them in making more
informed decisions.

Drag-and-drop Objects

This feature enables the users to create their overall designs and pictures much
faster by allowing them to use ready-made graphic objects or images, supplied
with the software. For example, the drawing software comes with a set of ready-
made shapes like line, rectangle, circle, etc. which the user can use in his/her
design as per the requirement. The user can select a desired object from the set of
given objects and drag it to the desired position on the drawing area and then drop
it there to add it to the overall design. The drag feature also allows the user to
suitably change the size or the shape of the object to match with the overall design.
It also enables the user to glue multiple objects together such that they stay
connected and move together if one of them is moved on the drawing area.
Similarly, the painting software comes with a clip art library of stored images. The
user can select a desired image from the clip art library and drag it to the desired
position on the drawing area and then drop it there to add it to the overall picture
being created. The user can also change the size, color, texture, etc. of the image to
match with the overall picture. With this feature, the user need not spend time in
creating an image that is readily available in the clip art library.

Import Objects

This feature further enables the users to create their overall designs and pictures
much faster by allowing them to use not only the graphic objects or images
supplied with the software, but even those graphic objects or images that are
stored in files created by some other software or means. For example, a
photograph may be scanned and the scanned image may be imported into and
included in an overall picture that the user is currently creating. Similarly, a
graphics object or image received from someone through electronic mail can be
imported in a drawing from the mail file. With this feature, the user need not
spend time in creating an image or an object that can be readily obtained from
somewhere else.

Screen Capture

This feature enables the users to take a snapshot of a screen display and to convert
it into an image that can be stored in a file and later imported into a document.
This feature is very useful while writing books or manuals that need to include
screen images as illustrations. A screen is captured as a bit-mapped image. Once
stored in a file, it can be imported into any document at any time and even
manipulated with a paint program.
PERSONAL ASSISTANCE PACKAGE

What it is?

Personal assistance packages allow individuals to use personal computers for


storing and retrieving their personal information, and planning and managing their
schedules, contacts, finances and inventory of important items.

Commonly Supported Features

Features normally supported by personal assistance packages are as follows (some


may support only a few of these, while others may have several additional features
not listed here):
1. Calendar
2. To-do list
3. Address book
4. Investments book
5. Inventory book

What each of these features enables us to do is briefly described below.

Calendar

This feature enables users to record their appointments and plan their schedules on
a yearly, monthly, weekly, daily and even hourly basis. Unlike a hard-copy
calendar which can also be used by individuals to record appointments and plan
schedules, a calendar software is designed to automatically alert a user prior to a
scheduled meeting with an audible alarm or a pop-up message on the display,
warn the user of possible schedule conflicts when a new appointment is recorded,
and automatically schedule tasks of recurring nature. It also allows users to view
or print the highlights of past or future events at the desired level of granularity
(yearly, monthly, weekly, hourly, etc.).

To-do List

This feature enables users to record, prioritize and manage the things to do. A user
can dynamically keep entering the tasks to do as and when they come up, and at
any point of time the user can instruct the system to display or print the tasks by
project, deadline date, or priority. The software also allows users to add or delete
tasks to update the to-do list, or to include additional information against a task to
record its current status or any other information related to the execution of the
task.

Address Book

This feature enables users to record the names, addresses, telephone numbers,
affiliations, date of births, etc. of their friends, relatives, clients, and other contact
persons. The entries in the address book can be made as and their friends,
relatives, clients, and other contact persons. The entries in the address book can be
made as and when they come up, and at any point of time the user can ask the
system to provide details of a particular person, or to display or print a list of
persons having something in common. For example, from the address book, a user
can easily obtain a list of persons living in a particular city, persons whose date of
birth falls on a particular date, persons affiliated to a particular organization, etc.

Investments Book

This feature enables users to maintain a record of their various types of


investments or loans such as long-term and short-term deposits in banks, stocks,
bonds, housing loan, car loan, life insurance, medical insurance, etc. The software
automatically alerts a user prior to the maturity of a term deposit, or prior to the
due date of the premium payment for a loan or insurance with an audible alarm or
a pop-up message on the display. It also allows users to view or print the summary
or details of their investments or liabilities at any instance of time. The software
can also be fed with the information of an individual's daily, weekly, or monthly
income and expenditure statements which when clubbed with the investments and
liabilities information, helps in effective financial planning by the individual.

Inventory Book

This feature enables users to maintain a record of the goods in their houses along
with associated information for each item, such as when was it purchased, from
where was it purchased, what is the duration of its warranty period, is it insured or
not, etc. In addition to making the list of all available items in a house readily
available, this feature also enables the user to find out the details of an item when
there is a break down in it or when it is stolen.

Points to Remember

1. A word-processing package enables us to create, edit, view, format, store,


retrieve and print documents on a computer system.
2. Some of the commonly supported features found in modern word-processing
packages are entering text; editing text; formatting page style; formatting text;
entering mathematical symbols; displaying documents; saving, retrieving and
deleting documents; printing documents; importing text, graphics and images;
searching and replacing text string; checking spelling; checking grammar and
style; using thesaurus; creating table-of-contents and index; and using mail-merge.
3. A style sheet is a pre-stored page format that can be used while creating a new
document or can be applied to an existing document.
4. A font is a complete set of characters with the same style and size. A word-
processing package comes with several standard fonts.
5. Font size is measured in points. A point is 1/72 of an inch, and the size refers
to the distance from the top of the tallest character to the bottom of the character
that extends the lowest.
6. The three commonly used font styles are italic, bold and underline.
7. Justification is the alignment of text on the left or the right margin, or on both
margins. The four types of justification are left-justification, right-justification,
full-justification and center-justification.
8. A word-processing package with WYSIWYG feature can display a document
on a screen in a form that closely resembles what the printed document will look
like.
9. The preview feature of a word-processing package shrinks down the pages of
your document so that an entire page or even facing pages can be displayed on the
screen at once in almost the same form as it will appear when printed.
10. The search-and-replace feature of a word-processing package enables you to
perform selective or global replacement of a specific word, phrase, or groups of
characters with a new set of characters.
11. The spell-checker of a word-processing package helps you to ensure that your
document does not contain any mis-spelled word.
12. The grammar-checker of a word-processing package enables you to correct
grammatical mistakes and use of improper writing styles in your document.
13. A spreadsheet package is a numeric data analysis tool that allows us to create
a kind of computerized ledger. It is useful for any numerical analysis problem
whose data can be organized as rows and columns.
14. Some of the key features of modern spreadsheet packages are support for a
large number of cells, support for addressing a range of cells by the addresses of
the endpoint cells, support for different types of cell data (such as, label, numeric
value, formula, and date and time), support for use of relative and absolute cell
addresses in formula, support for a wide range of commands, and support for
displaying numeric data in the form of graphs and charts.
15. A graphics package enables us to use a computer system for creating, editing,
viewing, storing, retrieving and printing designs, drawings, pictures graphs and
anything else that can be drawn in the traditional manner.
16. Some of the commonly supported features found in modern graphics packages
are drawing designs, painting drawings and pictures, presenting graphs and charts,
dragging-and-dropping graphic objects, importing graphic objects, and capturing
screen snapshots.
17. Computer-aided-design (CAD) deals with the integration of computers and
graphics design packages for the purpose of automating the design and drafting
process.
18. The two methods commonly used for composing graphic objects are vector
graphics and raster graphics. In vector graphics, the graphic object is composed of
patterns of lines, points, circles, arcs and other geometric shapes which can be
easily represented by few geometric parameters. On the other hand, in raster
graphics, the graphic object is composed of patterns of dots called pixels. Vector
graphics representation takes up much less storage space than raster graphics
representation for the same graphic object. However, raster graphics provides
more flexibility in drawing complex shapes and representation of colors.
19. A. personal-assistance package allows individuals to use personal computers
for storing and retrieving their personal information, and planning and managing
their schedules, contacts, finances and inventory of important items.
20. Some of the commonly supported features found in modern personal-
assistance packages are calendar, to-do-list, address book, investments book and
inventory book.

Questions

1. What is a word-processing package? List out some of the key features


supported by modern word-processing packages.
2. Differentiate between the insert and typeover modes of text entry in a word-
processing package.
3. Differentiate between the cut-and-paste and copy-and-paste facilities of a
word-processing package.
4. What is a style sheet in a word-processing application? How is it useful?
5. What is a font? What is meant by font size and font style?
6. Differentiate between left- and right-justified text.
7. What is meant by WYSIWYG facility? How is it useful?
8. What is print-preview facility? How is it useful?
9. Differentiate between portrait and landscape modes of printing.
10. What is meant by text, graphics and image importing facility? How is it
useful?
11. Explain the search-and-replace facility of a word-processing package.
12. What is a spell checker in a word-processing package? How does it work?
13. What is a grammar checker in a word-processing package? List out some of
its typical features found in a modern word-processing package.
14. How does the presence of a thesaurus in a word-processing package help?
15. What is mail-merge facility? How is it useful?
16. What is a clip art library? Describe how it helps in document preparation
with a word processor.
17. List out any five features of a word-processing package. Explain how each of
these five features is helpful in document preparation.
18. What is meant by word-wrap feature? How is it useful?
19. Give an example of a situation when the global search-and-replace command
of a word-processing package will prove useful.
20. What options does a spell checker typically present to the user when it
encounters an unidentified word in a document?
21. A spell checker cannot check for the improper use of correctly spelled
words. Explain why?
22. What is a spreadsheet package? List out some of its typical uses.
23. Think of an application for which a spreadsheet package is useful. Now
draw a sample spreadsheet for 1 application.
24. What is a cell in a spreadsheet? How is a single cell identified? How is a
range of cells identified?
25. Differentiate among row range, column range and block range of cells in a
spreadsheet.
26. List out the four commonly used types of cell data found in a spreadsheet
along with the need for each type.
27. Differentiate between relative and absolute cell addresses in a spreadsheet.
Explain the need for these two types of cell addresses.
28. Explain how a cell address can be made fully or partially absolute when
used in a formula.
29. List out some of the formatting features supported in a modern spreadsheet
package.
30. Explain about the graphics feature of modern spreadsheet packages. How is
it useful?
31. List out five commands that are likely to be present in a spreadsheet
package. Explain the use of each command.
32. What is a graphics software? List out some of the features normally
supported in a graphics software.
33. What is the major difference between the paint and the draw features of a
graphics software?
34. What is a CAD system? List out some of its typical uses.
35. Differentiate between vector graphics and raster graphics. Give their relative
advantages and disadvantages.
36. What is a bit-mapped image? Why is it so called?
37. Explain how the following features of a graphics software are useful:
(a) Present graphs (c) Import objects
(b) Drag-and-drop objects (d) Screen capture
38. What is a personal assistance package? List out some of the features
normally supported by it. Explain the usefulness of each of these features.
39. Write short notes on:
(a) Spreadsheet package
(b) Graphics package
40. Write short notes on:
(a) Computer Aided Design (CAD)
(b) Vector graphics
(c) Raster graphics
(c) Word-processing package
(d) Personal assistance package
41. Write short notes on the following features of a word-processing package:
(a) Word-wrap (e) Page formatting
(b) Text editing . (f) Text formatting
(c) WYSIWYG (g) Search-and-replace
(d) Print preview (h) Import text, graphics and image
42. Write short notes on the following facilities provided by some advanced
word-processing packages:
(a) Spell checking
(b) Grammar and style checking
(c) Mail-merge
43. Write short notes on the following with reference to a spreadsheet package:
(a) Cell contents (c) Graphics feature
(b) Range of cells (d) Relative and absolute cell addresses
Chapter 16

Business Data Processing

This chapter deals with the basic concepts of business data processing. In this
chapter, you will learn about the following:

1. Difference between data and information and how data processing converts
raw data into useful information.
2. The data storage hierarchy commonly used to facilitate data processing.
3. The standard methods of organizing data.
4. The basic concepts of database systems.
5. The modern concepts in database technology.

WHAT IS DATA PROCESSING?

Data is a collection of facts - unorganized but able to be organized into useful


information. A collection of sales orders, employee time sheets, and class
attendance cards are a few examples. Data can be manipulated to produce output,
such as bills, employee salary slips, and student attendance reports. This output,
which can be used to help people make decisions, is called information. That is,
information is data arranged in an order and form that is useful to the people who
receive it.

Processing, in general terms, is a series of actions or operations that converts some


input into useful output. When we speak of data processing, the input is data, and
the output is useful information. Hence, data processing is defined as a series of
actions or operations that converts data into useful information. It consists of three
sub-activities - capturing the input data, manipulating the data, and producing the
output results. A data processing system includes the resources such as people,
procedures, and devices that are used to accomplish the processing of data for
producing desirable output.

Thus, data is the raw material of information and just as raw materials are
transformed into finished products by a manufacturing process, raw data is
transformed into information by data processing.

DATA STORAGE HIERARCHY

In data processing, storage of data is often conceptualized as a data storage


hierarchy, which normally consists of the following six levels (see Figure 16.1).

Level 0 - Bit - A single binary digit (0 or 1).


Level 1 - Character -Multiple related bits are combined to form a character (byte).
Level 2 - Field - Multiple related characters are combined to form a field.
Level 3 - Record - Multiple related fields are combined to form a record.
Level 4 - File - Multiple related records are combined to form a file.
Level 5 - Database - Multiple related records are combined to form a file.

1. Bit. The smallest item of data is a single binary digit (a bit), either a 0 or a 1.
2. Character. Multiple related bits are combined to form a character (or byte).
For example, the letter M, the number 8, and the special character $ are characters.
Whereas the bit is the basic unit of primary and secondary storage, the character is
the basic unit for human perception.
3. Field. Multiple related characters are combined to form a field. For example,
if we are processing employees' data of a company, we may have an employee-
code field, an employee-name field, hours worked field, an hourly-pay-rate field, a
tax-rate-deduction field, etc. A field is a meaningful collection of related
characters. It is the smallest logical data entity that is treated as a single unit in
data processing. Note that a field may sometimes have a single character, such as
sex code may be represented as M or F.
4. Record. Multiple related fields are combined to form a record. For example,
an employee record will contain the fields containing the data of an employee,
such as the employee's code, name, hours worked, pay-rate, tax-rate deduction,
and so forth. Similarly, a student record will contain the fields containing the data
of a student. Thus, a record is a collection of related fields that are treated as a
single unit.
5. File. Multiple related records are combined to form a file. For example, a
collection of all the employee records of a company would be an employee file.
Similarly, a collection of all the inventory records of a company forms an
inventory file. Thus, a. file is a number of related records that are treated as a unit.
Notice that every record in a file has the same set of fields. Each record in a file is
identified, for storage and retrieval purposes, by a key field whose contents are
unique for each record in a file. In case of our employee file, employee-code field
may serve as the key field.
6. Database. Multiple related files are integrated to form a database. For example,
an employee database of an organization may integrate the records of multiple
employee files, such as employee salary file containing details of salary and
taxation information of all employees, employee personnel information file
containing details of personnel information of all employees, and employee skill-
set file containing details of various types of skills of all employees. In a database,
the data from multiple files are integrated in such a manner so that data
redundancy is minimized. For example, in case of the above example of three
different employee files, if in each file an employee record contains an employee
address field, and if an employee changes his/her residence, the address must be
changed in all the three files. In a database, the three files will be integrated in
such a manner that an employee's address data is stored only once and made
available to all applications. Therefore, only one update will be needed in case of
change of address of an employee. In essence, a database is a collection of
logically related data elements from multiple files.

STANDARD METHODS OF ORGANIZING DATA

The two standard methods used in data processing for organizing data are
1. File-oriented approach and
2. Database-oriented approach.
The file-oriented approach was the traditional method used in early days of data
processing and has largely been replaced today by the database-oriented approach.
However, several applications, dealing with simple and small data sets, use the
file-oriented approach even today. Hence we will have a look at both these
methods of organizing data.

File-oriented Approach

In this method, an application's data is organized into one or more files and the
application program processes the data stored in these files to generate the desired
output. For example, it is customary to set up a master file of permanent (and,
usually, the latest) data, and to use transaction files containing data of a temporary
nature. For instance, in a payroll processing application, the master payroll file
will contain not only all the permanent details about each employee, his/her name,
address, employee code, pay-rate, income tax rate, and so forth, but also the
current gross-pay-to-date total and the tax paid-to-date total. The transaction
payroll file will contain details of hours worked this week, normal and overtime,
and if piecework is involved, the quantity of goods made. When the payroll
program is processed, both files will have to be consulted to generate this week's
pay-slips, and the master file updated in readiness for the following week.

In the file-oriented approach of organizing data, a set of programs is provided to


facilitate the users in organizing, creating, deleting, updating, and manipulating
their files. All these programs together form a File Management System (FMS).
We will have a look at the commonly supported features in a typical file
management system in the next section of this chapter.

Database-oriented Approach

The file-oriented method of organizing data for data processing applications is


simple, inexpensive, and usually easy to use. However, it suffers from the
following limitations:
1. Limited query flexibility. In file-oriented approach, the records in a file are
organized according to a key field. As long as we search records based on key
field value, the query can be processed quickly. However, when the key field is
not relevant to the information needed, the entire file has to be searched. For
example, if the key field is employee code in an employee file, and if we need to
list out the names of all employees with a certain educational background, a search
of all the file records will be required to produce this information. If this
information is frequently needed, a new file structured on educational background
key will have to be created along with a new program to process this file.

2. Data redundancy. In file-oriented approach, the same data items are often
included in many different files. For instance, in the above example of creating a
new file structured on educational background key, the new file will also have
several of the data items stored in the first employee file. Similarly, suppose a
bank uses the file-oriented approach for storing its customers data, and it
maintains separate customer files for its various types of services such as savings
accounts, term deposits, and loan accounts. In this case, a great deal of redundant
data for a bank customer (such as home address, age, occupation, and
identification information) may be contained in multiple files. Repetition of the
same data items in more than one file is known as data redundancy. It leads to
increase in the cost of data entry and data storage. It also leads to data integrity
problem described below.

3. Data integrity problem. Data integrity is the consistency of the data in all files.
That is, in file-oriented approach, when some change occurs in a data item, every
file, which contains that field, should be updated to reflect the change for
consistency. For instance, in our example in which a bank maintains separate
customer files for each type of account, when a customer moves to a new address,
his/her address field must be updated in all the customer files in which this
customer's record is present. Integrity of data is necessary to avoid confusions that
may result when one file is updated while others are not. For example, in case of a
change in a data item, if all the files containing the data item are not updated
correctly, there may be frequent discrepancies among reports produced fro:
different files, causing confusion.

4. Lack of "program/data independence. In file-oriented approach, the application


programs usually contain data format statements that precisely define each data
field to be processed. This often results in different files having the same data item
stored using different data formats. Data dependence occurs when, the data is
dependent on the application. Due to data dependence problem, whenever there is
a need to add, delete, or change data formats, the application program must also be
changed. Data dependence problem also causes incompatibility among data files
from different applications due to which these data files cannot be linked if such a
need arises.

5. Limited data security flexibility. A file-oriented approach normally offers file-


level data security feature. That is, data access restrictions can be enforced only for
an entire file and not for a record or a field of data item.
Dissatisfied with these limitations of the file-oriented approach of organizing data,
researchers began looking for a better method of organizing data to consolidate
activities. Their efforts resulted in the database-oriented approach for organizing
data. In this approach, data from multiple related files is integrated together in the
form of a database, which has the following properties:
1. It provides greater query flexibility.
2. It reduces data redundancy.
3. It solves data integrity (inconsistency) problem.
4. It makes data independent of the application programs. That is, fields can be
added, changed, and deleted from the database without affecting existing
programs.
5. It also includes data security features at database level, record level, and even
at field level to provide greater flexibility of restricted data access.
In the database-oriented approach of organizing data, a set of programs is provided
to facilitate the users in organizing, creating, deleting, updating, and manipulating
their data in a database. All these programs together form a Database Management
System (DBMS). Later in this chapter, we will have a look at the commonly
supported features in a typical database management system.

FILE MANAGEMENT SYSTEM

In the file-oriented approach of organizing data, a set of programs is provided to


facilitate the users in organizing, creating, deleting, updating, and manipulating
their files. All these programs together form a File Management, System (FMS).
The commonly supported features in a typical file management system are
described below.

File Types

Data files are categorized according to the way the application uses them. A file
management system typically supports the following types of files:
1. Transaction File. A transaction file is used to store input data until it can be
processed. For example, in a payroll processing application for generating
payslips of employees on a weekly basis, the transaction file will contain weekly
data of each employee such as details of hours worked this week, normal and
overtime, and if piecework is involved, the quantity of goods made.
2. Master File. A master file contains all the current data relevant to an
application. For example, in the payroll processing application mentioned above,
the master file will contain the permanent details about each employee (his/her
name, address, employee code, pay-rate, income tax rate, and so forth), and also
the current gross-pay-to-date total and the tax paid-to-date total. When the payroll
program is processed, both the master file and the current week's transaction file
are consolidated to generate this week's pay-slips, and the master file is updated in
readiness for the following week.
3. Output File. Some applications use multiple programs for data processing.
In such applications, often the output produced by one program is used as input to
another program. Hence the produced output by the former program is stored in a
file known as output file, which is later on used by the latter program.
4. Report File. A report file holds a copy of a report generated by a data
processing application in computer-accessible form until it is convenient to print
it. It is often advantageous to keep report files instead of paper documents because
the files are easier to store and carry.
5. Backup File. A backup file is a copy of a file, created as a safety precaution
against loss of data caused due to corruption or inadvertent deletion of the original
file. Regular creation of backup files is extremely important.

File Organizations

File organization deals with the physical organization of the records of a file for
the convenience of storage and retrieval of data records. System designers choose
to organize, access, and process the records of various files in different ways
depending on the type of application and needs of the users. The three commonly
used file organizations in business data processing applications are

1. Sequential,
2. Direct/Random, and
3. Indexed Sequential

The selection of a particular file organization depends upon the type of


application. The best organization to use in a given application is the one that
meets the application's data access and processing requirements in the most
effective and economical manner. Hence an application designer must evaluate the
strengths and weaknesses of each file organization before making a choice of the
type of file organization to be used for the application at hand.

File organization requires the use of some key field or unique identifying value
that is found in every record in the file. The key value must be unique for each
record of the file because duplications would cause serious problems. In the
payroll example, the employee code field may be used as the key field.
Sequential Files

In a sequential file, records are stored one after another in an ascending or


descending order determined by the value of the key field of the records. In
payroll example, the records of the employee file may be organized sequentially
by employee code sequence. The principal storage medium for sequential files is
magnetic tape.

The computer processes a sequential file in the order in which data is stored in the
file. That is, the first record is read and processed first, then the second record is
read and processed, and so on. For instance, to locate a particular record in a
sequential file, the computer reads each record in sequence from the beginning of
the file and compares its key field value to the one that is needed. The search ends
only when the desired key value matches with the key field value of the currently
read record. Notice that with this processing mechanism, if only a single record
has to be processed, on an average, about half the file has to be searched to
retrieve the desired record for processing. Thus, sequential files are not suitable for
applications that process only one or a few records at a time.

Sequential file organization is the most efficient and economical file organization
in case of applications in which there is a large number of file records to be
updated at regularly scheduled intervals. That is, when the activity ratio (the ratio
of the total number of records in transaction file and the total number of records in
master file) is very high. This can be ensured by using the idea of batch
processing, in which transactions of a similar type are accumulated into batches,
then these batches are sorted into sequence with respect to the key field values of
the records, and then the entire batch of records is processed in a single pass
through the file. Applications such as payroll processing and monthly bill
processing are processed in this manner.

Advantages of Sequential Files

Sequential files typically have the following advantages:


1. They are conceptually simple to understand and use.
2. They are also easy to organize and maintain.
3. They need relatively inexpensive I/O media and devices for their storage and
processing.
4. They are most efficient and economical to use in applications in which the
activity ratio is high (me records are changed during update runs).

Disadvantages of Sequential Files


Sequential files typically have the following disadvantages:
1. They prove to be very inefficient and uneconomical for applications in which
the activity ration is very low.
2. Since an entire sequential file may need to be read just to retrieve and update
few records, accumulation of transactions into batches is recommended before
processing them. Hence the use of sequential files is limited to a batch processing
environment.
3. Because of the need to accumulate transactions into batches before processing
them, sequential processing precludes the possibility of up-to-the-minute data.
4. Sequential processing requires the files to be sorted before processing. That
is, both the transaction and master files must be sorted and placed in the same
sequence prior to processing.
5. Sequential processing often leads to data redundancy problem, since the same
data may be stored in several files sequenced on different .keys.

Direct Files

Many applications require up-to-the-minute timeliness of data. The users of such


applications cannot afford to wait for the transactions to be accumulated in batches
and then processed together. Such applications require a transaction to be
processed immediately as and when it occurs. A few examples of such
applications are airline or railway reservation systems, teller facility in banking
applications, systems for enquiring whether a certain item is in stock in a store,
etc. Note that the activity ratio is very low in these applications since only one
transaction is processed at a time. Hence the use of sequential files for such
applications proves to be very inefficient and uneconomical. The use of
direct/random files is recommended for such applications because in a
direct/random file organization, the desired record pertaining to the current
transaction at hand can be directly located by its key field value without having to
search through a sequence of other records. For example, when a passenger makes
a reservation request for a particular train on a particular date, the computer can
directly access the record for the train and update its seats position for that date.
Obviously, direct/random files need to be stored on a direct access storage device
to enable direct access of records. The principal storage medium for direct/random
files is magnetic/optical disk.

The obvious question that arises now is how are the records in a direct file
physically organized so that it becomes possible to directly access a particular
record, given its key field value, from a number of records stored in the file. To
enable this, direct file organization uses an address generating function to convert
a record key value into a storage address on the disk on which the file is stored.
Each record in the file is stored at the location to which the address generating
function maps the record's key field value. The process is known as hashing and
the address generating function is called a hashing algorithm.
Although the hashing algorithm is selected in such a manner so as to generate a
unique address for each record key value, but in practice, the hashing algorithm
sometimes maps the key values of two or more records to the same storage
address. This problem is known as collision. When a collision occurs, it may be
taken care of in many ways. One method is to use a pointer at the address
calculated by the hashing algorithm. This pointer points to a linked list of
addresses, which contains the physical addresses of all records whose key values
map to the address calculated by the hashing function.

To search a record given its key value, the computer applies the hashing algorithm
on the given key to generate its corresponding address. If the record is found at the
calculated address, the search is over. Otherwise, the computer traverses the linked
list pointed to by the pointer stored at the calculated address, accesses the
addresses stored in the linked list and the corresponding records one-by-one, and
compares the given key with the key of the accessed record. The search process
finishes as soon as the record with the matching key is found.

If required, the records of a direct file may also be processed sequentially in


ascending or descending sequence of key field value. However, if a large number
of records need to be processed sequentially (that is, if the activity ratio is high),
direct files prove to be very inefficient as compared to sequential files because the
computer has to use the hashing algorithm and reposition the read/write head of
the disk for every record that has to be processed.

Advantages of Direct Files

Direct files typically have the following advantages:

1. Given the key, any record can be quickly located and retrieved directly
without the need for sequential search of the file.
2. Transactions need not be sorted and placed in sequence prior to processing.
3. Accumulation of transactions into batches is not required before processing
them. They may t processed as and when generated.
4. It can support interactive online applications that need to provide up-to-the-
minute information in response to inquiries from users.
5. If required, it is also possible to process direct file records sequentially in a
record key sequence.

Disadvantages of Direct Files

Direct files typically have the following disadvantages:


1. They require relatively expensive hardware and software resources because
they must be stored on direct-access storage device such as a disk.
2. Due to address generation overhead involved, they are less efficient and
economical than sequential files for use in sequential applications with high
activity ratio.
3. Special security measures are often necessary for online direct files that are
simultaneously accessible from multiple online stations.

Indexed Sequential Files

We are all familiar with the concept of an index. For example, the display board
containing the names and room numbers of the various occupants at the entrance
lobby of a large multistoried building is an index that helps us locate a particular
person's room within the building. For instance, to find the room of Dr. Sharma
within the building, we would look up his name in the directory (index) and read
the corresponding floor number and room number. This idea of scanning a
logically sequenced table is preferable to searching door-by-door for the
particular, name. Similarly, if we wished to read the section in this book about
printers, we would not begin on page 1 and read every page until we came across
the topic of interest. Rather, we would find the subject in the contents (which
serves as an index) or the index at the back of the book to locate the page number,
and then turn directly to that page to begin reading.

Indexed sequential files use exactly the same principle. As shown in Figure 16.3,
in indexed sequential file organization there are actually two files for every data
file - the data file which contains the records stored in the file, and the smaller
index file which contains the key and disk address of each record stored in the data
file. The records of the file can be stored in random sequence but the index table is
in sorted sequence on the key value. This provides the user with a very powerful
tool. Not only can the file be processed randomly, but it can also t processed
sequentially. A request for a particular record is first directed to the smaller, more
accessible index file, which in turn, points to the physical location of the desired
record on the direct access storage device such as disk. For instance, to locate the
record of an employee (in the example of Figure 16.3) whose employee is 0004,
the computer first searches the index file for this employee code key and obtains
the address value 1002 corresponding to it. It then directly accesses the record
stored at the address location 1002 of the storage device.

This technique of file management is commonly referred to as the Indexed


Sequential Access Method (ISAM) and the files of this type are called ISAM files.

Employee Address
Code (key) Location
0001 1003
0002 1001
0003 1004
0004 1002
••• •••

Address Employee Record


Location
1001 0002 R. S. Patel...
1002 0004 R. K. Rana...
1003 0001 K. P. Sinha...
1003 0003 N.P.Singh...
••• •«•

Advantages of Indexed Sequential Files

Indexed sequential files typically have the following advantages:


1. They can be quite efficiently used for sequential processing for applications in
which the activity ratio is high.
2. They can also be used quite efficiently for direct access processing for
applications in which the activity ratio is low.
Disadvantages of Indexed Sequential Files
1. They require relatively expensive hardware and software resources because
they must be stored on a direct-access device such as a disk.
2. They require more storage space than other types of files because the index
file can also become quite large.
3. When used for direct access online applications, access to records may be
slower than direct files.

File Utilities

File utilities consist of routines, which perform a variety of generalized operations


on data files. Normally, they are quite general in nature in the sense that they can
operate on any data format and even on data files stored on different types of
storage medium. The operations performed by some of the commonly used file
utilities are described below.

Sorting
A file sorting utility is used to arrange the records of a file in some defined
sequence. This sequence is determined by the ordering of certain specified fields
(known as keys) within the record. The simplest case of sorting is an ordering of
the records in a file on a single key. For example, the records of an employee file
may be sequenced by ascending order of employee code as shown in Figure 16.4.
A more complex ordering may be produced by introducing a further key in the
sorting process. For example, suppose each record of the employee file also
contains a field for department code to which the employee belongs. Now the
order of sorting may be employee code within department code. This means that
all records for the lowest department code are presented for each employee
belonging to that department in ascending sequence of employee code, then all
records for the next department code, and so on. This is shown in Figure 16.5. Out
of the two keys used in this sorting example, department code is called the primary
key and employee code is called the secondary key because the order oi sorting is
employee code within department code.

The size of keys, the number of keys, and the type of ordering (ascending,
descending), which can be specified as input parameters, varies from one sorting
utility to another. These parameters decide the extent and sophistication of sorting
utilities. A sorting utility enables users to sp6cify their particular sequencing
requirements by means of simple parameters. The user specifies the sort keys, and
also details about the type of file such as storage device, file labels, record
structure. The sorting utility reads the unsequenced input file, and by means of
various copying techniques ultimately produces an output file, which contains the
records of the input file ordered in the required sequence.

Searching

A file searching utility is used to find a particular record from a file. The searching
is carried out with respect to certain specified fields (known as keys) within the
record. For example, in the employee file of Figure 16.4, the user can specify the
value 202 for the employee code field to request the computer to search the
corresponding employee's record.

The efficiency of a search algorithm depends on the file organization. For


example, to search a particular recon in a sequential file, the file is scanned
sequentially beginning with the first record and the specified key i compared one-
by-one with the key field of each record. The search process terminates when the
record with the matching key is found. On the other hand, direct or index
sequential file organizations enable immediate access to the desired record with
the help of either the hashing algorithm (in case of direct file organization) or the
index file (in case of index sequential file organization). The user needs to only
specify the file and the key, and the searching utility searches through the file and
produces the desired record. Normally, the time required to search a particular
record from a direct or index sequential file is much less as compared to the time
required to search it from a sequential file.

Merging

A file merging utility is used to combine the records of two or more ordered
(sorted) files into a single ordered file. Each of the constituent files must be in the
same order, although the record layout of files need not be identical. The output
file produced by the merging utility has the records in the same order as the input
files, placing records from each in their correct relative order. Figure 16.6,
illustrates the merging of two input files A and B to produce an output file C.

Copying

A file copying utility is used to produce an exact copy of a file, either from one
unit of a storage device on to another similar unit (such as from one type reel to
another or from one floppy disk to another), or from one storage medium to
another (such as from tape to hard disk or from CD-ROM to hard disk).
File copying utilities are often used for taking back-up copies of files. For
example, a file may be copied from a hard disk to a tape or floppy for back-up
purpose. File copying utilities are also known as peripheral interchange programs
since they may be used to copy a file from one peripheral device on to another
peripheral device.

Printing

A file printing utility is used to print a file on a printer to produce hard copy of its
contents. Printing utilities often provide the facility to print file contents in
different formats. They do often provide some selection and editing facilities to
enable parts of files to be printed (such as specified number of records and only
certain fields of records). Special printing facilities are often provided to print files
that contain program instructions rather than data.

Maintenance

A file maintenance utility is used to selectively copy the data of one or more files
into a new file, or to selectively update a file's contents. For example, facilities
provided in a file maintenance utility may include the combining of data from
more than one file into a single file, the deletion of records identified by record
key or record count within a file, and the selection of specific fields of records to
be copied from an existing file into a new file.
DATABASE MANAGEMENT SYSTEM

In the database-oriented approach of organizing data, a set of programs is provided


to facilitate the users in organizing, creating, deleting, updating, and manipulating
their data in a database. All these programs together form a Database Management
System (DBMS). The commonly supported features in a typical database
management system are described below.

Database Models

We saw that multiple related files are integrated together to form a database. A
database model defines the manner in which the various files of a database are
linked together. The four commonly used database models are (they are also
known as database structures or database structuring techniques):
1. Hierarchical,
2. Network,
3. Relational, and
4. Object-oriented

They are briefly described below.

Hierarchical Databases

In a hierarchical database, the data elements are linked in the form of an inverted
tree structure with the root at the top and the branches formed below. Below the
single-root data element are subordinate elements, each of which, in turn, has one
or more other elements. There is a parent-child relationship among the data
elements of a hierarchical database. A parent data element is one that has one or
more subordinate data elements. The data elements that are below a parent data
element are its children data elements. There may be many children elements
under each parent element, but there can be only one parent element for any child
element. Note that the branches in a tree structure are not connected. An example
of a hierarchical database structure is shown in Figure 16.7.

The hierarchical database structure has been used in a large number of database
applications because the data elements of many applications can be neatly
organized in the form of a hierarchical tree structure. However, the main limitation
of a hierarchical database structure is that it does not support flexible data access
because the data elements can be accessed only by following the path down the
tree structure. Hence it is important to determine all types of relationships among
the data elements and map them properly in the form of a hierarchical tree
structure when the database is first designed. For example, in the hierarchical
database of Figure 16.7, an organization maintains a hierarchical database of all its
employees. Employees are categorized by the department in which they work, and
within a department they are categorized by their job function, such as managers,
engineers, technicians, and support staff. If the personnel department has a
shortage of support staff one day, producing a list of all support staff, to take a
decision for using some support staff from other departments for this department,
would not be directly possible. Instead, the support staff assigned to each
department would have to be determined department-by-department.

Network Databases

A network database structure is an extension of the hierarchical database structure.


In this model also, the data elements of a database are organized in the form of
parent-child relationships, and all types of relationships among the data elements
must be determined when the database is first designed. In a network database,
however, a child data element can have more than one parent element or no parent
at all. Moreover, in this type of database, the database management system permits
the extraction of the needed information by beginning from any data element in
the database structure instead of starting from the root data element.

An example of a network database structure is shown in Figure 16.8. The example


shows a network database of a college that maintains the relationships among the
courses offered and the students enrolled for each course. As can be seen from the
example, the parent and child elements can have many-to-many relationships in a
network database structure. That is, each student may be enrolled in several
courses, and each course may have a number of students enrolled for it. With this
database structure used for this example, it is a course-wise students-wise courses
report (a report showing all courses taken by each student). For example, it is easy
to tell from the databas structure that in this semester, Maths course has been taken
by Seeta, Geeta, Ram and Sohan, and it is also easy t tell that in this semester,
Geeta has taken the courses Hindi, Maths and Computer Science. The example
also shows a child element that has no parent element (the student named Raju -
he might be a research student who has not taken any course in this semester).

Relational Databases

In a relational database, the data elements are organized in the form of multiple
tables with rows and columns. Each table of the database is stored as a separate
file. Each table column represents a data field, and each row a data record (also
knows as a tuple). The data in one table (or file) is related to data in another table
through the use of a common field.

An example of a relational database structure is shown in Figure 16.9. The


example shows a sample library database comprised of three tables. The first table
contains the data of library members, the second table contains the data of
borrowed books, and the third table contains the data of books in the library. Each
new member assigned a membership number and issued a library card with this
number on it. The member's name, address, and membership number are added to
the first table. When a member borrows a book, the membership number of the
borrower, the book's ISBN number (which serves as the unique identification
number for a book), and the due date for returning the book are added to the
second table. The first and second tables are related through the 'Membership No.'
common field, and the second and third tables are related through the "Book No.'
common field.

Now suppose the librarian wants a report of overdue books as of 10-11-2001, and
wants the list to contain the borrower's details and the book's details for each
overdue book. To produce such a report, the database search routine will first
search for the due date field in the borrowed books data table to surface the three
overdue books. The database management system will then use the 'Membership
No.' field to cross-reference the borrower's details for each overdue book from the
members data table, and the 'Book No.' field to cross-reference the book's details
of each overdue book from the books data table. The final report thus produced
would look something like the one shown in Figure 16.10.

The relational database model provides greater flexibility of data organization and
future enhancements in the database as compared to the hierarchical and network
database models. For many applications, the data elements can be organized in the
relational database model in a manner that is identical to the actual relationships
that exist between the data elements. Hence many users find the relational
database model to be closer to their intuitive model of the real-life situation,
making this model easier to understand and use. Moreover, if new data is to be
added to an existing relational database, it is not necessary to redesign the database
afresh. Rather, new tables containing the new data can be added to the database,
and then these tables can be related to the existing tables through the use of
common key fields. Data can also be reorganized when necessary to create new
tables by selecting certain rows or specific columns from other tables, or by
joining columns and rows from two separate tables.

Object-oriented Databases
The hierarchical, network, and relational database models (henceforth referred to
as conventional database models) were developed for the conventional business
data processing applications, such as inventory control, payroll, accounts,
employee information systems, and so on. Attempts to make use of these database
models in a wide variety of other types of applications exposed several serious
shortcomings of these database models. These applications include computer-
aided design (CAD), computer-aided engineering (CAE), computer-aided
manufacturing (CAM), computer-aided software engineering (CASE), expert
systems, and multimedia systems, which deal with documents having text,
graphics, animation, audio, and video. Some of the key features required for
effective modeling of these applications that are absent in conventional database
models are:
1. Ability to model complex nested entities, such as design and engineering
objects, and multimedia documents. Conventional database models do not
provide mechanisms, such as configuration management, to represent and manage
such entities.
2. Support for general data types found in object-oriented programming
languages. Database management systems based on conventional database
models support only a limited set of atomic date types, such as integer, string, etc.
They do not even allow the storage and retrieval of long unstructured data such as
images, audio, and textual documents.
3. Support for frequently useful object-oriented concepts such as object, class,
inheritance, etc. (these concepts have been explained in Chapter 12). The object-
oriented concepts consist of a number of data modeling concepts, such as
aggregation, generalization, and membership relationships, which are very useful
in modeling complex applications. Database management systems based on
conventional database models do not provide the necessary functions for
implementing object-oriented concepts. This means that applications programmers
must explicitly represent and manage objects and the relationships among the
objects in their programs.
4. Support for proper match between object-oriented programming languages
and database languages A database application is normally implemented by using
some conventional programming language (such as COBOL, PASCAL, PL/1, C,
or C++) and some database languages (data definition language, data manipulation
language, query language), which are part of the database management system.
With the popularity of object-oriented paradigm, the use of object-oriented
programming languages for implementing applications has become a common
practice. However, database languages used in database management systems
for conventional database models do not use object-oriented concepts for
implementing applications. This mismatch between object-oriented programming
languages and database languages used in database management systems for
conventional database models, makes database implementation of many
applications inconvenient.
The object-oriented database model was introduced to overcome the above listed
shortcomings of conventional database models. A data model is a logical
organization of the real-world objects (entities), constraints on them, and
relationships among objects. A database model that captures object-oriented
concepts such as class hierarchy, inheritance, and methods is ah object-oriented
database model. An object-oriented database is a collection of objects whose
behavior and state, and the relationships are defined in accordance with an object-
oriented database model. An object-oriented database management system is one,
which allows the definition and manipulation of an object-oriented database.

The object-oriented database model is the preferred model for a large range of
database applications such as CAD, CAE, CAM, CASE, expert systems, and
multimedia systems. The reason is that object-oriented concepts already include
such data modeling concepts as grouping of objects into a class, aggregation
relationships between an object and other objects it consists of (nested objects),
and generalization relationships between a class of objects and classes of objects
specialized from it. The fact that an object-oriented database model includes the
aggregation and generalization relationships means that an object-oriented
database management system provides direct support for the definition and
manipulation of the relationships among objects. This in turn means that
application programmers need not explicitly program and manage these
relationships.

An example of an object-oriented database structure is shown in Figure 16.11. The


class Vehicle is the root of a class-composition hierarchy, which includes the
classes VehicleSpecs, Company, and Employee. The class Vehicle is also the root
of a class hierarchy involving the classes TwoWheeler and FourWheeler. The
class Company is in turn the root of a class hierarchy with subclasses
DomesticCompany and ForeignCompany. It is also the root of a class-composition
hierarchy involving the class Employee.

For the database structure of Figure 16.11, a typical query may be like "list out the
President's and Company's names for all the companies located in Pune, India that
manufacture two-wheeler vehicles."

Main Components of a DBMS

A DBMS frees the users of a database from the need to worry about the
organization and location of data. It allows users to organize, process, and retrieve
selected data from a database without knowing about the underlying database
structure. The four major components of a DBMS that enable this ease of use of a
database are:
1. Data Definition Language (DDL),
2. Data Manipulation Language (DML)
3. Query Language, and
4. Report Generator. -
They are briefly described below.

Data Definition Language (DDL)

The data definition language (DDL) is used to define the structure of a database.
The database structure definition (also commonly known as database schema)
typically includes the following:
1. Defining all data elements to be included in the database.
2. Defining the organization of the data elements (fields) into records (or tuples),
tables, etc.
3. Defining a name, field length, and field type for each data element. A field
name is used to refer to the corresponding data element while accessing it. Field
length is used to define the maximum size c the data element (such as an employee
name field, may have a maximum size of 30 characters Common field types are
numeric (can contain only the digits 0 to 9, a decimal point, and a + or sign),
alphanumeric (can contain a combination of alphabetic characters, special
symbols, and digits logical (can contain one of two possible values - Yes/No or
True/False), date (can contain a single date), and memo (can be used to hold any
type of reminder that the user might like to type).
4. Defining controls for fields that can have only selective values. For
example, in an employee database, the sex field can have controls to accept only
the values M or F. Similarly, the age field can have controls to accept only the
values 18 or more and less than 70. Such controls ensure the correctness of
entered data to some extent.
5. Defining access controls to the various tables, records, and fields for different
categories of users to protect the privacy of sensitive data items from unauthorized
users.
6. Defining the logical relationships among the various data elements of the
database.
In short, virtually everything about the database structure is included in its schema.
It is possible to generate complete description of a database from its schema. This
description, in turn, can be used by systems analysts ii defining new applications
on the database.

Database systems are typically installed and coordinated by an individual called


the database administrator. He/she has the overall authority to establish and
control data definitions and standards. He/she is responsible for determining the
relationships among data elements, and for designing the database security system
to guard against unauthorized use. He/she also trains and assists applications
programmers in the use of the database. A data dictionary is developed and used in
a database to document and maintain the data definitions. It is automatically
created/updated by the DDL module of the DBMS as the database schema is
defined or changed.

Data Manipulation Language (DML)

Once the structure of a database (database schema) has been defined, the database
is ready for the entry and manipulation of data. The data manipulation language
{DML) includes all the commands that enable the users to enter and minipulate
the data. With these commands, the user can do such things as add new records to
the database, navigate through the existing records, view the contents of the
various fields of a record, modify the contents of one or more fields of a record,
delete an existing record, and sort the records in a desired sequence.

In some DBMS, the data definition language and the data manipulation language
are combined together, while in others, they are supported as separate DBMS
components.

Query Language

Although it is possible to navigate through a database one record at a time to


extract the desired information from the data stored in the database, this approach
can be very inefficient and frustrating when there are thousands of records and
several files in the database. Hence all database management systems provide a
query language that enables users to define their requirements for extracting the
desired information from the database in the form of queries. For example, from
an inventory database, a user may be interested in such information as "list out the
item description and vendor name for all items whose current inventory level is
less than 20 units" or "list out the stock number and item description for all items
with a profit margin greater than 25%".

Earlier each database management system had its own query language. The main
problem with this was that queries developed for one DBMS could not be used
with other DBMSs. However, eventually one query language, called SQL
(pronounced "S-Q-L"), emerged as an industry standard. It was originally
developed by IBM and was based on an earlier query language called SEQUEL.
SEQUEL being an acronym for "Structured English QUEry Language", many
people pronounce SQL as "Sequel" and believe that it stands for "Structured
Query Langauge". However, SQL does not stand for anything. Today, SQL is the
standard query language used in many DBMSs.
A query language can be easily learnt by a non-programmer. This enables normal
users of a database to access the database for desired information without the help
of any programmer.

Report Generator

A report is the presentation of information extracted from a database. The report


generator enables the users of a database to design the layout of a report so that it
can be presented in the desired format. This means that the user can specify proper
spacing between the data items to be presented in a report, and can also include
suitable report titles and subtitles, column heading, page numbers, separation lines,
and other elements that make a report more readable and presentable. The report
generator can also be instructed to perform arithmetic operations (such as
calculating subtotals and totals) on the data found in numeric fields to make a
report more meaningful and useful.

A user can define the layout of a report and then store it for later use. This facility
is often used for generating periodic reports. For example, this facility is found to
be very useful for generation of employee pay-slips from an employee database
every month, or generation of consumer bills every month, for the consumers of a
service. The report layout format remains the same every month, only the data
changes.

Creating and Using a Database

In this section we will have a closer look at how a database is created and used.
Large databases on large computer systems are normally created and maintained
by professional programmers. The users of these databases, however, need not be
programmers. They can be easily used by non-programmers to access the data and
produce reports. On the other hand, many database management systems designed
for personal computer systems enable non-programmers to not only use but even
to create their own databases. These databases are normally simple in structure and
small in size.

Creating a Database

Creation of a database is a three steps process:


1. Defining its structure, (schema),
2. Designing forms (custom screens) for displaying and entering data, and
3. Entering the data into it.

These steps are briefly described below.


Schema Definition

The first thing we do to set up a database is to define its structure (schema


definition). This is done by identifying the characteristics of each field in it. A
good way to begin defining the schema of a database is to list down on paper all
the fields that are to be included in the database, and then to determine the name,
type, and size of each field. This information is then captured into the system
using a tool called schema builder. The schema builder enables a user to define a
database schema interactively by prompting the user to enter the field name, field
type field size, and so on for each field.

While defining the schema of a database, it is important to consider possible future


needs and the needs of all types of users of the database. That is, all possible fields
that may be needed should be included in the database structure while defining it.
Although it is possible to modify the database structure at any time, making such
modifications is a time-consuming process. Hence it is always better to design a
database carefully in the first instance and minimize the need to modify the
database structure.

Designing Forms

After defining the structure of a database, the next step in database creation is to
design the forms (custom screens) that permit convenient data entry. Each form
displays a set of fields of the database structure with appropriate amount of blank
spaces against each to enable data entry for those fields.

To facilitate easier data entry, forms are often designed with several fancy features
such as:
1. A list box for a field that lists several options on it from which the user can
select a choice. For example, in the form of Figure 16.12, the SEX field may have
a list box that lists the options "Male" and "Female" on it and the user simply
selects the appropriate option for an employee. Depending on the user's selected
option, the system automatically enters "M" or "F" in the SEX filed. Similarly, the
STATE field may have a list box that lists all the states on it from which the user
can select the appropriate option for an employee's address.
2. Simple validation checks defined for a field to ensure correctness of entered
data to some extent. For example, in the form of Figure 16.12, a validation check
may be defined for the POSTAL CODE field to accept only six numeric
characters. With this, the field will not accept less than or more than six characters.
Similarly, a validation check may be defined for the AGE field to accept values
only in the range of 18 to 70 (both inclusive). Validation checks can also be used
to force a certain character position of a field to be a letter or numeral.
3. Automatic conversion of typed characters to upper-or lower-case. For 16.12,
this feature may be used with the STATE field. Hence, the system will accept
“mh”, “Mh”, "mH" or "MH" for the state code of Maharashtra, and will
automatically convert the entry to "MH”. This feature can greatly ease data entry
and ensure the uniformity of data.
4. Automatic formatting of certain fields. For example, in the form of Figure
16.12, this feature can be used with the TELEPHONE NO. field to automatically
display the value of this field in the specified format (with the parentheses, space,
and hyphen). That is, to enter the telephone number "(020) 5680-489", the user
only needs to type "0205680489", and the system automatically causes the form to
display "(020) 5680-489".

Entering Data

After the forms have been designed, the database is ready for entry of data. Data is
entered one record at a time. To enter the data, the user issues a command that
calls up and displays the appropriate form with blank fields. The user then keys in
the data for each field in the appropriate spaces. In this manner, the user enters the
data for the first record, then for the second record, and so on. In most database
systems, the records are automatically assigned a number as they are entered.

While entering data into the fields, the tab key or enter key is usually used to move
to the next field. Pressing enter or tab key in the last field on the form saves the
record in the database and moves to a new, blank form the next record to be
entered. In addition to using the tab or enter key to move forward through fields,
one can directly go to any field on the form at any time by clicking on it with the
mouse.

Viewing, Modifying, Deleting and Adding Records

All database systems .provide commands to view, modify, delete, or add the
records of an already established database. The command for viewing a record
enables the user to display the data in the various fields of a record in the same
screen format as that used for data entry. The user can specify the record to be
displayed by specifying its key field value. The database system usually also
provides the flexibility to the user to move between records for viewing different
records, such as "go to the first record", "go to the previous record", "go the next
record", and "go to the last record".

Many database systems also provide a facility to set up a filter that allows the user
to browse through and view only those records, which meet some criterion. For
example, in the employee database created by using the form of Figure 16.12, if
the user wants to view the records of only female employees, the user can set a
filter for the "Sex" field and only the records that contain "F" in that field will be
displayed. Note that while a filter is set, to user cannot access the records that do
not meet the filter criteria. Filters provide a quick and convenient way narrow
down the number of records the user has to work with.
The command for modifying a record enables the user to not only view but also to
update the data in the various fields of a record. To modify the contents of a
particular field of a record, the record is first displayed, then the cursor is
positioned in the field at the appropriate character position where the change is to
be made by clicking the mouse there, and then the contents of the field is
appropriately edited. The data in any other field of the record can be similarly
edited. Finally, the enter key has to be pressed for the changes to take effect. Some
database systems may prompt the user to confirm the changes before effecting the
changes and allowing the user to mo to another record.

The command for deleting a record enables the user to remove the selected record
from the database. To delete record, the user first selects the record either by
specifying its key field value or by using the facility to mo between records just as
is done in the case of viewing a record. The user then uses the delete command,
and the record is deleted. Most database systems prompt the user to confirm the
deletion of the record before deleting it. This feature prevents deletion of a record
by mistake.

The command for adding a record enables the user to add new records to the
database. When this command is enabled, the system displays a blank form and
waits for the user to enter data. The user then keys in the data for each field in the
appropriate spaces and finally presses the enter or tab key after keying the data in
the last field to save the record. On doing this, the system displays a new blank
form for the next record to be entered. If no more records are to be added, the user
can use the mouse to select the option to terminate the data entry process for
adding new records.

Searching for Desired Information

A database management system derives much of its power from the ease with
which its users can search for the desired information from the large volume of
data stored in a database. That is, users can search a database with great ease for
obtaining answers to a wide range of queries. The commonly supported features in
modern database systems for this are:
1. Find command,
2. Query language, and
3. Query By Example (QBE)
These features are briefly described below.
Find Command

The find command is used for simple database queries, like searching for records
having a particular string pattern in a field. For example, in the employee database
created by using the form of Figure 16.12, the Find command may be used to list
out the records of all employees whose last name is "SINHA". Similarly it may be
used to list out the records of all employees who belong to the city of "PUNE".

To use Find, the user has to type the string pattern to be searched and then has to
indicate which field to search in. For instance, in the above example, the user has
to type "STNHA" and indicate that this string has to be searched in the "LAST
NAME" field. The user can specify either a single field or all fields.

The Find command cannot be used for creating an elaborate set "of criteria for
complex queries. Furthermore, it can operate on only one table at a time, and the
user cannot save a specified criteria for future use.

Query Language

For handling complex quieries, all database systems support a query language.
Most of these query languages conform to the SQL standard. In SQL, the user has
to specify the criteria for search along with the fields and table (or tables) with
which to work with. The criteria for search can be built by using the relational
operators (= [equal to], > [greater than], < [less that], and combinations of these
operators) and the logical operators (AND, OR, and NOT). For example, to list out
the names of all employees whose last name starts with the letter "S", who belong
to "PUNE", and whose age is more than 40 years, the SQL query will look as
follows:

SELECT [LAST NAME], [FIRST NAME], [MIDDLE NAME]


FROM Employee
WHERE ([LAST NAME] = "S..") AND (CITY = "PUNE") AND [AGE > 40])

The keywords SELECT, FROM, and WHERE tell the SQL engine how to
interpret each part of the query statement. The SELECT keyword tells SQL which
fields are to be displayed for the records that match the criteria. The FROM
keyword tells SQL which table(s) to work with. The WHERE keyword tells SQL
the criteri for selecting the records (search criteria). The brackets [...] around some
of the field names are needed in the above example because these field names
contain spaces, and the brackets help the database to interpret each field name
correctly.
A query language can be easily learnt and used even by a non-programmer
because the complexity of a query language statement is normally more or less of
the same order as given in the above SQL statement. Furthermore, a query
language uses only a few keywords which are easy to remember and use. In fact,
SQL has only a few dozen or so basic keywords.
Other advantages of using a query language are that a query statement can be used
for creating an elaborate set of criteria for complex queries, it can operate on
multiple tables at a time, and a specified criteria can be saved for future use.

Query By Example (QBE)

Although query languages are easy to learn and use, many database developers
further simplify the job of database users of specifying search criteria by providing
front ends for the query language that collect the facts about a query from the user
and compose query language statements internally. The front end usually consists
of a form (called QBE form) and the user simply specifies the search criteria by
inputting values into the fields of this form. Again the values may be input either
by typing them or by selecting an option from a set of options provided for a
particular field, depending on how the front end has been designed to work.

The QBE form is designed to collect all necessary information from the user for
composing query language statement(s) for the search criteria. Once the user
completes the QBE form, the QBE engine automatically converts the user inputs
into suitable query language statement(s) for search processing. Hence the user is
relieved of remembering the query language keywords and using them with the
correct syntax to form queries. This front-end feature is called query by example
(QBE) and has been found to be very userful for many database users, especially
the beginners.

Creating Reports

The user of a database system can use the report generator of the database system
to assemble the output of a database query in the desired format. For this, the user
creates a report specifying the layout of the display (or printout) of the fields
requested by the user in the query. The user can also specify the titles and subtitles
for the report, the column headings for the various fields, and other elements to
make the output appear more presentable. Furthermore, the user can even specify
the output to be sorted with respect to one or more fields in the output. When the
sorting is on more than one field, the user has to specify the primary, secondary,
and tertiary key fields. A created report can be saved and used later for generating
similar reports whenever required.
Figure 16.13 shows a sample output of a report created for the employee database
whose data entry form is shown in Figure 16.12. The report is used to display (or
print) the list of employees who belong to the city of PUNE. The report contains
the last name, first name, address-1-, address-2, and telephone number of all such
employees. The report is sorted to present the list of employees in alphabetical
order of their last name.
Many database developers further simplify the job of database users by creating
commonly anticipated reports, storing them, and providing a simple graphical user
interface to select from the available reports. In this case, the user has to only
select one of the reports from the available options while outputting query results.
The user needs to create a new report only when none of the available options
meet his/her requirement. The newly created report can then be added to the list of
available Options for future use.

LIST OF EMPLOYEES WHO BELONG TO PUNE


DATE: DECEMBER 15, 2001
LAST FIRST ADDRESS-1 ADDRESS-2 TELEPHONE
NAME NAME NUMBER
Gupta Rajiv A-12, Nandanvan M. G. Road 4623-489

Murli Tapan A-ll, Vrindavan Pashan Road 5863-490


Pandey Rupa D-18, Vrindana Pashan Road 5865-323
Raina Pushpa C-15, SaritaVihar Aundh Road 5755-832
Ray Suhas B-05, Royal Villa M. G. Road 4685-635
Sen Prakash B-16, AnandPark Aundh Road 5762-333
Singh Deepak A-22, Anand Park Aundh Road 5728-628

Figure 16.13. A sample output of a report to generate a list of employees who


belong to Pune. The report is sorted to present the list in alphabetical order of their
last name.

MULTIMEDIA DATABASE SYSTEMS

Traditional database systems are suitable for the storage and management of
simple data types such as strings and numbers. With the increased use of
computers for multimedia applications over the last several years (such
applications are covered in Chapter 19), an increasing trend is to use database
technology for the storage and management of multimedia data such as text,
graphics, animation, audio and video. The nature of these data types and the
hardware and software features required in a system to handle them are given in
Chapter 19. The very nature of the multimedia data and the frequent requirement
of handling several of them together (such as audio and video data have to be
frequently handled together) make traditional database systems unsuitable for the
storage and management of multimedia data. This limitation of traditional
database systems motivated researchers to build technologies for multimedia
database systems. We saw before in this chapter that a database consists of a
collection of related data, while a database management system is a set of
programs to define, create, store, access, manage and query the database.
Similarly, we can view a multimedia database as a collection of multimedia data
items, such as text, graphics, animation, audio, and video, and a multimedia
database management system as a set of programs to define, create, store, access,
manage, and query the multimedia database.

Requirements for Multimedia Database Systems

In order to deal with multimedia data, multimedia database systems must meet
certain special requirements. These requirements are both from the perspective of
special hardware and software requirements for the computer systems to be used
for this purpose, and special database features needed for handling multimedia
data. As the hardware and software requirements for handling multimedia data
have been covered in Chapter 19, here we will discuss the database features
needed for handling multimedia data. These features are discussed below.

Support for Multimedia Data Storage and Retrieval

By their very nature, multimedia data are characterized by huge volumes. A


multimedia database should be capable of storing and managing several gigabytes
of data for small multimedia data objects such as images, and several hundred
terabytes or more if the database must hold significant amounts of video or
animation data. To meet the requirement of huge data volumes, multimedia
database systems often use a hierarchy of storage devices The storage hierarchy
typically consists of primary storage (such as random access memories),
secondary storage (such as magnetic disks), and tertiary storage (such as CD
jukeboxes, or magnetic tape libraries). In a hierarchical storage system like this,
performance of data retrieval depends on the efficiency of the migration
mechanisms used to assign the multimedia data items to the optimal level in the
storage hierarchy. The requirement of huge storage capacity is often taken care of,
to a large extent, by using data compression and decompression techniques
(described in Chapter 19).

Hence a multimedia database management system typically requires mechanisms


for handling huge data storage (possibly comprising of multi-level hierarchy),
migrating data automatically from one level to another in the storage hierarchy for
efficient data retrieval, compressing and decompressing data at the time of storage
and retrieval respectively, and transferring and distributing huge volumes of data
across the network.

Support for Multimedia Data Types


Multimedia database management systems must provide type support for common
multimedia data types. That is, it is not sufficient for a multimedia database
system to serve only as a repository of multimedia data, but the database system
must also be intelligent enough to understand the data it manages. Hence it must
have the capability to recognize and operate on several standard multimedia data
formats, such as JPEG, GIF, and MPEG. Internally, a multimedia database
management system may support a single (perhaps proprietary) data format for
each data type. For example, all types of multimedia data may be treated internally
as Blobs (binary large objects), as in simple data repositories that do not recognize
or support multimedia data formats. In this case, the multimedia database system
must have conversion routines to convert data from original format to internal
format on import to the database, and from internal format to original format on
export from the database.

Some multimedia data types such as video, audio and animation sequences also
have temporal (time-related) requirements, which have implications on their
storage, manipulation, and presentation. Similarly, images, graphics, and video
data have spatial (space-related) constraints in terms of their content. A
multimedia database system must be suitably designed to understand and meet
these additional requirements of these multimedia data types in order to handle
them successfully.

Support for Multimedia Data Relationships

A multimedia database system supports multiple data types. It is often required to


integrate two or more data types to form new composite multimedia data types and
present them to the user. Often composition and presentation of multimedia data
types requires spatial (space-related), temporal (time-related), and/or
synchronization relationships to be established among various data items of
different types. Spatial relationships organize the data's visual layout. For
example, superimposition of a text object on a specific part of a displayed
image/video object. Temporal relationships dictate the temporal layout, ensuring
the timely presentation of the right data. A simple example might be, "Play video
and audio al, and, when finished, play music ml until slide show s1 is done".
Synchronization relationships control the synchronized presentation of two or
more objects, such as maintaining lip synchronization between a movie and a
sound track. In order to take care of all such multimedia data composition and
presentation requirements, a multimedia database system should provide facilities
to define and support several kinds of relationships between multimedia data
objects.

Support for Multimedia Data Modeling


A multimedia database model must haw features to capture the static and dynamic
properties of the database contents (multimedia data). The static properties could
include the data items that make up the multimedia data, the relationships between
the data items, the data item attributes, and so on. Examples of the dynamic
properties include interaction between data items, operations on data items, user
interaction, and so forth.

There is a general consensus that the object-oriented database model is the most
suitable model for multimedia databases. In most cases, multimedia data types are
implemented as classes, having attributes and methods to support each data type.
They may be part of a large class hierarchy or framework. A framework goes
beyond a simple type definition to give more complete support for the data types,
including several methods and additional supporting classes (to import, view, and
export). While type frameworks focus on type-specific support, a database model
for multimedia databases must also have features to express several kinds of
relationships between multimedia data types for composition and presentation.
Hence, a database model for multimedia databases goes much beyond an ordinary
object-oriented database model used for modeling traditional databases.

Support for Multimedia Data Manipulation

A database management system needs to provide support for easy manipulation of


the data stored in a database. Implementing features for manipulation of simple
data types is simple, but it is not a simple task for multimedia data. Multimedia
databases require multimedia data manipulation languages (DMLs) or constructs
with features to support not only simple cut or crop operations on multimedia data,
but also to ensure that these operations adhere to the spatial, temporal, and
synchronization constraints discussed before. For example, to main the temporal
constraints, these operations must provide predictable and worst-case information
about the operation overhead. This lets the system determine if quality of service
(QoS) guarantees can be met when the operation is inserted within the data stream
between the source (database server) and the sink (the viewer).

Another concept related to data manipulation used in multimedia database


management systems is that of derived data. A modified data needs to be stored in
the database for future reference. It may either replace the old version or exist as
another version of the data. If users constantly create new versions of data, the
database size will grow rapidly. To reduce the need to store new versions of data,
a multimedia database management system stores the operations to generate the
new data (called derived data) rather than storing the new data itself.

Support for Multimedia Data Query


Some desired information can be extracted from the data stored in a database by
initiating queries. Queries contain predicates that must be satisfied by any data
retrieved. It is easy to formulate predicates and look for its matching data in
conventional databases. For example, "Find all employees for whom CITY =
"PUNE" and AGE > 40". However, this is not an easy task while dealing with
multimedia data. The three commonly used methods in existing multimedia
database systems for querying multimedia data are:

1. Manual keyword indexing. This method is currently the most popular and
straightforward method to query multimedia databases. In this method, descriptive
keywords are manually associated with every multimedia data stored in the
database. For example, keywords like “long face, sharp pointed nose, broad
moustache, no beard, fair complexion, mole on right side of chin” may be used to
describe an image data of a face. These keywords are metadata, since they are data
about multimedia data. For querying, a user specifies some keywords and the
database management system looks for images with matching keywords (the
images themselves are not queried). All images with matching keywords are
returned as the result of the query.

This method has the following limitations:


- Keyword classification is subjective since it is performed by a human.
- Exceptions will always exist, and some data may be incorrectly classified.
- Keywording is usually limited to a well-defined abstraction of the data (for
example, for every image of a face, a specific set of features is classified). This
means that if the abstraction becomes altered, then all of the data must be reviewed
again, adding new keywords as required. This could be a formidable task even for
small databases.
2. Content-based retrieval/querying (CBR/CBQ). In this method, queries are
based on the content oi multimedia data. When the data enters the database, it is
subjected to data analysis to derive certain attributes of the data (called derived
data). The derived data could include attributes such as lines, shapes, colors, and
textures from which objects could be determined at some later time. Queries
against this data then take place on the derived data. For example, "Find all
graphic objects having red triangles and green circles." Similarly, "Find all video
clips having a flying aeroplane."

To distinguish CBR on temporal data such as video and audio, from that on
images and graphics. CBR on images and graphics are called static CBR (or
SCBR), and CBR on video, animation, and audio are called dynamic CBR (or
DCBR).
With both types of CBR, specifying precise queries (exact matching) generally is
not practical. Therefore, multimedia database query languages must have features
to support fuzzy predicates such as "Looks like this" to find approximate matches.
Furthermore, since queries might not yield exact matches, we need facilities for
ranking the retrieved results according to how closely they match the given query.
With the ranking facility, the multimedia database system should also support the
facility to browse the various retrieved data items, and the facility to retrieve
similar items based on one or more of the already retrieved items.
3. Query by example (QBE). QBE in case of multimedia database systems is a
special user interface to support CBR. These interfaces allow the user to specify
the attributes of the desired object(s) by providing examples to match such as, a
drawing, photograph, action, or sound. For example, the user can" draw an
example of the type of image to be retrieved, by using shape, color, or texture.
The query manager then uses that example to find other similar images in the
database.

Support for Multimedia User Interface

The diverse nature of multimedia data requires an equally diverse user interface
for interacting with the database. Since multimedia database systems require
spatial and temporal rendering of multimedia data, the user interface design must
include features to control and devices to render the presentation. This may
include simple VCR-type control panels enabling the user to play, fast-forward,
pause, or rewind a presentation, as well as more advanced controls including
interactive data filtering, querying, and visual perspective controls. In addition, the
user interface should also have features to allow the user to control the quality of
service (QoS) parameters to adjust for resource limitations, cost of delivery, and
personal visual and aural preferences.

KNOWLEDGEDISCOVERYINDATABASES_(KDD)

The tremendous success of database technology has resulted in a huge amount of


data stored in databases in all types of industries and organizations. The amount of
data being collected and stored in databases continues to grow at a phenomenal
rate. A question that has become common for the owners of many databases is
"What do we do with so much of gathered data? Should we discard several years
old data and keep only the recent ones?" But people have realized that old data
should not be discarded because it contains some valuable information implicitly
coded within it. Organizations have begun to realize that the volumes of data they
have been storing contain an important, and largely ignored, resource - broad
knowledge about their businesses that could support better business decision-
making if properly exploited. For example, data collected in scientific databases if
properly analyzed can provide useful observations carefully collected about some
phenomenon under study; data collected in business databases if properly analyzed
can provide useful information about critical markets, competitors, and customers;
and data collected in manufacturing databases if properly analyzed can provide
useful information about performance and optimization opportunities, as well as
the keys to improving processes and troubleshooting problems.

The traditional method of turning data into knowledge relied on manual analysis
and interpretation. However, manual analysis of data is becoming impractical in
many domains as data volumes grow exponentially. Furthermore, manual analysis
of a dataset is slow, expensive, and highly subjective. When the scale of data
analysis grew beyond human capabilities, people started looking to computer
technology to automate the process. This initially resulted in the use of statistical
techniques on computers for automatic data analysis. Although the use of
statistical techniques along with file management tools once sufficed for analysis
of data in databases, the large size of modern databases, the mission-critical nature
of the data, and speed with which analyses need to be made, motivated researchers
to look into new approaches of data analysis. This ultimately resulted in a new
generation of techniques and tools for automatic analysis of huge volumes of data.
These new techniques and tools meant for extraction of knowledge from large
datasets are the subject of the field called knowledge discovery in databases
(KDD).

The KDD Process

KDD is an umbrella term describing a variety of activities for making sense of


data. It is used to describe the overall process of finding useful patterns in data,
including not only the data mining step of running specific knowledge discovery
algorithms but also pre- and post-processing of data and a host of other important
activities. The KDD process, shown in Figure 16.14, typically consists of the
following steps:
1. Data Selection. This step involves selection of a dataset or focusing on a
subset of variables or data samples on which knowledge discovery is to be
performed. This step is more significant than it may appear to be, especially when
the data is to be pulled from multiple data sources. For data selection, data often
needs to be extracted from different databases and joined, and perhaps sampled.
2. Data Preprocessing. After the selection of data, the selected data needs to be
preprocessed (cleaned). Data preprocessing/cleaning involves looking for obvious
flaws in the data and removing them, and removing records with errors or
insignificant values. Removal of flaws in the data involves collecting the
necessary information to model or account for the flaws, and deciding on
strategies for handling missing and unknown values in data fields. Data cleaning
also involves data conversions to ensure uniform representation of data in all
records. This is mainly required when the target data is derived from different
databases in which values for the same field may be represented using different
notations. For example, the sex field may be represented as 1 for male and 0 for
female in one database, and M for male and F for female in another database. The
process of data cleaning is often referred to as data scrubbing.

3. Data Transformation. After the selection and cleaning process, certain


transformations on the preprocessed data may be necessary. These range from
conversions from one type of data to another, to deriving new variables using
mathematical or logical formulae. This step also involves finding useful features
to represent the data, depending on the goal of the knowledge discovery task, and
using dimensionality reduction or transformation methods to properly summarize
the data for the intended knowledge discovery.
4. Data Mining. This step involves application of the core discovery procedures
on the transformed data to reveal patterns and new knowledge. This includes
searching for patterns of interest in a particular representational form or a set of
such representations, including classification rules or trees, regression, clustering,
sequence modeling, dependency and line analysis. All this requires selection of
method(s) to be used for searching for useful patterns in the data, such as deciding
which models and parameters may be appropriate and matching a particular data
mining method with the overall criteria of the KDD process.
5. Data Interpretation/Evaluation. This step involves interpreting the discovered
patterns, as well as possible visualization of the extracted patterns. In this step,
redundant or irrelevant patterns are removed, and powerful visualization tools are
used to translate the useful patterns into the form most understandable by the
users. The user then incorporates this knowledge into the performance system,
taking actions based on the knowledge, or simply documenting it and reporting it
to interested parties.
It may be noted from Figure 16.14 that a realistic KDD process is not simple and
linear, but thoroughly iterative and interactive. That is, the results of analysis are
fed back into the modeling and hypothesis derivation process to produce improved
results on subsequent iterations.
It may also be noted here that often people use the terms data mining and KDD
interchangeably because data mining is key to the KDD process. However, as
shown in the figure, the data mining activity (which is often considered as the core
activity of the KDD process) takes only a small part (estimated at 15% to 25%) of
the effort of the overall KDD process. The activities from data selection to data
transformation in the entire KDD process are popularly known as data
warehousing. As data warehousing and data mining have gained wide popularity,
they are separately covered below.

DATA WAREHOUSING
Data warehousing is the process of creating a repository of integrated data for the
purpose of decision support and analysis. A data warehouse is the resulting
repository of integrated data. It is a subject-oriented, integrated, time-variant, and
non-volatile collection of data in support of management's decision-making
process. The meaning of the key terms used in this definition is as follows.
1. Subject-oriented. This means that all data in a data warehouse is organized
around a specific subject area from the perspective of the end user (such as
customers, products, or accounts) to rapidly provide information relating to this
specific area. This is in contrast to most operational database systems in which
data is organized around the specific functions or activities of an application (such
as, inventory control, pay-roll, or invoicing) to enable efficient access, retrieval,
and update.
2. Integrated. Data residing in many different operational database systems is
often inconsistent in terms of coding and formats. On the other hand, even when
the data in a data warehouse is sourced from multiple database systems (or
multiple data sources), it is ensured during the data clearing process that all data in
the data warehouse is consistent and uniform, thereby eliminating the issues of
data incompatibility and portability.
3. Time-variant. In operational database systems, data is accurate at the
moment of access only. However, all data in a data warehouse is accurate at a
specific point-in-time and can be kept over a long time period. Due to this feature,
the data in a data warehouse provides a historical perspective.
4. Non-volatile. In operational database systems, data is continuously updated
on a record-by-record basis. On the other hand, in a data warehouse, data is
periodically loaded en mass and accessed later. It is never updated and retains its
integrity. Thus, data in a data warehouse is static, not dynamic. The only
operations that occur in data warehouse applications are the initial loading of data,
access of data, and refresh of data. Due to this reason, the physical design of a
data warehouse optimizes the access of data, rather than focusing on the
requirements of data update and delete processing.

Need for a Data Warehouse

A data warehouse is typically needed in an organization in one or more of the


following situations:
1. The organization has several operational database systems, but there is no
mechanism to present a holistic view of the entire gamut of information from the
data stored in these databases.
2. Same data is present on different operational database systems in different
departments about which users are not aware and/or different systems are giving
different answers to the same business questions.
3. Decision makers and policy planners are not able to obtain easily
decipherable, timely, and comprehensible information due to the non-availability
of sophisticated tools.
4. IT or business staff are spending a lot of time developing special reports for
decision makers.

Building a Data Warehouse

As shown in Figure 16.14, a data warehouse is typically built by using the


following processes:
1. Data selection
2. Data preprocessing/cleaning
3. Data transformation

A description of these processes has already been presented before. The


transformed data is structured in the form of multi-dimensional cubes in the data
warehouse so that different types of users (say from different department of an
organization) can view the same data in different form depending on their interest.
The data transformation tools are known as OLAP (On-Line Analytical
Processing) tools. Finally, data access tools allow the end users (decision makers)
to directly and easily access the desired information from the data warehouse
without the help of any IT staff. The overall architecture of a typical data
warehouse is shown in Figure 16.15.

Few Related Terminologies

Some commonly encountered terminologies while dealing with data warehousing


are briefly described below.

OLTP and OLAP

OLTP stands for On-Line Transaction Processing. It is the database architecture


designed specifically for transaction processing. OLTP describes systems that
support day-to-day business operations. These are transaction processing systems,
with many users concurrently accessing a database to insert, retrieve, update, and
delete individual records. Hence OLTP systems are optimized for the entry,
retrieval, and update of individual pieces of fact, not for the support of complex,
large-scale data analysis.

On the other hand, OLAP stands for On-Line Analytical Processing. It is the
database architecture designed specifically for effective data analysis. OLAP
describes systems that integrate data from one or more systems, then aggregates
and transforms the data to support effective decision-making. OLAP systems are
based on the concept of multi-dimensional databases and allow the users to
analyze the data using elaborate, multi-dimensional complex views.

In short, OLAP helps an organization to decide what to do and OLTP helps the
organization to do it. Figure 16.16 lists out the differences between OLTP and
OLAP systems.
Features OLTP OLAP
Stands for On-Line Transaction Processing On-Line Analytical Processing
Designed for Supporting day-to-day business Supporting effective data analysis
operations
Used for Implementing the policy decisions Making policy decisions regarding
what to do
Structure Transaction processing (entry, Complex, large scale data analysis
optimized for retrieval, and update of individual
pieces of fact)
Data model Normalized Multi-dimensional
Nature of access Insert, retrieve, update, and delete Retrieve summarized information and
records load data in batches
Access tools Query language Query language and advanced
analytical tools
Type of data Data that runs the business Data to analyze the business
stored
Nature of data Detailed Summarized and detailed
Performance Transaction throughput Query analysis throughput
metric
Figure 16.16. Differences between OLTP and OLAP systems.

Data Mart

A data mart is a subset of an organization's data warehouse. It contains data that is


of value to a specific business unit or department rather than the whole
organization. It can contain both detailed and summarized data for each specific
business areas of an organization. The data may be captured either from the
organization's operational systems or from the organization's data warehouse. A
data mart can be used to analyze data only to an extent of single business area or
department unlike the organization's data warehouse, which can be used to analyze
da across multiple business areas or departments of the organization. A data mart
can be built at a much lower cost, time, and effort than that involved in building a
data warehouse. Because of their low cost and shorter development time, data
marts start giving an early payback, thus justifying the return of investment.
Metadata

An important component of every data warehouse is the metadata. Simply stated,


metadata is data about data. It is a catalog of information that keeps track of what
is where, in the data warehouse. The metadata of a data warehouse typically
stores the definitions of source data, target data, source to target mappings,
transformation information, and update information. It is an integral part of a data
warehouse, which must be constructed along with the data warehouse.

Metadata is to a data warehouse what road map is to a navigator. It is the key to


providing users and developers with a road map to the information in the data
warehouse.

Drill Down and Roll Up Analyses

Information from a data warehouse can be extracted and viewed as per the
requirement of the end user. Both aggregated as well as detailed information can
be arrived at, depending on the analysis being carried out on the data. The process
of viewing information from a higher level (in the hierarchy) to a more detailed
view of information is known as drilling down on the data. Conversely, viewing
information from the detailed level up to a higher level is known as rolling up on
the data.

For example, suppose there is a data warehouse containing citizen data for the
whole country. Now a query analysis to find out the percentage of people area-
wise in different occupations can be carried out at city/village level, district level
(each district comprising of several cities and villages), state level (each state
comprising o several districts), and country level (the country comprising of
several states). A user may carry out drill down analysis by starting the analysis at
state level and gradually extracting this information for individual districts and
cities/villages of interest. On the other hand, a user may carry out roll up analysis
by starting the analysis at city/village level and gradually extracting aggregated
information for districts, states, and the country.

ROLAP and MOLAP

We saw that OLAP systems are designed to support effective decision-making.


The two popular architectures for OLAP systems are:
1. MOLAP (Multidimensional OLAP) and
2. ROLAP (Relational OLAP)

The analytical ability and the interface of these two architectures are the same,
what differs is the way data is physically stored. In MOLAP, data is stored in a
proprietary multidimensional database (MDDB) to be viewed in a
multidimensional manner. On the other hand, in ROLAP, data is stored in a
conventional relational database and query languages (like SQL) are used to
perform analysis on the data in the data warehouse.

The relative advantages and limitations of the two architectures are as follows:
1. Pre-identified queries are easier and faster to process with MOLAP than with
ROLAP because the multiple dimensions of the multidimensional database can be
properly structured to handle such queries efficiently.
2. Since MOLAP architecture stores the same data in the form of multiple
dimensions, the storage space requirement is more in case of MOLAP than
ROLAP. Hence MOLAP architecture has a limit on the physical database size it
can handle. ROLAP architecture is scalable up to several terabytes.
3. MOLAP architecture can handle a limited number of dimensions. ROLAP
architecture does not have any limit on the number of dimensions it can handle.
4. A proprietary multidimensional database is essential for MOLAP. ROLAP
can be implemented using conventional relational database technology.

Star and Snowflake Schemas

The two commonly used schema models for designing data warehouses are:
1. The star schema, and
2. The snowflake schema

In the star schema model, the data warehouse consists of one fact (major) table
and many dimension (minor) tables. The fact table stores the primary keys for all
dimension tables. A simple example of a star schema is shown in Figure 16.17.
Here sales is a fact table, whereas customer, product, time, and store are
dimension tables. The design appears like a star, with the fact table in the center,
and dimension tables connected to it by radial lines. The main advantages of star
schema are that it is easy to define, reduces the number of physical joins, and
provides simple metadata.

On the other hand, in the snowflake schema model, the data warehouse consists of
normalized dimension tables, by attribute level with each smaller dimension table
pointing to an appropriate aggregated fact table. Each dimension table has one key
for each level of dimension's hierarchy. The lowest key, for example, the store key
of store dimension will join store fact table, which will also have product and time
keys. An example of a snowflake schema is shown in Figure 16.18. A practical
way of designing a snowflake schema is to start with a star schema and create
snowflakes with queries. The main advantage of snowflake schema is that it
provides very good performance for queries involving aggregation.
DATA MINING

The term 'mining' literally means the operations involved in digging for hidden
treasures. Similarly, 'data mining' is used for the operations involved in digging
out critical information from within an organization’s stored data for better
decision support. It is the process of identifying interesting and useful patterns
from large databases or data warehouses. As shown in Figure 16.14, data mining is
the core part of the KDD process.

Formally, data mining is defined as "the nontrivial process of extracting implicit,


previously unknown, and potentially useful information from data". The meaning
of the key terms used in this definition is as follows:
1. Nontrivial process. The term 'process' here means that data mining involves
many steps including data preparation, search for patterns, knowledge evaluation,
and refinement - all repeated in multiple iterations. This process is 'nontrivial' in
the sense that it goes beyond simple search for quantities, and involves search for
structure, models, and patterns.
2. Implicit information. This means that the information extracted as the result of
data mining is from within an organization's stored data.
3. Previously unknown information. This means that the structures, models, or
patterns extracted as the result of data mining are a new knowledge obtained
which was previously unknown in the organization (hidden in the organization's
data).
4. Potentially useful information. This means that the information extracted as
the result of data mining is valuable and useful for the intended user or task (for
better decision support). For being useful, it should also be understandable (if not
immediately, then after some post processing).

Classification of Data Mining Algorithms

Many types of patterns normally exist in a large database. Different types of


algorithms are needed to extract different kinds of patterns. Some of the most
popular classes of algorithms used for data mining are:
1. Classification,
2. Clustering,
3. Association, and
4. Trend analysis
They are briefly described below.

Classification
The objective of classification algorithms for data mining is to classify the objects
of a database into one of several predefined categorical classes. A classification
algorithm is designed to determine the class of an object based on its attributes. In
this method, a set of objects is first taken as the training set, and every object in
this set is represented by a vector of attributes along with its class. Then a
classification function or model is constructed by analyzing the relationship
between the attributes and the classes of the objects in the training set. This
classification function or model is then applied to all objects in a database to
classify them into the already defined classes. This helps the user in having a
better understanding of the classes of the objects in the database.

A simple application of classification algorithm may be to classify the patient


records of a patient database into different classes of diseases. The personal and
clinical data of a patient's record may be used as the attributes for classification.
The classified information may be used by the hospital management personnel to
make decisions regarding, how many doctors and other staff should be employed
with certain speciality and skills, how many beds should be provided in different
sections of the hospital, what types of medicines and in how much quantity should
be stocked, and so on.

Clustering

The objective of clustering algorithms for data mining is to automatically partition


the data space of a database into a set of clusters, to which each of the objects in
the database are assigned, either deterministically or probabilistically. A clustering
algorithm is designed to identify all sets of similar objects in a database, in some
optimal fashion. The objects are so clustered that the intra-cluster (objects
belonging to the same cluster) similarities are maximized, and the inter-cluster
(objects belonging to different clusters) similarities are minimized. This is done
based on some criteria defined on the attributes of the objects. Once the clusters
are decided, the common features for objects in a cluster are summarized to form
the cluster description.

It is important to understand the difference between classification and clustering


algorithms. In the case of classification, the objects of a database are classified into
predefined classes whose number is known and fixed before the classification
algorithm is applied to the database. However, in case of clustering, the objects of
a database are clustered into clusters whose number is not known before the
clustering algorithm is applied to the database. Thus, if the same classification
algorithm is applied to two different databases, both will result in the same
predefined number of classes (say n, some of which may be null if no object mans
to them). On the other hand, if the same clustering algorithm is applied to two
different databases, both may result in different, previously unknown number of
clusters (say m and ri). Also note that the common features of objects in a class are
pre-defined in the classification algorithm, but the common features of objects in a
cluster are summarized after all the objects have been put in the cluster.

A simple application of clustering algorithm may be to cluster the customers of a


bank from the bank's customer database into several groups based on similarities
of their age, sex, income, and residence. Once clustering is done, the bank
management can examine the summarized characteristics of each subgroup,
extract significant statistics, and use them to understand its customers better and
thus provide more suitable products and customized services. Clustering
-algorithms have also been successfully applied in the area of text mining for
problems such as document indexing and topic identification in the research
setting.

Association

The objective of association algorithms for data mining is to automatically


discover association rules hidden in a database. An association rule reveals the
associative relationships among objects. For example, an association rule may
reveal that "If some object X is part of a transaction, then for some percent of such
transactions, object Y is also part of the transaction." Thus association algorithms
help in the discovery of togetherness, or the connection of objects. They are useful
in solving problems where it is important to understand the extent to which the
presence of some variables imply the presence of other variables and the
prevalence of this pattern in the entire database under examination.

An interesting and very useful application of association algorithm is market-


basket analysis, in which database of sales transactions are examined to extract
patterns that identify what items sell together, what items sell better when
relocated to new areas, and what product groupings improve department sales. For
example, a retail store may discover that people tend to buy soft drinks and potato
chips together. Store personnel then place the potato chips near the soft drinks to
promote the sale of both. They may even discount one to entice buying the other,
since these buyers now will be saving some money.

Another useful application of association algorithm is the analysis of Internet


traffic on a web site to better understand where the real demand is, what pages are
being looked collectively, and so on. Service providers can use this information to
better organize their web pages.

Trend Analysis
Several large databases have time series data (records accumulated over time) with
timestamp. For example company's sales data over several years/months, a
customer's credit card transactions over a period of time, a the fluctuations in stock
prices over a period of time, are all time series data. Such data can be easily
analyzed find certain historical trends. The objective of trend analysis algorithms
for data mining is to discover the patterns and regularities in the data evolutions
along with the dimension of time. Such patterns have often been found to be very
useful in making decisions for larger benefits in the future.
A simple application of trend analysis algorithm may be to analyze the historical
trend of fluctuations in the stock prices of various companies, to predict future
behavior. Such analysis results can be effectively used by investors in the stock
market for making investment decisions for better profitability.

Data Mining Techniques

Data mining adopts several techniques drawn from many different areas for
implementing the various types of algorithms-discussed above. Some of the most
popular techniques used for data mining are:
1. Statistics,
2. Machine learning,
3. Database-oriented,
4. Neural networks,
5. Fuzzy sets, and
6. Visual exploration
They are briefly described below. Most data mining systems employ multiple of
these techniques to deal with different kinds of data, different data mining tasks,
and different application areas.

Statistics

Statistical methods are very useful in data mining. Usually, statistical models are
built from a set of training data. An optimal model, based on a defined statistical
measure, is searched among the hypothesis space. Rules, patterns, and regularities
are then drawn from the model.

Some of the commonly used statistical methods used in data mining are:
1. Regression analysis. It maps a set of attributes of objects to an output variable.
2. Correlation analysis. It studies the correspondence of variables to each other,
such as the x2.
3. Cluster analysis. It finds groups from a set of objects based on distance
measure.
4. Bayesian network. It represents the causal relationships (what object/event is
caused by which other objects/events) among the variables in the form of a
directed graph, which is computed by using the Bayesian probability theorem.

Machine Learning

Like statistical methods, machine learning methods search for the model that is
closest (best matches) the data being tested. However, unlike statistical methods,
the searching space is a cognitive space of n attributes instead of a vector space of
n dimensions. Besides that, most machine learning methods use heuristics in the
search process.
Some of the commonly used machine learning methods used in data mining are:
1. Decision tree. Decision trees are a way of representing a series of rules for the
classification of a dataset and consist of nodes and branches. They are built using a
training set of data and are used to classify objects in a dataset. An object's class is
determined by the use of a decision tree by following the path from the root to a
leaf node. It chooses the branches according to the attribute values of the object. A
simple decision tree that may be used for classifying the employees of an
organization into groups based on their age, sex, and salary is shown in Figure
16.19. Decision trees have proved to be an attractive tool for data mining because
they are simple to implement and their intuitive representation makes the resulting
classification model easy to understand.
2. Inductive concept learning. It derives a concise, logical description of a
concept from a set of examples.
3. Conceptual clustering. It finds groups or clusters in a set of objects based on
conceptual closeness among objects.

Database-oriented

Database-oriented methods use data modeling or database specific heuristics to


exploit the characteristics of data in hand. Some of the commonly used database-
oriented methods used in data mining are:
1. Attribute-oriented induction. It generalizes primitive, low-level data into
high-level concepts by using conceptual hierarchies.
2. Iterative database scanning. It is employed to search for frequent item sets in
a transactional database. The association rules are then derived from these frequent
item sets.
3. Attribute focusing. It looks for patterns with unusual probabilities by adding
attributes selectively into the patterns.

Neural Networks
A neural network is a set of interlinked nodes called neurons. A neuron is a simple
device that computes function of its inputs. The inputs can be outputs of other
neurons or attribute values of an object. By adjusting the connection and the
functional parameters of the neurons, a neural network can be trained to model the
relationship between a set of input attributes and an output attribute. Such models
attempt to mimic brain activity by adapting the weights of the interconnections
among the neurons in the network allowing learning and memory creation to take
place. The neural network method is ideal for prediction and classification in
situations where there are a good deal of historical data available for training.

Fuzzy Sets

A fuzzy set is a set whose membership is fuzzy (based on rough match of attribute
values instead of exact matches). In conventional classification schemes, we look
for exact matches of attribute values (either true or totally false), but in systems
based on fuzzy sets, truth values can lie anywhere on the 0.0 to 1.0 interval of real
numbers. Using logical and fuzzy operators, such as AND, OR, NOT, VERY, and
SOMEWHAT, the system can make fuzzy decisions. For example,

IF (B OR C) THEN D
can be stated in a system based on fuzzy sets as
IF (SOMEWHAT B OR VERY C) THEN D
Systems based on fuzzy sets can be used to form a group of fuzzy sets for use, in
say, classification and clustering.

Visual exploration

In this method, data is transformed into visual objects (such as dots, lines, and
areas) and displayed in a two or three dimensional space. Users then interactively
explore the interesting spots and useful patterns by usual examination.

Data Warehousing and Data Mining

It is important to know the difference between data warehousing and data mining.
As can be seen from Figure 16.14, the two are related activities and can reinforce
each other. Usually, they are used in conjunction with each other. A data
warehouse sets the stage for effective data mining. Data mining can be done where
there is no data warehouse, but the data warehouse greatly improves the chances
of success in data mining.

Data mining is also different from OLAP, in that the latter is used to verify more
complex human-generated hypotheses involving multiple dimensions, produces
information summaries, and does not look for patterns. Thus OLAP is knowledge
verification, while data mining is knowledge discovery. Furthermore, OLAP is
multidimensional analysis and data mining is multi-variable, single-dimensional
analysis. For example, while OLAP answers the questions of what is the average
credit granted to customers who pay their monthly bills in full versus those who
choose to take financing, data mining gives the attributes associated with
customers who will take up financing.

OTHER RELATED CONCEPTS

Database Security
The data stored in a database is often confidential and should not be accessed by
unauthorized individuals. To prevent data stored in a database from being accessed
by unauthorized individuals, database management systems commonly support the
following security features:
1. From the point of view of access control, a database management system
normally supports two types of database users - database administrator (having
administrative access) and database user (having normal user access). A database
administrator has privileges to add new users to the database, delete one or more
users of a database, decide and enforce the various access rights of different users,
make changes to the schema, and so on. On the other hand, a normal user can only
view, modify, delete or add records; can enter data; can search for desired
information; and can create and generate reports.
2. All database management systems have password-based user authentication
mechanism. That is, all database users must enter their valid password to
successfully authenticate themselves to the database system in order to obtain
access to all or part of the data in the database.
3. Many database management systems support a program-level of security that
precludes unauthorized users from using particular programs that access the
database.
4. Many database management systems support record-level security that
prevents unauthorized users from accessing or updating certain records, such as
employee records of top-level managers in an employee database.
5. Many database management systems even support field-level security that
prevents unauthorized users from accessing or updating sensitive information in
certain fields, such as salary.
6. Many database management systems support read-only access that prevents
unauthorized users from modifying certain information (they can only view the
information).
7. All database management systems maintain a log of database accesses so that
in case of any security breach, the log records can be analyzed to detect the
possible cause of the problem.

Client-Server Database Systems


With the proliferation of computer networks, it became possible to access the data
stored in a database from any system connected to the same network on which the
system having the database was located. This gave birth to the client-server model
of database systems. As shown in Figure 16.20, in this model the database is
stored at and managed by a computer system called the database server. It runs all
important modules of the database management system that deal with the
maintenance and processing of data (called server programs). On the other hand,
systems on the same network that are primarily meant for accessing data from the
database are called database clients. They serve as front-end systems to the
database and run those modules (called client programs) of the database
management system that facilitate specification of access requests. When a
database client needs some information from the database, it makes a request to
the database server. The request travels on the network from the database client to
the database server, and the database server retrieves the requested information
from the database and sends only that information back to the client. Obviously,
there can be many database clients simultaneously connected to the same database
server and all of them can share the same database.

The client-server database system enjoys the following advantages over


conventional database systems:
1. Efficient utilization of computing resources. Separate databases are not
required for every user. Hence only the database server needs to have high
processing power and large storage. The database clients can be low-end personal
computers having low processing power and low storage capacity.
2. Since only one copy of the database is maintained for all the clients, it is
easier to maintain the integrity (consistency) of the data. That is, all database
updates need to be carried out only at one place.
3. Since only one copy of the database is maintained for all the clients, it is also
easier to ensure greater security of the data.
4. The system administration and maintenance cost is also lower because a good
system and database administrator is required only where the database server is.
With the popularity of the Internet, the4concept of database clients has now been
extended to web clients. A web client is a computer system connected to the
Internet that runs a web browser. The web browser enables a web client to
dynamically connect to a database server, download necessary client software for
becoming a database client, and make requests for information to the database
server.
The web-based database clients have proved to be better than the conventional
database clients because the deployment of the client software to hundreds of
database client machines was causing unacceptable effort. That is, seamless
upgrades of client software to new versions was either not possible or was causing
high maintenance cost.
Distributed Database Systems

Another development in the database area that was the result of the proliferation of
computer networks was that of distributed database systems. A distributed
database system seamlessly integrates multiple databases located on different
computers. These computers may be located in the same building or may be
geographically far apart (such as in different cities). Note that unlike a client-
server database system in which there is only one database, a distributed database
system has multiple databases integrated together to serve as a single database.
The main motivation behind using a distributed database system is to store data in
the most convenient places within a computer network, depending on data entry
requirements, storage capacity availability, processing load requirements, data
security requirements, and so on. For example, as shown in Figure 16.21, a
distributed database system might integrate employee databases of different
departments of an organization that are located in different cities. Each
department's database stores the records of the employees working in that
department.

A distributed database management system functions in such a manner that the


multiple distributed databases managed by it appear as a single centralized
database to the end users. That is. a user making a request would not be concerned
about the source of the data or how they are retrieved. For example, in the
distributed database system of Figure 16.21, a user can simply make a single
request for a sorted list of all female employees in the organization who are more
than 40 years old. The distributed database management system takes care of
sending this request to all the four databases, then accumulating the results, sorting
it, and presenting it to the user. All this is done internally without the knowledge
of the user making the request.

Active Database Systems

Traditional database management systems are passive in the sense that commands
are executed by the database (such as, query, update, delete) as and when
requested by the user or application program. However, some situations cannot be
effectively modeled by this pattern. For example, consider an inventory database
of a department store, which stores the current quantity of each item along with its
price and registered vendor's details. The database is directly connected to the
point-of-sale terminals of the store and as the items are sold, the inventory in the
database keeps getting updated. In order to ensure that an item never runs out of
stock in the store, it is required that an order for the item is placed as soon as its
quantity in the inventory falls below a threshold value. To do this in a passive
database system, a polling mechanism can be implemented that periodically
checks the quantity of every item in the inventory and prints a list of those whose
quantity is less than its threshold value. New orders can then be placed for the
items in this list. The main difficulty in implementing this mechanism is how to
decide the most appropriate polling frequency. If it is too high, there is a cost
penalty. On the other hand, if it is too low, the reaction may be too late to meet the
requirement of no item running out of stock. The best way to handle such an
application would be to make the system automatically place an order with the
registered vendor as soon as the current quantity of an item goes below its
threshold value. This is exactly what an active database system does. For instance,
in case of our example, the system can be designed to automatically invoke an
application when the quantity of an item goes below its threshold value. This
application prepares a purchase order for the item and sends this order to the
registered vendor on e-mail.
An active database system supports applications of the type mentioned above by
moving the reactive behavior from the application (or polling mechanism) into the
database management system. Active databases are thus able to monitor and react
to specific circumstances of relevance to an application.

An active database system must provide a knowledge model (that is, a description
mechanism) and an execution model (that is, a runtime strategy) for supporting
such applications. For this, an active database system uses rules that have up to
three components - an event, a condition, and an action. The event part of a rule
describes a happening to which the rule may be able to respond. The condition
part of the rule examines the context in which the event has taken place. The
action describes the task to be carried out by the rule if the relevant event has
taken place and the condition has evaluated to true. Such a rule is known as event-
condition-action or ECA-rule. In some cases, the event or the condition may be
ether missing or implicit. For instance, in the application discussed above, there is
no condition. Hence it is an example of event-action rule. The event is "quantity
below threshold value" and the action is "invoke the application for placing order".

Points to Remember

1. Data processing is defined as a series of actions or operations that converts


data into useful information. Thus, data is the raw material of information and just
as raw materials are transformed into finished products by a manufacturing
process, raw data is transformed into information by data processing.
2. A data processing system includes the resources such as people, procedures,
and devices that are used to accomplish the processing of data for producing
desirable output.
3. In data processing, storage of data is often conceptualized as a data storage
hierarchy, which normally consists of bit, character, field, record, file and
database.
4. Multiple related bits are combined to form a character, multiple related
characters are combined to form a field, multiple related fields are combined to
form a record, multiple related records are combined to form a file, and multiple
related files are integrated to form a database.
5. The two standard methods used in data processing for organizing data are file-
oriented approach and database-oriented approach.
6. In the file-oriented approach of organizing data, an application's data is
organized into one or more files and the application program processes the data
stored in these files to generate the desired output. A set of programs is provided
to facilitate the users in organizing, creating, deleting, updating, and manipulating
their files. All these programs together form a File Management System (FMS).
7. In the database-oriented approach of organizing data, data from multiple
related files is integrated together in the form of a database, which has the
following properties:

• It provides greater query flexibility.


• It reduces data redundancy.
• It solves data integrity (inconsistency) problem.
• It makes data independent of the application programs. That is, fields can be
added, changed, and deleted from the database without affecting existing
programs.
• It also includes data security features at database level, record level, and even
at field level to provide greater flexibility of restricted data access.
A set of programs is provided to facilitate the users in organizing, creating,
deleting, updating, and manipulating their data in a database. All these programs
together form a Database Management System (DBMS).
8. File organization deals with the physical organization of the records of a file
for the convenience of storage and retrieval of data records. The three commonly
used file organizations in business data processing applications are sequential,
direct/random, and indexed sequential.
9. File utilities consist of routines, which perform a variety of generalized
operations on data files. The operations performed by some of the commonly used
file utilities are sorting, searching, merging, copying, printing and maintenance.
10. A database model defines the manner in which the various files of a database
are linked together. The four commonly used database medels are hierarchical,
network, relational, and object-oriented.
11. The four major components of a database management system are data
definition language (DDL), data manipulation language (DML), query language
and report generator.
12. The data definition language (DDL) is used to define the structure of a
database. The database structure definition is commonly known as database
schema.
13. The data manipulation language (DML) includes all the commands that
enable the users to enter and manipulate the data.
14. The query language enables users to define their requirements for extracting
the desired information from the database in the form of queries.
15. The report generator enables the users of a database to design the layout of a
report so that it can be presented in the desired format.
16. A multimedia database is a collection of multimedia data items, such as text,
graphics, animation, audio, and video. A multimedia database management system
is a set of programs to define, create, store, access manage, and query the
multimedia database.
17. Special features needed in a multimedia database management system for
handling multimedia data include
• Support for multimedia data storage and retrieval
• Support for multimedia data types
• Support for multimedia data relationships
• Support for multimedia data modeling
• Support for multimedia data manipulation
• Support for multimedia data query and
• Support for multimedia user interface
18. The techniques and tools meant for extraction of knowledge from large
datasets are the subject of the field called knowledge discovery in databases
(KDD).
19. The KDD process typically consists of the following steps:
• Data selection
• Data preprocessing
• Data transformation
• Data mining and
• Data interpretation/evaluation
20. Data warehousing is the process of creating a repository of integrated data for
the purpose of decision support and analysis. A data warehouse is the resulting
repository of integrated data. It is a subject-oriented, integrated, time-variant, and
non-volatile collection of data in support of management's decision-making
process.
21. Data mining is the process of identifying interesting and useful patterns from
large databases or data warehouses. It is defined as the nontrivial process of
extracting implicit, previously unknown, and potentially useful information from
data.
22. A distributed database system seamlessly Integrates multiple databases
located on different computers. A distributed database management system
functions in such a manner that the multiple distributed databases managed by it
appear as a single centralized database to the end users.
23. An active database system is capable of monitoring and reacting to specific
circumstances of relevance to an application.
Questions

1. What is the difference between data and information?


2. What is meant by data processing?
3. What is a data processing system?
4. In data processing, storage of data is often conceptualized as a data storage
hierarchy. Describe the various levels of this hierarchy.
5. Give an example to illustrate the relationship between a character, a field, a
record, and a file.
6. What is a database? How is it different from a file?
7. What are the two standard methods used in data processing systems for
organizing data? Explain their relative advantages and disadvantages.
8. Describe three drawbacks that occur in traditional information processing
when separate, unrelated files are used.
9. What is the difference between a master file and a transaction file?
10. What is a key field? How is it useful?
11. What is data redundancy? Explain with an example. Now explain how the
database-oriented approach of data organization helps in reducing data redundancy
as compared to the file-oriented approach.
12. What is data integrity problem? Explain how the database-oriented approach
of data organization helps in solving this problem.
13. What is a file management system?
14. Describe the various types of files commonly supported in a typical file
management system.
15. What is the difference between an output file and a report file?
16. What is a backup file? Why is regular creation of backup files important?
17. What is meant by file organization? What are the three commonly used file
organizations in business data processing? How do we decide to use a particular
file organization for an application?
18. What is a sequential file? What is the principal storage medium used for
storing sequential files? Give examples of few applications that will benefit from
the use of sequential files.
19. What is activity ratio in file processing? What type of file organization is
suitable for (a) an application that has high activity ratio, (b) an application that
has low activity ratio? Give an example of each type c application.
20. How is a sequential file organized? How are records in a sequential file
accessed? How are these record processed?
21. What is a direct file? What is the principal storage medium used for storing
direct files? Give examples of few applications that will benefit from the use of
direct files.
22. How is a record stored in a direct file? How is it retrieved and processed?
23. Explain how are the records in a direct file physically organized so that it
becomes possible to directly access a particular record, given its key field value.
24. What is hashing? How is it useful in direct file organization? What is a
collision? How can it be taken can care of?
25. If the activity ratio is high, the use of direct files proves to be very
inefficient as compared to sequential files. Explain why.
26. Explain the basic principle used in indexed sequential file organization.
Explain the roles of data file and index file in indexed sequential file organization.
27. How are records stored in an indexed sequential file? How are they retrieved
and processed?
28. Explain how can indexed sequential files be used quite efficiently for both
sequential and direct access processing.
29. Discuss the advantages and limitations of the sequential, direct, and indexed
sequential file organizations.
30. What are file utilities?
31. Differentiate between the process of sorting and merging of files.
32. Explain the use of the following file utilities: copying, searching, printing,
and maintenance.
33. What is a database management system?
34. Give examples of how a company and an individual might use a DBMS.
35. What is a database model? Name the four commonly used database models.
Describe any two of these models.
36. Write short notes on:
(a) Hierarchical database model (c) Relational database model
(b) Network database model (d) Object-oriented database model
37. Explain the relational database model with the help of an example. List out
the main advantages of the relational database model as compared to the
hierarchical and network database models.
38. The collection of records in a database may have different sets of fields.
Discuss this statement. Give an example to illustrate this.
39. If new type of data is to be added to an existing relational database, it is not
necessary to redesign the database afresh. Discuss this statement. Give an example
to illustrate this.
40. List out some of the key features found in the object-oriented database model
that are absent in conventional database models.
41. Why is the object-oriented database model preferred for database
applications such as CAD, CAM, CAE, CASE, expert systems and multimedia
systems?
42. Explain the object-oriented database model with the help of an example.
43. What are the four major components of a database management system
(DBMS)? Describe the roles of each of these components in the overall design
and usage of a database.
44. What is a data definition language (DDL)? What is its role in the overall
design and/or usage of a database?
45. What is a data manipulation language (DML)? What is its role in the
overall design and/or usage of a database?
46. What is a query language? What is its role in the overall design and/or usage
of a database?
47. What is the difference between the data manipulation language and the
query language with respect to what each enables the user to do?
48. What is a report generator? What is its role in the overall design and/or
usage of a database?
49. A report generator can be instructed to perform arithmetic operations on the
data found in numeric fields to make a report more meaningful and useful. Discuss
this statement. Give an example to illustrate this.
50. What is a database schema? What all does it typically include about a
database?
51. What are the jobs and responsibilities of a database administrator?
52. What is a data dictionary? How is it created/updated?
53. What is SQL? How is it useful?
54. List out in proper sequence the three basic steps involved in creating a
database? Briefly describe these steps.
55. What are forms? List out some of the features that may be incorporated into
a form to facilitate easier data entry.
56. What is a filter? Explain with an example.
57. List out the three commonly supported features in modern database systems
that may be used for searching for desired information from a database.
58. Explain with an example how "Find" command can be used for making a
database query? What are the limitations of "Find" command?
59. Explain with an example how a query language can be used for making a
database query? What are the advantages of using a query language against
"Find" command?
60. What is query by example (QBE)? How does it make the job of querying a
database simpler?
61. A DBMS derives much of its power from the ease with which its users can
search for the desired information from the large volume of data stored in a
database. Discuss this statement.
62. What is a report? How is it created and used? Give an example of a sample
report.
63. What is a multimedia database system? What are the typical requirements of
multimedia database systems?
64. Discuss how the following requirements of multimedia database systems are
different from that of conventional database systems:
(a) Storage devices (c) Data manipulation
(b) Data modeling (d) Database querying
65. What is content-based retrieval/querying (CBR/CBQ)? In what type of
databases is this feature required an why?
66. What is derived data with reference to a multimedia database system? Why
is it used?
67. Explain with an example for each of the following types of relationships that
need to be taken care of in multimedia database systems:
(a) Spatial relationship
(b) Temporal relationship
(c) Synchronization relationship
68. Describe any two database query methods that are typically used in
multimedia database systems.
69. Write short notes on:
(a) Database security
(b) Active database systems
(c) Multimedia database systems
(d) Client-server database systems
(e) Distributed database systems
70. Write short notes on:
(a) Storage requirements of multimedia databases
(b) Query features in multimedia database systems
(c) Relationships among data in multimedia database systems
(d) Data manipulation features in multimedia database systems
71. Write short notes on:
(a) Data storage hierarchy
(b) Output versus report files
(c) Backup files
(d) Master versus transaction files
(e) File-oriented versus database-oriented approaches of organizing data
72. Write short notes on:
(a) Sequential file organization
(b) Direct file organization
(c) Indexed sequential file organization
73. Write short notes on:
(a) Sorting (d) Copying
(b) Searching (e) Printing
(c) Merging (f) Maintenance
74. Write short notes on:
(a) Database models (c) Components of a DBMS
(b) Database schema (d) Query features in database systems
75. What is meant by knowledge discovery in databases (KDD)? What is the
main motivation behind KDD?
76. Describe the KDD process.
77. Differentiate among the terms knowledge discovery in databases (KDD),
data warehousing, and data mining.
78. Explain the following terms with respect to the KDD process:
(a) Data selection (c) Data transformation
(b) Data cleaning (d) Data mining
79. The KDD process is interactive and iterative. Discuss.
80. What is a data warehouse? Explain its key features.
81. A data warehouse is defined as a subject-oriented, integrated, time-variant,
and non-volatile collection of data. Explain the meaning of the key terms used in
this definition.
82. When does an organization typically need to build a data warehouse?
83. Describe the process of building a data warehouse.
84. Differentiate between OLTP and OLAP.
85. What is a data mart? How is it different from a data warehouse?
86. What is metadata? How is it useful?
87. Differentiate between drill down and roll up analyses with reference to data
warehouses.
88. Differentiate between ROLAP and MOLAP. List out their relative
advantages and limitations.
89. Differentiate between star and snowflake schema models. Give an example
of each.
90. Write short notes on:
(a) Data warehousing
(b) Data mart
91. Write short notes on:
(a) OLTP versus OLAP
(b) ROLAP versus MOLAP
(c) Metadata
(d) Data mining
(c) Star versus snowflake schema
(d) Drill down versus roll up analysis
92. What is data mining? How is it useful? Explain with an example.
93. Data mining is defined as the nontrivial process of extracting implicit,
previously unknown, and potentially useful information from data. Explain the
meaning of the key terms used in this definition.
94. In data mining, different types of algorithms are needed to extract different
kinds of patterns. Briefly describe some of the most popular classes of algorithms
used for data mining.
95. Give an example each to explain the concept of classification, clustering,
association, and trend analysis used in data mining.
96. Briefly describe the following techniques used in data mining:
(a) Statistics (d) Fuzzy sets
(b) Machine learning (e) Neural networks
(c) Database-oriented (f) Visual exploration
97. Differentiate between data warehousing and data mining.
98. Explain how is data mining different from OLAP.
99. Write short notes on:
(a) Data mining techniques
(b) Data mining versus OLAP
(c) Classes of data mining algorithms
(d) Data mining and data warehousing
100. List out some of the commonly supported security features in a database
management system.
101. What is a client-server database system? Explain the roles of the database
server and database clients in such a system. List out some of the advantages of a
client-server database system over conventional database systems.
102. What is a web client in a client-server database system? How is it better
than a conventional database client?
103. What is a distributed database system? What is the main motivation behind
using such a system?
104. What is an active database system? Explain how an active database system
monitors and reacts to specific circumstances of relevance to an applicati

Chapter 17

Data Communications and Computer Networks

It is not the processing power of computers, but the power of communication


among computers that has revolutionized the information age. The marriage of
computing and data communication technologies (means and methods by which
data is transferred from one location to another) is one of the most exciting
developments in today's information age. This development has given birth to
computer networks. A computer network is a network of geographically
distributed multiple computers connected in such a way that meaningful
transmission and exchange of information become possible among them. Sharing
of information, sharing of resources (both hardware and software), and sharing of
processing load are some of the major objectives of a computer network.
The goal of this chapter is to introduce the various aspects of data communications
technology and to discuss how this technology is combined with computer
technology to form computer networks. Following are some of the important
concepts, which you will learn from this chapter:
1. Basic elements of a communication system.
2. The techniques, channels and devices used to transmit data between distant
locations.
3. The various types of computer networks.
4. Communication protocols, which are rules and procedure for establishing and
controlling the transmission of data from one computer to another.
5. Characteristics and advantages of distributed data processing.
Communication is the process of transferring messages from one point to another.
As shown in Figure 17.1, the three basic elements of any communication process
are:
1. A sender (source), which creates the message to be transmitted.
2. A medium, which carries the message.
3. A receive (sink), which receives the message.
For example, when you speak to your friend on the telephone, you are the sender.
The telephone line through which your voice is transmitted is the medium and
your friend is the receiver. This is a simple example of voice communication. The
same concept holds good for data communication also. Data communication is the
function of transporting data from one point to another. In this case, the sender and
the receiver are normally machines, in particular, computer devices (computers,
terminals, peripheral devices like line printers, plotters, disks, etc.) and the
transmission medium may be telephone lines, microwave links, satellite links, etc.
However, the messages that are transmitted are data, not voice conversations.
Thus, the electronic systems that transfer data from one point to another are called
data communication systems. Unlike computers that process and rearrange data,
data communication systems transmit data from one point to another without any
change.

DATA TRANSMISSION MODES

There are three ways, or modes, of transmitting data from one point to another. As
shown in Figure 17.2, the; are simplex, half-duplex, and full-duplex.

Simplex

If transmission is simplex, communication can take place in only one direction.


Devices connected to such a circuit are either a send-only or a receive-only device.
For example, a data collection terminal on a factory floor (send only) or a line
printer (receive only). At first thought, that might appear adequate for many types
of applications in which flow of information is unidirectional. However, in almost
all data processing applications, communication in both directions is required.
Even for a "one-way" flow of information from a terminal to a computer, the
system will be designed to allow the computer to signal the terminal that data has
been received. Without this capability, the remote user might enter data and never
know that it was not received by the computer (due to some problem somewhere).
Hence, simplex circuits are seldom used because a return path is generally needed
to send acknowledgement, control, or error signals.
Half-Duplex

A half-duplex system can transmit data in both directions, but only in one
direction at a time. Thus, a half-duplex line can alternately send and receive data.
It requires two wires. This is the most common type of transmission for voice
communication because only one person is supposed to speak at a time. It is also
used to connect a terminal with a computer. The terminal might transmit data and
then the computer responds with an acknowledgement.

Full-Duplex

In a half-duplex system, the line must be "turned-around" each time the direction
is reversed. This involves a special switching circuit and requires a small amount
of time (approximately 150 milliseconds). With high-speed capabilities of the
computer, this turn-around time is unacceptable in many instances. Also, some
applications require simultaneous transmission in both directions. In such cases, a
full-duplex system is used that allows information to flow simultaneously in both
directions on the transmission path. Use of a full-duplex line improves efficiency
as the line turn-around time required in a half-duplex arrangement is eliminated. It
requires four wires.
DATA TRANSMISSION SPEED

A term used to describe the data-handling capacity of a communication system is


bandwidth. Bandwidth is the range of frequencies that is available for the
transmission of data. A narrow range of frequencies in a communication system is
analogous to a narrow road. The flow of information in such a system - its data
transfer rate - is limited, just as is the flow of traffic in a narrow road. Wider
bandwidths permit more rapid information flow. Thus, the wider the bandwidth of
a communication system, the more data it can transmit in a given period of time.

When dealing with computer input/output devices, we think in terms of characters


per second. However, in case of data transmission, we talk in terms of bits per
second. The ASCII code uses 7 data bits per character plus a parity bit. For data
communication, additional bits are added to control the process. Although the
number of bits depends upon the communication system used, commonly
encountered systems use a total of either 10 or 11 bits per character. Hence a
terminal having a speed of 30 characters per second would probably be used with
a communication system, which transmits at the rate of 300 bits per second.

The communication data transfer rate is measured in a unit called baud. In general
usage, baud is identical to bits per second. For instance, a rate of 300 baud is 300
bits per second. Therefore the 30 characters per second terminal would be said to
operate at 300 baud. However, technically baud refers to the number of signal
(state) changes per second. Thus, using more sophisticated coding techniques, 1
baud can represent 2 or even 3 bits per second. But, with most communication
systems, 1 baud represents only one signal change per second and thus is
equivalent to 1 bit per second.
Depending on their transmission speeds, communication channels (paths) are
grouped into three basic categories -narrowband, voiceband, and broadband.

Narrowband

Narrowband or subvoice grade channels range in speed from 45 to 300 baud. They
are used for handling low data volumes and are adequate for low-speed devices.
They are used mainly for telegraph lines and low speed terminals.

Voiceband

Voiceband channels handle moderate data volumes and can transmit data at speeds
up to 9600 baud. They are so called because their major application is for ordinary
telephone voice communication. They are also used for data transmission from
slow I/O devices to CPU or from CPU to slow I/O devices. Moreover, most
remote terminals are connected to computers through voiceband channels.
Broadband

Broadband or wideband-channels are used when large volumes of data are to be


transmitted at high speed. These systems provide data transmission rates of 1
million baud or more. A company might use a broadband facility for high-speed
computer-to-computer communication or for simultaneous transmission of data to
several different devices.

As might be expected, the cost of the service increases with speed. Hence a
thorough analysis of the business needs and associated costs is necessary in
making a proper choice.

DATA TRANSMISSION MEDIA

The sender-medium-receiver concept has actually been with us for a very long
time. For example, shouting to another person does in fact involve voice
transmission over a distance via the medium air, which carries the sound wave.
Needless to say, the use of telephone lines as a transmission medium considerably
enhances the possible distance. Like telephone lines, there are several types of
physical channels (communication media) through which data can be transmitted
from one point to another. Some of the most common data transmission medium
are briefly described below.
Twisted-Pair Wire

A twisted-pair wire consists of two bunches of thin copper wires, each bunch
enclosed separately in a plastic insulation, then twisted around each other to
reduce interference by adjacent wires (see Figure 17.3). It is also called unshielded
twisted-pair (UTP) cable because other than the plastic coating around the two
individual bunches of copper wires, nothing shields it from outside interference.

UTP cables are commonly used in local telephone communication and short
distance (up to about 1 km) digital data transmission. They are normally used to
connect terminals to the main computer if they are placed at a short distance from
the main computer! Data transmission speed of up to 9600 bits per second (or
9600 baud) can be achieved if the distance is not more than 100 meters. However,
for longer distance data transmission, local telephone lines are used. In this case,
typical speed of digital signal transmission is 1200 bits per second.

UTP cables are an inexpensive medium of data transmission. They are easy to
install and use. However, their use is limited because they easily pick up noise
signals, which results in high error rates when the line length extends beyond 100
meters.
Coaxial Cable

Coaxial cables are groups of specially wrapped and insulated wire lines that are
able to transmit data at high rates. As shown in Figure 17.4, they consist of a
central copper wire surrounded by a PVC insulation over which a sleeve of copper
mesh is placed. The metal sleeve is again shielded by an outer shield of thick PVC
material. The signal is transmitted by the inner copper wire and is electrically
shielded by the outer metal sleeve.

Coaxial cables offer much higher bandwidths than UTP cables and are capable of
transmitting digital signals at rates of 10 mega bits per second. They are
extensively used in long distance telephone lines and as cables for cable TV. They
are also used by telephone companies to transmit data. In many cases, several
coaxial cables are packaged into a very large cable that can handle over 40,000
telephone calls simultaneously. Furthermore, coaxial cables have much higher
noise immunity and can offer cleaner and crisper data transmission without
distortion or loss of signal.

Microwave System
Another popular transmission media is microwave. This is a popular way of
transmitting data since it does not I incur the expense of laying cables. Microwave
systems use very high frequency radio signals to transmit data I through space.
However, at microwave frequencies, the electromagnetic waves cannot bend or
pass obstacles like I hill. Hence it is necessary that microwaves transmission be in
a line-of-sight. In other words, the transmitter and I receiver of a microwave
system, which are mounted on very high towers, should be in a line-of-sight. This
may I not be possible for very long distance transmission. Moreover, the signals
become weaker after traveling a certain distance and require power amplification.

In order to overcome the problem of line-of-sight and power amplification of weak


signals, microwave systems use repeaters at intervals of about 25 to 30 kms in
between the transmitting and receiving stations (see Figure 17.5). The first
repeater is placed in line-of-sight of the transmitting station and the last repeater is
placed in line of-sight of the receiving station. Two consecutive repeaters are also
placed in line-of-sight of each other. The data signals are received, amplified, and
retransmitted by each of these stations.

Microwave systems permit data transmission rates of about 16 Giga (1 Giga = 10 9)


bits per second. Furthermore, it can carry literally thousands of voice channels at
the same time. The link can support 250,000 voice channels. The initial
installation cost of microwave links being very high, they are mostly used to link
big cities with heavy telephone traffic between them.

Communications Satellite

The main problem with microwave communication is that the curvature of the
earth, mountains, and other structures often block the line-of-sight. Due to this
reason several repeater stations are normally required for long distance
transmission, which increases the cost of data transmission between two points.
This problem is overcome by using satellites, which are relatively newer, and
more promising data transmission media.

A communication satellite is basically a microwave relay station placed in outer


space. These satellites are launched either by rockets or by space shuttles and are
precisely positioned 36,000 kms above the equator with an orbit speed that exactly
matches the earth's rotation speed. Since a satellite is positioned in a
geosynchronous orbit, it is stationary relative to earth and always stays over the
same point on the ground. This allows a ground station to aim its antenna at a
fixed point in the sky. Each satellite can receive and retransmit signals to slightly
less than half of the earth's surface. Therefore, at least three satellites are needed in
geosynchronous orbit to provide worldwide data transmission service. Hundreds
of satellites are now in orbit to handle international and domestic data, voice, and
video communications needs. The INSAT series of Indian satellites are positioned
in such a way that they are accessible from any place in India.
As shown in Figure 17.6, in satellite communication, microwave signal at 6 GHz
or 14 GHz (read as gigahertz = 10 Hz) is transmitted from a transmitter on earth to
the satellite positioned in space. By the time this signal reaches the satellite, it
becomes weak due to 36,000 kms travel. A transponder mounted on the satellite
amplifies the weak signal and transmits it back to the earth at a frequency of 4
GHz or 1 lGHz. This signal is received at receiving station on the earth. It may be
noted that the retransmission frequency is different from the transmission
frequency in order to avoid the interference of the powerful retransmission signal
with the weak incoming signal.

A transponder can typically support 1200 voice channels each of 4800 bps or 400
digital channels each of 64Kbps data transmission rate. A satellite has many
transponders. Therefore, a single satellite has enormous data communication
capability.

The use of 4 GHz band of frequencies for transmission and retransmission of


microwave signals in a satellite communication system is called the C-band
transmission. On the other hand, the use of 11 GHz to 14 GHz band of frequencies
is called the Ku-band transmission.
In order that a large number of users can benefit from satellite communication, it
was realized that the size and cost of the receive-transmit earth stations has to be
considerably reduced so that one can easily install a private earth station. To meet
this requirement, smaller dish antennas having lower power transmitters and
receivers have been built for installation at users' sites. These dish antenna systems
are popularly known as VSATs (Very Small Aperture Terminals). The aperture
refers to the diameter of the dish antenna, which is about 1 to 2 meters.

Satellite communication systems have the following advantages:


1. A satellite, which is essentially a microwave relay station visible from any
point of a very large area, can be used for transmission and reception of data
between any two randomly chosen points in that area.
2. Data transmission costs are independent of the distance between two points as
long as the two points are within the area covered by the satellite.
3. A satellite having many transponders has enormous data communication
capability.
4. Error detection is trivial in a satellite communication system because a
transmitting station can receive back its own transmission and check whether the
satellite has transmitted the information correctly. If not, it can retransmit the data.
A satellite communication system, however, suffers from the following
disadvantages:
1. The initial cost of placing a satellite into its orbit is very high.
2. Owing to the travel of microwave signal from the sending earth station to the
satellite and then back to the receiving earth station, there is a 270 msec
propagation delay between the sender and receiver of any information.
3. The manner in which a satellite communication system works, any data sent
to the satellite for transmission automatically gets broadcast to all receiving
stations within the satellite's range. Hence, special security measures are needed to
prevent unauthorized tampering of information.
4. Atmospheric disturbances like thunder and lightening affect the K u-band
transmission of a satellite communication system. Hence C-band transmission is
recommended during bad weather.

Optical Fibers

Optical fibers are hair-thin threads of glass or plastic that can serve as a data
transmission medium as copper wires or coaxial cables. The basic difference is
that optical fibers transmit light signals instead of electrical signals. Because light
travels much faster than electricity, optical fibers can transmit data at much higher
speed than copper wires or coaxial cables, and also with no significant loss of
intensity over very long distances.

Optical fibers are made of glass, plastic or silica. Plastic fibers are least efficient,
but tend to be cheaper and more rugged. Glass or silica fibers are much smaller,
and their lower attenuation makes them more suited for very high capacity
channels.

Physically, a fiber-optic cable consists of three concentric layers - the inner core, a
cladding around it, and the outer protective coating. The inner core, which has a
diameter of 8 to 200 micrometers, consists of a bunch of optical fibers. The
cladding around it is made of plastic or glass and has a refractive index less than
that of the core. The characteristics of light propagation depend primarily on the
fiber size, its construction, the refractive index profile, and the nature of the light
source. The outer protective coating is made up of plastic.

The main components of an optical fiber communication system are shown in


Figure 17.7. Towards its source side is a converter that converts electrical signals
into light waves. The converter uses either a light-emitting diode (LED) or a laser
diode to convert electric signals into light signals. These light waves are then
transmitted over the optical fiber to the receiver's end. At the receiver's end,
another converter is placed that detects the light waves and converts them back to
electrical signals. It uses photoelectric diodes for this purpose. These electric
signals are then amplified using an amplifier and sent to the receiver.

Optical fibers have the following advantages:


1. Large bandwidth. Optical fibers can transmit massive amounts of data at very
high speed and long distances. They can have bandwidths 10 to 100 times greater
than the best coaxial cables. Their bandwidths are typically in the range of 200
MHz per Km to 3 GHz per Km. A fiber-optic cable consisting of a bunch of 10
optical fibers can accommodate more than 200,000 voice channels.
2. Low loss. As compared to electrical signals, light signals can travel at very
high speed with no significant loss of intensity over long distances. In case of use
of data transmission medium that use electrical signals for transmitting data, such
as copper wires or coaxial cables, electrical signals have to be intercepted and
amplified by repeaters at short intervals along the way. Light signals flowing
through a fiber-optic cable also must be amplified, but much less so that of
electrical signals. The implication is that signal repeaters need not be placed so
close together, which reduces the cost of an optical fiber communication system.
3. Immunity to electromagnetic interference. Because they are made of
insulators, optical fiber transmissions are not affected by magnetic or electrical
interference that can cause errors in other media, especially in twisted-pair wire.
Consequently, optical fiber communication systems have the potential for
reducing costs associated with complex error checking and correction mechanisms
that must be used with media that are affected by electromagnetic interference.
4. Small size and light weight. Fiber optic cables are much smaller in size and
lighter in weight than copper wires or coaxial cables. For example, a fiber optic
cable with a core and cladding of 0.125 mm diameter and 3.5 mm outer protective
coating has the same information carrying capacity as 900 twisted copper wire
pairs with an 8 cm outer diameter and weighing 100 times as much. Size and
weight are important factors when considering conduits running under
overcrowded city streets. In some large cities there simply is no room for
additional bulky copper wires. In this case, the use of smaller and lighter fiber
optic cables is very effective.
5. Security. Optical fiber offers increased security against unauthorized
tampering of information, since it is extremely difficult and expensive to tap
optical signals.
6. Safety and electrical insulation. Optical fibers being insulators provide
electrical isolation between the source and the destination. Hence they present no
electrical spark hazards and can be safely used in those places where it is unsafe to
use electrical conductors.
7. Analog and digital signals transmission. Both analog and digital signals can
be transmitted by the use of optical fibers. In analog transmission, the light
intensity is varied continuously. On the other hand, in digital transmission the light
source is turned on or off.

Optical fibers, however, suffer from the following disadvantages:


1. Optical fibers being fragile cannot be easily turned at sharp corners. They can
turn only those corners that have radius of at least a few inches. This creates
problem in the physical laying of the fiber optic cable.
2. Aligning and joining two fiber optic cables is not so simple and easy as for
twisted copper wire pairs or coaxial cables. It requires special equipment to do so.
Optical fibers are already being widely used for data transmission among
computers. Their advantage is making them the transmission medium of choice for
many applications involving telephones, televisions and computers.

Digital and Analog Data Transmission

Data is propagated from one point to another by means of electrical signals, which
may be in digital or analog form. As shown in Figure 17.8(a), in an analog signal,
the transmitted power varies over a continuous range, for example sound, light and
radio waves. The amplitude (v) of analog signals is measured in volts and its
frequency (f) in hertz (Hz). The higher is the frequency of the signal, the more
number of times it crosses the time axis. However, a digital signal is a sequence of
voltage pulses represented in binary form (see Figure 17.8(b)).

Computer generated data is digital whereas the telephone lines used for data
communication in computer networks are usually meant for carrying analog
signals. When digital data is to be sent over an analog facility, the digital signals
must be converted to analog form. The technique by which a digital signal is
converted to analog form is known as modulation. The reverse process, that is the
conversion of analog signal to its digital form at a destination device, is called
demodulation.

Modulation Techniques

Modulation is most often used for superimposing digital data on analog waves.
There are three forms modulation - amplitude, frequency and phase modulation.
They are discussed below.
1. Amplitude Modulation (AM). Two binary values (0 and 1) of digital data are
represented by two different amplitudes of the carrier signal keeping the frequency
and phase constant. On voice grade lines, it is used up to 1200 bits per second.
However, amplitude modulated signals are sensitive to impulse noises that arise
due to electrical sparks near the transmission line.
2. Frequency Modulation (FM). Two binary values of digital data are
represented by two differ frequencies while the amplitude and phase are kept
constant. Also known as frequency shift key, (FSK), this method is less
susceptible to error than amplitude modulation. Another advantage oft method is
that it is easier to design devices based on FSK because discrimination between
two frequencies is simpler than detecting phase changes. Thus for medium speed
communications (1200 to 2400 bits per second) the FSK scheme is preferred.
3. Phase Modulation (PM). Two binary values or digital data are represented by
the shift in phase of the carrier signal. That is, a sine wave with phase = 0°
represents a digital 1 and a sine wave with phase = 180° represents a digital 0.
This technique is more noise resistant and efficient than both amplitude
modulation and frequency modulation. For higher speed transmission of 9600 bits
per second, phase modulation is more reliable and is preferred to other methods.

Modems

The process of modulation and demodulation, that is, the conversion of digital data
to analog form and vice-versa, is carried out by a special device called a modem
(modulator/demodulator). Hence, when an analog facility is used for data
communication between two digital devices (say a terminal and a computer), two
modems are required, one near each digital device. As shown in Figure 17.9, the
digital signal generated at the terminal is converted to analog form by the
modulator of the modem placed near it. The analog signal is transmitted through
the telephone line, which is converted to digital form by the demodulator of the
modem placed near the computer. This digital data is processed by the computer.
The processed digital data is modulated to analog form and returned via the
telephone line to the terminal where the analog signals are demodulated to digital
form for display on the terminal. Thus, the modem is an essential piece of
hardware for any application in which two digital devices (say two computers)
want to communicate over an analog transmission channel (say a telephone line).
When you want to use a modem with your computer to allow it to communicate
with any other computer via the telephone line, the following factors should be
considered:
1. Transmission speed
2. Internal versus external
3. Facsimile facility
4. Error correction
5. Data compression
6. Intelligence

They are described below.


1. Transmission speed. The higher is the transmission speed of a modem, the
better it is because it can communicate faster. The transmission speeds of earlier
modems were 300, 1200, or 2400 bps (bits per second). Although modems
having transmission speed of 2400 bps can still be purchased, you will not find a
new modem that is slower than this.
For achieving transmission speeds higher than 2400 bps, many techniques are used
by modem manufacturers. In order to ensure that modems are inter-operable (can
communicate with another modem, even if it is made by a different manufacturer),
modems must conform to standards called modulation protocols. The standards for
higher transmission speeds for modems have been set by the Consultative
Committee for International Telephony and Telegraphy (CCITT). The first such
standard, called V.32, achieves transmission speeds of 9600 bps (four times the
speed of a 2400 bps modem). Another standard, called V.32bis ("bis" means in
addition to. Therefore V.32bis modems provide additional functionality to V.32
modems), allows modems to exchange data at a rate of 14400 bps. A more recent
standard, called V.34, allows modems to exchange data at a rate of 28800 bps.

Note that two modems can communicate with each other only if both follow the
same modulation protocol. That is, even if you have a modem that follows the
V.34 protocol, it cannot communicate at 28800 bps unless the modem on the other
end also follows the same protocol. To take care of this problem, most modems
are designed to have fall back feature. This feature allows a fast modem to
communicate with any slower modem. That is, when two modems attempt to
establish a connection for communication, they try to establish which protocols
they share, and then they use the fastest rate that both modems have. That is, if
two computers, one with 9600 bps modem and the other one with 14400 bps
modem, try to communicate, the data would be transferred between the two
computers at 9600 bps. Hence, a fast modem just provides you the option to
communicate faster when you can.

2. Internal versus external. Modems are of two kinds, internal and external. An
internal modem is an optional add-on circuit board that plugs into one of the
computer's expansion slots. It gets its power from the computer's expansion bus. It
is manufactured and supplied by the computer manufacturer itself.

An external modem, on the other hand, is a separate box that contains the circuitry
and logic to modulate data signals. It has its own power supply, on/off switch, and
front-panel LCDs to indicate its status. For this reason, external modems are
slightly more expensive. An external modem is connected to the computer via a
serial port.

Both the internal as well as external modems connect to the telephone system with
a standard telephone jack. However, each one has its own advantages and
disadvantages. Internal modems are slightly faster and do not have external wires
and power cords hanging around. However, as they plug into one of the
computer's expansion slots, this may be a problem if free slots are scarce. External
modems are slightly costlier and have external wires and power cords. They also
need one of the built-in serial ports of the computer, which may be a problem if
there are few other devices that also require a serial port for connectivity.
However, external modems have the flexibility of being switched off independent
of the computer, and if there is any problem with the modem hardware/software,
the computer need not be sent for repair and maintenance (only the modem can be
sent)
3. Facsimile facility. Some modems, known as FAX modems, are capable of
emulating a FAX machine in addition to performing the functions of a regular
modem. A computer equipped with a FAX modem can send/receive text and
images as a FAX to/from a remote FAX machine or another computer equipped
with a FAX modem. Like other kinds of modems, FAX modems can be external
or internal.
4. Error correction. Data transmission errors may occur while data moves on
telephone lines from one modem to another. To take care of this problem, many
of the more sophisticated modems use methods of recovering from data
transmission errors. The two standard methods (protocols) used in the design of
modems for error correction feature are MNP4 (Microcom Network Protocl
Version 4) developed by Microcom, Inc. and V.42 standard developed by CCITT.
MNP4 error-correction protocol is suitable for low-speed modems (such as those
operating at 2400 bps), whereas V.42 standard is suitable for higher-speed
modems (those operating at 9600 bps and 14400 bps).
5. Data Compression. Data compression techniques (discussed in Chapter 19)
help in reducing the volume of the data. The reduction in data volume depends
mostly on the kind of data that is being compressed and the compression algorithm
used, but can be as high as 10:1 ratio. By reducing the volume of the data to be
transmitted, modems with built-in data-compression techniques can achieve higher
throughput (can transfer more data in the same amount of time) than conventional
modems of the same speed.

Keeping interoperability in mind, the two standard data compression techniques


used in the design of modems are Microcom's MNP Class 5 specification and
CCITT's V.42bis specification. MNP5 specification is commonly used for low-
speed modems, whereas V.42bis specification is commonly used for high-speed
modems. The effective throughputs of the base data rates for the two standard
specifications are given in Figure 17.10. Note that whereas MNP5 can almost
double the transmission rate of a modem, V.42bis can almost quadruple it. Of
course, for data compression to work effectively, two communicating modems
must support a common data-compression standard. Most modems can determine
and adjust to the data compression capabilities of another modem automatically.

Base Data Rates Throughputs with'Data Compression


With MNP5 With V.42bis
2,400 bps 4,800 bps 9,600 bps
9,600 bps 19,200 bps 38,400 bps
14,400 bps 28,800 bps 57,600 bps
Figure 17.10. Effective throughputs of base data rates with the two standard data
compression specifications used in modems.

6. Intelligence. Some of the more expensive modems contain microprocessors,


storage chips, and specialized communication chips that allow them to operate and
function under a large number of different circumstances. These modems can be
programmed to automatically perform dialing, answering, and disconnecting
functions. For instance, some modems can automatically dial-up a remote
computer (auto-dial), even answer incoming calls from other computers (auto-
answer). Similarly, some modems have callback security feature that provides a
mechanism of protecting its computer from unauthorized access. These modems
include a list of valid phone number and password combinations with routines for
automatic passward check and callback. As soon as a remote computer tries to
establish a connection with a computer having this type of modem, the modem
calls back the remote computer immediately to ensure that the connection is
indeed established with the authorized remote user. Modems having such special
features are called smart modems or intelligent modems.

Analog versus Digital Transmission

If data is sent over long distances, the analog signal can become weak and
distorted. To avoid this, amplifiers are used. An afnplifier'used in a
communication system is similar to the amplifier used in a home stereo system - it
strengthens or amplifies a weak signal. Amplifiers are typically placed along
communication lines between modems.

Today, signals are also sent in digital mode. In this case modems are not needed.
When digital mode transmission is used over long distances, a repeater is used to
receive and then transmit the signal. Like amplifier, the purpose of & repeater is to
strengthen a weak digital signal over long distances.

Digital transmission of digital data is preferred to analog transmission of digital


data due to the following reasons:
1. Lower cost,
2. No modems required,
3. Higher transmission speeds possible, and
4. Lower error rate (higher reliability).

DATA TRANSMISSION SERVICES

We saw that there are many different types of data transmission media that may be
used for transmission of from one point to another. In practice, transmission of
data from one computer system to another often involves several data transmission
media, which together constitute the data transmission path between the sender
and receiver computers. For example, the data transmission path between two
computers located far apart might be constituted of copper wire, fiber optic cable
and communication satellite.

Organizations may afford to lay their own communication channels in a smaller


geographical area such as within a building or a campus. However, it becomes
impractical for organizations to do so in a larger geographical area such as
between two cities or two countries. It is also impractical for them to set their own
satellites in orbit. Therefore, organizations hire the services of data transmission
service providers (popularly known as common carriers) for their data
communications needs. VSNL (Videsh Sanchar Nigam Limited), BSNL (Bharat
Sanchar Nigam Limited) and MTNL (Mahanagar Telephone Nigam Limited) are a
few such common carriers in India, whereas AT&T, MCI, Western Union and
GTE are a few such common carriers in the USA. The various types of services
offered by the common carriers are:
1. Dial-up line. Dial-up line (also known as switched line) is a service that
operates in a manner similar to a telephone call. That is, a user of a computer
willing to communicate with a remote computer, first makes a connection request
by dialing up the remote computer. A circuit is then established between the two
computers via the telephone company's switching system. The modem attached to
the user's computer then sends and receives data over the telephone line. Just as
in the case of a telephone call, the charge for data transmission service in this case
depends on the duration of communication (circuit establishment) and the distance
between the two computers.
2. Leased line. Leased line (also known as private line or dedicated line) is a
special conditioned telephone line that directly and permanently connects two
computers. A leased line can be used for both voice and data transmissions.
Hence, if an organization has two offices in two different cities, it is often cheaper
for the organization to acquire its own leased line between the two offices which
can be used by the organization for all its voice (telephone calls) and data
transmissions between the two offices. The charges for a leased line are often
based on channel capacity (bps) and distance (air miles).

3. Integrated Services Digital Network (ISDN). The ISDN is a telephonic system


that provides digital (not analog) telephone and data services. As it supports digital
services (including digitized voice), the ISDN telephone users enjoy noise-free,
CD-quality sound. Moreover, with the ISDN, no modem is necessary because it
supports digital transmission of all types of data (including voice). This also
results in very short call set-up time between two ISDN subscribers.
The main factor that led to the development of the ISDN was the adoption of
digital transmission by many public telephone systems. Voice traffic in such
networks is encoded using pulse-code modulation at 64 Kbps. Naturally, these
networks could also carry data, resulting in integrated digital networks (IDN).

Based on the transmission and switching capabilities, the ISDNs are currently of
two types - narrowband ISDN and broad-band ISDN. Narrow-band ISDN is based
on 64 Kbps bit-streams that are combined into higher-capacity "trunks" using
time-division multiplexing. For example, 32 64-Kbps channels can be combined
into one 2-Mbps channel. The narrow-band ISDN, however, cannot support the
requirements of several types of data services, especially those needed for
multimedia applications. For example, the bandwidth required for full-definition
digital video is in the 100 Mbps range. To handle this sort of traffic, as well as
bursts of data traffic from computers, broad-band ISDN (often referred to as B-
ISDN) was introduced. B-ISDN is based on optical fibers and asynchronous time-
division multiplexing. The advantage of asynchronous time-division multiplexing
over conventional time-division multiplexing is that it allows the total bandwidth
available to be divided between contending activities in a much more flexible way.

ISDN has become so popular that a term to describe the standard analog service
has been coined: Plain Old Telephone Service (POTS).

4. Value Added Network (VAN). Some companies specialize in providing


value added data transmission service. The value added over and above the
standard services of the common carriers may include electronic mail, data
encryption/decryption, access to commercial databases, and code conversion for
communication between incompatible computers. These companies normally
lease dedicated lines of a common carrier, do value addition to enhance the
communication facilities, and then sell that enhanced service. This type of service
is popularly known as value-added network (VAN) service.

COMMUNICATION PROCESSORS

In a data communications network, the task of network designers is to select and


coordinate the network components so that the necessary data is moved to the
right place, at the right time, with a minimum of errors, and at the lowest possible
cost. A number of communication processors (typical micro- or mini- computers)
are used by network designers to achieve these goals. The functions of some of the
commonly used communication processors are briefly described below.

Multiplexers
There are many applications in which several terminals are connected to a
computer. If each terminal is operating at 300 bits per second over a
communication line (channel) that can operate at 9600 bits per second, then we see
a very inefficient operation. It has been found that the capacity of a channel
exceeds that required for a single signal. A channel is an expensive resource.
Hence for its optimal utilization, the channel can be shared in such a way so as to
simultaneously transmit multiple signals over it. The method of dividing a
physical channel into multiple logical channels, so that a number of independent
signals may be simultaneously transmitted on it, is known as multiplexing. The
electronic device that performs this task is known as a multiplexer.

A multiplexer takes several data communication lines or signals and converts them
into one data communication line or signal at the sending location. For example,
as shown in Figure 17.11, there may be 4 terminals connected to a multiplexer.
The multiplexer takes the signals from the 4 terminals and coverts them into one
large signal, which can be transmitted over one communication line. Then, at the
receiving location, a multiplexer takes the one large signal and breaks it into the
original 4 signals. Without multiplexers, you would have to have 4 separate
communication lines.

Thus, with multiplexing it is possible for a single transmission medium to


concurrently transmit data between several transmitters and receivers. There are
two basic methods of multiplexing channels. They are frequency-division
multiplexing and time-division multiplexing.

1. Frequency-Division Multiplexing (FDM). The bandwidth or range of a medium


exceeds that of any given signal. This fact is utilized for frequency-division
multiplexing. In FDM, the available bandwidth of a physical medium is split up
(divided) into several smaller, disjoint logical bandwidths. Each of the component
bandwidths is used as a separate communication line (channel). Figure 17.12
illustrates the process of FDM.

The best example of FDM is the way we receive various stations in a radio. Each
radio station is assigned a frequency range within a bandwidth of radio
frequencies. Several radio stations may be transmitting speech signals
simultaneously over the physical channel, which is "ether" in this case. A radio
receiver antenna receives signals transmitted by all the stations. Finally, the tuning
dial in the radio is used to isolate the speech signal of the station tuned. In FDM,
the signals to be transmitted must be analog signals. Thus, digital signals must be
converted to analog form if they are to use FDM.

2. Time-Division Multiplexing (TDM). The bit rate of transmission medium


always exceeds the required rate of the digital signal. This fact is utilized for time-
division multiplexing. In TDM, the total time available in the channel is divided
between several users and each user of the channel is allotted a time slice (a small
time interval) during which he/she may transmit a message. That is, multiple data
streams belonging to different users are interleaved into one data stream at the
sending end of the channel. At the receiving end, a demultiplexer is used to
reassemble individual chunks of messages sent by the users into full messages,
Figure 17.13 shows multiplexing of three different signals using TDM. The same
idea may be extended for multiplexing several signals.

Although TDM may be used to multiplex digital or analog signals, its usage is
more appropriate for digital data transmission. It is also very much suitable for
communication between computers because such communications occur in short
fast bursts. Besides this, TDM is generally more efficient as more subchannels can
be derived. It is up to the network designers to allocate time slots to different
channels. It is common to have 32 low-speed terminals connected to one high-
speed line.

Whether or not to use multiplexing usually depends upon economics. The cost of
high-speed modems and multiplexers is very high compared to the cost of low-
speed modems. However, if line costs are high due to long distances, then
multiplexing is cost effective. One serious disadvantage with multiplexing relates
to a transmission line failure. If the line goes out, everything is dead. With
individual lines only one terminal is likely to be lost.

Concentrators

A concentrator performs the same function as a multiplexer, but concentrators


have the ability to actually reduce the number of signals. For example, 100 signals
from different devices coming into the concentrator could leave as only 70 or 80
signals. The signals are concentrated to form a fewer number of signals. This
requires intelligence. This intelligence normally takes the form of microprocessors
or even minicomputers. Thus, a concentrator is basically an intelligent
multiplexer.
The advantage of using a concentrator is that devices of varying speeds and types
are connected to the concentrator, which in turn is connected to the host computer
by high-speed lines. Concentrators are especially useful where data
communication cost is high, such as long-distance international communications.
In general, concentrators are more expensive than multiplexers. For some long-
distance and international data communication applications, however, the use of
concentrators is cost justified.

Front-End Processors (FEP)


If information is to be moved from point-to-point in a computer network, then
some type of control is necessary. Network processing (also known as
communications processing) is the control of information movement between the
various locations of the network. This is a substantial task.

In the early network days, the communications processing job was handled by the
main computer. This began to place heavy additional loads on the CPU. Thus, the
ability of the computer to do information processing, i.e., the job for which it was
intended, was seriously degraded. As a result, manufactures introduced the front-
end processor. This is a separate processor designed specifically to handle the
network processing task (see Figure 17.14).

A front-end processor is usually installed in the same location as the main


computer. Its primary purpose is to offload communications processing task from
the main computer, thereby the main computer can be dedicated for applications
and data processing jobs. It virtually acts like an intelligent terminal or like a
secretary/receptionist to the main computer.

ASYNCHRONOUS AND SYNCHRONOUS TRANSMISSION

Data transmission on a communication line is normally carried out in two different


modes - asynchronous and synchronous. Asynchronous transmission is often
referred to as start-stop transmission because of its nature, that is, the sender can
send a character at any convenient time and the receiver will accept it. This is the
characteristic of many terminals. When a terminal is connected to a computer and
an operator manually presses keys on the terminal, the time spent between
successive keystrokes would vary. Thus in asynchronous transmission, data is
transmitted character by character at irregular intervals.

In order to enable the receiver to recognize a character when it arrives, the


transmitter "frames" each character. Preceding the character is a start bit and
following the character will be one or two (depending upon the system) stop bits.
Thus for the 7-bit ASCII code, for each character the transmitter transmits the
seven character bits, one parity bit, one start bit, and one or two stop bits for a total
of either 10 or 11 bits. The concept of the character framed by start-stop bits is
illustrated in Figure 17.15(a). Note that in asynchronous transmission, the time
between transmitting any two characters can be zero or of any length. Thus the
computer might send a continuous stream of characters to the terminal, or
characters keyed in by a terminal operator can be sent to the computer as and when
the operator keys in a new character.
Asynchronous transmission is well suited to many keyboard type terminals. The
advantage of this method is that it does not require any local storage at the
terminal or the computer as transmission takes place character by character. Hence
it is cheaper to implement. However, since the transmission line is idle during the
time intervals between transmitting characters, the idle time of the transmission
line may be a matter of concern if the line cost is high. Even though less efficient
than synchronous transmission, it is also used with devices such as printers simply
to reduce cost.

Synchronous mode of data transmission involves blocking a group of characters in


somewhat the same way records are blocked on magnetic tape. Each block is then
framed by header and trailer information. The header consists of synchronizing
information, which is used by the receiving device to set its clock in synchronism
with the sending end clock. The header also contains information to identify the
sender and the receiver. Following the header is a block of characters that contains
the actual message to be transmitted [see Figure 17.15(b)]. The number of
characters in a block may be variable and may consist of hundreds of characters.
The message characters in the block are terminated by a trailer. The trailer
contains an end of message character followed by a check character to aid
detection of any transmission error. Thus with synchronous transmission, entire
blocks of characters are framed and transmitted together.

Synchronous transmission is well suited to remote communication between a


computer and such devices as buffered terminals and printers. Here the logical
data block length would be 80 or 132 characters. It is also used for computer-to-
computer communication.
The primary advantage of synchronous transmission is its efficiency. It enables the
use of much higher data rates than with asynchronous transmission because it
eliminates the need for individual start-stop bits on each character. The main
disadvantage of synchronous transmission is the need for local buffer storage at
the two ends of the line to assemble blocks and also the need for accurately
synchronized clocks at both ends. As a result, synchronous equipment usually
costs more.

SWITCHING TECHNIQUES

In its simplest form, data communication takes place between two devices that are
directly connected by some form of transmission medium - twisted wires, coaxial
cables, microwave and satellite links. Often however, it is impractical or
uneconomical for two devices to be directly connected. Instead, communication is
achieved by transmitting data from source to destination through a network of
intermediate nodes. These nodes provide a switching facility that moves data from
node to node until the destination is reached. There are three different methods of
establishing communication links between the sender and receiver in a
communication network, namely, circuit switching, message switching and packet
switching. They are briefly described below.

Circuit Switching

It is the simplest method of data communication in which a dedicated physical


path is established between the sending and receiving stations through the nodes of
the network. This method is used to connect two subscribers for a telephone
conversation. Network computers and terminals connected to a telephone network
also use this method of establishing communication path among them.

The method of circuit switching is illustrated in Figure 17.16. Each rectangle


represents a switching node of the communication network. When a message is to
be communicated, a physical path is established between the sending station and
the receiving station by physically connecting the incoming and outgoing line of
each of the intermediate switching nodes that fall on the path. Once a circuit is
established between the two stations, it is exclusively used by the two parties and
the dedicated physical link between both ends continues to exist until the call is
terminated either by the sender or the receiver. As soon as the connection is
terminated by one of the two stations, the dedicated resources are deallocated and
can now be used by other stations also.

Thus circuit switching involves three phases - circuit establishing, data transfer
and circuit disconnection. It is used in the Public Switched Telephone Network
(PSTN).
Advantages

1. The main advantage of circuit switching is that once the circuit is established,
data is transmitted with no delay other than the propagation delay, which is
negligible (typically of the order of 6 msec per 1000 kms).
2. It is suitable for low-speed communication between a terminal and a computer
because the method is simple and requires no special facilities.
3. Since a dedicated continuous transmission path is established, the method is
suitable for long continuous transmissions.
4. Since the full capacity of the circuit is available for exclusive use by the
connected pair of nodes, the transmission time required to send a message can be
known and guaranteed after the circuit has been successfully established. Hence
it is the preferred method for transmission of voice and real-time data.

Disadvantages
1. Prior to actual data transfer, the time required to establish a physical link
between the two stations is of the order of 10 sees or more depending on the
distance. For many computer applications, such as point of sale verification, this
elapse time is too large and unsuitable.
2. Since the physical link is a dedicated one, the channel capacity is dedicated to
one source for the entire duration of a connection. Hence, the network resources
are not properly utilized.
3. Since communications between computers occur in short fast bursts with long
silent periods in between (during which the communication line is not used), the
method proves to be very uneconomical when used for communication between
computers that are connected using expensive, high-speed transmission lines.

Message Switching

A message is a logical unit of information and can be of any length. In this


method, if a station wishes to send a message to another station, it first appends
the destination address to the message. After this, the message is transmitted from
the source to the destination either by store-and-forward method or broadcast
method.

As shown in Figure 17.17, in the store-and-forward method, the message is


transmitted from the source node to an intermediate node. The intermediate node
stores the complete message temporarily, inspects it for errors, and transmits the
message to the next node based on an available free channel and its routing
information. The actual path taken by the message to its destination is dynamic as
the path is established as it travels along. When the message reaches a node, the
channel on which it came is released for use by another message. In Figure 17.16,
if a message is to be transmitted from station A to station B, it may take either path
1-2-3-4 or 1-5-4 depending on the availability of a free output path at that
particular moment.

As shown in Figure 17.18, in the broadcast method, the message is broadcast over
a common medium known as broadcast channel. All the stations check the
destination address of each message as they pass by and accept only those
addressed to them. The routing delays inherent in store-and-forward method are
eliminated in this method. However, this method requires that all stations must be
connected to the broadcast channel.

Advantages

1. In message switching, no physical connection is required between the source


and the destination as required in case of circuit switching.
2. As channels are used only when, messages are transmitted, this method uses
the channels very effectively.

Disadvantages

1. As the message length is unlimited, each switching node must have sufficient
storage to buffer messages. In many cases, this storage space may be under-
utilized.
2. In message switching, a message is delayed at each node for the time required
to receive the message plus a queuing delay waiting for an opportunity to
retransmit the message to the next node.
3. The method is too slow for interactive/real-time applications. Hence, it is used
when message delays are not critical.

Packet Switching

This method works in a similar fashion as message switching. However, it


overcomes the disadvantages of message switching technique because in this
method routing is done on 'packet' basis and not on 'message' basis.

A message is split up into 'packets' of a fixed size (of the order of one or few
thousand bits). Besides the block of data (part of a message) to be sent, a packet
has a header that contains the destination and source addresses, control
information, message number, number of current and last packet, synchronization
bits, acknowledgement and error checking bytes, etc. Like message switching, the
packets may be routed from the sender node to the destination node either by
store-and-forward method or by broadcast method. In the store-and-forward
method, the packets are stored temporarily at the intermediate nodes for error
recovery purposes and are routed to the next node based on an available free
channel. The actual path taken by the packet to its destination is dynamic as the
path is established as it travels along. Thus, it is possible that different packets of
the same message can be routed across different paths leading to the same
destination depending upon line availability and congestion.

Packet switching is used in the X.25 public packet network and the Internet.

Advantages

1. Unlike messages, packets are of small and fixed size. Hence the storage
requirement for buffering the packets at intermediate nodes is minimal.
2. Since the routing is done on packet basis, the intermediate nodes do not have
to wait for the entire message, hence the transmission is very fast.
3. The method is fast enough for interactive/real-time applications.
4. It is most suitable for "bursty" computer-to-computer communication and is
widely used in wide area networks.

Disadvantages

1. Due to the need to buffer each packet at every intermediate node and to
reassemble the packets at the destination node, the overhead incurred per packet is
large.
2. There is no guarantee of how long it takes a message to go from its source
node to its destination node because the time taken for each packet depends on the
route chosen for that packet, along the with volume of data being transferred along
that route.

ROUTING TECHNIQUES

When multiple paths exist between the source and destination nodes of a packet,
any one of the paths may be used to transfer the packet. For example, in the
network configuration of Figure 17.17, there are two paths between nodes A and
B: 1-5-4 and 1-2-3-4 and any one of the two may be used to transmit a packet
from node A to B. The selection of the actual path to be used for transmitting a
packet is determined by the routing technique used. An efficient routing technique
is crucial to the overall performance of the network. A good routing algorithm
should make routing decisions as fast as possible and should be easily
implementable in hardware. Furthermore, the decision process usually should not
require global state information of the network because such informal gathering is
a difficult task and creates additional traffic in the network. Routing algorithms are
usually classified based on the following two attributes:
1. Place where routing decisions are made, and
2. Time constant of the information upon which the routing decisions are based.
Note that routing techniques are not needed in LANs (described later in this
chapter) because the sender of a message simply puts the message on the
communication channel and the receiver takes it off from the channel. There is no
need to decide the path to be used for transmitting the message from the sender to
the receiver.

Place Where Routing Decisions are Made

Based on this attribute, routing algorithms may be classified into the following
three types [Reprinted, with permission, from the book titled Distributed
Operating Systems: Concepts and Design by Pradeep K. Sinhi ©1997 IEEE]:

1. Source routing. In this method, the source node selects the entire path before
sending the packet. That is, all intermediate nodes via which the packet will be
transferred to its destination are decided at the source node of the packet, and this
routing information is included along with the packet. The method requires that
the source node must have fairly comprehensive information about the network
environment. However, the routing decision process is efficient because the
intermediate nodes need not make any routing decision. A drawback of the
method is that the path cannot be changed after the packet has left the source node,
rendering the method susceptible to component failures.
2. Hop-by-hop routing. In this method, each node along the path decides only
the next node for the path. That is, each node maintains information about the
status of all its outgoing channels and the adjacent nodes and then selects a
suitable adjacent node for the packet and transmits it to that node. The routing
decisions are typically based on the channel availability and the readiness of the
adjacent nodes to receive and relay the packet. The method requires that each
node must maintain a routing table of some sort. However, as compared to the
source routing method, this method makes more efficient use of network
bandwidth and provides resilience to failures because alternative paths can be used
for packet transmissions.
3. Hybrid routing. This method combines the first two methods in the sense that
the source node specifies only certain major intermediate nodes of the complete
path, and the subpaths between any two of the specified nodes are decided by the
method of hop-by-hop routing.

Static and Dynamic Routing

Depending on when the information used for making routing decisions is specified
and how frequently it is modified, routing algorithms are classified into the
following two types [Reprinted, with permission, from the book titled Distributed
Operating Systems: Concepts and Design by Pradeep K. Sinha. © 1997 IEEE]:
1. Static routing. In this method, routing tables (stored at the nodes) are set once
and do not change for very long periods of time. They are changed only when the
network undergoes major modifications. Static routing is also known as fixed or
deterministic routing. Static routing is simple and easy to implement. However, it
makes poor use of network bandwidth and causes blocking of a packet even when
alternative paths are available for its transmission. Hence, static routing schemes
are susceptible to component failures.
2. Dynamic routing. In this method, routing tables are updated relatively
frequently, reflecting shorter-term changes in the network environment. Dynamic
routing strategy is also known as adaptive routing because it has a tendency to
adapt to the dynamically changing state of the network, such as the presence of
faulty or congested channels. Dynamic routing schemes can use alternative paths
for packet transmissions, making more efficient use of network bandwidth and
providing resilience to failures. In dynamic routing, however, packets of a
message may arrive out of order at the destination node. This problem can be
solved by appending a sequence number to each packet and properly reassembling
the packets at the destination node.

NETWORK TOPOLOGIES

A network is a logical extension of a data communication system. In a computer


network, two or more computers (often referred to as nodes) are linked together
with carriers and data communication devices for the purpose of communicating
data and sharing resources. The term network topology refers to the wav in which
the nodes of a network are linked together. It determines the data paths that may
be used between any pair of nodes in the network. Although the number of
possible network topologies is seemingly limitless, the four major ones are the star
network, the ring network, the completely connected network, and the multi-
access bus network.

The choice of network topology for installing a computer network depends upon a
combination of factors such as:
1. The desired performance of the system.
2. The desired reliability of the entire system.
3. Size (number of nodes and their geographical distribution) of the system.
4. Expandability of the system.
5. Cost of the components and services required to implement the network.
6. Availability of communication lines.
7. Delays involved in routing information from one node to another.

Star Network

Figure 17.19 shows the star arrangement of a computer network. In this


configuration, multiple computers are connected to a host computer. That is, the
computers in the network are not linked directly to each other and can
communicate only via the host computer. The routing function is performed by the
host computer, which centrally controls communication between any two other
computers by establishing a logical path between them.
.
Advantages

1. Star topology has minimal line cost because only n-1 lines are required for
connecting n nodes.
2. Transmission delays between two nodes do not increase by adding new nodes
to the network because any two nodes may be connected via two links only.
3. If any of the local computers fails, the remaining portion of the network is
unaffected.

Disadvantage

1. The system crucially depends on the central node. If the host computer fails,
the entire network fails.

Ring Network

Figure 17.20 shows the circular or ring arrangement of a computer network. In this
configuration, each computer in the network has communicating subordinates, but
within the ring there is no master computer for controlling other computers. A
node receives data from one of its two adjacent nodes. The only decision a node
has to take is whether the data is for its own use or not. If it is addressed to it, it
utilizes it. Otherwise, it merely passes it on to the next node.

Advantages

1. The ring network works well where there is no central-site computer system.
2. It is more reliable than a star network because communication is not
dependent on a single host computer. If a link between any two computers breaks
down, or if one of the computers breaks down, alternate routing is possible.

Disadvantages
1. In a ring network, communication delay is directly proportional to the number
of nodes in the network. Hence addition of new nodes in the network increases the
communication delay.
2. The ring network requires more complicated control software than star
network.

Completely Connected Network

As shown in Figure 17.21, a completely connected network has a separate physical


link for connecting each node to any other node. Thus, each computer of such a
network has a direct dedicated link, called a point-to-point link, with all other
computers in the network. The control is distributed with each computer deciding
its communication priorities.

Advantages

1. This type of network is very reliable, as any link breakdown will affect only
communication between the connected computers.
2. Each node of the network need not have individual routing capability.
3. Communication is very fast between any two nodes.

Disadvantage

1. It is the most expensive network from the point of view of link cost. If there are
n nodes in the network, then (n-l)/2 links are required. Thus, the cost of linking the
system grows with the square of the number of nodes.

Multi-access Bus Network

Figure 17.22 shows a multi-access bus network. In this type of network, a single
transmission medium is shared by all nodes. That is, all the computers are attached
to the same communication line (channel). When a particular computer wants to
send a message to another computer, it appends the destination address to the
message and checks whether the communication line is free. As soon as the line
becomes free, it broadcasts (place) the message on the line. As the message travels
on the line, each computer checks whether it is addressed to it. The message is
picked up by the addressee computer, which sends an acknowledgement to the
source computer and frees the line. This type of network is also known as
'multipoint' or 'multidrop' or 'broadcasting' network. It is appropriate for use in a
local area network where a high-speed communication channel is used and
computers are confined to a small area. It is also appropriate when satellite
communication is used as one satellite channel may be shared by many computers
at a number of geographical locations.

Advantages

1. The main advantage of a multi-access bus network is the reduction in physical


lines.
2. The failure of a computer in the network does not affect the network
functioning for other computers.
3. Addition of new computers to the network is easy.

Disadvantages
1. All computers in the network must have good communication and decision-
making capability.
2. If the communication line fails, the entire system breaks down.

Hybrid Network
Different network configurations have their own advantages and limitations.
Hence in reality, a pure star or ring or completely connected network is rarely
used. Instead, an organization will use some sort of hybrid network, which is a
combination of two or more different network topologies. The exact configuration
of the network depends on the needs and the overall organizational structure of the
company involved. In some cases, the hybrid network may have components of
star, ring, and completely connected networks. A typical hybrid network of this
type is shown in Figure 17.23.

NETWORK TYPES (LAN, WAN AND MAN)

Networks are broadly classified into two types: local area networks (LANs) and
wide-area networks (WANs). The WANs are also referred to as long-haul
networks. The key characteristics1 that are often used to differentiate between
these two types of networks are as follows [Reprinted, with permission, from the
book titled Distributed Operating Systems: Concepts and Design by Pradeep K.
Sinha. © 1997 IEEE]:
1. Geographic distribution. The main difference between the two types of
networks is the way in which they are geographically distributed. A LAN is
restricted to a limited geographic coverage of a few kilometers, but a WAN spans
greater distances and may extend over several thousand kilometers. Therefore,
LANs typically provide communication facilities within a building or a campus,
whereas WANs may operate nationwide or even worldwide.
2. Data rate. Data transmission rates are usually much higher in LANs than in
WANs. Transmission rates in LANs usually range from 0.2 Megabit per second
(Mbps) to 1 Gigabit per second (Gbps). On the other hand, transmission rates in
WANs usually range from 1200 bits per second to slightly over 1 Mbps.
3. Error rate. Local area networks generally experience fewer data transmission
errors than WANs do. Typically, bit error rates are in the range of 10-5 to 10-7 with
WANs.
4. Communication link. The most common communication links used in LANs are
twisted pair, coaxial cable, and fiber optics. On the other hand, since the sites in a
WAN are physically distributed over a large geographic area, the communication
links used are by default relatively slow and unreliable. Typical communication
links used in WANs are telephone lines, and microwave links satellite channels.
5. Ownership. A LAN is typically owned by a single organization because of its
limited geographic coverage. A WAN, however, is usually formed by
interconnecting multiple LANs each of which may belong to a different
organization. Therefore, administrative and maintenance complexities and costs
for LANs are usually much lower than for WANs.
6. Communication cost. The overall communication cost of a LAN is usually
much lower than that of a WAN. The main reasons for this are lower error rates,
simple (or absence of) routing algorithms, and lower administrative and
maintenance costs. Moreover, the cost to transmit data in a LAN is negligible
since the transmission medium is usually owned by the user organization.
However, with a WAN, this cost may be very high because the transmission media
used are leased lines or public communication systems, such as telephone lines,
microwave links, and satellite channels.
Networks that share some of the characteristics of both LANs and WANs are
sometimes referred to as metropolitan area networks (MANs). The MANs usually
cover a wider geographic area (up to about 50 km in diameter) than LANs and
frequently operate at speeds very close to LAN speeds. The main objective of
MANs is to interconnect LANs located in an entire city or metropolitan area.
Communication links commonly used for MANs are coaxial cable and microwave
links.
Ethernet is the most widely used LAN technology because it is relatively fast and
economical. It was introduced by DEC (Digital Equipment Corporation), Intel,
and Xerox in 1980, and subsequently, a slightly modified version of it was
adopted by the IEEE as a standard LAN technology. The network topology used
for Ethernet is multi-access bus topology. The communication medium used is
low-loss coaxial cable having a data transfer rate of 10 Mbps. A message is
transmitted from one node to another by breaking it up into packets (called frames
in Ethernet) and then by broadcasting the packets to the bus. An address
designator is associated with each packet. As a packet travels on the bus, each
node checks whether the packet is addressed to it and the addressee node picks up
the message.
The ARPANET of the Advanced Research Projects Agency of the U.S.
Department of Defense was the first WAN. It connected about 40 universities and
research institutions throughout the United States and Europe with about 50
computers ranging in size from mini-computers to supercomputers. ERNET
(Education and Research NETwork) is a WAN, which links several education and
research institutions in India. NICNET (National Informatics Centre's NETwork)
is a WAN, which links several offices of NIC (National Informatics Centre) of
India up to district headquarters. Indian Railways also has its own WAN which
links its booking offices across the nation facilitating the passengers to book
tickets on most major trains from anywhere in India. Similarly, international
airlines worldwide also link their computers to form a WAN that facilitates
booking of flight tickets on international flights. SWIFT is a WAN that
interconnects the computers of International banks to reconcile their accounts and
for electronic funds transfer. The Internet (described in the next chapter) is a WAN
that encompasses many LANs and computers across the world.

COMMUNICATION PROTOCOLS

A protocol is a set of formal operating rules, procedures, or conventions that


govern a given process. A communication or network protocol, therefore,
describes the rules that govern the transmission of data over communication
networks. These rules provide a method for orderly and efficient exchange of data
between the sender and the receiver and for the proper interpretation of controls
and data transmitted as raw bits and bytes. These rules are embedded in the data
communication software.

Roles of a Communication Protocol

In any computer network, a communication protocol normally performs the


following functions for the efficient and error-free transmission of data. It has a
separate set of rules (implemented in software) for performing each of these
functions.
1. Data sequencing. It refers to breaking a long message into smaller packets of
fixed size. Data sequencing rules define the method of numbering (or
sequencing) packets to detect loss or duplication of packets, and to correctly
identify packets that belong to the same message.
2. Data routing. Routing algorithms are designed to find the most efficient paths
between a source and a destination. They can handle varying degree of traffic on
the present network configuration with optimal time utilization.
3. Data formatting. Data formatting rules define which group of bits or
characters within a packet constitutes data, control, addressing, or other
information.
4. Flow control. A communication protocol also prevents a fast sender from
overwhelming a slow receiver. It ensures resource sharing and protection against
traffic congestion by regulating the flow of data on the communication lines.
5. Error control. These rules are designed to detect errors in messages and to
ensure transmission of correct messages. The most common method for
correcting errors is to retransmit the erroneous message block. This method
requires coordination between the sender and the receiver nodes so that the block
having error is discarded by the receiver node and is retransmitted by the sender
node.
6. Precedence and order of transmission. These rules condition all nodes about
when to transmit their data and when to receive data from other nodes. It is
ensured that all nodes get a chance to use the communication lines and other
resources of the network depending upon the priorities assigned to them.
7. Connection establishment and termination. These rules define how connections
are established, maintained and terminated when two nodes of a network want to
communicate with each other.
8. Data security. Providing data security and privacy is also built into most
communication software packages. It prevents access of data by unauthorized
users.
9. Log information. Several data communication software are also designed
to develop log information, which consists of all jobs and data communications
tasks that have taken place. Such information is normally used for charging the
various users of the network based on their usage of the network resources.

Concept of Layered Protocols in Network Design

Most modern computer networks are designed in a modular or structured fashion


for easy and efficient handling of the system. They are normally split up into a
series of modules and are logically composed of a succession of layers or levels.
Each layer offers certain services to the higher layers, shielding those layers from
the details of how the offered services are actually implemented. Each layer has its
own set of protocols. A particular layer of one machine communicates only with
the corresponding layer of another machine using the protocols of this layer.

The main reasons for using the concept of layered protocols in network design are
as follows:
1. The protocols of a network are fairly complex. Designing them in layers
makes their implementation more manageable.
2. Layering of protocols provides well-defined interfaces between the layers, so
that a change in one layer does not affect an adjacent layer. That is, the various
functionalities can be partitioned and implemented independently so that each one
can be changed as technology improves without the other ones being affected. For
example, a change to a routing algorithm in a network control program should not
affect the functions of message sequencing, which is located in another layer of
the network architecture.
3. Layering of protocols also allows interaction between functionally paired layers
in different locations. This concept aids in permitting the distribution of functions
to remote nodes.
The terms protocol suite, protocol family, or protocol stack are used to refer to the
collection of protocols (of layers) of a particular network system.

Network Interface Cards

Network interface card, often referred to as NIC or network card, is a hardware


device that allows a computer to be connected to a network, both functionally and
physically. The NIC is a printed circuit board that is installed on to one of the
expansion slots of the computer and provides a port on the back of the computer to
which the network cable is attached. Thus, the NIC is one of the several add-on
cards (expansion boards) that the computer may have.

As the NIC is connected directly to the computer's I/O bus, the design of a NIC is
specific to the computer's I/O bus hardware, the computer's operating system, and
the network's communication protocol. The network's communication protocol is
embedded in the NIC's ROM. Thus, there are different NICs for different networks
even for the same computer. For example, if a computer is to be connected to an
Ethernet LAN, it must be equipped with an Ethernet network card, and if it is to be
connected to an ATM network, it must be equipped with an ATM network card.

In addition to the communication software embedded in the NIC's ROM, the


computer also requires network software that tells the computer how to use the
NIC. Both the network software and the NIC have to adhere to the communication
protocol of the network to which the computer is to be connected.

The OSI Model

The initial computer networks had their own set of standards and conventions that
were quite hardware oriented. Each manufacturer used to develop their own
communication protocols for their networks. For example, IBM launched SNA
(Systems Network Architecture) in 1974. Similarly, DEC (Digital Equipment
Corporation) launched its network in 1980 for use on the DEC range of computers.
The architecture of DECNET (Digital Equipment Corporation Network) is known
as DNA (Digital Network Architecture). Like SNA, it is a private network
architecture oriented only to DEC hardware. Other telecommunication protocols
are BNA (Burroughs Network Architecture) by Burroughs Incorporation, DSN
(Distributed Systems Network) by Hewlett Packard, PRIMENET (Prime
Computers Network) by Prime Incorporation, etc. Thus the data communication
protocols of one network were not compatible with any other network. Moreover,
standards of the same network architecture also kept changing from time to time.
For example, earlier versions of SNA were not compatible with its subsequent
versions. Such incompatibilities started creating bottleneck in the efficient and
proper utilization of network resources.
This problem was recognized by the International Standards Organization (ISO),
which established a subcommittee to develop an international standard on network
architectures. The result was the Open System Interconnection (OSI) model,
which is a framework for defining standards for linking heterogeneous computers
in a packet switched network. Thus the standardized OSI protocols made it
possible for any two heterogeneous computer systems, located anywhere in the
world, to easily communicate with each other.

The OSI model is also designed in a highly structured way. Its architecture is
shown in Figure 17.24. It is a seven-layer architecture in which a separate set of
protocols is defined for each layer. Thus each layer has an independent function
and deals with one or more specific aspects of the communication. The roles of the
seven layers are briefly described below. This description material has been
reprinted, with permission, from the book titled Distributed Operating Systems:
Concepts and Design by Pradeep K. Sinha. [© 1997 IEEE].
In actual implementation, of the seven layers, the first three layers are likely to be
in hardware, the next two layers in the operating system, the presentation layer in
library subroutines in the user's address space, and the application layer in the
user's address space, and the application layer in the user’s program.

Physical Layer

The physical layer is responsible for transmitting raw bit streams between two
nodes. That is, it may convert the sequence of binary digits into electric signals,
light signals, or electromagnetic signals depending on whether t two nodes are on
a cable circuit, fiber-optic circuit, or microwave/radio circuit, respectively.
Electrical details such as how many volts to use for 0 and 1, how many bits can be
sent per second, and whether transmission can take place only in one direction or
in both directions simultaneously are also decided by the physical layer take place
only in one direction or in both directions simultaneously are also decided by the
physical layer protocols. In addition, the physical layer protocols also deal with the
mechanical details such as the size and shape of the connecting plugs, the number
of pins in the plugs, and the function of each pin. In short, the physical layer
protocols deal with the mechanical, electrical, procedural, and functional
characteristics of transmission of raw bit streams between two sites. RS232-C is a
popular physical layer standard for serial communication lines.

Data-Link Layer

The physical layer simply transmits the data from the sender's node to the
receiver's node as raw bits. It is the responsibility of the data-link layer to detect
and correct any errors in the transmitted data. Since the physical layer is only
concerned with a raw bit stream, the data-link layer partitions it into frames so that
error detection and correction can be performed independently for each frame. The
data-link layer also performs flow control of frames between two sites to ensure
that a sender does not overwhelm a receiver by sending frames at a rate faster than
the receiver can process. Therefore, the error control and flow control mechanisms
of a network form the data-link layer protocols in the OSI model. Notice that the
data-link layer and physical layer protocols establish an error-free communication
of raw bits between two nodes.

Network Layer

The network layer is responsible for setting up a logical path between two nodes
for communication to take place. It encapsulates frames into packets that can be
transmitted from one node to another using a high-level addressing and routing
scheme. That is, routing is the primary job of the network layer and the routing
algorithm forms the main part of the network layer protocols of the network.
Two popular network layer protocols are the X.25 Protocol and the Internet
Protocol (called IP). The X.25 is a connection-oriented protocol that is based on
the concept of establishing a virtual circuit between the sender and receiver before
the actual communication starts between them. In this protocol, a request for
connection is first sent to the destination, which can either be accepted or rejected.
If the connection is accepted, the requesting party is given a connection identifier
to use in subsequent requests. During the connection establishment phase, a route
between the two parties is also decided that is used for the transmission of
subsequent traffic.

On the other hand, IP is a connectionless protocol in which no connection is


established between the sender and receiver before sending a message. Therefore,
each packet of the message is transmitted independently and may take a different
route. IP is part of the DoD (U.S. Department of Defense) protocol suite.
Notice that the functions performed at the network layer are primarily required in
WANs. In a single LAN, the network layer is largely redundant because packets
can be transmitted directly from any node on the network to any other node.
Therefore the network layer, if present, has little work to do.

Transport Layer

The job of the transport layer is to provide node-to-node communication and to


hide all the details of the communication subnet from the session layer by
providing a network-independent transport service. Using this service, all the
details of the communication subnet are sealed and one subnet can be replaced
with another without disturbing the layers above the transport layer.
In particular, the transport layer accepts message of arbitrary length from the
session layer, segments them into packets, submits them to the network layer for
transmission, and finally reassembles the packets at the destination. Some packets
may be lost on the way from the sender to the receiver, and depending on the
routing algorithms used in the network layer, packets may arrive at the destination
in a sequence that is different from the order in which they are sent. The transport
layer protocols include mechanisms for handling lost and out-of-sequence packets.
For this, the transport layer records a sequence number in each packet and uses the
sequence numbers for detecting lost packets and for ensuring that messages are
reconstructed in the correct sequence.

The two most popular transport layer protocols are the Transport Control Protocol
(TCP) and the User Datagram Protocol (UDP). TCP is a connection-oriented
transport protocol. It uses end-to-end mechanisms to ensure reliable, ordered
delivery of data over a logical connection. These goals are basically achieved by
using packet sequence numbers and positive acknowledgements with timeout and
retransmission.

The UDP is a connectionless transport protocol. It is an unreliable protocol


because, when it is used, message packets can be lost, duplicated, or arrive out of
order. Therefore, only those applications that do not need reliable communication
should use UDP.

Session Layer

The purpose of the session layer is to provide the means by which presentation
entities can organize and synchronize their dialog and manage their data exchange.
It allows the two parties to authenticate each other before establishing a dialog
session between them. It also specifies dialog type - one way, two way alternate,
or two way simultaneous - and initiates a dialog session if the message is a
connection request message. The other services of the session layer include
quarantine service, dialog control, and priority management. The quarantine
service buffers a group of messages on the receiving side until the session layer on
the sending side explicitly releases them. This is useful in database applications
where a transaction (consisting of a group of messages) needs to be an atomic unit.
The dialog control is useful for dialog sessions in which the user primitives used
for sending and receiving messages are of the nonblocking type. In this case, the
user may have multiple requests outstanding on the same session, and replies may
come back in an order different from that in which the requests were sent. The
dialog control reorders replies according to the order of requests. The priority
management service is useful for giving priority to important and time-bound
messages over normal, less-important messages. The session layer is not required
for connectionless communication.
Presentation Layer

The purpose of this layer is to represent message information to communicating


application layer entities in a way that preserves meaning while resolving syntax
differences. For this, the presentation layer may perform one or more of the
following types of transformations on message data:

1. A message usually contains structured information that may include any of the
data types used in programming languages - integers, characters, arrays, records,
and so on, including user-defined data types. Translation is therefore required
where language systems or application programs in the source and destination
computers use different representations for these data types.

2. Data format conversions are also needed to transfer data between computers
when the hardware of the sending and receiving computers uses different data
representations. In this case, the presentation layer software in the sending
computer transforms message data from the formats used in its own computer to a
set of standard network representations called eXternal Data Representation
{XDR) before transmission. The presentation layer software in the receiving
computer transforms the message data from the network representations to the
formats used in its own computer.

3. For applications dealing with confidential or secret data, the presentation layer
software in the sending computer encrypts message data, before passing it to the
session layer. On the receiver side, the encrypted message data is decrypted by
the presentation layer before being passed on to the application layer.
4. In a similar manner, when message data is large in volume (such as multimedia
data) or with networks that are slow or heavily loaded, message data may be
compressed and decompressed by the presentation layer software in the sending
and receiving computers, respectively.

Application Layer

The application layer provides services that directly support the end users of the
network. Obviously, the functionality implemented at this layer of the architecture
is application-specific. Since each application has different communication needs,
no fixed or standard set of application layer protocols can meet the needs of all
applications. Therefore, the application layer is basically a collection of
miscellaneous protocols for various commonly used applications such as
electronic mail, file transfer, remote login, remote job entry, and schemas for
distributed databases. Some popular application layer protocols are X.400
(Electronic Mail Protocol), X.500 (Directory Server Protocol), FTP (File Transfer
Protocol), and rlogin (Remote Login Protocol).
Example of Message Transfer in the OSI Model

The example below has been reprinted, with permission, from the book titled
Distributed Operating Systems: Concepts and Design by Pradeep K. Sinha. ©
1997 IEEE.

To illustrate the functions of the various layers of the OSI model, let us consider a
simple example of message transmission. With reference to Figure 17.25, let us
assume that a process at the sending node wants to send a message M to a process
at the receiving node. The sending node's process builds the message M and passes
it to the application layer (layer 7) on its machine. The application layer software
adds a header (H7) to M and passes the resulting message to the presentation layer
(6) via the interface between layers 7 and 6. The presentation layer software
performs text compression, code conversion, security encryption, and so on, on the
received message, and after adding a header (H6) to it, it passes the resulting
message on to the session layer (5). Depending on the type of dialog, the session
layer software establishes a dialog between the sender and the receiver processes.
It also regulates the direction of message flow. A header (//$) is added to the
message at this layer, and the resulting message is passed on to the transport layer
(4). The transport layer software now splits the message into smaller units (Mi and
M2) called packets and adds a header (H4) to each packet. These headers contain
the sequence numbers of the message packets. The packets are then passed on to
the network layer (3). The network layer software makes routing decisions for the
received packets and sets up a logical path between the sending and receiving
nodes for transmission of the packets. It then adds a header (Hi) to each packet and
passes them on to the data-link layer (2). The data-Jink layer software adds a
header (H2) and a trailer (T2) to each of these packets. The trailers contain the
checksum of the data in the corresponding packets. The resulting message units
are called frames, which are passed on to the physical layer (1). The physical layer
software simply transmits the raw bits from the sender's machine to the receiver's
machine using the physical connection between the two machines.

On the receiver's machine, the message data traverses up from the physical layer to
the application layer. As the message data traverses to higher-level layers, each
layer performs the functions assigned to it and strips off the headers or trailers
added by its peer layer at the sending node. For example, the data-link layer at the
receiving machine performs error detection by recalculating the checksum for each
frame and comparing it with the checksum in the trailer of the frame. It strips off
the header (Hi) and the trailer (7y from the frames before passing them on to the
network layer. The application layer of the receiver's machine finally passes on the
message in its original form to the communicating process on the receiver's node.
Notice that the software of a particular layer on the sending machine conceptually
communicates only with its peer layer on the receiving machine, although
physically it communicates only with the adjacent layers on the sending machine.
This abstraction is crucial to network design.

INTERNETWORKING TOOLS

Interconnecting of two or more networks to form a single network is called


internetworking, and the resulting network is called an internetwork. Therefore, a
WAN of multiple LANs is an internetwork.

Internetworks are often heterogeneous networks composed of several network


segments that may differ in topology and protocol. For example, an internetwork
may have multiple LANs, some of which may have multi-access bus topology
while others may have ring topology; some of these LANs may be using Ethernet
technology which others may be using Token Ring technology; and some
segments of the network may be using the IP suite while others may be using
IBM's SNA (System Network Architecture) protocol suite. Internetworking allows
these, relatively unrelated networks to evolve into a single working system. That
is, the goal of internetworking is to hide the details of different physical networks,
so that the resulting internetwork functions as a single. Interconnecting two
networks having the same topology and protocol is simple because the two
networks can easily communicate with each other. However, interconnecting two
dissimilar networks that have different topologies and protocols requires an
internetworking scheme that provides some common point of reference for the two
networks to communicate with each other. That point of reference might be a
high-level protocol common to the two networks, a device that allows
interconnection of different topologies with different physical and electrical
characteristics, or a protocol that allows operating environment differences to be
ignored. The most commonly used approach is to make use of common high-level
protocols for moving data between common layers on a communications model
such as the OSI or the IP suites. Internetworking tools, such as bridges, routers,
brouters, and gateways, make extensive use of this approach. As described below,
each of these tools has strengths, weaknesses, and specific applications in
internetworking. These tools are "blackbox" internetworking technologies that
enable interconnection of similar or dissimilar networks to form a single network
system.

Bridges

Bridges operate at the bottom two layers of the OSI model (physical and data
link). Therefore, they are used to connect networks that use the same
communication protocols above the data-link layer but may or may not use the
same protocols at the physical and data-link layers. For example, bridges may be
used to connect two networks, one of which uses fiber-optic communication
medium and the other uses coaxial cable; or one of which uses Ethernet
technology and the other uses Token Ring technology. But both networks must
use the same high-level protocols (e.g., TCP/IP or XNS) to communicate.

The similarity of higher-level protocols implies that bridges do not modify either
the format or the contents of the frames when they transfer them from one network
segment to another (they simply copy the frames). Hence bridges feature high-
level protocol transparency. They can transfer data between two network segments
over a third segment in the middle that cannot understand the data passing through
it. As far as the bridge is concerned, the intermediate segment exists for routing
purposes only.

Bridges are intelligent devices in the sense that they use a process of learning and
filtering in data forwarding to keep network traffic within the segment of the
network to which it belongs. Therefore, bridges are also useful in network
partitioning. When the performance of a network segment degrades due to
excessive network traffic, it can be broken into two network segments with a
bridge interconnecting the two segments.

Routers

Routers operate at the network layer of the OSI model. Therefore, routers do not
care what topologies or access-level protocols the interconnected network
segments use. Since routers use the bottom three layers of the OSI model, they are
usually used to interconnect those networks that use the same high-level protocols
above the network layer. Note that the protocols of data-link and physical layers
are transparent to routers. Therefore, if two network segments use different
protocols at these two layers, a bridge must be used to connect them.

Unlike bridges, routers do not view an internetwork from end to end. That is,
bridges know the ultimate destination of a data, but routers only know which is the
next router for the data being transferred across the network. However, routers are
smarter than bridges in the sense that they not only copy a data from one network
segment to another, but they also choose the best route for the data by using
information in a routing table to make this decision. That is, managing traffic
congestion is a big plus of routers; they employ a flow control mechanism to direct
traffic on to alternative, less congested paths.

Routers are commonly used to interconnect those network segments of large


internetworks that use the same communication protocol. They are particularly
useful in controlling traffic flow by making intelligent routing decisions.

An internetwork often uses both bridges and routers to handle both routing and
multiprotocol issues. This requirement has resulted in the design of devices called
brouters, which are a kind of hybrid of bridges am routers. They provide many of
the advantages of both bridges and routers. They are complex, expensive, and
difficult to install, but for very complex heterogeneous internetworks in which the
network segments use the same high-level communication protocols, they often
provide the best internetworking solution.

Gateways

Gateways operate at the top three layers of the OSI model (session, presentation,
and application). They are the most sophisticated internetworking tools and are
used for interconnecting dissimilar networks that use different communication
protocols. That is, gateways are used to interconnect networks that are built on
totally different communications architectures. For instance, a gateway may be
used to interconnect two networks, one of which uses the IP suite and the other
uses the SNA protocol suite.

Since networks interconnected by a gateway use dissimilar protocols, protocol


conversion is the major job performed by gateways. Additionally, gateways
sometimes also perform routing functions.

WIRELESSNETWORKS

One of the most challenging and interesting recent trends in the computer and
communications industries is the integration of wireless communications and
computing. The resulting network is referred to as a wireless computing systems.
A wireless computing system enhances the functionality of computing equipment
by freeing communication from the location constraints of the wired computing
systems.

Types of Wireless Computing Systems

Wireless computing systems can be broadly classified into the following two
categories:
1. Fixed wireless systems. These wireless computing systems support little or
no mobility of the computing equipment associated with the wireless network. For
example, a LAN can be set up using wireless technology to get rid of the hassles
of laying cables. The LAN will work as a conventional wired LAN except for the
difference that it does not need any cabling to be carried out.
2. Mobile wireless systems. These wireless computing systems support
mobility of the computing equipment, which the users use to access the resources
associated with the wireless network. In turn, these systems support mobility of
users and allow the mobile users to access information-from anywhere and at
anytime. The resulting computing environment, which is often called mobile
computing or nomadic computing, no. longer requires a user to maintain a fixed
position in the network and enables almost unrestricted user mobility. Typical
computing equipment used in mobile wireless systems includes smart phones,
personal digital assistants (PDAs), and pagers with Internet access.

Note that mobile users do not necessarily need to use wireless interfaces and
wireless interfaces do not necessarily support mobility. A mobile user can simply
connect to fixed networks using wired interfaces as he/she moves.

Likewise, a fixed-location user might use a wireless interface (via a LAN) while
sitting in an office. Therefore, mobile and wireless computing systems are not the
same even though there is considerable overlap.
Issues in Wireless Computing Systems

Wireless computing systems communicate by modulating radio waves or pulsing


infrared light. Wireless communication is linked to the wired network
infrastructure by stationary transceivers. The area covered by an individual
transceiver's signal is known as a cell. Cell sizes vary widely. For instance, an
infrared transceiver can cover a small meeting room, a cellular phone transceiver
has a range of a few miles, and a satellite beam can cover an area more than 400
miles in diameter.

The successful use of wireless computing systems faces several challenges. The
important ones among them are as follows:
1. Lower bandwidths. Wireless communication is characterized by lower
bandwidths. That is, the channel capacity typically available in wireless systems
is much lower than what is available in wired networks due to the limited
spectrum available, power restrictions, and noise levels.
2. Variable bandwidths. In case of mobile wireless systems, the limited
bandwidth that is available is also variable depending on location. Channel reuse
must, therefore, be an integral part of the system in order to provide service to as
many potential subscribers as possible.
3. Higher error rates. Noise and interference have more impact on wireless
computing systems than for wired computing systems. This, in turn, increases
communication latency resulting from retransmissions, retransmission time-out
delays, and error-correction protocol processing.
4. Increased security concerns. Security is a greater concern in wireless systems
than in wired-systems since information may be traveling in free space (with the
exception of infrared LANs). Moreover, a stronger level of authentication is
needed in a mobile environment where network nodes can potentially join or leave
a network at will.
5. Dynamically changing network. In case of a mobile wireless system, the
topology of the network changes rapidly due to the movement and resulting
connections and disconnections of the mobile nodes. Moreover, the number of
mobile nodes in a network cell varies dynamically, and large concentrations of
mobile users, say, at conventions and public events, may overload network
capacity.
6. Lost or degraded connections. In case of a mobile wireless system, mobility
can cause wireless connections to be lost or degraded. Users may travel beyond
the coverage of network transceivers or enter areas of high interference.
7. Support for routing and location management functions. Mobile wireless
systems also need to provide support for routing functions (to maintain
communication with mobility) and location management functions (to keep track
of the location of mobile nodes).
8. Limited power. Mobile nodes are battery operated and hence have limited
power available. As a result, the power required for transmitting and receiving
must be minimized in mobile wireless systems.

Wireless Applications

Wireless computing systems have several interesting and important applications


such as:
1. Mobile e-commerce applications, popularly known as m-commerce
applications.
2. Web surfing using wireless devices.
3. Access to corporate data by sales people and other frequent travelers while
they are traveling.
4. Mobile video-on-demand applications.
5. Location-sensitive services, such as programs that help finding nearby movie
theaters or restaurants an unfamiliar location.

Wireless Communication Technologies

Wireless communication systems use one or more of the wireless communication


technologies discussed below

Analog Cellular

By using this communication technology, computing equipment that are equipped


with a modem can transfer data over analog cellular telephone networks. Although
the data rates supported by this technology are low (of the order of few Kbps), it is
one of the most popular methods for wireless data communications due to the
wide availability of modems and analog cellular services.

Digital Cellular

By using this communication technology, computing equipment can transfer


digital data over digital cellular telephone networks without the need for a modem.
The various standards available for digital cellular c transmission are
1. Time Division Multiple Access (TDMA),
2. Code Division Multiple Access (CDMA), and
3. Global System for Mobile Communication (GSM).
The effective data transfer rate of digital cellular technology is less than that of
analog cellular technology.

Cellular Digital Packet Data (CDPD)


In this method, digital data to be transferred is broken into small packets and
inserted into analog cellular telephone networks. The technology employs unused
analog channels available in the analog telephone cellular infrastructure. That is,
transmitters use a channel for a short transmission burst and release the channel
for analog voice links. The effective data rate that can be achieved using this
technique is 19.2 Kbps.

Mobile Radio Networks

The Specialized Mobile Radio (SMR) and Extended Specialized Mobile Radio
(ESMR) technologies employ narrow bands for creating mobile radio network
infrastructure. Such an infrastructure is primarily used for utility, dispatch, and
other service-oriented metropolitan area users. Due to the use of narrow bands,
mobile radio networks have limited data rates (of the order of 20 Kbps).

Personal Communications Services (PCS)

PCS technology is used to offer greater network complexity and lower end-to-end
latency in wireless networks. It has two variations. The low-tier PCS is used for
microcell coverage for frequency reuse and low-power benefits. On the other
hand, the high-tier PCS is used for early digital cellular systems such as GSM,
TDMA, and CDMA. It is used for large macrocells of the order of 0.5 and 3.0
kilometers. PCS technology may be used to serve LANs, MANs, and WANs.

Satellite

We have already seen that satellites are widely used for providing broadcasting,
long distance, and international data communication services to stationary users.
With advances in antenna design, signal reception, and other related technologies,
it has now become possible to provide mobile services using satellites. Many
satellite-based networks using Low-Earth-Oribit (LEO), Medium-Earth-Orbit
(MEO), and Geosynchronous-Earth-Orbit (GEO) have been started to provide
commercial wireless data services at relatively low data rates (below 64 Kbps).
For example, Iridium is a LEO system that uses 66 satellites to provide mobile
communications to every point on earth and within 50 miles above it. In Iridium,
the same satellite may not serve a user throughout the duration of a call; a call may
be handed off to another approaching satellite. The satellites, in concentric orbits,
maintain links with up to four satellites in neighboring orbits. But handoffs are
necessary among satellites in counter-rotating orbits to maintain cross-links among
satellites.

Although there is a large market for satellite-based mobile services especially in


places where no (or poor) cellular/PCS service exists, due to the high initial cost
and per-minute charges, users of satellite-based mobile communications remain a
small minority among a much larger number of wireless users. For example,
Iridium, which started its service in January 1999, has been officially declared
bankrupt and has terminated commercial services because the number of
customers that adopted the service was much smaller than needed to maintain this
multibillion-dollar network.

Microwave Systems

We have already seen that microwave systems use very high frequency radio
signals to transmit data through space. Hence for several years, microwave
systems have been and continue to be a popular means of wireless data
communications. Microwave, links operate in higher frequency bands than any
other technologies and offer data rates of several Mbps.

Local Multipoint Distribution Systems (LMDS)

LMDS is a technology for supporting point-to-multipoint applications. It uses a


28-31 GHz band with 1.3 GHz of spectrum allocated to it in the US and 3 GHz of
spectrum allocated to it in Canada. LMDS uses spread spectrum and microcell
technology that supports two-way data transfer rates of up to 1 Gbps. A drawback
of the LMDS technology is that signal propagation at the 28 GHz range requires a
direct line-of-sight path between the transmitter and receiver. Possible applications
of LMDS technology are high-speed Internet data, video conferencing, and cable
TV data transmission at several hundred Mbps.

Wireless Technologies and Standards

Over the years, several wireless technologies and standards have been introduced.
Out of these, some of the most popular ones are described below.

2G and 3G Technologies

The early mobile phones used first-generation technology, which was analog,
circuit-based, narrowband, and suitable only for voice communications. Then
came the second-generation wireless-networking technology (popularly known as
2G technology), which was digital, circuit-based, and narrowband but suitable for
voice and limited data communications. Currently, we have the third-generation
wireless-networking technology (popularly known as 3G technology), which is
suitable for voice and advanced data applications, including online multimedia and
mobile e-commerce. Further details of the 2G and 3G technologies are given
below.
2G Technology

As mentioned above, 2G technology is digital, circuit-based, narrowband, and


suitable for voice and limited data communications. It comprises of the following
three primary standards:
1. TDMA. The Time-Division-Multiple-Access (TDMA) technology does
time-division multiplexing of each cellular channel to handle multiple
communications simultaneously. In particular, TDMA technology divides each
cellular channel into three time slots, each of which handles a separate
transmission. The channel switches quickly from one time slot to another,
thereby handling three communications simultaneously. This technology is
primarily used in the US.
2. GSM. Global System for Mobile (GSM) communications technology is also
based on time-division multiplexing of each cellular channel. However, it uses
wider carrier frequencies than TDMA are divides each cellular channel into eight
time slots, rather than three. Hence, GSM technology can handle eight
communications simultaneously. This technology is primarily used in Europe and
Asia.
3. CDMA. Code-Division-Multiple-Access (CDMA) technology does not divide
a channel into sub-channels, like TDMA or GSM. Instead, it carries multiple
transmissions simultaneously by filling the entire communications channel with
data packets coded for various receiving devices. The packets go only to the
devices for which they are coded. This technology is primarily used in the US.

As upgrades to 2G technologies, 2.5G technologies were developed to provide


more bandwidth for higher data transfer rates. 2.5G uses High-Speed-Circuit-
Swjtched-Data (HSCSD) technology, which is basically an extension of GSM
technology that can offer throughput of up to 384 Kbps. Although 2.5G offers
more bandwidth than 2G, it is less than that offered by 3G. However, since 2.5G
uses existing 2G spectra and does not require: entirely new network infrastructure,
it can be implemented faster and less expensively than 3G. 2.5G comprises of the
following three primary standards:

1. iDEN. Integrated Digital Enhanced Network (iDEN) is a GSM upgrade that


uses enhanced compression and modulation technologies to deliver data transfer
rates of 64 Kbps. It is primarily used in North America, South America, China,
and Japan.
2. GPRS. General Packet Radio Service (GPRS) is another GSM upgrade that
offers data transfer rates of up to 171 Kbps. It can thus be used for applications
such as videoconferencing and interacting with multimedia web sites. GPRS
reallocates several GSM time slots for voice to data uses, thereby increasing data
rates but decreasing voice rates. It is primarily used in China, Europe, and the US.
3. EDGE. Enhanced Data-rate for Global Evolution (EDGE) technology (also
known as Enhanced Data GSM Environment) is yet another GSM upgrade that
offers data transfer rates of up to 384 Kbps. It employs new modulation and radio
techniques that use existing GSM's frequency range more efficiently. It is
primarily used in tffe US.

3G Technology

As mentioned before, 3G technology is designed to offer data rates high enough


for mobile users to work with multimedia web content, videoconferencing, and e-
commerce. It is designed to offer data transmission rates of up to 2.05 Mbps in
stationary applications, 384 Kbps for slow-moving users, and 128 Kbps for users
moving in vehicles. 3G is thus considerably faster than 2G and 2.5 G technologies.
It comprises of the following three primary standards:
1. W-CDMA. Wideband Code-Division Multiple Access (W-CDMA)
technology is an upgrade to the CDMA standard of 2G technology. It uses a 5-
MHz-wide carrier signal, rather than the 200-KHz-wide carrier that narrowband
CDMA uses. The International Telecommunication Union (ITU) has formally
standardized this technology to let the vendors offer a consistent set of services
throughout the world. This technology is also known as International Mobile
Telecommunications 2000 (IMT-2000) direct spread.
2. CDMA2000. This is yet another CDMA upgrade technology. It offers a
migration path from CDMA2000 lx to CDMA2000 lxEV-DO and lxEV-DV to
CDMA2000 3x. CDMA2000 lx offers maximum data rates of 153.6 Kbps.
During the next few years, users could move to lxEV-DO (lx evolution, data only)
and lxEV-DV (lx evolution, data and voice), offering data rates up to 614 Kbps.
Finally, users could move ahead to CDMA2000 3x, which would provide the full
3G maximum throughput of 2.05 Mbps.
3. TD-CDMA. Time-Division CDMA (TD-CDMA) is a technology that
combines time-division multiplexing and CDMA techniques. It was developed and
used primarily in China.

Wireless LANs

Wireless Local Area Networks (WLANs) are like traditional LANs having a
wireless interface to enable wireless communication among the equipment that are
part of the LAN. A wireless LAN may be further connected to a more extensive
fixed network such as LAN, WAN, the Internet, etc. The primary component of a
wireless LAN is the wireless interface card that has an antenna. This interface card
can be connected to the mobile unit as well as to the fixed network. Wireless
LANs have limited range and are designed to be used only in local environments
such as a building, hallway, park, or office complex. The main advantage is the
flexibility and mobility supported by a wireless LAN; bandwidth considerations
are secondary.

Unlike cellular networks with allocated channels (frequencies), users in WLANs


have to share frequencies, which may eventually lead to collisions. The choice of
frequency depends on whether microwave, spread-spectrum, or infrared
communication will be used. Interference and security depend on the type of
communications method used in the WLAN.

The following three are the primary WLAN standards:


1. IEEE 802.11. The IEEE 802.11 standard supports 1 Mbps data rate and
several choices of physical medium such as spread spectrum and infrared. It also
supports prioritized access to the medium. An additional feature of this standard is
battery conservation for inactive or idle wireless users. Many universities and
companies are encouraging the use of IEEE 802.11-based LANs for accessing
campus computing systems and the Internet. The IEEE 802.11 standard is being
enhanced to support 11 Mbps data rate.
2. HiperLAN. The HiperLAN standard can be used to support 23.5 Mbps
channel rates. It, however, allows the use of only spread spectrum physical
medium. Like IEEE 802.11, it also supports prioritized access to the medium.
3. HiperLAN2. Another emerging WLAN standard is HiperLAN2, which is
being standardized by ETSI (European Telecommunications Standard Institute).
An exciting feature of this standard is that it provides for use of connections that
offer different quality of service for different applications. It uses time-division
multiplexing of unicast, multicast, and broadcast connections. Many major players
in the WLAN area have formed HiperLAN2 Global Forum to advance and
complement the ETS1 standardization process.
Wireless Local Loops (WLLs)

Wireless Local Loops (WLLs) technology has been designed to support fixed
wireless systems. Since WLLs provide fixed wireless access (as opposed to mobile
access provided by cellular and PCS), they can provide several MHz of bandwidth
that can be used for high-speed Internet access and data transfer in addition to the
basic telephone service. These loops allow long-distance carriers to bypass the
existing wired local loops owned b) local telephone carriers (which may result in
the saving of tremendous access charges). Due to this reason, man} long-distance
companies in advanced countries (like the U.S.) are looking to build their WLLs to
avoid paying access charges. Moreover, in developing nations where laying
thousands of miles of copper cable is impractical WLLs can be used to provide
telephone and low-speed data transfer services.

Among many choices of technologies that can be used in WLL environments,


cellular and microcellular system; can be used in the 900, 1800, and 1900 MHz
ranges with 9.6 Kbps for 10 to 100 users within a few kilometer; range. Wireless
LANs can be deployed to support WLL for users in smaller areas but with higher
bandwidth requirements. Systems that are especially designed for fixed wireless
access, such as Local Multipoint Distribution Systems (LMDS), can provide very
high bandwidth (tens of Mbps) in large areas for large number o users but require
a direct line of sight.

Radio-router Technology

Radio-router technology is an emerging wireless technology designed to make


links in an IP network mobile. It uses a radio-transmission framework for packet-
based, broadband, IP wireless communications. A radio-router network can be
built on top of the existing IP infrastructure, rather than from the ground up like a
3G network Since IP network technology is already well developed and
inexpensive, radio-router systems will be relatively easy, quick, and economical to
implement.

The technology uses OFDM (Orthogonal Frequency Division Multiplexing), in


which a single channel is divided into several sub-channels, each at a different
frequency. This boosts bandwidth by letting a system carry several transmissions
at the same time. Radio-router systems offer a maximum throughput of 1.5 Mbps.
OFDM, unlike traditional FDM, uses signal modulation and demodulation
techniques, as well as orthogonal placement of I adjacent channels, to minimize
interference.

Multihop Wireless Networks


In most wireless network environments, the radio channel is used to connect the
mobile equipment to a base station in a single hop. The base station itself is
connected to a wired infrastructure. Consider an environment f where there is no
wired infrastructure yet connectivity must be maintained among users who can
move around arbitrarily and can at times not be in direct transmission range of
each other. Multihop wireless networks, also known as instant infrastructure
systems, are designed to provide wireless communications capability in such
environments.
I Instant infrastructure systems play an important role in wireless communication
because due to transmitted power constraints, not all radios are within the range of
each other, and packets may need to be relayed from one radio to another on their
way to their intended destinations. These systems, however, are more complex to
design and manage than traditional single-hop, centrally controlled systems. This
is mainly because a fully implemented multihop system needs to have complete
support for multimedia, multihopping, and mobility features.
Wireless Application Protocol (WAP)

We saw in the discussion above that many different wireless access technologies
exist that are not interoperable. Designing and building networks and applications
for each technology would certainly be a very difficult job for developers. With
the proliferation of the Internet and wireless communications devices, Internet
access using mobile devices has become important for anywhere, anytime
information access capability. However, redesigning of all web sites to support
downloading of information by mobile users is certainly not feasible. To address
these issues, researchers started working towards the development of a technology
that could allow development of applications that are independent of the
underlying wireless access technology and that could also enable access of
information from existing web sites using mobile devices. The result of this was
WAP.

WAP specifications have been developed by the WAP Forum, a consortium of


leading wireless companies. It supports interoperability of different wireless
networks, devices and applications using a common set of application and network
protocols. In fact, WAP is a stack of protocols that defines the type and structure
of messages that two devices have to use when they are communicating with each
other in a wireless environment. The WAP protocol stack contains a set of six
layers, which are application layer, session layer, transaction layer, security layer,
transport layer, and wireless layer. Figure 17.26 presents a summary of the various
WAP layers, the protocols at each layer, and their functions. WAP protocols have
been designed to reduce the problems associated with the use of the Internet
protocols for wireless data transfer. They do this simply by eliminating
unnecessary data transfers and using binary code to reduce the amount of data that
has to be sent. For instance, WAP has introduced a new Markup Language called
the Wireless Markup Language (WML), which is a version of HTML optimized
for mobile devices.

Figure 17.27 shows the basic architecture of WAP. The architecture is similar to
web architecture, but it requires a WAP gateway for translating between HTTP
and WAP. That is, the WAP gateway acts as a proxy server to a mobile client and
translates requests from WAP protocol stacks to protocol stacks employed by the
information server on the other side. The WAP gateway has encoders to translate
the content coming from the server into compact formats to reduce the size of data
over the wireless network. The WAP gateway usually resides in the company or
organization that provides carrier services to its subscribers. This architecture
ensures that mobile users can access a wide variety of contents and applications
and also allows application developers to build content services and applications
that can run on a large base of mobile devices.
WAP Layers Protocols Functions

Application Wireless Application Provides an application environment required for


Layer Environment (WAE) the development and execution of the
applications, that is, micro browser environment,
WML, and WML script.
Session Layer Wireless Session Supplies methods for the exchange of
Protocol information between client and server
(WSP) application. These methods include HTTP
functions and semantics, facility for reliable and
unreliable data push, and protocol feature
negotiation.
Transaction Wireless Transaction Provides several types of transaction services.
Layer Protocol (WTP)
Security Layer Wireless Transport Layer Provides authentication, privacy, and secure
Security (WTLS) connection between applications.
Transport Layer Wireless Datagram Provides a common interface to upper layer
Protocol (WDP) protocols by adapting to specific features of the
underlying technologies.
Wireless Layer Wireless and mobile Provides a specific way to transmit information
networks over a wireless link.
Figure 17.26. The various WAP layers, the protocols at each layer, and their
functions.

DISTRIBUTED COMPUTING SYSTEMS

The merging of computer and networking technologies gave birth to distributed


computing systems in the late 1970s. Simply speaking, a distributed computing
system is a collection of computers interconnected by a communication network.
It is a configuration in which many independent computer systems (which may be
geographically far apart) are connected by a communication network, and in
which messages, processing task, programs, data, and other resources are
transmitted between cooperating computer systems. Such an arrangement enables
the sharing of many hardware and software resources as well as information
among several users who may be sitting far away from each other. It also increases
the usability of computers by bringing them closer to the end users and by
integrating them into daily business activities at the locations at which these
activities take place. The individual computers of a distributed computing system
are often referred to as nodes.
It is obvious that distributed computing systems are much more complex and
difficult to build than traditional centralized svstems. The increased complexity is
mainly due to the following reasons:

1. The system must be designed in such a way so as to effectively use and


manage a very large number of distributed resources.
2. The system must be designed to enable communication among the various
nodes of the system. Special software is usually needed to handle loss of messages
during transmission across the network or to prevent overloading of the network.
3. Special security measures are needed to protect the widely distributed shared
resources and services against intentional or accidental violation of access control
and privacy constraints.
Despite the increased complexity and the difficulty of building distributed
computing systems, the installation and use of distributed computing systems are
rapidly increasing. This is mainly because the advantages of distributed computing
systems outweigh their disadvantages. The major advantages that have led to the
emergence and popularity of distributed computing systems are as follows
[Reprinted, with permission,' from the book titled Distributed Operating Systems:
Concepts and Design by Pradeep K. Sinha. © 1997 IEEE.]:
1. Inherently distributed applications. Several applications are inherently
distributed in nature and require a distributed computing system for their
realization. A few examples of inherently distributed applications are electronic
mail facility, a computerized worldwide airline reservation system, a computerized
banking system in which a customer can deposit/withdraw money from his or her
account from any branch of the bank, and a factory automation system controlling
robots and machines all along an assembly line.
2. Information sharing among distributed users. In a distributed computing
system, information generated by one of the users can be easily and efficiently
shared by the users working at other nodes of the system. For example, a project
can be performed by two or more users who are geographically far off from each
other but whose computers are a part of the same distributed computing system. In
this case, although the users are geographically separated from each other, they
can work in cooperation, for example, by transferring the files of the project,
logging on to each other's remote computers to run programs, and exchanging
messages by electronic mail to coordinate the work.
The use of distributed computing systems by a group of users to work
cooperatively is known as computer-supported cooperative working (CSCW), or
groupware. Groupware applications depend heavily on the sharing of data objects
between programs running on different nodes of a distributed computing system.
3. Resource sharing. Information is not the only thing that can be shared in a
distributed computing system. Sharing of software resources such as software
libraries and databases as well as hardware resources such as printers, hard disks,
and plotters can also be done in a very effective way among all the computers and
the users of a single distributed computing system.
4. Better price-performance ratio. Distributed computing systems potentially
have a much better price-performance ratio than a single large centralized system
because they facilitate resource sharing among multiple computers. For example, a
single unit of expensive peripheral devices such as color laser printers, high-speed
storage devices, and plotters can be shared among all the computers of the same
distributed computing system. If these computes are not linked together with a
communication network, each computer must have its own peripherals, resulting
in higher cost.
5. Shorter response times and higher throughput. Multiple processors of a
distributed computing system can be utilized properly for providing shorter
response times and higher throughput than a single-processor centralized system.
For example, if a particular computation can be partitioned into a number of
subcomputations that can run concurrently, in a distributed computing system all
the subcomputations can be simultaneously run with each one on a different
processor. Distributed computing systems with very fast communication networks
are increasingly being used as parallel computers to solve single complex
problems rapidly. Another method often used in distributed computing systems for
achieving better overall performance is to distribute the load more evenly among
the multiple processors by moving jobs from currently overloaded processors to
lightly loaded ones.
6. Higher reliability. Reliability refers to the degree of tolerance against errors
and component failures in a system. A reliable system prevents loss of information
even in the event of component failures. The multiplicity of storage devices and
processors in a distributed computing system allows the maintenance "of multiple
copies of critical information within the system and the execution of important
computations redundantly to protect them against catastrophic failures. With this
approach, if one of the processors fails, the computation can be successfully
completed at the other processor, and if one of the storage devices fails, the
information can still be used from the other storage device. Furthermore, the
geographical distribution of the processors and other resources in a distributed
computing system limits the scope of failures caused by natural disasters.
7. Extensibility and incremental growth. Another major advantage of distributed
computing systems is that they are capable of incremental growth. That is, it is
possible to gradually extend the power and functionality of a distributed
computing system by simply adding additional resources (both hardware and
software) to the system as and when the need arises. For example, additional
processors can be easily added to the system to handle the increased workload of
an organization that might have resulted from its expansion. Incremental growth
is a very attractive feature because for most existing and proposed applications it
is practically impossible to predict future demands of the system. Extensibility is
also easier in a distributed computing system because addition of new resources
.to an existing system can be performed without significant disruption of the
normal functioning of the system.
8. Better flexibility in meeting users' needs. Different types of computers are
usually more suitable for performing different types of computations. For
example, computers with ordinary power are suitable for ordinary data processing
jobs, whereas high-performance computers are more suitable for complex
mathematical computations. In a centralized system, the users have to perform all
types of computations on the only available computer. However, a distributed
computing system may have a pool of different types of computers, in which case
the most appropriate one can be selected for processing a user's job depending on
the nature of the job.

Points to Remember

1. A computer network is a network of geographically distributed multiple


computers connected in such a way that meaningful transmission and exchange of
information become possible among them. Sharing of information, sharing of
resources (both hardware and software), and sharing of processing load are some
of the major objectives of a computer network.
2. The three basic elements of any communication process are a sender (source),
which creates the message to be transmitted, a medium, which carries the message,
and a receiver (sink), which receives the message.
3. The three modes of transmitting data from one point to another are simplex,
half-duplex, and full-duplex. In simplex mode of transmission, communication can
take place in only one direction. A half-duplex system can transmit data in both
directions, but only in one direction at a time. A full-duplex system allows
information to flow simultaneously in both directions.
4. Bandwidth is the range of frequencies that is available for the transmission of
data. The wider the bandwidth of a communication system, the more data it can
transmit in a given period of time.
5. The communication data transfer rate is measured in a unit called baud. In
general usage, baud is identical to bits per second.
6. There are several types of physical channels (communication media) through
which data can be transmitted from one point to another. Some of the most
common data transmission medium are wire pairs, coaxial cable, microwave
system, communications satellite and optical fibers.
-*- '** . '
7. The technique by which a digital signal is converted to its analog form is
known as modulation. The reverse process, that is the conversion of analog signal
to its digital form, at a destination device, is called demodulation.
8. The three forms of modulation are amplitude modulation, frequency
modulation and phase modulation.
9. The process of modulation and demodulation, that is, the conversion of digital
data to analog form and vice-versa, is carried out by a special device called a
modem (modulator/demodulator).
10. Data transmission service providers are popularly known as common carriers.
The various types of services offered by the common carriers are dial-up line,
leased line, Integrated Services Digital Network (ISDN), and Value Added
Network (VAN).
11. The method of dividing a physical channel into many logical channels, so that
a number of independent signals may be simultaneously transmitted on it, is
known as multiplexing. The electronic device that performs this task is known as
a multiplexer.
12. The two basic methods of multiplexing channels are frequency-division
multiplexing and time-division multiplexing.
13. The two modes of data transmission on a communication line are
asynchronous and synchronous. In asynchronous transmission, the sender can
send data at any convenient time and the receiver will accept it. On the other hand,
in synchronous transmission, the sender and receiver must synchronize with each
other to get ready for the data transmission before it takes place.
14. The three different methods of establishing communication links between the
sender and receiver in a communication network are circuit switching, message
switching and packet switching.
15. The selection of the actual path to be used to transmit a packet in a WAN is
determined by the routing strategy used.
16. The term network topology refers to the way in which the nodes of a network
are linked together. Although the number of possible network topologies is
seemingly limitless, the four major ones are the star network, the ring network, the
completely connected network, and the multi-access bus network.
17. Based on characteristics such as geographic distribution of nodes, data rate,
error rate, and communication cost, networks are broadly classified into two types:
LAN and WAN. Networks that share some of the characteristics of both LANs
and WANs are sometimes referred to as MANs.
18. A communication or network protocol describes the rules that govern the
transmission of data over communication networks. These rules provide a method
for orderly and efficient exchange of data between the sender and the receiver and
for the proper interpretation of controls and data transmitted as raw bits and bytes.
19. Network Interface card, often referred to as NIC or network card, is a
hardware device that allows a computer to be connected to a network, both
functionally and physically.
20. Computer networks are implemented using the concept of layered protocols.
The OSI model provides a standard for layered protocols for WANs. The seven
layers of the OSI model are physical, data-link, network, transport, session,
presentation, and application. Of the available protocol suites for network
systems, the Internet Protocol (IP) suite is the most popular and widely used.
21. Interconnecting of two or more networks to form a single network is called
internetworking, and the resulting network is called an internetwork. The goal of
internetworking is to hide the details of different physical networks, so that the
resulting internetwork functions as a single coordinated unit. Tools such as
bridges, routers, brouters, and gateways are used for internetworking. The
Internet is the best example of an internetwork.
22. A wireless computing system enhances the functionality of computing
equipment by freeing communication from the location constraints of the wired
computing systems.
23. Wireless computing systems are of two types -fixed wireless systems that
support little or no mobility of the computing equipment associated with the
wireless network and mobile wireless systems that support mobility of the
computing equipment which the users use to access the resources associated with
the wireless network.
24. Wireless communication technologies used in wireless networks include
analog cellular, digital cellular, Cellular Digital Packet Data (CDPD), mobile radio
networks, Personal Communication Services (PCS), satellite, microwave systems,
and Local Multipoint Distribution Systems (LMDS).
25. The commonly used wireless technologies include 2G and 3G technologies,
wireless LANs, Wireless Local Loops (WLLs), radio-router technology, multihop
wireless networks, and Wireless Application Protocol (WAP).
26. A distributed computing system is a configuration in which many independent
computer systems (which may be geographically far apart) are connected by a
communication network, and in which messages, processing task, programs, data,
and other resources are transmitted between cooperating computer systems. Such
an arrangement enables the sharing of many hardware and software resources as
well as information among several users who may be sitting far away from each
other.

Questions

1. What is a computer network? How is it useful?


2. Identify the basic elements of a communication system and the purpose of
each.
3. Differentiate between simplex, half-duplex, and full-duplex modes of data
transmission.
4. Which mode of data transmission is suitable for communication between a
terminal and a computer?
5. "A full-duplex line is faster since it avoids the delay that occurs in a half-
duplex circuit." Explain this statement.
6. Explain the terms "bandwidth" and "baud".
7. Why are the transmission mode and the bandwidth of communication channels
of concern to an analyst designing a data communication system?
8. Differentiate between narrowband, voiceband, and broadband
communication channels. Give a practical application of each.
9. What is a wire pair? In what situations are they suitable for use in data
transmission?
10. What is a coaxial cable? Give some of its practical uses.
11. Explain how microwave systems can be used for communication between
two distant stations.
12. How are communications satellites used? What are the possible advantages
and limitations of using a communications satellite?
13. What is an optical fiber? How is it used for data communications? What are
its advantages?
14. Differentiate between analog and digital transmission of data. Give their
relative advantages and disadvantages.
15. What do you understand by modulation and demodulation?
16. Why is modulation used in signal transmission? Describe the three different
forms of modulation used in signal transmission.
17. What are modems? What purpose do they serve in data communication
systems?
18. Describe some of the common factors to be considered while selecting a
modem.
19. Explain the use of "fall back" feature in the design of modems.
20. Differentiate between internal and external modems. Give their relative
advantages and disadvantages.
21. What is a FAX modem? How is it more useful than a conventional modem?
22. Describe the error correction and data compression features found in some
modems.
23. What is an intelligent modem? List out some of the features found in
intelligent modems.
24. What is a repeater?
25. When are public telephone lines used to connect a terminal to a computer?
Are modems required for this purpose? Why?
26. Explain about the following types of services offered by the common
carriers:
(a) Dial-up line (c) Integrated Services Digital Network (ISDN)
(b) Leased line (d) Value Added Network (VAN)
27. What is ISDN? Differentiate between narrow-band and broad-band ISDN.
28. What is a Value Added Network (VAN)?
29. What is a multiplexer? Explain its function with the help of a diagram.
30. Describe the two basic methods of multiplexing. Give uses of both the
methods.
31. List out the differences between FDM and TDM. Which method is suitable
for communication between computers and why?
32. What is a concentrator? Justify its use in a data communication system.
33. What is FEP? Illustrate its use.
34. Describe the asynchronous and synchronous modes of data transmission.
35. List out the relative advantages and disadvantages of asynchronous and
synchronous modes of data transmission.
36. Explain how circuit switching is used to link the sender and the receiver in a
communication network. What are the advantages and disadvantages of this
method of switching?
37. Explain the store-and-forward method of message switching. Give the
advantages and disadvantages of this message switching technique.
38. What is packet switching? Why is this method used for digital data
communication between computers?
39. What is routing? What are the desirable features of a good routing
algorithm?
40. Differentiate between source routing and hop-by-hop routing methods. Give
their relative advantages and disadvantages.
41. Differentiate between static and dynamic routing methods. Give
their relative advantages and disadvantages.
42. What is meant by network topology? Describe three commonly used
network topologies with their relative advantages and disadvantages.
43. What is a hybrid network? Why are they used?
44. Write a short note on multi-access bus network.
45. What is a LAN? What are its main objectives?
46. What is WAN? What is a MAN?
47. Differentiate between a LAN and a WAN. Give one example of each.
48. What is a communication protocol? What are the normal functions
performed by these protocols?
49. Why are communication protocols needed in a computer network?
50. What is a network interface card? Explain its usage in a computer system.
51. Why is layering used in the design of communication networks?
52. Describe the layering concepts in the OSI model of network architecture with
the functions of each layer.
53. What is meant by internetworking? What are the main issues in
internetworking? Explain the difference among the following terms:
(a) Bridge
(b) Router
(c) Gateway
54. What is a wireless computing system? How is it useful?
55. Differentiate between fixed wireless systems and mobile wireless systems.
56. What are the major challenges in the successful use of wireless computing
systems?
57. List out some of the applications that can benefit from wireless computing
systems.
58. Describe the commonly used wireless communication technologies used in
wireless communication systems.
59. Differentiate between 2G and 3G wireless technologies.
60. What is a wireless LAN? Describe the three primary WLAN standards.
61. What is a multihop wireless network? Why are such networks needed?
62. What is Wireless Application Protocol (WAP)? Why is it needed?
63. Describe the various WAP layers, the protocols at each layer, and their
functions.
64. Describe the basic architecture of WAP? Explain the role of WAP gateway.
65. What is a distributed computing system? Why are distributed computing
systems gaining popularity?
66. List out the advantages and limitations of a distributed computing system.
67. Write short notes on:
(a) Data transmission modes
(b) Data transmission speed
68. Write short notes on:
(a) Microwave system
(b) Communications satellite
(c) Optical fibers
69. Write short notes on:
(a) Network interface card
(b) ISDN
(c) Value Added Network (VAN)
(c) Data transmission media
(d) Data transmission services
(d) Dial-up line
(e) Leased line
70. Write short notes on:
(a) Modem
(b) Multiplexer
(c) Concentrator
(d) Front-end processor
71. Write short notes on:
(a) FAX modems
(b) Intelligent modems
(c) Internal versus external modems
(d) Transmission speeds of modems
72. Write short notes on:
(a) Switching techniques
(b) Routing techniques
(c) Network topologies
(d) Asynchronous and synchronous transmission
73. Write short notes on:
(a) LAN versus WAN
(b) Communication protocols
(c) Ethernet
74. Write short notes on:
(a) The OSI model
(b) Internetworking tools
(c) Distributed computing systems
75. Write short notes on:
(a) Fixed versus mobile wireless systems
(b) Issues in successful use of wireless computing systems
(c) Wireless applications
(d) Multihop wireless networks
76. Write short notes on:
(a) Analog cellular
(b) Digital cellular
(c) Mobile radio networks
77. Write short notes on:
(a) 2G technology
(b) 3G technology
(c) Wireless LANs
(d) Cellular Digital Packet Data (CDPD)
(e) Personal Communications Services (PCS)
(f) Local Multipoint Distribution Systems (LMDS)
(d) Wireless Local Loops (WLLs)
(e) Radio-router technology
(f) Wireless Application Protocol (WAP)1
Chapter 18

The Internet

DEFINITION (WHAT IT IS?)

The Internet is a huge network of computers that links many different types of
computers all over the world. It is a network of networks that share a common
mechanism for addressing (identifying) computers and a common set of
communication protocols for communications between two computers on the
network.

BRIEF HISTORY

The Internet has its root in the ARPANET system of the Advanced Research
Project Agency of the U.S. Department of Defense. ARPANET was the first
WAN and had only four sites in 1969. The Internet evolved from the basic ideas of
ARPANET for interconnecting computers and was initially used by research
organizations and universities to share and exchange information. In 1989, the
U.S. Government lifted restrictions on the use of the Internet and allowed it to be
used for commercial purposes as well. Since then, the Internet has rapidly grown
to become the world's largest network. It now interconnects more than 30,000
networks, allowing more than 10 million computers and more than 50 million
computer users in more than 150 countries around the world to communicate with
each other. The Internet continues to grow at a rapid pace.

ITS BASIC SERVICES

There are basically four types of services provided by the Internet to its users.
These are described below.

Electronic Mail

The electronic mail service (known as e-mail in short) allows an Internet user to
send a mail (message) to another Internet user in any part of the world in a near-
real-time manner. The message may not reach its destination immediately, but
may take anywhere from few seconds to several minutes, because it must be
passed from one network to another until it reaches its destination.

E-mail service has many similarities with the postal mail service that all of us are
familiar with. All Internet users have an e-mail address, just like all of us have a
postal address. Each Internet user has a logical mail box just like each one of us
has a mail box in our house. When sending a mail to another user, the sender
specifies the e-mail address of the receiver just as we write the postal address of
the receiver in the postal mail system. The e-mail service delivers an already sent
mail into the receiver's mail box. The receiver extracts the mail from the mail box
and reads it at his/her own convenient time just like in a postal mail system. After
reading the message, the receiver can save it, delete it, pass it on to someone else,
or respond by sending another message back.

Messages in e-mail service can contain not only text documents but also image,
audio and video data. The only restriction is that the data to be sent must be
digitized, that is, converted to a computer-readable format.

With e-mail service, the Internet has proved to be a rapid and productive
communication tool for millions of users. As compared to paper mail, telephone,
and fax, e-mail is preferred by many because of its following advantages:
1. It is faster than paper mail.
2. Unlike the telephone, the persons communicating with each other need not be
available at the same time.
3. Unlike fax documents, e-mail documents can be stored in a computer and be
easily edited using editing programs.

File Transfer Protocol

The File Transfer Protocol service (known as FTP in short) allows an Internet user
to move a file from one computer to another on the Internet. A file may contain
any type of digital information - text document, image, artwork, movie, sound,
software, etc. Hence, anything that can be stored on a computer can be moved
with FTP service. Moving a file from a remote computer to ones own computer is
known as downloading the file and moving a file from ones own computer to a
remote computer is known as uploading the file.

By using the FTP service, a file transfer takes place in the following manner:
1. A user executes the ftp command on his/her local computer, specifying the
address of the remote computer as a parameter.
2. An FTP process running on the user's computer (called FTP client process)
establishes a connection with an FTP process running on the remote computer
(called FTP server process).
3. The user is then prompted for login name and password to ensure that the user
is allowed to access the remote computer.
4. After successful login, the desired file(s) are downloaded or uploaded by using
get (for downloading) and put (for uploading) commands. The user can also list
directories or move between directories of the remote computer before deciding
the file(s) to be transferred.
Notice from the discussion presented above that a user could transfer files to/from
a remote computer only if he/she has access rights for the remote computer. With
this restriction, it is almost impossible to provide access rights to the vast number
of the users of the Internet to a computer that contains sharable information. The
concept of anonymous FTP site is used to overcome this problem. An anonymous
FTP site is a computer that allows a user to log in with a username of anonymous
and then a password that is the user's e-mail address. The user can then download
files from the computer that have been stored on it for the purpose of sharing.
Such sites are called publicly accessible sites because they can be accessed by any
user on the Internet.

Of course, FTP service is also used for more secure file transfer operations. In
such cases, a user needs a valid username and password to access a particular
computer. This is common; for example, for organizations that wish to let only
certain people access their computer.

Telnet

The telnet service allows an Internet user to log in to another computer somewhere
on the Internet. That is, a user can execute the telnet command on his/her local
computer to start a login session on a remote computer. This action is also called
"remote login."

To start a remote login session, the user types the command telnet and the address
of the remote computer on the terminal of his/her local computer. The user then
receives a prompt asking to enter a login name (user ID) and a password to ensure
that the user has the access rights for accessing the remote computer. If the user
specifies a correct login name and password, he/she gets logged in to the remote
computer. Once the login session is established with the remote computer, telnet
enters the input mode and anything typed on the terminal of the local computer by
the user is sent to the remote computer for processing.

Some of the common uses of the telnet service are:


1. Using the computing power of the remote computer. The local computer may
be an ordinary personal computer and the remote computer may be a powerful
super computer.
2. Using a software on the remote computer. The software that the user wants
to use may not be available on the local computer.
3. Accessing remote computer's database or archive. The information archive
such as the public database or library resources may be available on the remote
computer.
4. For logging in to ones own computer from another computer. For example, if
the user is attending a conference in another city and has access to a computer on
the Internet, he/she can telnet to his/her own computer and read his/her electronic
mails.

Usenet News

The usenet service allows a group of Internet users to exchange their


views/ideas/information on some common topic that is of interest to all the
members belonging to the group. Several such groups exist on the Internet and
are called newsgroups. For example, the newsgroup named comp. security misc
consists of users having interest in computer security issues.

A newsgroup is like a large notice board that is accessible to all the members
belonging to the group. A member, who wants to exchange his/her
views/ideas/information with other members, sends a specially formatted message,
which is processed and interpreted as a notice to be posted on the notice board by
the member's computer, which has an appropriate software running for this
purpose. After the processing of the message is over, it can be read (seen) from
any member's computer just like a notice posted on a notice board can be read by
anyone having access to the notice board.

There are two types of newsgroups - moderated and nonmoderated. In a


moderated newsgroup only selected members have the right to directly post
(write) a message to the virtual notice board, whereas in a nonmoderated
newsgroup any member can directly post a message to the virtual notice board. In
a moderated newsgroup, a message sent by an ordinary member first goes to the
computer of one of the selected members having the right to directly post a
message to the notice board. The message is then checked by this member who
decides whether the message is appropriate for being posted and does any editing
that might be required to improve the quality of the message. This member then
posts the message on the notice board. After this only the message becomes
readable to (can be seen by) other members.

The main idea of a moderated newsgroup is to ensure the quality of the


newsgroup. As no one moderates the quality of the messages of a nonmoderated
newsgroup, anyone can post anything. But members of such newsgroups should
be careful in posting a message because other members may react angrily by
sending a flaming message in response to an ill mannered message. To address
this issue, the concept of netiquette (network etiquette) has arisen, that deals with
rules of framing messages that will not hurt others.

Each newsgroup has a unique name. For example, the newsgroup named
comp.lang.c contains messages relating to the discussion on C programming
language issues. A newsgroup can be created by the system administrator of any
computer on the Internet. To make it accessible to other members, he/she then
exports the newsgroup to other computers by using a special command meant for
this purpose. An Internet user who wants to become a member of a newsgroup has
to first subscribe to the newsgroup by using a special command meant for this
purpose. An already subscribed user can unsubscribe from a newsgroup at any
time.

Over the years, many newsgroups have become extremely well organized and
moderated and include valuable information. For example, many newsgroups have
documents called FAQs (Frequently Asked Questions) that try to answer many of
the questions that someone new to the group would have on the topic. A
newsgroup is a great place to ask questions or catch up on the recent issues of the
topic it covers because newsgroups often have world experts in their respective
fields as their members.

INTERNET SEARCH TOOLS

The Internet is a vast ocean of information that is of interest to a wide variety of


users. Obviously, this large information bank will be of little or no use if one can't
easily find something of his/her own interest in it. Therefore, several user-friendly
tools have been made available that allow users to successfully navigate the
Internet and find useful information for one's own purposes. A few of the most
popular of these tools are briefly described below.
The process of navigating the Internet to search for useful information is often
called Internet surfing. Hence, Internet search tools are also called surfing tools.

Gopher

Gopher is a text-based tool that provides hierarchical collections of information of


all sorts across the Internet. It displays the information hierarchy as a series of
menu items. That is, when using gopher, each menu item connects to another
menu that branches off to yet another series of menus until you reach the actual
document, image, sound, file, etc.

Gopher is useful for an Internet user who is faced with the question "Is there
anything on the Internet that is useful for me?" It allows the user to see
information on the Internet as if they were all on his/her own computer. That is,
from the menus displayed by gopher, the user can select and display the desired
information without having to type the address of the computer on which the
information is located or without having to remotely log in to that computer.
Gopher automatically does all this for the user in the background.
Archie

Archie is a keyword-based search tool that allows files, stored at anonymous sites
of the Internet, to be searched either by their names or by their contents. You tell
archie to search for something by typing a "keyword". In case of a "name search",
the keyword is a filename or part of a filename you are looking for. As a result of
this search, archie will display a listing of FTP site addresses that have filenames
that contain the indicated keyword. The filenames containing the indicated
keyword are also displayed for each such FTP site. On the other hand, in case of a
"content search", the keyword is a word or phrase that you are looking for as data
in files. As a result of this search, archie will display a listing of FTP site addresses
and the filenames of the files that contain the indicated keyword as file data.

World Wide Web

The World Wide Web (called WWW or W3 in short) is the most popular and
promising method of accessing the Internet. The main reason for its popularity is
the use of a concept called hypertext. Hypertext is a new way of information
storage and retrieval that enables authors to structure information in novel ways.
An effectively designed hypertext document can help users rapidly locate the
desired type of information from the vast amount of information on the Internet.
Hypertext documents enable this by using a series of links. A link can be shown
on the screen in multiple ways such as a labeled button, highlighted text, or
different color text than normal text if your computer has a color display, or
author-defined graphic symbols. A link is a special type of item in a hypertext
document that connects the document to another document that provides more
information about the linked item. The latter document can be anywhere on the
Internet (in the same document in which the linked item is, in the same computer
in which the former document is, or in another computer that is at the other end of
the world). By "connect" we mean that a user simply selects the linked item (using
a mouse or key command) and the user almost immediately sees the other
document on his/her computer terminal.

The concept of hypertext can be best illustrated with the help of an example,
Suppose the screen of your computer terminal has the following hypertext
document currently displayed on it:

Pradeep K. Sinha has been involved in the research and development of


distributed systems for almost a decade. At present Dr. Sinha is working at the
Centre for Development of Advanced Computing (C-DAC), Pune, India. Before
joining C-DAC, Dr. Sinha worked with the Multimedia Systems Research
Laboratory (MSRL) of Panasonic in Tokyo, Japan.
This hypertext document has the following two links that are shown on the screen
as highlighted (bold and underlined) texts:
1. Centre for Development of Advanced Computing (C-DAC). Suppose this
link connects the current document to another document that gives detailed
information about C-DAC and is located on a computer system at C-DAC in Pune,
India.
2. Multimedia Systems Research Laboratory (MSRL) of Panasonic. Suppose
this link connects the current document to another document that gives detailed
information about MSRL of Panasonic and is located on a computer system at
MSRL of Panasonic in Tokyo, Japan.

Now, suppose your computer had a mouse connected to it, and you used the
mouse to click anywhere on the link Multimedia Systems Research Laboratory
(MSRL) of Panasonic of the displayed document. What would happen? Within a
few seconds you will find yourself connected to the computer at MSRL of
Panasonic in Tokyo and displayed on your computer screen will be the document
that gives detailed information about MSRL of Panasonic.

Hypertext documents on the Internet are known as Web Pages. Web Pages are
created by using a special language called HyperText Markup Language (HTML
in short). HTML is a subset of the more generalized language called Standard
Generalized Markup Language (SGML in short) which is a powerful language for
linking documents for easier electronic access and manipulation of documents.
HTML is becoming a de-facto industrial standard for creating Web Pages.

The WWW uses the client-server model and an Internet Protocol called HyperText
Transport Protocol (HTTP in short) for interaction between the computers on the
Internet. Any computer on the Internet that uses the HTTP protocol is called a
Web Server and any computer that can access that server is called a Web Client.
The use of the client-server model and the HTTP allows different kinds of
computers on the Internet to interact with each other. For example, a Unix
workstation may be the web server and a Windows PC may be the web client if
both of them use the HTTP protocol for transmitting and receiving information.

WWW BROWSERS

To be used as a web client, a computer needs to be loaded with a special software


tool that is known as WWW browser (or browser in short). Browsers normally
provide the following navigation facilities to help users save time when they are
jumping from server to server while Internet surfing:
1. Unlike FTP and Telnet, browsers do not require a user to remotely log in to a
server computer and then to log out again when the user has finished accessing
information stored on the server computer.
2. Browsers allow a user to specify an URL address of a server computer to
facilitate the user to directly visit the server computer's site and to access
information stored on it. URL stands for Uniform Resource Locator. It is an
addressing scheme used by WWW browsers to locate sites on the Internet.
3. Browsers allow a user to create and maintain a personal hotlist of favorite
URL addresses of server computers that the user is likely to frequently visit in
future. A user's hotlist is stored on his/her local web client computer. Browsers
provide hotlist commands to allow the user to add, delete, update URL addresses
in the hotlist and to select an URL address of a server computer from the hotlist
when the user wants to visit that server computer.
4. Many browsers have a "history" feature. These browsers maintain a history of
the server computers visited in a surfing session. That is, they save (cache) in the
local computer's memory, the URL addresses of the server computers visited
during a surfing session, so that if the user wants to go back to an already visited
server later on (in the same surfing session), the link is still available in the local
computer's memory.
5. Browsers allow a user to download (copy from a server computer to the local
computer's hard disk) information in various formats (i.e., as a text file, as an
HTML file, or as a PostScript file). The downloaded information can be later (not
necessarily in the same surfing session) used by the user. For example,
downloaded information saved, as a PostScript file can be later printed on a
PostScript-compatible printer, where even the graphics will be properly
reproduced.

Browsers come in various forms and capabilities. The currently available browsers
can be broadly classified into the following three types:
1. Line browsers,
2. Graphical browsers, and
3. Java-enabled browsers.
They are described below.

Line Browsers

A line browser is a text-based browser that provides command-line interface to its


users. That is, line browsers are capable of displaying only plain text. They denote
a hypertext link either by using numbers in brackets like this [1], or by using
boldface type like this. Line browsers that use the latter approach to denote a
hypertext link are known as Lynx browser and are the most common line browsers
in use today. Line browsers are used on those web-client computers that only have
text displaying capability.
An example of a typical line browser display is given in Figure 18.1. Note that
every word or phrase that is of boldface type (such as ARPANET system)
represents a hypertext link.

The commands at the bottom of the screen help users take advantage of the
various features of the line browser. For example, a user can use the up and down
arrow keys to skip to the next hypertext link, and use the right and left arrow keys
to either select a link, or move backward to a previous link. Pressing the return key
initiates the link that is currently selected and the browser takes the user to
wherever it leads.

An Introduction to the Internet <pl of 10>


The Internet is a network of networks that share a common
mechanism for addressing computers and a common set of
communication protocols for communications between two
computers on the network. It has its root in the ARPANET system.
The following are the four types of basic services provided by the
Internet to its users:
Electronic Mail File Transfer Protocol Telnet Usenet News
There are several user-friendly, tools that allow users to successfully
navigate the Internet and find useful information for one's own
purposes. A few of the most popular of these tools are:
Gopher Archie - World Wide Web
To be used as a web client, a computer needs to be loaded with a
special software tool that is known as WWW browser.
— press space for next page — Arrow keys: Up and Down to move.
Right to follow a link; Left to go back. H>elp 0>ptions P>rint G>o
M>ain screen Q>uit/=search [delete] = history list

0
Figure 18.1. A typical line browser display.

Graphical Browsers

Although line browsers offer full hypertext capability for Internet surfing, they
have the following limitations:
1. They cannot handle multimedia data such as graphics, image, video, and
sound.
2. They rely heavily on the keyboard for navigating and selecting information
because a user has enter a selection number or skip from link to link by using the
arrow keys of the keyboard.

Graphical browsers are designed to overcome these limitations of line browsers.


They are designed to take full advantage of the WWW's ability to handle all kinds
of digital media such as graphics, image, video and sound. Moreover, they rely
heavily on the mouse for navigating and selecting information. A user can literally
point a: click his/her way around the world on the Internet by using only the
mouse. However, graphical browsers requi the web client computer to have
graphics capabilities of handling and displaying multimedia data. Therefore, i web
client computer has graphics capabilities, such as a Windows, Macintosh, or
XWindows machine, then it c be loaded with a graphical browser to allow its users
to have a visually more spectacular Internet surfing compared to a line browser.
These are many graphical browsers available today with names like Mosaic,
NetScape, Cello, Viola, MacWeb, Internet Explorer, etc. Out of these, Mosaic is
the best known and probably the most popular one. It is distributed free of charge
by the NCSA (National Center for Supercomputing Applications). There is also a
commercial version of Mosaic available now called NetScape, which is becoming
the de-facto standard for browsers. Internet Explorer is also a very popular
graphical browser.

To give an idea of a graphical browser, Figure.,18.2 shows how the initial screen
looks like when Internet Explorer is invoked.

Note that in case of a graphical browser, a hypertext link can be shown on the
screen in multiple ways such as a labeled button, highlighted (bold and/or
underlined) text, or different color text than normal text if the computer has a color
display, or author-defined graphics symbols. If the computer has a color display,
the usual default is for links to be in both blue and red colors. Blue links are places
you haven't visited yet in your current Internet surfing session and Red links are
places you have already visited. In other words, once you click on a link and go to
that place, if during the same session you ever come back to the text from which
the hypertext jump was made, it will show up as a red link indicating that you
have already visited the place of this link. This little navigation helper is a great
time-saver if you are jumping from server to server searching for information on a
particular topic.

Java-enabled Browsers

A conventional graphical browser works as follows (see Figure 18.3):


1. The user of the web-client calls on hypertext link.
2. The browser of the web-client computer decodes the URL address of the link.
3. The browser contacts the server corresponding to the URL address and
requests for the object referenced by the link.
4. The server then fetches an object from the local computer and returns to the
browser a bag of bytes that contains the object.
5. The browser then inspects the bytes to determine the type of the data such as
HTML document or JPEG image, etc.
6. Finally, the browser uses the data type information to invoke the appropriate
code to manipulate and display the object on the web-client computer's screen.
Browser - User clicks on a hypertext link
Browser - Browser decodes URL address of the link
Browser - Browser requests corresponding object from the server
Browser - Browser inspects the bytes to determine the type of the data
Browser uses the data type information to invoke the appropriate code to
manipulate and display the object on the computer's screen
Network - request
Network - Reply
Server - Server fetches the object and returns to the browser a bag of bytes that
contains the object

Conventional graphical browsers that work in the manner described above are
called "first-generation" browsers. The main problem with these browsers is that
they are built in a monolithic fashion. That is, every possible type of data, protocol
and behavior that a browser can deal with is frozen into its design when the
browser is built. This means that every time a new data type, protocol, or behavior
is invented, this browser must be upgraded to make it capable of dealing with the
new situation. From the viewpoint of end users this is a difficult job because users
must continually be aware of what data types and protocols exist, which browsers
deal with which of these data types and protocols, and which versions of which
browsers are compatible with each other. Given the rapid growth of the Internet,
this situation is clearly out of control. Java-enabled browsers, known as "second-
generation" browsers, are designed to overcome the above-mentioned limitations
of the conventional graphical browsers. They are based on the Java programming
language (see Chapter 12 for details) and have the ability to dynamically
download Java applets (mini-applications) from webserver computers to web-
client computers and execute them on the client's computer. This feature provides
the following capabilities to Java-enabled browsers:
1. Dynamic content. We saw that a first-generation browser can download
data from a server computer to its own client computer and can display the data on
the client's computer terminal screen. In addition to data, Java-enabled browsers
can also download Java-based applets (segments of programs that act as mini-
applications) on the client comnnter that are executed right there on the client
machine. Java-based applets may be written to pntvid" full animation, play
sound, and interact with the user in real time when executed. Thus, Jav3 ^n^iled
browsers transform the static data display capability of first-generation browsers
into a new td dynamic viewing system. They enable creation and display of
animation-oriented applications that was not possible with first-generation
browsers. For example, someone could write a Java program to implement on
interactive chemistry simulation. Users browsing the Internet with a Java-enabled
browser could easily download this simulation program on their computer and
interact with it, rather than just having a static picture with some text displayed on
their computer screen.
2. Dynamic data types. We saw that due to their monolithic design structure,
the first-generation browsers can deal with only a fixed set of data objects. For
example, a browser might be designed to understand only the following image
formats - GIF, XI1 pixmap, and XI1 bitmap. If this browser sees a new image
format, it cannot display it because it does not know how to deal with it. A Java-
enabled browser overcomes this problem of dealing with an unknown/new data
type object because it can dynamically download the Java-based applet for dealing
with the unknown data type object from the server computer from which the data
object is downloaded. The applet can then be executed to deal with the unknown
data type object and to display it on the client's computer screen. Figure 18.4.
illustrates how a Java-enabled browser interacts with a server when it encounters
an object of an unknown type.
Notice that the capability of Java-enabled browsers to understand different types
of objects dynamically makes life of the Internet users much more comfortable.
For example, if someone invents a new object type, the inventor just has to make
sure that a copy of the Java-based applet for dealing with the object type is
installed on the server that contains the object type. There is no need to upgrade all
the browsers in the world. A Java-enabled browser actually upgrades itself
dynamically when it encounters a new type of object.
3. Dynamic protocols. HTTP (HyperText Transport Protocol) is the most
commonly used protocol for interaction between the computers on the Internet.
Hence, most of the first-generation browsers have the knowledge of HTTP built in
them. However, with the increase in commercial use of the Internet, many
software vendors are providing new browsers and servers with added capabilities,
such as billing and security. These new capabilities most often take the form of
new protocols. So each vendor comes up with their unique style of security and
sells a server and browser that understand this new protocol. An increasing trend
of such new protocols have become a problem for Internet users because if a user
wants to access data on multiple servers with each one having its own proprietary
new protocols, the user needs multiple browsers or needs to upgrade its browser
every time a new protocol is introduced. This is certainly not possible. '
A Java-enabled browser overcomes this problem of dealing with new protocols
because it can dynamically download the Java-based applet for dealing with the
new protocol from the server computer with which it is interacting. The software
vendor of a server with a new protocol just has to make sure that a copy of the
Java-based applet for dealing with the new protocol is installed on the server. The
interactions between the browser and server take place in a manner similar to the
one illustrated in Figure 18.4. A Java-enabled browser actually upgrades its
capability of understanding new protocols dynamically as and when it encounters
a new protocol.

Browser
User clicks on a hypertext link
Browser decodes URL address of the link
Browser requests corresponding object from the server
Browser inspects the bytes to determine the type of the object and realizes that it is
of unknown type
Browser requests the server for the Java-based applet to support the object
Browser executes the applet to manipulate and display the object on the
computer's screen

Network
Request
Reply
Request
Reply

Server
Server fetches the object and returns to the browser a bag of bytes that contains the
object
Server returns to the browser the applet to support the object

Figure 18.4. Functional structure of a Java-enabled browser.

INTERNET SEARCH ENGINES

An Internet search engine is an application available on the WWW that helps users
locate the web sites containing useful information and references to such
information. For using a search engine, the user has to type the description of the
desired information using the user interface provided by the search engine. The
search engine in turn searches for the requested information and returns the results
of this search to the user. The returned results enable the user to quickly locate the
requested information from the vast ocean of information available on the Internet.
Major Elements of Internet Search Engines

The three major elements of an Internet search engine are as follows:


1. Search request interface, which allows the users to provide description of the
desired information to the search engine. Depending on the complexity of this
element, the search engine may allow specifications of simple keywords,
combination of keywords using boolean operators and exclusion/inclusion
operators, specification of phrases, and title and URL limiters.
2. Information discoverer, which discovers information from the WWW and
creates a database for the search engine, which is used to locate useful information
during the search process. The information discoverer accrues this information in
two-ways: (a) in the manual method, authors provide information about their
websites to the search engine; (b) in the automatic method, the information
discoverer collects the information using programs, such as web crawlers, spiders,
robots. These programs periodically roam on the Internet storing links of
information about each page they visit as well as their associated hyperlinks. The
information discoverer creates an index from the results of the automated search.
If the web page is changed or updated, the spider finds these changes and the
index is updated.
3. Presenter of search results, which returns the results of the search, ranking
them in the order it believes, is most relevant to the search. Search engines often
list the results of the search in accordance to a relevance score. Relevance scores
reflect the number of times a search term appears in a web page. Some search
engines also allow the user to control the relevance score by giving different
weights to each search word.

Categories of Internet Search Engines

Internet search engines are normally categorized into the following four
categories:
1. Natural Language Search Engines. These search engines allow the users to
submit search phrases in natural languages such as English, Hindi, Japanese, etc.
instead of using boolean operators to link keywords.
,
2. Subject Directories Search Engines. These search engines present the results
of searches in hierarchical subject categories, instead of listing them in an order by
how relevant the search engine thinks the site is to the search.
3. Subject Guide Search Engines. These search engines contain links of many
important resources on a topic. They differ from subject directories search
engines in the sense that their search request interface has forms that contain
databases of sites on many subjects, organized into a subject classification scheme.
4. Meta Search Engines. These search engines do not create their own databases
but make use of the databases of other search engines. They quickly process the
user's search request by invoking several individual search engines at once and
return the results compiled into a convenient format.

Some Popular Internet Search Engines

Today, there are more than two dozen major search engines available on the
WWW. Some of the popular ones are as follows:
1. HotBot (www.hotbot.com) provides extensive search options through the use
of query operators and forms. It allows the use of query operators in combination
with forms, which many other search engines do not allow. In addition to the
options found on the basic search form, it has an advanced search form.that
provides more precise filters, additional specifiers, and limiters.
2. Yahoo (www.yahoo.com) supports a query syntax that allows
inclusion/exclusion, phrase matching, wildcard matching, and title and URL
limiters. Like other search engines, Yahoo provides form-based searching on its
search options page, which also allows customization of the results display, and
date ranges.
3. Lycos (www.lycos.com) provides a good option of both basic and advanced
search features. Its basic search form has a drop-down menu that allows boolean
and phrase searching, natural language queries, and basic adjacency and proximity
searches. On the other hand, it has advanced search options, which allows the
user to limit results to sound or picture files, or pages offered as a part of the
Lycos services. These limiters may also include HTML title, URL, and specific
domains.
4. Infoseek (www.infoseek.com) uses a form-based approach that requires a Java
script enabled browser. It assumes some knowledge of HTML to provide the
description of the desired information.
5. Google (www.google.com) is an interesting search engine having many
unique features. It excels in producing extremely relevant results, and instead of
web page summaries shows an excerpt of the text that matches the search query.
For determining relevance scores of search results, it goes far beyond the number
of times a keyword appears on a page and examines all aspects of the page's
contents. It prioritizes the results according to how closely the individual search
terms appear, and favors results that have the search terms near each other. It only
produces results that match to all the search terms either in the text of the page or
in the text of the links pointing to the page.
6. Inference Find (www.infind.com) is a meta search engine that searches six
search engine: simultaneously. The search engine merges the results, removes
duplicate files, and organizes the results into sections by concepts and/or by top-
level domain (educational institution, government organization, company, etc.) It
retrieves the maximum number of results each search engine will allow by
searching target search engines in parallel. Due to the parallel search feature, it
returns the results very quickly.
7. Ixquick (www.ixquick.com) is another meta search engine that uses multiple
search engines to perform the search and returns only the top-10 of the search
results. It utilizes a "star" system, whereby the number of stars indicates the
number of sites ranking each result in the top-ten. It offers a variety of search
options including boolean, implied boolean, natural language search, truncation,
case sensitivity and field search by sending a query to the search engines that
support these options. It also has features for searching news, mp3 music files and
pictures.

USES OF THE INTERNET

The world-wide scope of the Internet makes it perhaps the single most valuable
tool for use in many significant ways by both non-profit and commercial
organizations. Some of the important current strategic uses of the Internet are
listed below:
1. On-line communication. The electronic mail service on the Internet is
extensively used today by computer users around the world to communicate with
each other. With this facility, the Internet has proved to be a rapid and productive
communication tool for millions of users.
2. Software sharing. The Internet provides access to a large number of
shareware software development tools and utilities. A few examples of such
available shareware tools are compilers, code libraries, mail servers, and operating
systems. For example, a set of such shareware tools is available via ftp from the
Internet site sunsite.unc.edu. The Free Software Foundation also provides a wealth
of GNU software tools on the Internet that can be downloaded free of charge. For
more details on the software tools offered by the Free Software Foundation, you
can anonymous yip to the Internet site prep.at.mit.edu and look in the directory
/pub/GNU.
3. Exchange of views on topics of common interest. The Internet has a number
of news groups. Each news group allows a group of users to exchange their views
on some topic of common interest. For example, the news group
comp.os.os2.advocacy contains candid dialog about the OS/2 operating system.
4. Posting of information of general interest. The Internet is also being
extensively used as a large electronic bulletin board on which information of
general interest can be posted to bring it to the attention of interested users around
the world. Some commonly posted information includes career opportunities,
conference and event announcements, and calls for papers for conferences and
journals.
5. Product promotion. Several commercial organizations are effectively using
the Internet services for promoting their products. These organizations make use
of corporate ftp, Gopher, or WWW server sites focused on disseminating
timely information about corporate happenings, product announcements,
recent strategic alliances, press releases, and other information of potential interest
to existing and prospective customers. For example, comp.sys.sun.announce
news group contains information about Sun Microsystem's latest product
announcements.
6. Feedback about products. In addition to product promotion, commercial
organizations are also using the Internet to gather information about user
satisfaction of existing products, market opportunities of new products, and ideas
for potential new products. This is usually accomplished by putting up an
interactive survey application by the organization on a WWW or Gopher site on
the Internet.
7. Customer support service. Many software organizations are also using the
Internet to provide unprecedented levels of timely customer support. The
combined electronic mail, ftp, and other services on the Internet provide all of the
enabling tools necessary to provide such first-rate customer support. For
example, bugs in fielded software products can be reported to an organization via
electronic mail, and bug fixes, minor releases, workarounds, known problems and
limitations, and general advice about a product can be made available by an
organization to its customers via an ftp server.
8. On-line journals and magazines. The Internet now has literally
thousands of electronic subscriptions that can be found both for free and low cost.
There are many Gopher and WWW sites on the Internet that deal with electronic
versions of many journals and magazines. For example, the Internet edition of
the Times of India newspaper is available at the Internet site
http://www.timesofindia.com. Researchers are working in the direction to extend
this idea to support full-fledged electronic libraries on the Internet.
9. On-line shopping. The Internet has also facilitated the introduction of a new
market concept that consists of virtual shops. These shops remain open 24 hours
all the year round and are accessible to purchasers all around the world. They
provide information about products or services for sale through ftp, Gopher, or
WWW servers. Using the Internet services, customers submit specific product
queries and request specific sales quotes. Through a well-defined authorization
and authentication scheme, the Internet services are then used to accept orders
placed by the customers, to handle order payments, and to track orders to
fulfillment. For example, the Internet Mall is a collection of shops, each
providing several products or services for sale. For a list of the available products
or services at the Internet Mall, you can ftp to the Internet site ftp.netcom.com and
look in the directory /pubs/Guides. Similarly, the Internet site amazon.com is a
WWW-based book shop on the Internet where information on all types of
International books can be found and books can also be ordered on-line.
10. World-wide video conferencing. World-wide video conferencing is an
emerging service on the Internet that allows a group of users located around the
globe to talk and interact with each other as if they were sitting and discussing in a
single room. The parties interacting can see each other talking on their computer
screens and can hear each other's voice through a special audio-device fixed in
their computers. The CU-SeeMe system developed at Cornell University is an
example of an Internet-based video conferencing system. For information on CU-
SeeMe, you can ftp to the Internet site gated.cornell.edu and look in the
directory /pub/video/CU-SeeMe.FAQ. 76.txt.

HOW TO GET CONNECTED TO THE INTERNET?

We saw that the Internet can be put to many different types of usage. However,
before one can even think of using the Internet, he/she has to be connected to this
worldwide communications network. There are four basic ways to get connected
to the Internet:
1. Direct/Leased-line
2. Remote Dial-up
3. SLIP/PPP .
4. Commercial Online Service
Each of these options varies in terms of hardware and software required for
connection, cost of connection, and flexibility of usage (what can and cannot be
done). Let us consider these options one by one to understand their connectivity
differences.

Direct/Leased-line Connection

In this method, a dedicated (leased) phone line is used to connect a computer


system to the Internet. As the communication line is dedicated, the entire
bandwidth of the line is reserved for network traffic between the Internet and the
connected computer system. The connected computer system is sometimes called
a gateway because it can be used to provide Internet connectivity to other
computers via it. Here direct connection means that the connected computer
system forms a domain (a final destination) on the Internet, such as stanford.edu or
ibm.com, and that it can be used to provide Internet connection to other computers
that become part of the same domain.

Most large organizations having their own internal computer network (such as
colleges, universities, research institutions, etc.) use this method of Internet
connectivity. Depending on the type of setup within an organization, individual
computers of the organization may or may not have their own Internet address and
software tools for communicating with the Internet. In the former case, access to
the Internet from an individual computer is direct, meaning that a user of the
individual computer can use its own software tools for Internet access and if
he/she transfers a file from another computer on the Internet, that file will be
downloaded directly to his/her computer's hard disk, where he/she can
immediately access it. In the latter case, the user of an individual computer has to
use the software tools for Internet access that are on the gateway computer and a
file downloaded from the Internet first goes to the gateway computer's hard disk
which has to be again transferred to the hard disk of the user's computer.

Fees for direct connections are often based on yearly contracts and the cost of such
a connection depends on a number of factors, including bandwidth (speed of the
leased line), number of users, and the purpose of use (for profit, non-profit,
educational, etc.). Because of the significant expenses involved, direct connection
method is suitable mainly for large organizations and software companies and is
not suitable for individuals willing to connect their own personal computer or
workstation to the Internet.

Remote Dial-up Connection

We saw that the gateway computer system of a direct/leased-line connection can


be used to provide Internet connectivity to other computers via it. This idea has led
to the concept of Internet Service Provider (ISP). An ISP is an organization that
maintains a gateway computer system having direct/leased-line connectivity to the
Internet and provides Internet access facility to other users (that are registered with
it) by allowing them to connect their personal computers to its own gateway
computer by using a modem. This method of connecting a user's personal
computer to the Internet is known as remote dial-up connection. The ISP's
gateway computer is called a host or server, and the user's computer is called a
client or remote machine. Using his/her personal computer, the user has to first log
in to the server computer in order to use its connection to the Internet.

rFor a remote dial-up connection, a user requires a computer with some basic
telecommunications software, a • telephone line, and a modem. Today, you can
buy a computer with a modem already installed in it. However, if fyou already
have a computer and you need to buy only a modem, the recommenced speed for a
new modem is 128.8 Kilobits/sec or faster.

With this kind of connection, a user is assigned on account on the host computer.
This includes assignment of an (e-mail name, or address, such as
sinha@netcom.com and allocation of some disk space on the host computer. For
fusing the Internet facility, the user dials up the host computer by using his/her
computer and the modem and then logs in to the host computer by using his/her e-
mail name and password. The user then uses the host computer's Internet software
to access the Internet. The actual level of user's Internet access is dependent on the
Internet software running on the host (different hosts may offer different packages
of services - e-mail, FTP, telnet, Usenet news, gopher, WWW, etc.). Moreover,
the user is also required to learn a little about the host computer': operating system
to take advantage of his/her connection. So if the host is a Unix computer, the user
will have to learn a few Unix commands to access the Internet. Essentially, the
user's computer acts as a dumb terminal to simply access the host and its Internet
software.
With this kind of connection, if a user visits an Internet site and downloads some
information, the downloaded information gets stored in the disk space allocated to
the user on the host computer. The user then needs to copy it to his/her personal
computer by using the telecommunications software on his/her computer. That is,
with a remote dial-up connection, anything a user uploads or downloads has to go
first through the host computer. Hence the host computer acts 4s a transfer station.
Fees for remote dial-up connections are normally based on hourly usage of the
host computer by clients.

SLIP/PPP Connection

SLIP/PPP connection is an extension to the remote dial-up connection to allow


client computers to have and run their own Internet software to access the Internet
rather than depending on the host computer's software. With this type of
connection, a user needs to know only about his/her own computer's operating
system and Internet software and need not learn about the host computer's
operating system and other software to take advantage of his/her connection to the
Internet. This is made possible by using SLIP (Serial Line Internet Protocol) or
PPP (Point-to-Point Protocol), which are software that allow a client computer to
be connected via a modem to a he computer, and once connected, the client
computer becomes an actual domain on the Internet. Hence all t software tools that
the user of a client computer uses for interfacing with the Internet are the ones that
are put 1 and run on the client computer.
For a SLIP/PPP connection, a user requires a computer with TCP/IP
(Transmission Control Protocol/Intent Protocol) communication software, a
telephone line, a fast modem (28.8 Kilobits/sec or faster), and SLIP or PPP
software. When a user wants to set up a SLIP/PPP connection, the Internet Service
Provider (ISP) asks to specify which of the two software the user wishes to use
and, depending on the user's choice, it provides one of the two software free of
charge to the user. SLIP and PPP provide essentially the same functionality, but
the gene opinion is that PPP is newer, better implemented, and likely to replace
SLIP in the long run; however, SLIP more common today. If you have the option,
go with PPP. The user is also responsible for acquiring a installing the Internet
software tools that he/she wishes to use for accessing various Internet services.

Like for remote dial-up connections, fees for SLIP/PPP connections are also
normally based on hourly usage the host computer by clients.
Commercial Online Services

At the time of writing this, this method of Internet connectivity is not available in
India. It is used in some of the advanced countries like the US. In this method, a
service organization offers a complete online environment access to some or all of
the Internet's services by using phone service to connect a client's local call to the
host computer of the service organization. The service organization offers local
phone access to most areas of country. This means that if a client is traveling with
a laptop, he/she can usually access his/her online account from different cities with
only a local phone call.

There are a handful of such service organizations in the US that provide


commercial online services. The popular ones are CompuServe, America Online
(AOL), GEnie, Delphi, eWorld, and Prodigy.

A client has to register with one of the commercial online services to use the
services provided by it. At the time of registration, the client is given an online
account on the host computer of the commercial online services and he/she is
given (usually on a floppy disk) all the software that is needed to access the
service (including the telecommunications software). The client only needs to
have a computer and a modem. The client logs in to his/her account by entering
the phone number given to him/her by the commercial online services. Once
logged in, the client can access the Internet through a graphical user interface.

OTHER RELATED CONCEPTS

Intranet

Most organizations often require their employees to have easy and quick access to
department, corporate, and customer information. To address this requirement,
they need more dynamic ways to link people and information than conventional
means of communication. Several organizations haye started using Intranets to
fulfill this requirement. An Intranet is a network that connects the computers and
networks within an organization by using the hardware and software that is used
on the Internet. Typically, it uses the TCP/IP protocols and server and browser
software used for the Internet.

With an Intranet, the basic services of the Internet (electronic mail, file transfer
protocol, telnet and usenet news) becomes available to the employees and business
partners of the organization. This allows the employees and business partners of
the organization to communicate effectively and quickly by using electronic mail
facility, and to share information, software and other computing resources by
using the other facilities.
The various departments of the organization can put the information on their web
pages on to the Intranet, and all interested parties can access the information, read
it, and download it without wasting the paper to copy it, or the time to make and
circulate the copies. Similarly, employees of the various offices of the
organization located across the world can form a newsgroup to brainstorm or
exchange ideas collectively on topics of common interest. An Intranet being
confined to the computers and networks of an organization, the information on the
Intranet is confined to the employees and business partners of the organization.
This is a great security advantage of Intranets. Furthermore, since an Intranet uses
the same software as the Internet, which most computer users are already familiar
with, the users of the Intranet do not require any additional training. Owing to all
these features, the usage of Intranets is growing rapidly to more and more
organizations.

Proxy Server

An organization's network interconnects all the computers of the organization. If


all these computers are directly connected to the Internet, maintaining security
becomes difficult for the organization because the Internet is an open environment.
There may be virus attacks on the organization's computing resources and other
security problems through the Internet. To handle this problem, organizations
often use a proxy server, which is a computer system that is specially configured
to allow other computers of an organization to interact with the Internet through it.
When only a single proxy server interacts with the Internet, security can be easily
maintained because the single server can be kept more secure than hundreds of
individual computers on a network.

With proxy server, the Internet is accessed from within the organization in the
following manner. When someone from the organization specifies the URL of a
server on the Internet using the browser on his/her computer, the user's request is
first sent to the proxy server. The proxy server then contacts the server on the
Internet and then the proxy server sends the requested information from the
Internet server to the user's computer. All this is transparent to the user. That is,
the user gets a feeling that he/she is directly accessing the Internet server specified
in the URL. By acting as an in-between system, the proxy server can maintain
security as well as log all traffic between the Internet and the organization's
network of computers.

A proxy server is typically used in an organization to provide one or more of the


following services:

1. To serve as a firewall. A firewall controls the flow of incoming and outgoing


messages from within an organization for providing better security to the
organization. For example, the firewall software running on the proxy server can
be configured for packet filtering to ensure that only certain packets are permitted
to flow from the inside to the outside world. Similarly, the firewall software can
be configured to allow telnet to a computer within the organization only from
those computers of the outside world whose IP addresses have been pre-registered
in the proxy server. Many firewalls also permit establishment of port filters on a
per host or subnet basis, allowing the network administrator to control access on a
fine grained basis than just the whole organization.
2. To log the Internet traffic. Proxy servers can be configured to log every IP
address, date and time of access, URL, number of bytes downloaded, and so on.
This information can be used to analyze any attacks against the organization's
systems. It can also be used to analyze who spends how much time on the Internet
and what types of information does he/she accesses.
3. To scan viruses entering through the Internet. Proxy servers can be
configured to scan all incoming information for potential virus attacks through the
Internet. This protects the organization's computers from virus attacks because
many computer viruses penetrate an organization's systems via the Internet.
4. To cache recently accessed web pages. Proxy servers can also be used to
speed up performance of some Internet services by caching recently accessed web
pages on its local hard disk. If someone within the organization makes a request
for a web page which is already existing in the cache, then the proxy server sends
the web page to the requesting user's computer directly from its cache rather than
obtaining the web page from the specified Internet server and then forwarding it to
the user's computer. This leads to a fairly high speed of Internet access in many
situations.

Internet Telephony

Internet telephony refers to the use of the public Internet for voice transmission.
That is, it enables the subscriber of an Internet service to use his/her computer to
make long-distance calls. For this, the subscriber's computer must have a full
duplex sound card and high-quality microphone. Both computer to computer and
computer to telephone calls over the Internet are made possible with this facility.
In addition to the hardware mentioned above, Internet telephony software is
needed for this facility. Some of the commonly known Internet telephony software
packages are Net2phone, Dial pad, Hot telephone and Phone Free. Some of these
packages enable computer to computer voice communication, while others enable
computer to telephone communication.

Internet telephony makes use of the Internet Protocol (IP) that computers on the
Internet use to communicate with each other. The parties involved in a typical set-
up for a computer to voice call include
1. The subscriber (the users),
2. The Voice Over IP (VOIP) service provider, and
3. The user's Internet Service Provider (ISP)

That is, the user needs to first get registered with both the ISP and VOIP service
provider. Now a call using Internet telephony takes place in the following
manner:
1. The user makes a call using his/her computer.
2. He/she first gets connected and authenticated by the ISP, which provides the
gateway to access the Internet.
3. The user is then connected to the VOIP service provider's gateway. This
gateway has the Internet telephony software, which converts the packets into voice
form and connects to the telephone network of the destination partly. The called
party's telephone will then ring.
4. Once the call is established, the two gateways will constantly communicate
and ensure that the packets are forwarded with the least loss.

Microbrowser

With the growing success of mobile communication technology and proliferation


of mobile devices, such as mobile phones, Personal Digital Assistants (PDAs) and
two-way pagers, there is a growing demand for Internet-enabled hand-held
devices. To meet this demand, several vendors are now producing Internet-enabled
hand-held devices. These devices allow users to access e-mail and web pages on
their mobile devices. Microbrowsers are browsers meant for use with Internet-
enabled mobile devices. They are designed to work with small, resource-restricted
hand-held devices by, for example, eliminating or reducing the functionality found
in traditional desktop browsers.

Because hand-held devices have limited processing and memory resources,


microbrowsers are designed to be small so that their size is only a fraction of the
size of their desktop counterparts. Thus, while desktop browsers occupy around 20
Mbytes, most microbrowsers occupy only a few hundred Kbytes. Their size ranges
from 64 Kbytes to 2 Mbytes. Many vendors achieve these small sizes by providing
simplified interfaces and by eliminating much of the desktop browser's multimedia
functionality such as streaming-audio and -video support.

Microbrowsers take one of the following two general approaches to accessing web
data:
1. Direct Access Approach. The microbrowsers based on this approach use an
HTML-based language, such as compact HTML and XHTML. Compact HTML,
an HTML subset, works with small devices' resource limitations by not
supporting, for example, JPEG images, tables, multiple fonts, or more than two
colors. XHTML is basically HTML reformulated as an XML application. XHTML
lets a small device access just a subset of a web page for easier downloading and
display.

As shown in Figure 18.5(a), in case of microbrowsers that use this approach,


clients get data directly from a web server without any intervention. However, this
approach is limited by the server's ability to send information in HTML.

A few microbrowsers that use this approach are Microsoft's Mobile Explorer, the
Opera browser, and Pumatech's Browse-it.

2. WAP Gateway Approach. The microbrowers based on this approach use


WAP's Wireless Markup Language (WML). As shown in Figure 18.5(b), in this
approach a content-adaptation server, known as WAP gateway, is used. The data
downloaded from a web server first goes to the WAP gateway.

The WAP gateway translates the web content written in HTML or other languages
into WAP' WML. Thus the WAP gateway, which acts as a proxy, translates and
formats the web content i WML for the target hand-held device.

A few microbrowsers that use this approach are Neomar Microbrowser and the
Openwave Mobil Browser.

Next Generation Internet Protocol (IPV6)

The Internet connects together several hundred thousands of networks, and several
tens of millions of computers. Several millions of users access the Internet from
over more than hundred countries. The size of the Internet over the last few years
has grown and continues to grow exponentially.

Presently, the Internet works on IPV4 (Internet Protocol Version 4), which is
popularly known as IP.IPV4 has been around since 1978. By the middle of 1990s,
it was recognized that there are several limitations in IPV4 i a new version of
Internet Protocol (IP) needs to be worked out. Some of the important limitations
identified IPV4 are:
1. The 32-bit address space of IPV4 is not sufficient to cope up with the growing
size of the Internet and its user community. That is, it would not permit enough
Internet addresses for the rapidly growing number of users. What was sufficient
for a few million users or a few thousands of networks, will of longer be sufficient
to support a world with tens of billions of nodes and hundreds of million of
networks.
2. When IPV4 was defined, multimedia applications were not so popular. Hence
IPV4 lacks feature support multimedia applications that need real-time services or
time-sensitive services.
3. IPV4 has no support for security at IP layer. With several Internet applications
dealing with critical data, security has become an important issue.
4. IPV4 has limited mobility support, which has become a need for the users
dealing with mobile applications.

To address these limitations of IPV4, the Internet Engineering Task Force (IETF)
developed and proposed a new version of the Internet Protocol. This version is
popularly known as IPV6 (Internet Protocol Version 6) or Next Generation IP.
The key features of IPV6 are:
1. It uses 128-bit address space instead of 32-bit in IPV4, which is believed to
ensure that the world will not run out of IP addresses. With this large address
space, it is expected that the Internet under IPV6 can support 1015 (quadrillion)
hosts and 1012 (trillion) networks (the Internet under IPV4 can support maximum
232 hosts). Therefore the IPV6 address space is approximately 64 x 109 times
more than that of IPV4.
2. It uses flow labeling and priority concepts to support real-time services.
Senders can label packets that belong to high-priority traffic. By assigning higher
priority to the packets belonging to real-time applications, the necessity of time
sensitiveness is restored. Packets that are time insensitive are assigned low
priority and serviced by the best effort approach. Senders can also request special
handling of packets by the routers by assigning flow labels to them, such as a non-
default quality of service or real-time service. With this feature, video and audio
data may be treated as flows whereas traditional data, such as file transfer and e-
mail, may not be treated as flows.
3. IPV6 with its ancillary security protocol provides a better communication tool
for secure business transaction over the Internet. With a longer address field,
IPV6 permits extensions that would natively support authentication, data integrity,
and data confidentiality, which would address a variety of critical security
concerns.
4. The enhanced routing capability of IPV6 includes support for mobile hosts.
This feature allows a node to move from one link to another without changing the
address. Movement can even be heterogeneous, that is, a node can move from an
Ethernet link to a cellular packet network.
5. Besides unicast and multicast, IPV6 has the provision of anycast addressing.
Anycast addressing allows a packet addressed to an anycast address to be
delivered to any one of a group of hosts.
6. IPV6 also permits auto-configuration. IP-enabled devices can thus gain full
access to the Internet without requiring time-consuming manual configuration.
7. IPV6 uses improved packet header format by dropping the least used options
from IPV4 packet header format. IT also has improved support for extensions
that brings greater flexibility in operations. All these features permit more efficient
packet handling.
Points to Remember

1. The Internet is a huge network of computers that links many different types of
computers all over the world. It is a network of networks that share a common
mechanism for addressing (identifying) computers and a common set of
communication protocols for communications between two computers on the
network.
2. The four basic services provided by the Internet to its users are electronic
mail, file transfer protocol, telnet, and usenet news.
3. The electronic mail service (known as e-mail in short) allows an Internet user
to send a mail (message) to another Internet user in any part of the world in a near-
real-time manner.
4. The File Transfer Protocol service (known as FTP in short) allows an Internet
user to move a file from one computer to another on the Internet.
5. The telnet service allows an Internet user to log in to another computer
somewhere on the Internet.
6. The usenet service allows a group of Internet users to exchange their
views/ideas/information on some common topic that is of interest to all the
members belonging to the group.
7. There are several user-friendly tools that allow users to successfully navigate
the Internet to find useful information. A few of the most popular of these tools are
Gopher, Archie, and the World Wide Web (WWW).
8. The WWW uses a concept called hypertext. Hypertext documents on the
Internet are known as Web Pages. Web Pages are created by using a special
language called HyperText Markup Language (HTML in short), which is a
powerful language for linking documents for easier electronic access and
manipulation of documents.
9. To be used as a web client, a computer needs to be loaded with a special
software tool that is known as a browser. Browsers normally provide several
navigation facilities to help users save time when they are doing Internet surfing.
10. The three common types of browsers are line browsers, graphical browsers,
and Java-enabled browsers.
11. An Internet search engine is an application available on the WWW that helps
users locate the web sites containing useful information and references to such
information.
12. Some of the important current strategic uses of the Internet are in on-line
communication, software sharing, exchange of views on topics of common
interest, posting of information of general interest, product promotion, feedback
about products, customer support service, on-line journals and magazines, on-line
shopping, and world-wide video conferencing.
13. The four basic ways to get connected to the Internet are: direct/leased-line
connection, remote-dial-up connection, SLIP/PPP connection, and commercial on-
line service.
14. The next generation Internet Protocol (popularly known as IPV6) has been
developed to address the limitations of the current Internet Protocol (IPV4). The
key features of IPV6 are large address space to ensure that the world will not run
out of IP addresses; flow labeling and priority concepts to support real-time
services; better security features for secure business transactions; enhanced routing
capability to support mobile hosts; and provision for anycast addressing auto-
configuration and improved packet header format.
15. An Intranet is a network that connects the computers and networks within an
organization by using the hardware and software that is used on the Internet.
Typically, it uses the TCP/IP protocols and server and browsers software used for
the Internet.
16. For security reasons, organizations often use a. proxy server, which is a
computer system that is specially configured to allow other computers of an
organization to interact with the Internet through it. When only a single proxy
server interacts with the Internet, security can be easily maintained because the
single server can be kept more secure than hundreds of individual computers on a
network.
17. Internet telephony refers to the use of the public Internet for voice
transmission. It enables the subscriber of an Internet service to use his/her
computer to make long-distance calls.
18. Microbrowsers are browsers meant for use with Internet-enabled mobile
devices. They are designed to work with small, resource-restricted hand-held*
devices by, for example, eliminating or reducing the functionality found in
traditional desk-top browsers.

Questions

1. What is the Internet? How did it evolve?


2. List out three main characteristic features of the Internet that may be used to
define it.
3. Name some of the basic services provided by the Internet. Explain how
each of these services helps the Internet users.
4. In what manner is e-mail service similar to postal mail service? In what
manner are the two different from each other?
5. List out some of the advantages and disadvantages of e-mail service against
fax service.
6. List out some of the advantages and disadvantages of e-mail service against
telephone service.
7. What is an electronic mail (e-mail)? Why is it preferred by many to paper
mail, telephone and fax services?
8. What is the file transfer protocol (FTP)? List out the steps involved in
downloading/uploading a file by using the FTP service.
' —
9. Explain how is it ensured that only authorized users can access resources of
a remote computer in case of FTP and Telnet services.
10. Explain the difference between "downloading" and "uploading" of
information.
11. List out some of the common uses of the telnet service offered by the
Internet.
12. What is an anonymous FTP site? Why is it used?
13. What is a newsgroup? How is it useful?
14. Differentiate between moderated and nonmoderated newsgroups.
15. Answer the following questions:
(a) How is a news group created?
(b) How does a new member subscribe to a news group?
(c) How does an old member unsubscribe to a news group?
(d) How is a new message posted to a news group?
(e) How is a message read from a news group?
16. What is meant by Internet surfing? Name some of the commonly used
surfing tools.
17. What is hypertext? How is it useful?
18. Define the following terms with respect to the Internet:
(a) HTML (d) Web client
(b) HTTP (e) Web browser
(c) Web server
19. What is a WWW browser? What types of navigation facilities are typically
supported by modern browsers to help users save time while Internet surfing?
20. Differentiate between a line browser and a graphical browser.
21. What is a Java-enabled browser? In what manner is it better than
conventional graphical browsers?
22. Explain how the following features are supported by a Java-enabled browser:
(a) Dynamic content,
(b) Dynamic data types, and
(c) Dynamic protocols.
23. What is an Internet search engine? What are the three major elements of an
Internet search engine? Explaii the roles of these elements.
24. What are the major categories in which Internet search engines are normally
categorized? Describe thi features of each of these categories of Internet search
engines.
25. Name three popular Internet search engines. Describe some of their key
features.
26. Describe some of the typical uses of the Internet.
27. Write short notes on: (a) Electronic mail
(c) Telnet service
(b) File transfer protocol (d) Usenet news
28. Write short notes on:
(a) Internet search tools
(b) WWW browsers
(c) Uses of the Internet
29. Write short notes on:
(a) Netiquette
(b) Internet surfing
(c) Gopher
(d) Ways to get connected to the Internet
(e) Internet search engines
(d) Archie
(e) WWW
30. List out three different ways in which a user can get his/her computer
connected to the Internet. List out t relative advantages and limitations of the three
methods.
31. What is leased line connectivity? For what type of users is it normally used?
32. What is an Internet Service Provider (ISP)? How does it provide Internet
connectivity to the users?
33. Differentiate between the method of remote dial-up connection and
SLIP/PPP connection of getting connected to the Internet. List out their relative
advantages and limitations.
34. Write short notes on:
(a) Leased-line connectivity (c) SLIP/PPP connectivity
(b) ISP (d) Commercial online services
35. What is IPV6? Why has it been developed and proposed?
36. List out some of the main limitations of the current Internet Protocol.
Explain how the newly proposed Internet Protocol takes care of these limitations.
37. List out the main features of IPV6.
38. What is an Intranet? How is it different from the Internet? How is it similar
to the Internet.
39. Explain three different ways in which an Intranet may be useful to an
organization.
40. What is a proxy server? Why is it used? Explain how the Internet is
accessed from within an organization that uses a proxy server.
41. List out some of the typical uses of a proxy server.
42. What is a firewall? Explain how can it help in providing better security to an
organization.
43. What is Internet telephony? Explain how a call takes place by using Internet
telephony.
44. What is a microbrowser? How is it different from a traditional desktop
browser? What are the two general approaches used by microbrowsers for
accessing web data?
(e) Next generation Internet Protocol (IPV6)
45 Write short notes on:
.
(a) Intranet (d) Mien
(b) Proxy server (e) Next
(c) Internet telephony
46 Give the full form of:
.
(a) FTP (h) URL
(b) FAQ (i) SLIP
(c) WWW (j) PPP
(d) HTML (k) VOIP
(e) SGML (1) IPV6
(f) HTTP (m)IETF
(g) ISP
Chapter 19

Multimedia

You saw in Chapter 1 that modern computers are not only used as a fast
calculating machine, but also as a device that operates upon data. You also saw
that data comes in various shapes and sizes depending on the type of computer
application. - In fact, the increasing popularity and usage of computers over the
years is mainly due to their capability to handle different types of data. This
capability of computers makes them suitable for a very wide range of applications
and users. Hence, this chapter will introduce you to the different types of data that
modern computer systems can process and the issues involved in processing these
data types.
This chapter starts with an introduction to multimedia and multimedia computer
systems. It then describes the commonly used media in computer systems along
with the issues in handling each one of them. Some key multimedia applications
are then described to allow the readers to appreciate the various uses of
multimedia. Finally, the chapter also covers some advanced topics on multimedia
like data compression techniques and multimedia synchronization. Beginners may
skip these advanced topics.

WHAT IS MULTIMEDIA?

A "media" is something, which can be used for presentation of information. There


are two basic ways to present some information:
1. Unimedia presentation. In this case a single media is used to present
information. For example, stereo system is a unimedia device because it presents
information by using only sound media. Similarly, a book having only text (no
diagrams) is also a unimedia device because it presen information by using only
text media.
2. Multimedia presentation. In this case more than one media is used to present
information. F example, a TV system is a multimedia device because it presents
information by using sound and video media. Similarly, a book having both text
and diagrams is also a multimedia device because it presents information by using
text, graphics and images.

Obviously, multimedia presentation of any information greatly enhances the


comprehension capability of the user of the information because it involves the use
of more of our senses. For example, students in a class can understand a lecture
better if the lecturer draws illustrative diagrams on the board while delivering
his/her lecture (multimedia presentation) instead of using only voice explanation
(unimedia presentation).
In case of computer systems, the commonly used media for the purpose of storage,
access and transmission of information are:
1. Text (alphanumeric characters)
2. Graphics (line drawings and images)
3. Animation (moving images)
4. Audio (sound)
5. Video (Videographed real-life events)

Hence, in the computer world, multimedia refers to the use of more than one of the
above listed media for information presentation to the computer users - such as
text and sound.

WHAT IS A MULTIMEDIA COMPUTER SYSTEM?

A multimedia computer system is a computer system that has the capability to


integrate two or more types of media (text, graphics, image, audio, and video) for
the purpose of generation, storage, representation, manipulation and access of
multimedia information. Advances in computer hardware and software have led to
the development of inexpensive input, output, storage and processing devices for
multimedia computer systems. Technically, multimedia on computer systems is
not as new as many people think. For example, computer systems capable of
displaying graphs (such as sales graphs), charts (such as bar charts, pie charts),
maps (such as contour maps) and engineering drawings (such as mechanical
drawings, building plans, circuit diagrams, perspective views) along with text
information have been in use for several years. What is more exciting and
relatively new about multimedia computer systems is their enhanced capability to
handle additional media like sound and video for better information presentation.

In general, the data size for multimedia information is much larger than plain text
information because representation of graphics, animation, audio or video media
in digital form requires much larger number of bits than that required for
representation of plain text. Because of this, multimedia computer systems require:
1. Faster CPU (for more quickly processing large amount of data),
2. Larger storage devices (for storing large data files),
3. Larger main memory (for running programs with large data size),
4. Good graphics terminals (for displaying graphics, animation and video), and
5. I/O devices required to play any audio associated with a multimedia
application program.

Note that logically speaking, all multimedia computer systems need not have all
the features listed above. For example, a computer system that does not have the
capability to handle audio and video media can still be called a multimedia
computer system because it can still handle multiple media (text and graphics).
However, a full-fledged multimedia computer system must be capable of handling
all types of media discussed above and hen must have all the features listed above.

MULTIMEDIA COMPONENTS

Text

Alphanumeric characters are used to present information in text form. Computers


are widely used for text processing.

Hardware Requirements for Text

Text processing using computers generally involves the following hardware


devices (see Chapter 9 for a description of some of these I/O devices):
1. Keyboards are most commonly used to input text data.
2. OCRs (Optical Character Recognizers) are used to codify printed text for
direct input of printed text to computers.
3. Computer screens are used to display text information.
4. Printers are most commonly used to output text in hard copy form.

Software Requirements for Text

In addition to the above listed devices, the following text processing capabilities
are highly desirable ii multimedia computer system for better presentation and use
of text information:
1. Text editing. Text editors and word processing packages are used to
generate, edit and props layout a text document.
2. Text style. Presentation of text information can be made more effective by
using text of various sizes, fonts and styles (bold, italics, shadow, etc.). For
example, newspapers use a good combination of all these styles to better highlight
more important news than less important ones. Similarly, book like the one you
are now reading, a combination of various text styles are used to put more
emphasis on certain words or phrases than the remaining text.
3. Text searching. Usage of text information can be greatly enhanced by text
searching feature. This feature allows the user to enter a word or phrase and
quickly finds and displays that part of the where the word or phrase appears in the
text information with the word or phrase highlighted. It is equivalent to searching
for a word in a book's index, and then going to the indicated page or pages for
more information. However, this process is much faster in a computerized text
information. Almost all word processing packages have this feature. Several
software having this feature are also available on the Internet that help in searching
desired information from the Internet.
4. Hypertext. Both presentation and use of text information can be greatly
enhanced by using hypertext feature. This feature provides great flexibility of
structuring and accessing computer-based text information. It generalizes the
concepts of "footnote" and "cross reference" of traditional information (or
document) organization and allows users to obtain information just by clicking on
an anchor (a word or phrase linked to another document) within a document. An
anchor is often called a "hotword". This means that if the user wants more
information about a particular hotword, he/she can select that hotword (usually
with a mouse pointer) and open a window with additional text explaining that
word or phrase.

Figure 19.1 shows a typical structure of hypertext documents in which information


units are stored in a network of nodes interconnected by links. This type of
information structuring allows nonsequential navigation within the information
space according to individual needs. The author of a hypertext document
determines the actual structure and navigation options (by defining hotwords in
the document and linking them to additional text information), and the readers
decide the order of navigation according to their individual interests while reading
the document online. Generally, hotwords are distinguished from other text
displayed on the screen. It may be of different color or font, or the mouse pointer
may change into a special symbol (such as a hand) when moved over the hotword.
This makes it easier for the user to identify which words have associated links
with more information. Otherwise, the user can waste a lot of time clicking on
words that have no other associated information.

5. Text importing and exporting. The task of creating a text document can often be
greatly simplified if the document preparation software has text importing feature.
This is because some of the text you want to incorporate in your document may
already exist as a file created by a word processor or a database file. The file
(partly or fully) can be simply imported into the new document at the desired
location instead of retyping the entire text again. If the imported file is large, it
will result in enormous saving of time and effort required to prepare the new
document. Similarly, text exporting feature is very useful in allowing other
packages to use an existing document (partly or fully).

Graphics

Computer graphics deals with the generation, representation, manipulation and


display of pictures with the aid of a computer. Graphics is an important component
of multimedia because a picture is a powerful way to illustrate information. For
example, in a multimedia application meant for educating small children,
displaying the photograph of a horse along with its text description makes the
illustration much more effective. Without the photograph, it will be very difficult
to explain using only text how a horse looks like. Similarly, displaying the
photograph of an employee, along with his/her name, address, sex, age, etc. from a
company's database of employees, makes the employee information much more
effective.

Graphics Types

The pictures used in computer graphics can be broadly classified into two types:

1. Line drawings. These are drawings and illustrations in the form of 2D and 3D
pictures created from mathematical representation of simple objects like lines,
circles, arcs, etc. Simple object types are used to create complex objects. For
example, the picture of a chair can be drawn using lines and arcs. Numerical
results obtained from computations can also be transformed to graphics forms like
bar graphs or pie charts using simple objects.

The area of computer graphics that deals with this type of pictures is known as
generative graphics. Generative graphics is extensively used in creating illustrative
diagrams. For example, most of the figures in this book have been created by
using this technique. Another very important application of generative graphics is
CAD (Computer Aided Design) and CAM (Computer Aided Manufacturing). For
example, nowadays CAD packages are extensively used in designing models for
aircraft, ship, and building structures, layout of printed circuit boards, and
chemical plant pipelines, etc. Based on these drawings, manufacturing information
such as parts list, subassembly list, etc., are automatically generated and used by
CAM packages. The greatest advantage of using CAD and CAM packages for
such applications is that design ideas may be quickly checked and graphically
conceptualized interactively, and design changes may be quickly modified,
immediately creating accurate assembly drawings and associated parts and
subassembly lists.
2. Images. These are pictures and photographs composed of a collection of
pixels (short form of "picture element," which is a unit of measurement across a
computer screen). As shown in Figure 19.2, the pixels of an image are arranged as
a two-dimensional matrix. This two-dimensional (or spatial) representation is
called the image resolution. Since the storage representation of images is a direct
translation of the image, pixel by pixel, no concept of a line, arc, or circle exists.

As shown in the figure, each pixel consists of three components: the red (R), the
green (G), and the blue (B). On a display screen, each component of a pixel
corresponds to a phosphor. A phosphor glows when excited by an electron gun.
Various combinations of different RGB intensities produce different colors. The
number of bits used to represent a pixel is called the color depth, which decides
the actual number of colors available to represent a pixel. Color depth in turn is
determined by the size of the video buffer in the display circuitry. For example, a
screen with a 640-by-480 resolution and with 24-b color (i.e., 8 bits each for the R,
G, and B components) displays 640 pixels horizontally and 480 vertically, and
each pixel can be represented by selecting from more than 224 (^ 16.7 million)
different colors. The resolution and color depth determine the presentation quality
and the size of image storage. The more pixels and the more colors, the better the
quality and the larger the volume. For example, a 640-by-480 image with 24-b
color requires 640 x 480 x 24b = 7.4 Mb of storage. To reduce the storage
requirement, images are usually compressed before being stored or transmitted.
Image compression techniques are discussed later in this chapter.

The area of computer graphics that deals with this type of pictures is known as
cognitive graphics. Cognitive graphics along with image processing techniques
(like image compression and decompression, cleaning of noisy or blurred images,
image editing, etc.) is extensively used in applications that deal with recognition
and classification of pictures. For example, an image database containing images
of peoples' fingerprints is commonly used nowadays in criminal investigation.
Another similar application is classification of images of ECG patterns, X-rays of
different parts of the body, etc. to perform medical diagnosis of patients by using
computers.

Hardware Requirements for Graphics

Computer graphics generally involves the following hardware devices (see


Chapter 9 for a description of some of these I/O devices):

1. A locating device (such as a mouse, a joystick, or a stylus) attached to a video


display terminal along with a drawing software is often used to directly draw
pictures on computer screen from scratch for generative graphics applications.
2. A flatbed or rectangular-coordinate digitizer is also used as an input device for
generative graphics applications for inputting existing line drawings (such as a
map) to a computer.
3. Scanners (optical scanners, image-scan digitizers, etc.) are most commonly
used as input devices for capturing photographs and drawings as digital images for
cognitive graphics applications.
4. Digital images are also captured directly by a digital camera or a frame
capture hardware such as a video capture board interfaced to some standard video
source like video camera or video cassette recorder (VCR).
5. Computer screens with graphics display capability are used to display
graphics. Standard VGA (Video Graphics Array) graphics can display 640 pixels
across and 480 pixels down (referred to as having a resolution of 640 x 480) on the
monitor with 16 colors (or gray scales, if the monitor is a monochrome monitor).
Although there are higher resolutions available (for example, Super VGA has a
resolution of 800 x 600), Standard VGA can display very good images and comes
with most new computers.

Standard VGA requires a VGA board and a monitor capable of displaying VGA
graphics. A Standard VGA board comes with 256K of memory attached to the
board. This limits 640 x 480 VGA displays to 16 colors. Both the resolution and
the number of colors of display can be increased by increasing the memory on the
graphics board. For example, if this memory is increased to 512K, a resolution of
640 x 480 with 256 colors is possible. Similarly, if this memory is increased to 1
MB, resolutions of 800 x 600 or 1024 x 768 with 256 colors are possible. These
graphics are called extended graphics. Higher resolutions with more colors make
image displays noticeably better. But the computer system must have a monitor
capable of displaying such high-resolution images.

6. Laser printers are*most commonly used to output graphics in hard copy form.
7. Plotters are also used to output graphics in hard copy form.
Software Requirements for Graphics
In addition to the above listed devices, the following graphics processing
capabilities are highly desirable ii multimedia computer system for better
presentation and use of graphics information:
1. Painting or drawing software. This software allows the user to create
graphics from scratch by using a mouse and various simple objects such as lines,
circles, and polygons with various supporting colors. It also allows the user to
modify and enhance graphic images produced using a scanner or screen capture
software. All these features make this software very useful for creating desired
graphics in a multimedia application.
2. Screen capture software. Often we need to incorporate images from computer
screen displays in some document. Screen capture software packages are used in
such cases to capture the display of a computer screen as a graphic image. These
packages allow the users to save the graphic images in a variety of graphic formats
and are also useful in converting a graphic image from one storage format to
another because a multimedia software might have been designed to accept image
data only in a particular format.
3. Clip art. Clip art is a library of commonly used graphic images or objects,
such as a personal computer, printer, aeroplane, telephone, flower, building, etc.
These images can be directly imported from the library and used in a multimedia
application. This saves enormous time and effort that might otherwise be
required to create or search and capture a similar image object. This is also
helpful if one does not have a scanner or some other means of inputting graphics
into the computer. A clip art library often provides the facility to add new objects
or delete an existing object from the library.
4. Graphics importing. The task of creating a multimedia application
incorporating graphics can offer be greatly simplified if the application software
can import graphic images in some standard format. Common graphic formats
include .BMP, .GIF, and .PCX.
5. Software support for high resolution. If a multimedia application needs to
display very high quality images, it is important to have not only the necessary
hardware but also software support for high resolution graphics. Some software
cannot display a resolution greater than 640 x 480 pixels. Others cannot display
more than 16 colors. Most software, however, support Standard VGA graphic
images. Hence, extended graphics hardware feature must also have the right
software for displaying higher resolution graphics with 256 colors.

Animation

Computer animation deals with the generation, sequencing, and display (at a
specified rate) of a set of images (called frames) to create an effect of visual
change or motion, similar to a movie film (video). Animation is an important
component of multimedia because just as a picture is a powerful way to illustrate
information, a small animation clip is even more powerful and is very useful for
illustrating concepts that involve movement. For example, in the multimedia
application meant for educating small children (our previous example), an
animation clip will be very effective in illustrating the difference in movement of a
horse during a gallop versus a walk. Without animation, it will be very difficult to
explain such concepts using only still images and/or text. Similarly, in a
multimedia application that contains training materials for teaching swimming, the
proper way to swing hands for swimming can be more effectively illustrated with
an animation as compared to images and/or text description.

Animation is often confused with video (described later in this chapter) may be
because both deal with the display of a sequence of images (frames) to generate an
effect of motion. However, animation is commonly used in those instances where
videography is not possible or animation can better illustrate the concept than
video. For example, collision between two stars or movement of planets around
sun cannot be videographed and can be best illustrated with the help of an
animation clip. Similarly, flow of blood in our arteries and veins and pumping of
blood by our heart can be best illustrated with the help of an animation clip.
Animation is also very commonly used in advertisements, cartoon films, video
games, and virtual reality applications. Virtual reality is a relatively new computer
technology using which the user can put on a pair of goggles and a glove and tour
a three-dimensional world that exists only in the computer, but appears realistic to
the user.

Animation deals with displaying a sequence of images at a reasonable speed to


create an impression of movement. For a jerk-free full motion animation, 25 to 30
frames have to be displayed per second. We saw in the previous section that a 640-
by-480 image with 24-b color requires 7.4 Mbits of storage. Therefore, a one
second of animation will require 7.4 x 25 = 185 Mbits =; 23 Mbytes (185 -=- 8) of
storage. In general, an animation clip lasts for several seconds. Hence animation
files require much more storage space than graphic files involving a single image.
Moreover, to play an animation clip stored in a file on a secondary storage device
like hard disk, it should be possible to read the data at the required rate and
transfer it through the bus to the frame buffer to display it on the monitor.

Hardware Requirements for Animation

Computer animation generally involves the following hardware devices:


1. Image generation tools and devices such as scanners, digital camera, and
video capture board interfaced to some standard video source like video camera or
video cassette recorder (VCR) are used to generate images to be used in
animation.
2. Computer monitors with image display capability (described in the previous
section) is the minimum requirement for outputting (displaying) animation. In
addition, multimedia computer systems capable of handling animation also require
a graphics accelerator board that not only controls the resolution and number of
colors of display, but also speeds up the refresh rate. Refresh rate is the time taken
to paint the computer screen with a new image frame replacing the previous image
frame. Increased speed due to the use of graphics accelerator board smoothes out
the movement (avoids flickering of animated sequences) because subsequent
frames that make up the animation can be displayed more quickly.

Software Requirements for Animation

In addition to the above listed tools and devices, the following capabilities are
highly desirable in a multimedia computer system with animation facility:
1. Animation creation software. This software allows the user to create
animation sequences from scratch by using a mouse and various simple objects
such as lines, circles and polygons with various supporting colors. For example, an
animation sequence to illustrate bouncing of a ball can be created as follows:
- select a circle object and fill it with red color;
- then start the recorder of the animation creation software;
- then select the colored circle and drag it around the screen using a mouse,
recording several positions for it on the screen (each time you release the
mouse button, you record the object's position on the screen);
- finally stop the recorder and use save command to save the animation.

Now to test the recorded animation, start the player of the animation creation
software and click on the colored ball. The ball will bounce across the screen
according to the positions recorded during the recording phase. The same
bouncing sequence will repeat every time you click on the ball.
2. Screen capture software. Screen capture software packages are used to
capture the displays of a computer screen as graphic images, which can be used in
animation.
3. Animation clips. This is a library of animation clips from which one can select
and directly import an animation clip and use it in a multimedia application. This
saves enormous time and effort that might otherwise be required to create a similar
animation clip. This is also useful if one does not have an animation creation
software. An animation clips library often provides the facility to add a new
animation clip or delete an existing animation clip from the library.
4. Animation file importing. The task of creating a multimedia application
incorporating animation can often be greatly simplified if the application software
can import animation files in some standard formats. Common animation file
formats include .FLI and .FLC.
5. Software support for high resolution. If the animation sequences of a
multimedia application are made up of very high quality images, it is important to
have not only the necessary hardware but also software support for displaying high
resolution images having many colors to maintain the high quality of animation
display.
6. Recording and playback capabilities. A multimedia system with animation
capability should allow the user to control the recording and display of an
animation sequence. For example, it should provide the user with options to
'pause' and 'replay' the animation sequence.
7. Transition effects. Animation can be even more interesting if it is enhanced
with transition effects such as fade-in and fade-out, layering, zooming, and
rotation of objects.

Audio

Computer audio deals with synthesizing, recording, and playback of audio or


sound with the aid of a computer. Audio is another very important component of
multimedia because in many cases sound can substantially reinforce our
understanding of information presented in other ways, and in some cases sound is
the only way to provide the desired information. For example, in the multimedia
application meant for educating small children (our previous example), voice
explanation can be added to the animation clip describing what is being shown and
pointing out what to look for that makes a horse's gallop different from a horse's
walk. Similarly an animation clip can show the horse neighing and neighing sound
can be added to effectively convey the type of sound horses make. Note that it is
nearly impossible to provide an accurate description of a horse's neigh, a lion's
roar, or a bird's chirp using text, and graphics is of no help in these cases. Hence
sound is the only media that can accurately provide such information.
Analog and Digital Audio

Audio information travels in natural media in the form of sound waves, which are
analog in nature. In order for the computer to be able to understand audio
information, sound waves must be converted from analog form to digital form.
Transducer is a device capable of changing signals from one form to another. For
example, microphone is an example of a transducer that converts sound waves into
electrical signals. Conversely, loudspeaker is an example of a transducer that
converts electrical signals into sound waves.

Information can be represented as analog signals or digital signals. Analog signals


exhibit a/ continuous tone of smooth fluctuations, while digital signals are
composed of discrete values represented by numbers. The transformation between
analog and digital signals is achieved by A/D (Analog-to-Digital) conversion and
D/A (Digital-to-Analog) conversion. A/D conversion transforms an analog input
(such as voltage) into a series of numeric representation by digitization. D/A
conversion is the reverse process of A/D conversion. It transforms a sequence of
discrete numbers back into continuous analog signal. Figure 19.3 shows the role of
A/D and D/A converters in the acquisition and playback of analog signals by a
computer system.

A multimedia computer system capable of processing audio information requires a


sound board (or sound card), which is equipped with A/D and D/A converters. In
addition to performing the basic function of A/D and D/A conversions of audio
signals, a sound board is generally also equipped with the following features:
1. It has a connector for speakers or headphones to allow users to listen to sound
recordings.
2. It has a MIDI input port to input sound from an external MIDI device (such as
an electronic keyboard or drums), a MIDI output port to output recorded sound to
the MIDI device, and a MIDI synthesizer to translate the information transferred
between the computer and the musical instrument. MIDI (Musical Instrument
Digital Interface) is an international standard developed for digital music that
determines the cabling, hardware, and communications protocol needed to connect
a computer with electronic musical instruments and recording equipment.
3. Most sound boards also have a volume control knob to allow users to control
sound volume according to their taste.

Digital Audio Quality

The quality of digital audio is characterized by the following three parameters:


1. Sampling rate. Analog-to-digital conversion transforms an analog signal into
a series of numeric representation by digitization. Digitization is composed of
sampling and quantization. Sampling take; snapshots of the analog waveform at
certain points in time, and the sampling rate determines how often the analog
signal is digitized. According to Nyquist theorem, the sampling rate must be at
least twice the highest frequency component of the analog waveform to reproduce
the signal optionally. The higher the sampling rate, the truer the sound. Sampling
rate is measured in kilohertz (KHz) am its typical values are 8, 11, 22, and 44.1
KHz. For example, the sampling rate of CD-quality audio is 44.1 KHz, and that of
telephone-quality audio is 8 KHz.
2. Quantization. Quantization determines the digital measured value of the
analog waveform at the sampling time. The larger the range of numbers used for
quantization, the more gradations of the digitally sampled waveform can be
represented, resulting in better quality audio. Quantization is measured in terms of
number of bits and its typical values are 8, 12, and 16 bits.
Figure 19.4 illustrates sampling and quantization of an analog signal. In Figure
19.4(a), the analog signal is sampled at periodic points in time. The sampled
values are then represented by the closest quantization levels. The difference
between the value of the closest quantization level and the real analog value is
known as quantization error. In Figure 19.4(b), 2 bits are used to represent
quantization, resulting in 4 possible levels, and in Figure 19.4(c), 3 bits are used,
allowing 8 quantization levels. As the number of bits used to represent
quantization increases, more quantization levels become possible resulting in
reduced quantization error and increased audio quality.
3. Number of channels. It refers to the number of channels used for audio
recording. Its typical values are one for mono systems, two for stereo systems, and
5.1 for Dolby surround-sound systems.

The quality and the storage and bandwidth requirements of digital audio depend
on the three parameters discussed I above. The higher the sampling rate, the
more bits used to represent quantization, and the more channels, the better the
quality of the digital audio, and the higher the storage and bandwidth
requirements. For example, an 8 KHz sampling rate, 8 bits quantization, and mono
recording will produce telephone-quality audio, and will require a bandwidth of
8000 x 8 x 1 = 64 Kb/s. On the other hand, a 44.1 KHz sampling rate, 16 bits
quantization, and stereo recording will produce CD-quality audio but will require a
bandwidth of 44100 x 16 x 2 = 1.4 Mb/s. In general, an audio clip lasts for several
seconds. Hence audio files are very large requiring large storage space. For
example, with reference to the example given above, a 20 seconds CD-quality
audio clip will require 1.4 x 20 = 28 Mb = 3.5 Mbytes of storage. Again, digital
audio compression or a compromise in quality can be applied to reduce the storage
requirement.

Hardware Requirements for Audio

Computer audio generally involves the following hardware devices:


1. A sound board with all the features already described before.
2. Some type of input device (such as a microphone) is used for audio input to
record a human voice or music or any type of sound in a computer. The A/D
converter of the sound board takes care of digitizing the input sound.
3. Some type of output device (such as speakers or headphones) is used for audio
output to listen to a recorded sound. The D/A converter of the sound board takes
care of converting the sound from its digital to analog form.
4. MIDI devices may also be used as both input and output devices for audio
data.
5. Synthesized sound can also be generated on a computer using keyboard (as
interaction device) and sound sequencer software.
6. Sound editors are used to cut and paste sound sequences, to add special
effects, and to create new sound sequences from existing sound sequences.
7. Audio mixers are used to combine multiple channels of sound with controls
like synchronization points.

Software Requirements for Audio

In addition to the above listed tools and devices, the following capabilities are
highly desirable in a multimedia computer system with audio facility:
1. Audio clips. This is a library of audio clips (pre-made sound effects, music,
and narration) from which one can select and directly import an audio clip and use
it in a multimedia application. This saves enormous time and effort that might
otherwise be required to create a similar audio clip. This is also useful if one does
not have the facility to create sound sequences. An audio clips library often
provides the facility to add a new audio clip or delete an existing audio clip from
the library.
2. Audio file importing. The task of creating a multimedia application
incorporating audio can often be greatly simplified if the application software can
import audio files in some standard formats. Common audio file formats
include .WAV (Windows files), .MID (MIDI files), .VOC, and .INS.
3. Software support for high quality sound. If a multimedia application uses very
high quality audio, to reproduce the sound effectively, it is important to have not
only the necessary hardware but also software support for both recording and
playback of high quality audio. Some software allows users to select the fidelity
level by capturing sound using varying values of quantization and sampling rate.
Some software also has a conversion utility that allows users to convert the
sampling rate of audio files.
4. Recording and playback capabilities. A multimedia system with audio
capability should allow the user to control the recording and playback of an audio
sequence. For example, it should provide the user with options to "pause" and
"replay" the sound sequence.
5. Text-to-speech conversion software. This software is used to
convert written text into corresponding sound.
6. Speech-to-text conversion software. This software is used to convert speech
into corresponding text.
7. Voice recognition software. This software is used to identify the speaker of a
given voice by matching the voice with a set of voices stored in a database along
with the details of the speaker of each voice.

Video

Like animation, computer video deals with the recording and display of a
sequence of images at a reasonable speed to create an impression of movement.
Each individual image of a sequence of images is called a frame. For a jerk-free
full motion video, 25 to 30 frames have to be displayed per second. Like
animation, video is also an important component of multimedia because it is very
useful for illustrating concepts that involve movement. Although both animation
and video deal with the display of a sequence of images (frames) to generate an
effect of motion, but video typically deals with recording of a real-life event
produced by a device such as a digital video recorder. Like animation data, video
data also requires large storage space and needs to meet the real-time constraints
on retrieval, delivery, and display. Again, digital video compression or a
compromise in quality can be applied to reduce the storage requirement.

Video information travels in natural media in the form of light waves, which are
analog in nature. In order for the computer to be able to understand video
information, light waves must be converted from analog form to digital form.
Video camera is a transducer that is commonly used to convert light waves into
electrical signals. Conversely, monitor is a transducer that is commonly used to
convert electrical signals into light waves. Like audio, in case of video also the
transformation between analog and digital signals is achieved by A/D and D/A
conversions as shown in Figure 19.3. Analog-to-digital conversion of video also
involves the sampling and quantization of analog signals as already explained
before and shown in Figure 19.4. A multimedia computer system capable of
processing video information requires a video board (or video card), which is
equipped with A/D and D/A converters.

Video Display Technologies

As already mentioned before in this chapter (see Figure 19.2), an image is


represented as a collection of pixels, which are arranged as a two-dimensional
matrix. Each pixel is of the size of a small dot. Hence, an image can be thought of
as made up of horizontal lines, each a row of individual dots (pixels). To paint an
entire video image on a monitor screen, an electron gun illuminates every pixel as
it sweeps across the screen, one line at a time, from left to right and from top to
bottom and then back on the top. This process, called raster scanning, has to be
repeated several times every second (called refresh rate) to provide continuity of
motion and to avoid flicker.

A complete line travelled by the electron gun from left to right is called a scanline.
In one pass of raster scanning, if the electron beams travel all the scanlines
sequentially from top to bottom, it is called & progressive scan (see Figure
19.5(a)). On the other hand, if the electron beams travel only the odd scanlines in
one pass and the even scanlines in the next pass, it is called an interlaced scan (see
Figure 19.5(b)). For the interlaced scan, each pass is called & field, and two
complete fields comprise a full display screen.

When the electron beam has travelled the bottom-most scanline, it retraces back to
the top. Similarly, when the electron beam reaches the end of a scanline, it retraces
back to the beginning of the next scanline to be traveled. To prevent the retrace
lines from being visible on the screen, blanking pulses are applied to the picture
tube. The time taken to move the electron gun from the end of the bottom-most
scanline to the beginning of the top-most scanline is called the vertical blanking
interval, while the time taken to move it from the right end of one scanline to the
left end of the next is called the horizontal blanking interval. The vertical blanking
intervals are often used to embed other signals, such as synchronization
information, in broadcast television (TV) systems.

The two commonly used types of monitors for video display are TV monitors and
computer monitors. TV monitors use interlaced scanning technique with a refresh
rate of 60 fields per second or 30 frames per second (the actual refresh rate
depends on the broadcasting standard used by the TV system - NTSC, PAL or
SECAM described later in this chapter). On the other hand, computer monitors use
progressive scanning technique with a refresh rate of 60 frames per second. The
aspect ratio, which is the ratio of the horizontal to the vertical dimensions, is 4:3
for both TV and computer monitors. Note that as compared to a computer monitor,
a TV monitor costs less but flickers often due to the lower refresh rate.

Types of Video Signals

We saw in Figure 19.2 that a pixel is composed of RGB components. Human


vision is more sensitive to variation in the luminance (brightness) than in the
chrominance (color difference). To take advantage of such deficiencies in the
human eye, light can be separated into luminance and chrominance components
instead of the RGB components. For example, the YUV model separates
luminance from chrominance via the following linear transformation from the
RGB system
Y = 0.30R + 0.59G + 0.11B
U = 0.62R-0.52G-0.10B
V = -0.15R-0.29G + 0.44B

Where Y is the luminance component and (U, V) are the chrominance


components.
Based on these concepts of light representation, there are following two types of
video signals (for both analog and digital videos) for storage and transmission:
1. Composite video signals. A composite video signal combines the luminance
Y and chrominance C into a single stream to be stored and transmitted. Examples
of analog videos using composite video signals include broadcast TV signals and
VHS. Examples of digital videos using composite video signals include the D-2
and D-3 formats.
2. Component video signals. A component video signal separates the video into
luminance Y and chrominance C streams. Component video signals are again of
two types - the Y/C component and the RGB component. The Y/C component
uses two separate channels to transport Y and C information, whereas the RGB
component uses three channels to carry R, G, and B colors. Examples of analog
videos using component video signals include Hi8 (it is of Y/C component type)
and Beta SP (it is of RGB component type). Examples of digital videos using
component video signals include the D-l, D-4, and D-5 formats.
Out of the two, component video signals have better quality than composite video
signals.

Broadcast Television Standards

The three main TV broadcasting standards are NTSC, PAL and SEC AM. All
three are analog videos using composite video signals technology. They mainly
differ in the way they encode the chrominance signal. They also differ in screen
resolution and frame rate. Their characteristic features are briefly described below.
1. NTSC. NTSC stands for National Television Systems Committee. It is a 525
scanlines system that uses interlaced scanning technique with a refresh rate of
29.97 frames per second. In NTSC, the luminance signal is called the Y signal,
and the chrominance signal is amplitude modulated onto the color subcarrier at
two different phases - the / (in-phase) value at 0° and the Q (quadrature) value at
90°. NTSC is used in the US, Japan , and some Asian countries.
2. PAL. PAL stands for Phase Alternating Line. It is a 625 scanlines system
that uses interlaced scanning technique with a refresh rate of 25 frames per second.
In PAL, the composite video signal operates on the YUV model, where Y is the
luminance component and (U, V) are the chrominance components. In PAL also,
the chrominance signal is transmitted on a two-phase amplitude-modulated color
subcarrier but it uses a more complex process called Phase Alternating Line,
which provides more bandwidth for chrominance modulation, yielding better color
resolution. PAL is used in India and Western Europe (except France).
3. SECAM. The SEC AM system, developed in France, stands for Sequential
Couleur Avec Memoire. It is a 625 scanlines system that uses interlaced scanning
technique with a refresh rate of 25 frames per second. In SECAM, the
chrominance signal is transmitted using a frequency-modulated color subcarrier,
transmitting one of the color difference signals on every other scanline, and the
other color difference signal on alternate scanlines. It also has better color
resolution than NTSC. SECAM is used in France, Eastern Europe, Russia, and
Middle East.
A summary of the characteristic features of the three analog TV signal standards is
given in Figure 19.6. Compared to NTSC, PAL and SECAM have better
resolution but lower refresh rates and hence more flicker.

Standards Features NTSC PAL SECAM

Scanlines/frame 525 625 625


Scanning technique Interlaced Interlaced Interlaced
Refresh rate 29.97 25 25
(frames/second)
Aspect ratio 4:3 4:3 4:3
Transmission Analog Analog Analog
Modulation AM AM FM
Used in US, Japan, and India and Western France, Eastern
some Asian Europe (except Europe, Russia, and
countries France) Middle East
Figure 19.6. Features of the three broadcast TV standards.

High Definition Television (HDTV)

HDTV emerged out of the desire to build a video system that could deliver a more
exciting viewing experience than that offered by current TV technologies. The
major goals in designing such a system were to provide for improved picture
resolution, improved color resolution, wide screen display, and large projection.
Two major broadcasting systems that have evolved for commercial use out of this
effort are
1. MUSE (Multiple SubNyquist Sampling Encoding) in Japan and
2. HD-MAC (High Definition Multiple Analog Components) in Europe.
The main features of these two systems are given in Figure 19.7. As shown in the
figure, the scanning parameters (scanlines/frame and refresh rate) are different for
the two systems.
Standards MUSE HD-MAC
Features
Scanlines/frame 1125 1250
Refresh rate 60 50
(frames/second)
Transmission Analog Analog
Modulation FM FM
Media Broadcasting Broadcasting
satellite satellite
Used in Japan Europe
Figure 19.7. Features of the two HDTV standards.

Apart from broadcasting purposes, HDTV is used in industrial applications also.


Museums, film production, teaching, electronic billboards, and multimedia games
are some such applications.

Hardware Requirements for Video

The following hardware devices are generally required in a computer system


capable of handling video (see Chapter 9 for a description of some of these I/O
devices):
1. A video camera is the most commonly used input device for capturing video
data.
2. A video monitor (TV monitor or computer monitor) is the most commonly
used output device for displaying video data.
3. A video board (or video card), which is equipped with A/D and D/A
converters. In addition to performing the basic function of A/D and D/A
conversions of video signals, a video board also has connectors for video camera
and video monitor. Note that the video camera, the video monitor, and the video
board must be compatible with each other. A video board also compresses the
video image for more efficient storage.
4. Video editors are used to cut and paste video sequences, to add special effects,
and to create new video sequences from existing video sequences. They also allow
superimposing of text and audio on a video sequence.
Software Requirements for Video
In addition to the above listed devices, the following capabilities are highly
desirable in a multimedia computer system with video facility:
1. Video clips. This is a library of video clips from which one can select and
directly import a video clip and use it in a multimedia application. This saves
enormous time and effort that might otherwise be required to create a similar
video clip. A video clip library often provides the facility to add a new video clip
or delete an existing video clip from the library.
2. Recording and playback capabilities. A multimedia system with video
capability should allow the user to control the recording and display of a video
sequence. For example, it should provide the user with options to 'pause' and
'replay' the animation sequence.

MULTIMEDIA APPLICATIONS

It was mentioned in the beginning of this chapter that the capability of computers
to handle different types of media makes them suitable for a very wide range of
applications and users. Below we discuss some of the most commonly known
applications of multimedia. Please note that there are many more multimedia
applications in addition to those discussed here and it is not possible to cover all of
them. The basic idea here is to introduce the readers to some key multimedia
applications so that they can gain sufficient background to appreciate the use of
multimedia and to visualize its other applications. For ease of presentation, the
applications discussed below have been grouped in areas.

Education

Education is an area that has benefited a lot with the advent of multimedia. There
are many multimedia applications that directly or indirectly contribute to better
education mechanisms. Some of the main applications are described below.

Multimedia Books

Multimedia books use audio, animation and video to enrich text and still images
used in printed books to provide better understanding of the subject matter covered
in a book. These books also provide a very effective way of searching for specific
facts in a variety of ways such as searching mechanisms for words and phrases and
hypertext and hypermedia techniques. Due to these reasons, several reference
books such as encyclopedias, dictionaries, telephone directories, etc. are now
being published and made available on CD-ROMs, which allow users to access
the information they need quickly. Many journals, magazines and product manuals
are also being published in electronic form so that users can access and print only
those articles/portions in which they are interested.

A further extension of this idea is digital library, which is a repository of large


information in digital form allowing multiple users to search and access
information of their interest from it. Such a library (being virtual nature because it
stores the books only in soft copy form and not physically) can remain open round
the clock allowing users to access information from it at their own convenient
time. Network multimedia can be used to allow users to access the library from
remote locations. With this extended facility, there is no need for a user to
physically come to the library for using it. This overcomes the distance and time
limitations of current libraries.

Better Presentation

We saw that multimedia applications can present information in a variety of forms


(text, graphics, animation, audio, video) involving the use of more of our senses.
Hence multimedia presentation can be used to better explain a subject matter to the
students because it enhances the comprehension capability of the students. It is
extremely effective in getting across new ideas and concepts. Moreover, it helps in
making a presentation more interesting and has the inevitable effect of grabbing
and holding a person's attention.

Foreign Language Learning

Using a book for learning a foreign language is difficult because one is not sure
how to pronounce the words written in text form. The book can have an
accompanying audio tape to solve this problem, but it is inconvenient for the
learner to keep rewinding the tape to find specific information. Moreover, the
learner also does not have the flexibility to quickly hear the pronunciation for a
specific word. Using a multimedia program incorporating both text and sound, the
learner can see words and phrases on the screen as they are pronounced by the
computer program. The learner also has the flexibility to request the computer to
pronounce any word displayed on the screen by simply selecting that word (say by
clicking over it). Additional features may be incorporated in the multimedia
program to assist in faster learning process. For example, if the learner does not
understand the meaning of a word or phrase, he/she may point to it to quickly
display a translation for it in his/her native language.

Natural Learning Environment

Multimedia course materials provide a natural learning environment because they


allow different students to learn and proceed at their own pace of learning. For
example, beginners may like to spend more time on a subject matter to understand
the basic concepts, while advanced learners may like to skip rudimentary
information and directly go to more advanced concepts. Hypertext and
hypermedia technologies may be used in multimedia course materials to provide
this flexibility to the students. With this facility, since the students are not forced
to read through the subject matter in a rigid format, they find the learning
environment more interesting and motivating to learn faster.

Networked multimedia can be used to simulate a virtual classroom in which


students can come for learning at their own convenient time and can leave the
classroom whenever they want. Note that just like a digital library, a virtual
classroom (which does not exist physically) overcomes the distance and time
limitations of current classrooms because it remains open round the clock and
allows students to use it from remote locations.

Training

Employee training is an important aspect of any organization. An organization


often needs to impart training to its employees on the processes, products and
services offered by the organization. Many organizations have developed and use
interactive multimedia training programs for this purpose. A computer based
training has many advantages. It allows the employees to take training at their own
convenient time. For example, workers on a nigh shift can learn as conveniently as
those working during the day, and an employee can stop training when other more
important work must be done, and resume training when his/her schedule allows.
Multimedia tools are often used in these training programs to enhance their
effectiveness. For example, hypertext and hypermedia technologies may be used
to allow different employees to get trained at their own pace of learning.
Networked multimedia can be used to impart the same (high quality) training to
employees working in remote offices and plants of the organization.

Entertainment

Computer systems were normally considered as a device that is useful in our


education, research, and work. However, multimedia technology has now also
made them an interesting entertainment tool. The applications described below are
few examples of this.

Video Games

With the advent of multimedia, there has been a boom in the different types of
video games available on computer systems. Sound and animation have been
particularly important in these applications to make the games thrilling and
exciting for the user. Because the sequence of events in such games depends on
the actions of the player, these programs are very interactive in nature and offer an
ever-changing contest to the user.

The virtual reality technology has helped in creating new types of video games
that were never possible before. For example, Virtual World Entertainment makes
the Battletech Center, in which players sit in a tiny booth where they are fully
immersed in a virtual battle. Players can fight with the computer, or they can be
networked together to play against each other.
Special Effects in Films

Multimedia technology is also being exploited by the film industry for providing
special effects in films. Several movies now contain many visual tricks that could
never be accomplished without the aid of computers. For example in the Hindi
movie, Chachi 420, the hero is shown being transformed from man to woman by
the use of a computer graphics technique called morphing. In the English movie,
Jurassic Park, the dinosaurs were shown as living creatures (although they are
extinct and no more exist) by the use of multimedia technology only. Similarly, a
number of very successful films, including Titanic, Star Wars, Superman, have
used multimedia technology for special effects.

Animation Films

Computerized animation and coloring have given a new life to the animation film
industry. In animation films of the past, animations were created by using hand-
drawing technique, which was a very tedious and time consuming process.
Because of hand-drawing, the quality of animations was also not very good (was
far from realistic). Using computer programs based on the precise mathematical
laws of physics, animators can now create animations that are far more realistic
than ever before. Moreover, with computerized animation facility, an animator can
now create in a few hours what used to take days with hand-drawing techniques.
Elaborate scenes can now be animated in much less time and cost that might once
have been too costly to bring to life, such as the flying-carpet ride in Disney's
Alladin.

Interactive TV

Interactive TV allows users to select TV programs of their interest from remote


massive video archives, view at the time they wish without leaving the comfort of
their homes, and interact with the programs via VCR-like functions, such as fast-
forward and rewind. In essence, it implements a virtual video-rental shop from
which customers can borrow and view the videos of their choice at their own
convenient time. The rental shop being virtual provides 24 hours service.

Interactive TV is implemented by using a Video-on-Demand (VoD) system and


the facilities offered are often referred to as movie-on-demand, news-on-demand,
sports-on-demand, education-on-demand, etc. depending on which ones of these
are supported by the system.

The main components of a VoD system are as follows (see Figure 19.8):
1. Video server. A video server consists of massive storage and media
controllers. It stores a large number of digitized videos and serves simultaneous
video requests to the same or different videos on demand. The storage media
usually consist of magnetic disks, optical disks, and magnetic tape and are usually
organized hierarchically for cost effectiveness. Under this configuration, popular
videos are stored in the disks. Less popular ones are stored in tape devices with
terabyte capacity and retrieved as necessary to the disk drive for processing. The
basic functions supported by video servers include request handling, random
access, and user interactions.
2. Transport network. The transport network delivers video programs from the
video server to the customers. The network must have a very high data rate and
satisfy the real-time delivery constraints of video traffic.
3. Set-top box. A set-top box along with the television monitor and the infrared
controller (i.e., remote control), serves as the bridge between the subscribers and
the system. With on-screen images and cursor-like devices, viewers are
connected to the video server and can browse the video selections and interact
with the services via VCR-like functions. The major functions of the set-top box
include receiving the incoming video streams; demodulating, demultiplexing, and
decoding the signals; performing the necessary signal conversion, such as D/A
transformation for playback on the TV monitor; and sending outgoing control
messages.

Marketing

In the last few decades, computers have radically altered business practices.
Because multimedia is so effective at communicating information, many
companies have found it to be a powerful marketing tool. Few examples of use of
multimedia in marketing are given below.

Multimedia Presentation

Business promotion often requires making presentations by a company to its


prospective customers about the company and its products and services. Such
presentations are normally carried out either at the company's own premises, or at
the premises of a specific customer, or at an exhibition/conference site.
Multimedia computer systems are nowadays preferred and being used extensively
for this purpose instead of slides or overheads. The main reason is that the audio-
visual and other features of multimedia make the presentations more lively and
interesting to the audience. Moreover, changes can be easily incorporated in an
already prepared presentation to customize it for a specific customer or a specific
group of prospective customers. Laptop computers have further helped in this
activity and are extensively being used nowadays to carry out multimedia
presentations at locations other than the company's own premises because
marketing agents need mobility.
Multimedia Catalogue

Multimedia brochures and catalogues are extensively used nowadays for sales
promotion and marketing. For example, many real estate firms use multimedia to
show prospective customers information about available houses. Such application
can quickly search a few houses from a database of many houses that closely
match a customer's requirements. It can then display high-quality graphic images
of each selected house, with room photographs, layouts, and maps to facilitate the
customer in better and faster decision making. Although the same information can
be provided on paper, the computerized application has the added capabilities of
rapid searches to locate houses that meet the needs of the customer.

Multimedia Kiosk

Multimedia kiosks are often being used nowadays in public places as information
providers in place of help desks with an attendant. For example, a multimedia
kiosk placed at an airport might provide the travellers with information on tourist
attractions, restaurants, and hotels, along with graphic images and maps showing
how to gel there. A kiosk at a large museum may be used to provide the visitors
with information on what types of displays are in which parts of the museum. A
kiosk at a cosmetic counter in a supermarket may provide customers witr
information on makeup for particular skin types and colors. A multimedia kiosk
generally has a touch-screer monitor with a very user-friendly graphical user
interface for ease of operation by general public.

Animated Advertisements

For sales promotion, companies often advertise their products and services on
television. Most of the TV programmes are sponsored by one or more companies
and in turn they get time slots for advertising their products during the programme.
Several of these advertisements use computer animation to effectively
communicate the usefulness of the products or services. For example, if you
carefully watch the advertisements for detergent soaps/powders, toothpastes,
insecticides for mosquitoes and cockroaches, etc., you will see few scenes in them,
which cannot be videographed. These scenes are produced using computer
animation.

Virtual Shops and Shopping Malls

The already described video-on-demand system is also used to create virtual


shops, which remain open 24 hours and allow the customers to do purchases at the
time they wish without leaving the comfort of their homes. In this case, the video
server stores a large number of digitized videos containing multimedia description
of all the products on sale in the shop. A customer makes a request to the system
for a particular type of product by selecting the product name from the displayed
list of products and then providing its specifications as requested by the system by
using the TV set at his/her home. The system then quickly searches for all the
models of the named product in the shop that match the customer's requirements.
It then displays the list of selected models and at allows the customer to
interactively examine each model in the list by requesting more details of specific
aspects of the model. For example, if the customer is interested in buying a fridge,
the system displays a list of all models available, and then on customer's request
displays a high quality graphic image of the selected model. The customer can
then interactively rotate the image to examine the look of the model from all
directions, can open the doors of different compartments one-by-one to examine
the facilities inside, can zoom certain parts inside the fridge to have a closer look,
can request for display of the image in all colors in which the model is available,
etc. Once the customer gets satisfied and wants to purchase one, he/she places an
order by filling up a form displayed by the system. The form requests for
information such as product name with model number and color, name a address
of the customer, credit card number, delivery address (the person ordering may
like to gift it to someone), choice of delivery date (for example on birthday), etc.
The system records the order and the purchased item is delivered manually to the
customer by the shop owner.

The virtual reality technology is used to extend the concept of virtual shops to
virtual shopping malls. In this case, the customer is presented with a virtual
shopping street on his/her TV screen with many different types of shops lined up
on both sides of the street. Using interactive TV features, the customer can use the
remote control to have a virtual walkthrough on the shopping street, enter any
shop of his/her choice, have a closer look at the products displayed in it, make
purchases in the shop, then get back on the street, enter another shop and make
purchases there, and so on. Notice that with this facility, a customer sitting in his
house in India can virtually roam around in a shopping street in Japan and can
make purchases from the shops in that street.

Groupware

Groupware, also known a computer-supported cooperative work (CSCW), refers


to a system that provides an electronic shared workspace to users located far from
each other with communication, collaboration, and coordination supports. Group
communication support allows the users to cooperate regardless of time and
location constraints by exchanging messages either synchronously or
asynchronously with each other. Group collaboration support allows users to share
information among groups for effective collaboration. Group collaboration support
effectively manages the participating users so as to enhance communication and
collaboration among them. Multimedia has been helpful in making groupware
more effective by allowing the exchange and sharing of multimedia information
among participating users. The following are the three most important multimedia
groupware applications.

Multimedia E-mail

We saw the usefulness of e-mail application in the previous chapter. Multimedia


e-mail is an extension of text-based e-mail facility. It allows users located far from
each other to asynchronously exchange messages that contain multimedia
information. In fact, e-mail is the most widely used service over the Internet.
MIME (Multipurpose Internet Mail Extensions) is the current standard for Internet
e-mail. Unlike the older SMPT (Simple Mail Transfer Protocol) standard, which
understands only ASCII characters (text), MIME specifies a set of encoding rules
and header extensions that describe new type of contents (such as image, video, or
audio) and the structure of the multimedia message to embed multimedia
information.

Collaborative Authorship

Collaborative authorship applications deal with collaboratively editing and


composing a (multimedia) document by a group of people. The participants can
access the document either synchronously or asynchronously. Each participant
works on a part of the document and the final document is the combination of all
individual parts.

Multimedia Conferencing

Multimedia conferencing, also known as video conferencing, refers to a system


that simulates face-to-face interactions among participating users located far from
each other as if they were sitting and discussing in a single room. In this system,
each participating user has a PC (or a workstation) on his/her working desk, which
has a video camera and mike attached to it. The PCs of all these users are
interconnected together through a high-speed network. The network is used to
transmit audio, video and other data from one participant's PC to the PCs of other
participants. A user willing to communicate with other users, talks in front of
his/her PC. The audio-visual equipment attached to his/her PC capture the
information that is then transmitted to the PCs of other users. The coordination
support software coordinates the proceeds of the conference and resolves any
conflicts when multiple users want to communicate simultaneously.
Science and Engineering

The area of science and engineering has been benefiting from the use of computers
ever since the early days of computers. With the advent of multimedia, several
new applications of computers emerged in this area. Today computers are playing
an ever-increasing role in the area of science and engineering. Few examples of
use of multimedia in science and engineering are given below.

Computer Aided Design (CAD)

CAD is an important application of generative graphics. Nowadays CAD packages


are available for designing almost anything - cars, aircrafts, ships, buildings,
printed circuit boards, etc. In fact, knowledge of CAD is now required for many
engineering design jobs because an engineer or architect designing a product can
be far more productive with a computer than with pencil and paper. Use of a CAD
system in designing an object, allows the designer to create an electronic model by
describing all three dimensions of the object. The designer can display any view of
the object on the computer screen to see the object from a different perspective.
On paper, the designer needs to draw a different drawing for each view, and for
any change in the design, he/she will have to redraw all affected views.

Visualization

Visualization deals with exploring data and information graphically. Many


computer applications deal with very large data sets. If the data is represented
numerically, it becomes difficult to find relationships between different parts of
the data. But if the same data is represented graphically, this relationship can be
visualized much easily. For example, if we have a table containing data, which
shows how pressure changes with the change of temperature in a particular
experiment, it will be much easier to visualize this relationship if the same data is
represented in the form of an (x, y) graph. Special visualization tools are available
that allow graphical representation of very large and complex data sets assisting
scientist and engineers in the analysis of their problems.

Visualization is not only restricted to scientific and engineering applications. For


example, a pie chart can be used to better visualize the percentage of earnings of a
company from its different activities, or a bar chart can be used to better represent
the year-wise change in profit of a company over a period of time.

Data Compression

We saw that multimedia data are typically large in volume and often require real-
time and continuous delivery and presentation. Hence, multimedia applications
require massive storage space, high data-transfer rate, and huge transmission
bandwidth. Existing computers, storage devices, and networks are unable to
satisfy these requirements. Hence, data compression techniques are used to reduce
the volume of multimedia data in such a way that the original data can be
reproduced with the desired quality level wherever required.

The process of reducing the volume of data by applying a compression technique


is called compression and the resulting data is called compressed data. The reverse
process of reproducing the original data from compressed data is called
decompression and the resulting data is called decompressed data. We will see
below that the decompressed data may or may not be the same as the original data
depending on the type of compression technique used.

Types of Compression Techniques

Compression techniques can be categorized based on the following considerations:

1. Lossless or lossy. If the decompressed data is the same as the original data, it
is referred to as lossless compression, otherwise the compression is lossy because
there is loss of originality in the reproduced data. Lossy compression techniques
usually have higher compression ratios (larger reduction in the volume of data),
but may introduce some distortion in the original quality of the data when
decompressed. In case of lossy compression, the desired quality level of the
decompressed data is application dependent.
2. Symmetrical or asymmetrical. In a compression technique, if the time
required to compress and to decompress are roughly the same, it is referred to as
symmetrical compression. In asymmetrical compression, the time taken for
compression is usually much longer than decompression. Symmetrical
techniques are used in those applications that require data to be digitized and
compressed in real time, such as video conferencing. On the other hand,
asymmetrical techniques are used in those applications in which the data are
compressed once and decompressed several time, such as in video-on-demand
applications.
3. Software or hardware. A compression technique may be implemented either
in hardware or software. As compared to software codecs (COder and DECoder),
hardware codecs offer better quality and performance. However, they are costlier
and are available only on platforms with costly extended hardware. Software
codecs can be ported on any platform ensuring wider consumer accessibility. Due
to performance reason, hardware codecs are suitable for CPU-intensive processing
and software codecs are suitable for less CPU-intensive processes.
Basic Compression Techniques

Some basic compression techniques are described below. An actual compression


technique for multimedia object is often a combination of one or more of these
basic compression techniques.

Lossless Techniques

The following two are the commonly used lossless compression techniques:
1. Run-length coding. In this method, repeated symbols in a string are replaced
with the symbol and the number of instances it is repeated. For example,
"aaaabbcccccaaaaaababbbb" is expressed as "a4b2c5a6blalb4".
2. Variable-length coding. In general, coding schemes for a given character set
use a fixed number of bits per character. For example, BCD, EBCDIC and ASCII
coding schemes use a fixed number of bits per character. If it is known (through
statistical studies) that the frequency of occurrence of different characters in a
character set is different (for example we all agree that the character Z is not so
frequently used as the character A in the character set of English alphabets), then a
coding scheme that employs a variable number of bits per character may be used
to obtain tighter packaging of data. A variable-length coding scheme is based on
this concept. In such a coding scheme, fewer bits are used to represent the more
frequently occurring characters than the less frequently occurring ones. Obviously,
the most frequently occurring character would be represented with only one bit.
Huffman coding is an example of this method. It is briefly described below with
an example.

To make the example simple and easy to understand, let us assume that our
character set consists of only six characters: A, B, C, D, E, and F. A conventional
coding scheme that uses a fixed number of bits per character would require three
bits per character (because 22 < 6 < 23). Now suppose the relative frequency of
occurrence of the characters in this character set is as shown in Figure 19.9. The
figure also displays a Huffman coding of these six characters, which minimizes
the total number of bits for characters appearing with the frequency shown.

Note that the Huffman encoding scheme pays off only with uneven character
distribution. For example, if all characters in Figure 19.9 were used equally often,
the mean number of bits per character would be 3.33. This is worse than a fixed-
length coding scheme in which the mean number of bits per character would be 3.
For probabilities given in Figure 19.9, the average number of bits per character is
2.05.

Character Probability of Code


Occurrence
A 0.40 0
B 0.29 10
C 0.20 110
D 0.08 1110
E 0.02 11111
F 0.01 11110
Figure 19.9. An example showing a Huffman code for a given character set with
the probability of occurrence of the characters.

Lossy Techniques

The following two are the commonly used lossy compression techniques:
1. Predictive encoding. In many types of multimedia objects (like digital audio
or video) adjacent samples or frames are generally similar to each other. The
predictive encoding method takes advantage of this fact and stores only the initial
sample and the difference values between every two adjacent samples for all the
samples in the compressed form. The compressed data is decompressed by
reproducing a sample from its previous sample and the difference value between
the two samples. Since the size of the difference value between samples is usually
much smaller than the size of: sample itself, the file size of a compressed data is
generally much smaller than the uncompressed data file. Note that the sample may
be a pixel, line, audio sample, or video frame.

2. Transform encoding. In this method, data is converted from one domain to


another that is more convenient for compression. For example, data may be
converted from the time domain to the frequency domain. DCT (Discrete Cosine
Transform) encoding is the best example of this method. It is described below.
DCT encoding transforms samples from the time domain to the frequency domin.
The input data is fed as a two-dimensional block, typically with 8x8 pixels. DCT
transforms an 8x8 block of pixel color values into an 8x8 matrix of spatial
frequencies. The low frequencies (i.e., general information) are positioned near the
upper left corner, and the higher frequencies (i.e., sharp edges) are positioned near
the lower right corner. The coefficients of the output DCT matrix are divided by
the corresponding entries of an 8x8 quantization table (Q-table). Each entry of the
Q-table describes the quality factor of the corresponding DCT output coefficient.
The lower the quality factor, the higher the magnitude of value. For example, for
DCT compression, the lower frequencies are more important than the higher ones.
Therefore, a Q-table with smaller numbers near the upper-left corner and larger
ones near the lower-right corner is used. The division of the DCT output matrix by
the Q-table causes the lower-right corner portion of the resultant matrix to the
resultant matrix to become mostly zeros. As a result, the greater portion of the
high-frequency information is discarded. The modification of the Q-table is one
way to change the degree of compression. The entries in the Q-table are based on
eye masking experiments and are essentially an approximation to the best estimate
of levels that provide just-noticeable distortion in the image.

The DCT decoder performs the reverse process and converts the 64 coefficients
back to pixel values. Since quantization is a lossy process, it may not reproduce
the originals exactly.

Some Standard Multimedia Compression Techniques

Over the years, several standards have evolved for compression and
decompression of multimedia objects. Some of the most commonly used standards
are described below. In selecting the standards to be described here, we have taken
care to select one each for still image, video and audio media.

JPEG (Joint Photographic Experts Group)

JPEG is the standard compression technique for still images. It is of reasonably


low computational complexity, is capable of producing compressed images of
high quality, and can provide both lossless and lossy compression of arbitrarily
sized grayscale and color images. As will be clear from the explanation below, it is
a hybrid of several basic compression methods. It supports the following four
modes of encoding:
1. Sequential. In this mode, the image is encoded in the order in which it is
scanned.
2. Progressive. In this mode, the image is encoded in multiple passes, so that the
entire content can be visualized in a rough-to-clear process (i.e., refined during
succeeding passes). This capability is convenient for browsing applications
where a low-quality (low-resolution) image is more than adequate for things like
scanning through the pages of a catalog, and when the desired page is reached,
only that page can be subjected to subsequent passes to display it more clearly (in
high-resolution).
3. Hierarchical. In this mode, the image is encoded at multiple resolutions to
accommodate different types of displays.
4. Lossless. In this mode, the image is encoded in such a way that the original
quality of the image can be fully restored.

JPEG uses DCT encoding and quantization for the first three modes, and uses
predictive encoding for the lossless mode. Since quantization is a lossy algorithm,
the first three modes of encoding are lossy. The basic steps of lossy JPEG
compression (shown in Figure 19.10) are as follows (the decoder performs the
inverse operations):
1. If the image to be compressed is color, RGB color space is transformed to
YUV color space and chrominance component (the color) is downsampled to
exploit color redundancy. If the image is grayscale, this step is not needed.
2. The image is then divided into a series of blocks of 8 x 8 pixels.
3. DCT transformation is then applied to each such 8x8 block of pixels to exploit
spatial redundancy.
4. The resulting DCT coefficient (the 64 frequency component in each block) are
then scalar quantized using a quantization-table (O-table).
5. The resulting 2-D output of quantization is then ordered in a zigzag sequence,
creating a bit stream with zero value coefficients close to the end, since the low-
frequency component (most likely nonzero) are placed in front of the high-
frequency components (most likely zero).
6. Run-length encoding is then applied to the zeros of the zigzag sequence.
7. Finally, variable-length encoding is applied on the run-length coded stream to
obtain the JPEG compressed stream.

The lossless mode of JPEG compression uses a different method than the lossy
method shown in Figure 19.10. Fundamentally, the image pixels are handled
separately (i.e., the 8 x 8 block structure is not used), and each pixel is predicted
based on three adjacent pixels using one of eight possible predictor modes. The
basic steps of lossless JPEG compression (shown in Figure 19.11) are as follows
(the decoder performs the inverse operations):

1. A simple predictive coding scheme is first applied to the image to be


compressed. For this, each pixel of the image is handled separately.
2. A variable-length encoder is then used to encode the predicted pixels
losslessly to obtain the JPEG compressed bit stream.

MPEG Video

MPEG (Motion Pictures Experts Group) is a multimedia standard with


specifications for coding, compression, and transmission of audio, video, and data
streams in a series of synchronized, mixed packets. MPEG video standard is a
subset of the MPEG standard. It is divised for compression of a wide range of
video and motion pictures. It defines the structure of coded video bit streams
transmitted to the decoder and the decoder architecture, but leaves the encoder
architecture undefined, so that some encoders may produce higher quality
compression, some may be real-time, and some may require manual intervention.
MPEG compression is lossy and asymmetric, with the encoding process requiring
more time than the decoding process.

Digital video compression may either apply intraframe compression to each


individual frame of the video or combine both intraframe and interframe
compression. The former scheme yields a lower compression ratio than the latter
because it does not exploit temporal redundancy. Differential encoding is one
approach to remove temporal redundancy. It encodes and sends the differences in
the adjacent frames. Motion compensation is another technique for interframe
compression. It compares the current frame with the previous one and encodes the
motion vectors (i.e., the change in coordinate values due to the motion) and pixel
differences after motion. MPEG uses both intraframe and interframe techniques
for data compression.

In MPEG, encoded frames are of the following three type:


1. I (Intraframe). An I-frame is coded independently of any other frames in the
video sequence. Hence it contains all of the necessary information required to
reproduce a complete frame. It basically applies the intraframe compression of the
basic JPEG DCT algorithm.
2. P (Predicted). A P-frame is predicted from the differences from the previous I-
or P-frame in the sequence.
3. B (Bidirectional). A B-frame is bidirectional interpolated by the preceding and
the subsequent I- 01 P-frames.
Note that due to the interframe dependency in case of P-frames and B-frames, a
current P-frame can be decoded only if the preceding I- or P-frame has been
presented to be decoded. Similarly, without both the preceding am subsequent I-
or P-frame in the decoder, it is impossible to generate a B-frame. For example, if
the presentation order of a video sequence is IBBPBBPBBI.....then the actual input
sequence of MPEG frames to a decoder should be IPBBPBBIBB.....(see Figure
19.12). Therefore, the patterns of video frame sequence in storage and during
transmission are different from that for presentation.

The basic steps of MPEG compression (shown in Figure 19.13) are as follows (the
decoder performs the inverse operations):
1. The individual frames of the video data to be compressed are preprocessed
and color subsampling is performed on them to carry out the first level of
compression. Recall that color subsampling is approach shrinks the data size by
downsampling the chrominance component (i.e., using less bits to represent the
chrominance component) while leaving the luminance component unchanged.
2. Interframe motion compensation is then performed for the frames of types P
and B to carry out the second level of compression. This step is not needed for the
frames of type I because only intraframe compression is applied to these frames.
3. Each frame is then divided into a series of blocks of 8 x 8 pixels.
4. DCT transformation is then applied to each such 8x8 block of pixels to exploit
spatial redundancy.
5. The resulting DCT coefficients (the 64 frequency components in each block)
are then scalar quantized using a quantization table (Q-table).
6. The resulting 2-D output of quantization is then ordered in a zigzag sequence,
creating a bit stream with zero value coefficients close to the end.
7. Run-length encoding is then applied to the zeros of the zigzag sequence.
8. Finally, variable-length encoding is applied on the run-length coded stream to
obtain the MPEG compressed video stream.

MPEG standard has the following versions:


1. MPEG-1. The MPEG-1 standard was developed in response to industry needs
for an efficient way of storing and retrieving video information on digital storage
media. One such inexpensive medium being the CD-ROM, the first version of
MPEG, MPEG-1, was targeted at CD-ROM and applicatioins at a bit rate of about
1.5 Mb/s. Although the MPEG-1 standard was developed with CD-ROM in
mind, other storage and transmission media can include DAT, Winchester disk,
optical disk, ISDN and LAN. In fact, the data rate is variable and all decoders
must be able to decode at rates up to 1.856 Mb/s. The video is strictly progressive
(i.e., noninterlaced) and picture quality is equivalent to VHS.
2. MPEG-2. The MPEG-2 standard was developed to provide the capability of
compressing, coding, and transmitting high-quality, multichannel, multimedia
signals over broad-band networks. It addresses high-quality coding for all digital
transmissions of broadcast-TV-quality video at data rates of 2-15 Mb/s. Its major
applications include digital storage media, digital television (including HDTV),
broadcasting over cable, satellite, and other broadcast channels, and other
communications applications. Since MPEG-2 was designed mainly as a
transmission standard, it supports a variety of packet formats (including long and
variable-length packets of from 1 KB up to 64 KB) and provides error-correction
capability that is suitable for transmission over cable and satellite links.
MPEG-2 is backward compatible with MPEG-1. The primary enhancement is
centered around the addition of interlaced video. Thus, there are two coding
structures (field and frame) in MPEG-2. Other improvements include
enhancements on coding efficiency.
3. MPEG-4. Recently, the focus of video coding has shifted to object-based
coding at bit rates of 8 Kb/s or lower and 1 Mb/s or higher. Key aspects of this
newly proposed MPEG-4 standard include independent coding of objects in a
picture frame; the ability to interactively composite these objects into a scene at
the display; the ability to combine graphics, animated objects, and natural objects
in the scene; and the ability to transmit scenes in higher dimensionality formats
(e.g., 3-D). Also inherent in the MPEG-4 standard is the concept of video
scalability, both in the temporal and spatial domains, in order to effectively control
the video bit rate at the transmitter, in the network, and at the receiver so as to
match the available transmission and processing resources.
MPEG-4 builds on and combines elements from three fields - digital television,
interactive graphics, and the World Wide Web. It aims to provide a merging of the
production, distribution, and display elements of these three fields.
MPEG-4 is now in the application-identification stage. It currently targets
applications with very low bit rates of 48 - 64 Kb/s, such as videophone over the
PSTN and visual transmission over mobile facilities.

MPEG Audio

MPEG audio is a standard for compression and decompression of digital audio. It


has been found that whenever a strong signal is present, the spectral neighborhood
of weaker audio signals becomes imperceptible to human ears. Measurements of
human hearing sensitivity have shown that the ear integrates audio signals that are
very close in frequency and treats them as a group. Only when the signals are
sufficiently different in frequency will the era perceive the loudness of each signal
individually. The coding technique used in MPEG audio standard (known as
perceptual coding) takes advantage of this perceptual weakness of human ears
(pshychoacoustic phenomena). In perceptual coding, the audio spectrum is divided
into a set of a narrow frequency bands, called critical bands, to reflect the
frequency selectivity of human hearing. Then a filtering mechanism is used to
filter coding noise sharply to force it to stay close to the frequency of the
frequency components of the audio signal b6ing coded thereby masking out the
noise. By reducing the coding noise when no audio is present and allowing strong
audio to mask the noise at other times, the sound fidelity of the original signals can
be perceptually perceived.
The basic steps of MPEG audio (MPEG-1 audio, to be more precise) encoding,
shown in Figure 19.14(a), are as follows:
1. The audio signal to be compressed is first transformed from the time domain
to the frequency domain.
2. The resultant audio spectrum is then passed through a filter bank, which
divides it into multiple sub-bands.
3. The input audio signal is simultaneously subjected to a psychoacoustic model,
which exploits auditory masking and determines the signal-to-noise ratio of each
sub-band.
4. Each sub-band is then quantized using a quantizer. A bit/noise allocation
algorithm is used to determine the number of code bits allocated to quantize each
sub-band so that the audibility of quantization noise is minimized.
5. The quantized samples are then formatted into a series of bit streams, which is
the encoded bit stream for the input audio signal.
As shown in Figure 19.14(b), the decoder performs the inverse operation of the
encoder for reconstructing the time-domain audio signal from the encoded bit
stream.

To provide different quality and different bit rates, the standard supports three
distinct layers for compression layer I is the most basic and simplest coding
algorithm, and layers II and III are enhancements of layer I.
Recently, a new version of MPEG audio (MPEG-2 audio) has been developed for
low-bit-rate coding of multichannel audio. It has 5.1 channels of audio, including
three front channels (i.e., left, center, right) plus two surrounds, and a low-
frequency bass-effect channel called the subwoofer. Since the subwoofer has
only limited frequency response (about 100 Hz), it is sometimes referred to as the
".1" channel. MPEG-2 audio is backward compatible to MPEG-1 audio because it
uses the same coding methods and syntax as that of MPEG-1 audio for the two
main channels (left and right). However, MPEG-2 audio uses new coding
methods and syntax for the surround channels.

MULTIMEDIA SYNCHRONIZATION

Often multimedia presentation involves simultaneous presentation of two or more


types of media. For example, a movie involves simultaneous presentation of video
and audio. Similarly, a French movie with English subtitles involves simultaneous
presentation of video, audio and text. In such cases, multimedia synchronization
is required to ensure the desired temporal ordering among a set of multimedia
objects in a multimedia presentation. One such example is lip synchronization,
which refers to the requirement that the voice should match the movement of the
lips of the speaker. Another example is subtitle synchronization, which refers to
the requirement, that the timing of the displayed text (subtitle) should match with
the timing of the video (scene) and the voice (spoken words) of the speaker that
correspond to the subtitles.
Multimedia synchronization can be divided into two levels - temporal
specification and temporal synchronization. They are described below.

Temporal Specification

Temporal specification is used to model the temporal relationships among the set
of related abstract multimedia objects of a presentation scenario, where an abstract
object denotes a logical unit of media data such as a video object or a text object.
The two commonly used approaches for temporal specification are graphical-
based and language-based. These are described below.

Graphical-based Approach

In this approach, the temporal relationships among the multimedia objects of a


presentation scenario is represented in the form of a graph, such as an X-Y graph
with X-coordinate representing time and Y-coordinate representing objects, or a
Petri net. For example, consider the multimedia scenario represented as an X-Y
graph in Figure 19.15.
It has four multimedia objects 0h 02, 03 and 04. St denotes the start point of object
0i. The same multimedia scenario is represented in Figure 19.16 as a petri net.

Language-based Approach

In this approach, the temporal relationships among the multimedia objects of a


presentation scenario is represented in the form of a special programming
language that has temporal synchronization functions. A few examples of
synchronization functions that such a language may have are:
1. SyncAtomicSerial (A, B): Object B starts after object A stops.
2. SyncAtomicParallel (A, B): Objects A and B start simultaneously.
3. SynElemSerial (tl, A, t2, B): Object A starts after time tl, and object B starts
after time t2 after A stops.
4. SyncElemParallel (tl, A, t2, B): Object A starts after time tl, and object B
starts after time t2. Based on the values of tl and t2, objects A and B may overlap.

Temporal Synchronization

Note that temporal specification focuses only on the temporal relationships among
the objects without explicit reference to time. Temporal synchronization
mechanisms use the temporal relationships information of temporal specification
and convert it into a set of playback schedules and retrieval schedules to enforce
the playback deadlines for various multimedia objects of a presentation scenario.
A playback schedule is the set of playback deadlines of multimedia objects in a
multimedia scenario, where playback deadline of an object is the latest starting
time of the object, for a meaningful presentation. Retrieval schedule is the set of
request deadlines to the server. It accounts for end-to-end delays and ensures that
the playback deadline is not missed.

To display an object O at time Ts (the playback deadline), the presentation site


sends a request to the corresponding media server at request time Tr, which is R
time units prior to Ts. R is the response time to account for possible experienced
end-to-end delays and packet losses. The timing relationships among the playback
deadline Ts, the request time Tr, and the response time R are given by Tr = Ts - R
and are depicted in Figure 19.17. The possible experienced end-to-end delays are
contributed by (assuming that the presentation and server sites are different):
1. Request queuing delay and retrieval delay (i.e., seek, latency, and data transfer
times) at server site.
2. Round-trip queuing delays, propagation delays, and transmission delays in
network communication.
3. Queuing delay and processing delay at the presentation site.
The time duration from when a user initiates a presentation request to when the
presentation begins is called the set-up time. Figure 19.18 shows the set-up time in
a presentation. The set-up time T must be long enough to compensate for the
system delays and to achieve inter-media synchronization. The set-up time
therefore is not necessarily equal to max {R!t R2, —, Rn} where Oh O2, —, On are
the start objects and Ru R2, — Rn are their respective response times. T is largely
dependent on the request time of the first request objects in the request ordering.
For example, in Figure 19.18, T' is largely dependent on the request times of
objects O1 and O2.
The set-up time determines the earliest playback time of the corresponding
scenario, which in turn determines the absolute playback deadlines of the
subsequent objects. The earliest playback time is the earliest time a presentation
can start after it is initiated, and it is also the actual playback deadline of the start
objects. Combining the earliest playback time with the relative playback schedule
gives the actual playback schedule.

Points to Remember

1. Multimedia refers to the use of more than one of the following media for
information presentation:
• Text (alphanumeric characters)
• Graphics (line drawings and images)
• Animation (moving images)
• Audio (sound)
• Video (videographed real-life events)
2. A multimedia computer system is a computer system that has the capability to
integrate two or more types of media (text, graphics, animation, audio, and video)
for the purpose of generation, storage, representation, manipulation and access of
multimedia information.
3. In general, the data size for multimedia information is much larger than plain
text information. Because of this, multimedia computer systems require:
• Faster CPU (for more quickly processing large amount of data),
• Larger storage devices (for storing large data files),
• Larger main memory (for running programs with large data size),
• Good graphics terminals (for displaying graphics, animation and video), and
• I/O devices required to play any audio associated with a multimedia application
program.
4. Keyboards, OCRs, computer screens, and. printers are some of the commonly
used hardware devices for processing text media.
5. Text editing, text searching, hypertext, and text importing/exporting are some
of the highly desirable features of a multimedia computer system for better
presentation and use of text information.
6. Computer graphics deals with the generation, representation, manipulation
and display of pictures (line drawings and images) with the aid of a computer.
7. Locating devices (such as a mouse, a joystick, or a stylus), digitizers,
scanners, digital cameras, computer screens with graphics display capability, laser
printers, and plotters are some of the commonly used hardware devices for
processing graphics media.
8. Some of the highly desirable features of a multimedia computer system for
better presentation and use of graphics information are painting or drawing
software, screen capture software, clip art, graphics, importing, and software
support for high resolution.
9. Computer animation deals with the generation, sequencing, and display (at a
specified rate) of a set of images (called frames) to create an effect of visual
change or motion, similar to a movie film (video). Animation is commonly used in
those instances where videography is not possible or animation can better illustrate
the concept than video.
10. Virtual reality is a relatively new computer technology using which the user
can put a pair of goggles and glove and tour a three-dimensional world that exists
only in the computer, but appears realistic to the user.
11. Scanners, digital cameras, video capture board interfaced to a video camera or
VCR, computer monitors with image display capability, and graphics accelerator
board are some of the commonly used hardware devices for processing animation
media.
12. Some of the desirable features of a multimedia computer system with
animation facility are animation creation software, screen capture software,
animation clips, animation file importing, software support for high resolution,
recording and playback capabilities, and transition effects. ......_
13. Computer audio deals with synthesizing, recording, and playback of audio or
sound with the aid of a computer.
14. Transducer is a device capable of changing signals from analog form to digital
form or vice-versa.
15. MIDI (Musical Instrument Digital Interface) is an international standard
developed for digital music that determines the cabling, hardware, and
communications protocol needed to connect a computer with electronic musical
instruments and recording equipment.
16. Sound board, microphone, speaker, MIDI devices, sound synthesizer, sound
editor and audio mixer are some of the commonly used hardware devices for
processing audio media.
17. Some of the desirable features of a multimedia computer system with audio
facility are audio clips, audio file importing, software support for high quality
sound, recording and playback capabilities, text-to-speech conversion software,
speech-to-text conversion software, and voice recognition software.
18. Computer video deals with the recording and display of a sequence of images
at a reasonable speed to create an impression of movement. Each individual image
of such a sequence is called a. frame.
19. The three main TV broadcasting standard are NTSC, PAL and SECAM.
20. Video camera, video monitor, video board, and video editor are some of the
commonly used hardware devices for processing video mediae
21. Some of the desirable features of a multimedia computer system with video
facility are video clips and recording and playback capabilities.
22. Some of the key areas that have benefited a lot with the advent of multimedia
are education, entertainment, marketing, groupware, and science and engineering.
23. Data compression techniques are used to reduce the volume of multimedia
data in such a way that the original data can be reproduced with the desired quality
level whenever required.
24. The process of reducing the volume of data by applying a compression
technique is called compression and the resulting data is called compressed data.
The reverse process of reproducing the original data from compressed data is
called decompression and the resulting data is called decompressed data.
25. Data compression techniques may be lossless or lossy, symmetrical or
asymmetrical, and software 01 hardware implemented.
26. The commonly used lossless compression techniques are run-length coding
and variable-length coding.
27. The commonly used lossy compression techniques are predictive encoding
and transform encoding.
28. Some standard multimedia compression techniques are
• JPEG (Joint Photographic Experts Group) for still images
• MPEG (Motion Pictures Experts Group) video for digital video
• MPEG audio for digital audio
29. Multimedia synchronization deals with mechanisms to ensure the desired
temporal ordering among a set c multimedia objects in a multimedia presentation.

Questions

1. What is multimedia? Explain with the help of some examples.


2. Tell which ones of the following are unimedia and which ones are
multimedia devices (give justification f< your answers):
(a) TV system (d) A book having only text (no diagrams)
(b) Stereo system (e) A book having both text and diagrams
(c) Telephone system (f) A modern personal computer
3. List out the commonly used media types generally used in modern computer
systems and explain how each one helps in information presentation.
4. What is a multimedia computer system? What are it typical characteristics?
Do all multimedia systems need to have all these characteristics?
5. You have a printed document of 100 pages. Give two different ways in
which this text data can be input to a computer system.
6. Name two output devices that can be used with a computer system to output
text information. Give their relative advantages and disadvantages.
7. List some of the desirable features of a word processing software. Give a
practical use of each feature.
8. What is meant by "text style"? List some of the text styles that you will like
to have in your computer system. Give a practical use of each of them.
9. Explain with three examples how text searching feature can be useful in a
computer system.
10. What is a "hypertext?" Explain how it helps in presentation and use of
information.
11. What is meant by "text importing" and "text exporting"? Explain how these
features help in the creation of a document.
12. Write short notes on:
(a) Text editor
(b) Hypertext
(c) Text style
(d) Text searching
(e) Multimedia computer systems
(f) I/O devices for text processing
(g) Text importing and exporting
13. What is computer graphics? Give a few examples to explain its uses in
multimedia applications.
14. Explain the difference between "generative graphics" and "cognitive
graphics". Give two uses of each.
15. What is a "pixel"? Explain how an image is composed and displayed on a
computer screen.
16. An image has a resolution of 1024 x 768 and color depth of 24-b (i.e., 8 bit
each for the R, G, and B components). Calculate the storage requirement of this
image.
17. Name two input devices for generative graphics applications. Describe a
practical use of each.
18. Name two input devices for cognitive graphics applications. Describe a
practical use of each.
19. Name three output devices that may be used with a computer system to
output graphics data. Describe a practical use of each of these devices.
20. Explain with suitable examples the difference between "Standard VGA" and
"Extended Graphics" displays.
21. What is a painting/drawing software? Describe two uses of this software in
creating multimedia applications.
22. What is a screen capture software? Describe a typical use of this software.
23. What is a clip ait? How does it help in the creation of multimedia
applications?
24. What is meant by "graphics importing"? Explain how this feature helps in
the creation of multimedia applications.
25. Name some of the common graphics file formats.
26. Write short note on:
(a) Locating devices
(b) Scanner
(c) Digitizer
(d) Plotter
(e) Clip art
(f) Graphics importing
(g) Standard VGA display
(h) Extended graphics
(i) Painting/drawing software
(j) Screen capture software
(k) Software support for high-resolution graphics
27. What is computer animation? Give a few examples to explain its uses in
multimedia applications.
28. Differentiate between "animation" and "video". Explain the difference with
the help of few examples.
29. What is "virtual reality"? Describe a multimedia application that makes use
of this technology.
30. A jerk-free full motion animation sequence is created of a set of images
having a resolution of 640 x 480 and color depth of 24-b (i.e., 8 bits each for the
R, G, and B components). Calculate the storage requirement for storing one
second of this animation.
31. What is an animation creation software? Describe with the help of a typical
example how this software can be used to create an animation sequence.
32. What is an animation clips library? How does it help in the creation of
multimedia applications?
33. Name some of the common animation file formats.
34. Name some of the transition effects features that may be used to make
animation more interesting.
35. Write short notes on:
(a) Refresh rate
(b) Virtual reality
(c) Graphics accelerator board
(d) Animation creation software
36. What is computer audio? Give a few examples to explain its use in
multimedia applications.
37. What is a transducer? Name three devices that can be categorized as a
transducer.
38. Explain the role of analog-to-digital and digital-to-analog converters in the
acquisition and playback of analog signals by a computer system.
39. What is a sound board card in a multimedia computer system? In addition
to it basic function, what additional facilitiesdoes it generally provide?
40. What is MIDI? How does it help in the creation of multimedia applications?
41. Explain how an analog signal is transformed into a digital signal. Explain
the role of sampling rate and quantization on the quality of the digital signal
produced by this process.
42. An audio clip is of 30 seconds duration and uses 8 KHz sampling rate, 8 bits
quantization, and mono recording. Calculate its storage requirement.
43. An audio clip is of 15 seconds duration and uses 44.1 KHz sampling rate, 16
bits quantization, and stereo recording. Calculate its storage requirement.
44. What will roughly be the storage requirement for
(a) a 15 seconds telephone-quality audio clip
(b) a 15 seconds CD-quality audio clip ..
45. What is an audio clips library? How does it help in the creation of
multimedia applications?
46. Name some of the common audio file formats.
47. Write short notes on:
(a) Transducer
(b) Sound card
(c) MIDI
(d) Sampling rate
(e) Quantization
(f) Quantization error
(g) Software support for high quality sound
48. What is computer video? Give a few examples to explain its uses in
multimedia applications.
49. Give examples of two transducers that deal with video data.
50. Give examples of two transducers that deal with audio data.
51. What is the role of a video board card in a multimedia computer system?
52. Describe the process of displaying a video on a monitor screen.
53. Differentiate between "progressive scan" and "interlaced scan".
54. What are the main differences between a TV monitor and a computer
monitor?
55. Define the following terms in context of video display:
(a) Raster scanning (f) Progressive scan
(b) Refresh rate (g) Interlaced scan
(c) Scanline (h) Vertical blanking interval
(d) Field (i) Horizontal blanking interval
(e) Aspect ratio
56. Explain the difference between composite video signals and component
video signals. Which of the two has better quality? Give one example for each of
the following:
(a) Analog video using composite video signals
(b) Digital video using composite video signals
(c) Analog video using component video signals
(d) Digital video using component video signals
57. Name the three popular TV broadcasting standards. Describe their
characteristic features.
58. What is HDTV? Name two standards that are based on this technology.
List out the main characteristic feature of these two standards.
59. What is a video clips library? How does it help in the creation of multimedia
applications?
60. Write short notes on:
(a) Video display technology
(b) Types of video signals
(c) Broadcast TV standards
(d) HDTV
61. Give some examples of multimedia applications in education.
62. What is a multimedia book? What are its main features? How do these
features make it better than a conventional book?
63. What is a digital library? What are it advantages and disadvantages as
compared to a conventional library?
64. Explain how is multimedia useful in
(a) Better presentation (c) Learning a subject
(b) Foreign language learning (d) Employee training
65. What is a virtual classroom? What are it advantages and disadvantage as
compared to a conventional classroom?
66. Give some examples of multimedia applications in entertainment.
67. Explain how is multimedia useful in making
(a) Video games (c) Animation film
(b) Movies (d) Advertisements
68. What is an interactive TV? How is it different from a conventional TV
system?
69. What is a video-on-demand system? What are its main components? What
is the role of each component in the system? Name some applications of this
system.
70. Give some examples of multimedia applications in marketing.
71. What is multimedia catalogue? What are its advantages and disadvantage as
compared to a conventional catalogue?
72. What is a virtual shop? How can a customer make purchases from it?
What are its advantages and disadvantage as compared to a conventional shop?
73. What is a virtual shopping mall? What are the key technologies involved in
implementing it?
74. What is groupware? Give some examples of multimedia applications in
groupware.
75. What is video conferencing? Explain how it works.
76. List out some of the uses of multimedia in scientific and engineering
applications.
77. What is computer aided design? How does it help a designer?
78. What is visualization? Give two examples to illustrate its usefulness.
79. Write short notes on
(a) Multimedia books
(b) Digital library
(c) Virtual classroom
(d) Interactive TV
(e) Video-on-demand system
(f) Multimedia catalogue
(g) Multimedia Kiosk
(h) Virtual shop
(i) Groupware
(j) Multimedia e-mail
(k) Video conferencing
(1) Computer aided design
(m) Visualization
80. What is data compression? Why is it needed in a multimedia computer
system?
81. When an encoded data is decoded, is the resulting data same as the original
data? Give reasons for your answer.
82. Explain the difference between lossless and lossy data compression
techniques. Give one example each for justifying the use of one technique over the
other technique.
83. Explain the difference between symmetrical and asymmetrical data
compression techniques. Give one example each for justifying the use of one
technique over the other technique.
84. Give the relative advantages and disadvantages of hardware and software
codecs..
85. Name two lossless and two lossy data compression techniques. Give a
practical use of each of these techniques.
86. Write short notes on:
(a) Run-length coding
(b) Variable-length coding
(c) Predictive coding
(d) Transform coding
(e) DCT coding
87. What is JPEG? Briefly describe the various modes supported by it.
88. Describe the steps involved in lossy JPEG compression.
89. Describe the steps involved in lossless JPEG compression.
90. What is MPEG video? Briefly describe its main characteristic features.
91. Differentiate among the different types of encoded frames used in MPEG
video.
92. Describe the steps involved in MPEG video compression.
93. Write short notes on:
(a) MPEG-1 video
(b) MPEG-2 video
(c) MPEG-4 video
(d) MPEG-2 audio
94. What is MPEG audio? Briefly describe the basic principle on which it works.
95. Describe the steps involved in MPEG audio encoding.
96. Describe the steps involved in MPEG audio decoding.
97. What is meant by multimedia synchronization? Explain the need for it in
multimedia applications by giving suitable examples.
98. Describe the roles of temporal specification and temporal synchronization in
multimedia synchronization.
99. Describe with suitable examples two approaches that may be used for
temporal specification in multimedia synchronization.
100. Define the following terms in context of temporal synchronization of
multimedia objects:
(a) Playback schedule (e) Response time
(b) Playback deadline (f) Set-up time
(c) Retrieval schedule (g) Earliest playback time
(d) Request time
101. What is the relationship among playback deadline, request time, and
response time in context of multimedia synchronization?
102. Explain how the actual playback schedule of a set of multimedia objects can
be obtained from their temporal specification.
103. Write the full form of the following:
(a) MPC (i) HDTV
(b) CAD (j) MPEG
(c) NTSC (k) MIDI
(d) MUSE (1) VGA
(e) JPEG (m) SECAM
(f) OCR (n) HD-MAC
(g) CAM (o) VOD (h) PAL
Chapter 20

Classification of Computers

General purpose computers come in many sizes and capabilities. Traditionally,


computers were classified by their size, processing speed and cost. Based on these
factors, computers were classified as microcomputers, minicomputers, mainframes
and supercomputers. However, with the rapidly changing technology, this
classification is no more relevant. The problem is that computer technology is
changing so fast that just after few months of introduction of a new computer in
the market, new models of computers are introduced which have much higher
performance and cost less. Thus, a recently introduced small system can
outperform the large models of a few years ago, and a new minicomputer can do
the work of an earlier mainframe at a much lower cost. Hence today computers are
classified based on their mode of use. According to this classification scheme
computers are classified as notebook computers, personal computers,
workstations, mainframe systems, supercomputers, and clients and servers. In this
chapter you will learn about these types of computers.

NOTEBOOK COMPUTERS

Notebook computers are portable computers which are mainly meant for use by
people who need computing power wherever they go. As their name implies,
notebook computers are approximately of the size of an 8½ x 11 inch notebook
and can easily fit inside a briefcase. Since they have to be carried along, they are
also light in weight, weighing around 2 Kg. They are also known as laptop PCs
(laptop personal computers) because they are as powerful as a PC and their size
and weight allows them to be used by comfortably placing them on ones lap.

As shown in Figure 20.1, a notebook computer uses an almost full-size keyboard,


a small flat screen liquid crystal color display, and a trackball (instead of a mouse
because notebook computers are often used without a desk). They also have a hard
disk (of few hundred mega bytes), a floppy disk drive, and sometimes a CD-ROM
drive also. The display screen is foldable in such a way that when riot in use, it can
be folded to flush with the keyboard to convert the system into notebook form.
When in use, the display screen is folded open as shown in the figure. Many
models of notebook computers can be plugged into a "dock" on a docking station
(a personal computer or a workstation) to take advantage of the larger machine's
big monitor, storage space, and other peripherals such as a printer. Many models
of notebook computers can also be connected to a network so that they can
download data (read files) from other computers on the network as and when such
a need arises, or to access the Internet. Since notebook computers are meant to be
mobile and used from anywhere, efforts are being made to provide wireless
connectivity to these systems with other stationary computers.

Notebook computers are designed to be used even at places where there is no


power point available to connect them with a power source (for example while
traveling in a train or aeroplane). Hence they are designed to operate with
chargeable batteries. With a fully charged battery, a notebook computer can be
used for a few hours.

Notebook computers normally run MS-DOS or WINDOWS operating system.


They are mostly used for word processing, spreadsheet computing, data entry, and
preparing presentation materials while a person is traveling. They are also used for
making presentations by plugging them into an LCD (liquid crystal display)
projection system when presentations are to be made at a location away from ones
office.

The processing capability of a notebook computer is normally as good as an


ordinary PC (personal computer) because both use the same type of processor such
as an Intel Pentium processor. However, a notebook computer generally has lesser
hard disk storage than a PC to keep its total weight to around 2 Kg. Notebook
computers are typically more expensive (2 to 3 times) than a normal PC.

PERSONAL COMPUTERS (PCs)

A PC is a non-portable general-purpose computer that can easily fit on a normal


size office table (leaving some writing space to keep writing pads and other office
stationary) and is generally designed to be used by one person at a time (single-
user-oriented). As the name implies, PCs were mainly designed to meet the
personal computing needs of individuals either in their working places or at their
homes. In fact, PCs have changed the work culture and work habits of numerous
organizations and individuals. An increasing proportion of office work now
involves the use of computers. Hence, today PCs are found on the working desks
of several employees in any organization. PCs are also providing employees with
flexible working environments. Those employees who could not work during
traditional office hours due to personal reasons can now work part of the time in
the office and the remainder of the time at home by having a PC in their homes.
Several individuals also keep a PC in their homes to run a business in their homes.
PCs are also used both by children and adults for education and entertainment.
Hence, PCs are now very common everywhere and can be found in offices,
classrooms, homes, hospitals, shops, clinics, etc.

The configuration of PCs varies from one PC to another depending on their usage.
However, the most commonly used configuration consists of a system unit, a
monitor (display screen), a keyboard, and a mouse. The system unit, which is in
the form of a box, consists of the main circuit board (consisting of CPU, memory,
etc.), the hard disk storage, the floppy disk drive, the CD-ROM drive, any special
add-on cards (such as network interface card), and ports for connecting peripheral
devices (such as printer).

The two most commonly used models of PCs are the desktop model and the tower
model. As shown in Figure 20.2, the only difference between the two models is
that the monitor is positioned on top of the system unit in the desktop model,
whereas the system unit of the tower model is designed to stand by the side of the
monitor, allowing it to be positioned even on the floor beside or under the working
desk to preserve desk space. Although the desktop model was more popular few
years ago, the tower model is gaining popularity now.

A PC generally employs several chips (CPU chip, RAM chips, ROM chips, I/O
handling chips, etc.) on a main circuit board called a system board, or
motherboard. The motherboard is what distinguishes one PC from another. Often
PCs are distinguished by the main component of the motherboard, that is the
microprocessor chip, which is used as their CPU. Some of the commonly known
PCs and the microprocessor chips used in them are described below.

PCs were first introduced in mid-1970s, and all PCs built during the 1970s were 8-
bit systems. That is, they were built using microprocessor chips that could operate
on 8 bits of data at a time. Some popular microprocessor chips of this type are
Zilog's Z80, MOS Technology's 6502, Intel's 8080, and Motorola's 6809. All these
microprocessor chips have built-in eight-line data buses. This means that these
chips can only retrieve from storage, manipulate, and process a single 8-bit byte of
data at a time. They are thus 8/8 bit chips. A 16-line address bus is also built into
these chips to determine the primary storage locations of the instructions and data
that are needed. With 16 address lines, a maximum of 64 Kilobytes (2 16) or 65,536
separate storage locations can be identified by these chips. Some of the PCs that
were built by using these types of microprocessor chips are Apple II, Commodore
64, and Radio Shack TRS-80 systems.

In early 1980s, microprocessor suppliers introduced 16-bit microprocessor chips


that could operate on 16 bits of data at a time. Intel 8088 is the most popular
microprocessor chip of this type. The original IBM PC, the IBM PC/XT, and most
of the IBM compatible PCs (PCs manufactured using IBM’s specifications)
manufactured during 1984 and later, used the Intel 8088 microprocessor chip. In
the 8088 chip, although the internal data path between the CPU and its associated
registers is 16 bits wide, the external data path between the CPU and primary
storage is only 8 bits wide, and so all operations to and from storage are done 8
bits (1 byte) at a time. Once received, however, data are processed 16 bits at a time
internally in the 8088 chip. The 8088 is thus an 8/16 bit chip. An extension of the
8088 chip is Intel's 8086 chip. Unlike the 8088, both the internal and external data
paths of the 8086 chip are 16 bits wide. Ther8Q86 is4hus a true 16/16-bit chip.
With an expanded built-in address bus having 20 lines, both the 8088 and the 8086
chips can identify a maximum of 1 Megabyte (220) or 1,048,576 separate storage
locations.

Another popular microprocessor chip is the Motorola 68000 chip, used in the
Apple's Macintosh PCs. It is a 16/32-bit chip because it uses an internal data path
of 32 bits and an external data path of 16 bits. So all operations to and from
storage are done 16 bits (2 bytes) at a time, and data are processed 32 bits at a time
internally. Thus the 68000 is more powerful than the 8088 or 8086. The address
bus of 68000 chip has 24 lines, allowing a primary storage capacity of up to 16
Megabytes (224= 16,777,216 bytes).

Next came the more advanced Intel chips called 80286, 80386 and 80486. The
80286 chip was about six times faster than the 8086 chip and could support a
primary storage capacity of up to 16 Megabytes. It was used with the IBM
Personal System/2 (PS/2) models of PCs. It was soon superceded by the more
advanced Intel 80386 and 80486 chips, which were 32/32-bit chips. Other popular
32/32-bit chips were Motorola 68020 and 68030, used in some models of Apple's
Macintosh PCs.

Successors to the Intel's 80486 chip fall in the Pentium family of microprocessor
chips - Pentium Processor, Pentium Processor with MMX Technology, Pentium II
Processor, and Pentium III Processor. All these are 32/64-bit chips. That is, they
use an internal data path of 32 bits and an external data path of 64 bits. So all
operations to and from storage are done 64 bits (8 bytes) at a time, and data are
processed 32 bits at a time internally. Thus these chips are more powerful than the
80286, 80386, 80486, 68020, or 68030 chips. Most of the current days PCs are
built using the microprocessor chips of the Pentium family.

In addition to wider external data path, the microprocessor chips of the Pentium
family are also designed to have better clock speed so that they can execute more
instructions in a given unit of time than the earlier microprocessor chips. There are
two cycles that occur during the processing of each program instruction. These
instruction and execution cycles are synchronized by a specific number of electric
pulses produced by an electronic clock that is built into the processor. Thus, the
speed with which an instruction is executed is also directly related to the chip's
clock speed, or number of pulses it uses each second. Different chips (even
different versions of a particular chip) are produced with different clock speeds.
For example, the Intel 80286 chip used in IBM's PS/2, models 50 and 60, ran at 10
million pulses per second (that is, its clock speed was 10 megahertz or 10 MHz).
Similarly, the Motorola 68000 chip used in Apple's Macintosh system had a clock
speed of 7.83 MHz Most of earlier chips had clock speed in the range of 2 to 66
MHz. The typical clock speeds of the microprocessor chips in the Pentium family
are given in Figure 20.3. Note that the higher is the clock speed, the faster is the
processor because it can execute more instructions in a given unit of time.

Two other major techniques used by the microprocessor chip designers for better
performance are larger cache sizes and larger instruction sets supported by a chip.
For example, the Pentium Processor has 16 KB (16 Kilo Bytes) of cache, which is
used for caching both recently used instructions and data. The more recently
introduced Pentium Processor family chips (Pentium Processor with MMX
technology, Pentium II Processor, and Pentium III Processor) have separate caches
of 16 KB each for data and instructions. That is, they effectively have 32 KB
cache size. Larger separate internal caches for data and instructions improve
performance by reducing the average memory access time and providing fast
access to recently used instructions and data. The instruction and data caches being
separate can be accessed simultaneously. Furthermore, the Pentium II Processor
and Pentium III Processor chips also have a 512 KB of level-two cache that further
improves performance by allowing a large amount of recently used instructions
and data to be cached. There are two kinds of memory caches. A level-one cache
(known as L1 cache) is built into the CPU chip itself, and a level-two cache
(Known as L2 cache) is external, typically made up of SRAM (static RAM) chips
on the motherboard. A static RAM chip requires power to hold its content and has
access times in the 10 to 30-nanosecond range. Static RAMs do not require refresh
circuitry as do dynamic RAMs, but they take up more space and use more power.
Pentium family chips Typical clock speeds

Pentium Processor 120, 133, 150, 166 and 200 MHz.


Pentium Processor with MMX 166,200 and 233 MHz.
technology
Pentium II Processor 233, 266, 300, 333, 350, 400, and
450 MHz.
Pentium III Processor 450, 500, 750 and 800 MHz.
Pentium IV Processor 1 GHz and higher
Figure 20.3. Typical clock speeds of microprocessor chips in the Pentium family.

The Pentium Processor with MMX technology and the Pentium II Processor chips
have 57 new instructions, as well as data types, as compared to the previous Intel
microprocessor chips. These instructions and data types are mainly for multimedia
enhancements enabling these chips to provide increased performance on a wide
variety of multimedia and communications applications. Similarly,, the Pentium
III Processor chip has additional new instructions enabling advanced imaging, 3D,
streaming audio and video, and speech recognition applications. Thus with a PC
based on Pentium III Processor it will be possible to
1. View and manipulate higher resolution and higher-quality images than with
previously available PCs,
2. Support high-quality audio, MPEG2 video and simultaneous MPEG2
encoding and decoding, and
3. Have reduced CPU utilization for speech recognition, as well as higher
accuracy and faster response time.
Virtually all PCs of today give users the flexibility to enhance the functionality of
a basic configuration and are said to have an open architecture. For this, the
system unit of a PC has expansion slots in which a wide variety of special-function
add-on boards (also called add-on cards) can be plugged in. These add-on boards
contain the electronic circuitry for a wide variety of computer-related functions.
The number of available expansion slots varies from computer to computer. The
functionality of some of the more popular add-on boards is given below.
1. Network interface card. This card, often referred to as NIC, allows a PC to
be connected to a network. For example, if a PC is to be connected to an Ethernet
LAN, it must be equipped with an Ethernet card. Similarly, if the PC is to be
connected to an ATM network, it must be equipped with ah ATM card.
2. Fax modem card. This card allows a PC to be connected to a remote computer
via a telephone-line. It also enables the PC to transfer images of hard-copy
documents via telephone lines to another location just as we do using a fax
(facsimile) machine.
3. Color and graphics adapter card. This card is required for interfacing a PC
with video monitors that have graphics and/or color capabilities. For example,
the VGA (video graphics array) board enables the interfacing of high-resolution
monitors with the PC.
4. Motion video card. This card enables full-motion color video with audio to be
integrated with other output on the monitor's screen. Because the card accepts
multiple inputs, videos can be shown full-screen (one video input) or in windows
(multiple video inputs).
The system unit of a PC also has ports for connecting peripheral devices to the PC.
These ports allow external input/output or storage devices (such as a printer and
other devices external to the system unit box) to be plugged in to the PC in much
the same way as you plug an electric equipment into an electrical socket. The two
common types of ports available in almost all PCs are:
1. Serial ports. Serial ports facilitate the serial transmission of data, one bit at a
time in sequence over a single wire. When a PC uses an output serial port, the 8-
bit bytes produced in parallel by the PC are then lined up into a single stream of
bits for serial transmission to a printer or other device connected to that port.
Serial ports provide an interface for low-speed printers and modems. A popular
serial port standard is the RS-232C interface that facilitates the transmission of
data over telephone lines. Many serial ports installed on PC systems follow this
standard.
2. Parallel ports. Parallel ports facilitate the parallel transmission of data, that
is, 8 or more bits are transmitted simultaneously. A popular parallel port standard
is the Centronics printer interface. Parallel ports provide the interface for such
devices as high-speed printers and plotters, magnetic tape backup units, and
external hard disk units.
The popular operating systems for PCs are MS-DOS, MS-Windows, Windows-
NT, Linux and Unix. An OS called OS/2 was also used on IBM PCs few years ago
and the Apple's Macintosh PCs run the Apple's propriety OS called Macintosh OS
as well as Apple's version of Unix called A/UX. Most of these operating systems
enable the user to switch between tasks. This capability is known as multitasking -
a single-user variation of the multiprogramming concept. Multitasking eases user
operation and saves lots of time when a user has to switch between two or more
applications while performing a job. For example, suppose a user is using a word
processor to create an annual report, and he/she needs to do some arithmetic
calculations on the computer and include the calculated results in the report.
Without multitasking, the user would have to close the annual report file and the
word processing application, open the calculator application, make the necessary
calculations, write down the results, close the calculator application, and reopen
the word processing application and the annual report file. With multitasking, the
user simply opens the calculator application, makes the necessary calculations, and
switches back to the annual report file to continue working on it. This capability to
switch between tasks (applications) saves lots of time and effort of the user. If
hard disk space is sufficient, a PC can be configured to simultaneously have more
than one OS. For example, a PC can be configured to have both MS-Windows and
Linux OS and the user can choose at the time of switching on the PC which OS
should the PC boot with depending on what application the user wants to run on
the PC at that time. Thus the PC can work both as a Windows machine as well as a
Linux machine. This feature provides great flexibility in the usage of a wide
variety of applications for different OSs on the same PC.
PCs generally cost from a few tens of thousands to about a lakh of rupees,
depending on their capabilities and capacity. The tremendous growth and
continuing potential of the PC market has brought many manufacturers to this
arena. A few of the major PC manufacturers are IBM, Apple, Compaq, Dell,
Zenith, Siemens, Toshiba, and Hewlett-Packard.

WORKSTATIONS

A workstation is a powerful desktop computer designed to meet the computing


needs of engineers, architects, and other professionals who need greater processing
power, larger storage, and better graphics display facility than what PCs provide.
For example, workstations are commonly used for computer-aided design (CAD),
in which industrial designers create pictures of technical parts or assemblies. To
process and view these complex and detailed diagrams, a computer with great
processing power, large storage, and good graphics display monitor is needed.
Workstations are also used" for simulation of complex scientific and engineering
problems and for visualizing the results of simulation. They are also used for
multimedia applications, such as for creating special audio-visual effects for
television programmes and movies.
A workstation looks very much like a PC and is typically used by only one person
at a time, just like a PC. The following characteristics are often used to distinguish
between the two:
1. Processing power. The processing power of a workstation is several times
(typically 5 to 10 times) more than that of an average power of a PC.
2. Storage capacity. Workstations have larger main memory (typically 0.5 GB
to a few GB) as compared to PCs, which have few tens or hundreds of MB of
main memory. The hard disk capacity of a workstation is also much more
(typically 4 GB to several tens of GB) as compared to the hard disk capacity of
PCs (typically few GB).
3. Display facility. Most workstations have a large-screen (19 inch or more)
color monitor capable of displaying high-resolution graphics. Thus, the color and
graphics adapter card, which is optional for PCs, is available by default in
workstations. PCs normally use monitors having smaller screen (17 inch or less).
4. Processor design. Unlike the microprocessor chips used in PCs for CPU, the
CPU chips used in workstations are designed using a special technology known as
Reduced Instruction Set Computers (RISC). The basic idea behind the RISC-
based architecture is that the speed of the processor can be greatly increased by:
- Eliminating infrequently used programmed instructions from the set of
instructions supported by a CPU chip,
- Making all the instructions of equal length, and
- Reducing the number of addressing modes.
Popular RISC processors used in workstations are ALPHA (used in DEC-ALPHA
workstations), RIOS (used in IBM workstations), SPARC (used in SUN
workstations), and PA-RISC (used in HP workstations).
Operating system. Unlike PCs which can run any of the five major OSs - MS-
DOS, MS-Windows, Windows-NT, Linux and Unix, all workstations generally
run the Unix operating system or a variation of it, such as AIX (used in IBM
workstations), Solaris (used in SUN workstations), and HP-UX (used in HP
workstations). Also, unlike most operating systems for PCs, which are single-user
oriented, a workstation's operating system is designed to enable it to support a
multiuser environment.
6. Network interface card.
Network H
Most workstations have built-in hardware to connect to a Local Area Network
(LAN). As already discussed before, this facility is normally optional in case of a
PC. Workstations generally cost from a few lakhs to few tens of lakhs of rupees
depending on their capabilities and capacity. The biggest manufacturer of
workstations is Sun Microsystems. Other manufacturers of workstations include
IBM, DEC, Hewlett-Packard (HP), and Silicon Graphics.

MAINFRAME SYSTEMS

There are several organizations such as banks, insurance companies, hospitals,


railways, etc. that need to process large number of transactionson-line and require-
computer systems having massive data storage and processing capabilities.
Mainframe systems are computer systems that are mainly used for handling the
bulk of data and information processing of such organizations. They are also used
in such environments where a large number users need to share a common
computing facility such as in research groups, educational institutions, engineering
firms, etc.
By its very nature of usage, a mainframe system is housed in a central location
with several user terminals connected to it. The user terminals act as access
stations and may or may not be located in the same building in which the
mainframe system is located.
A typical configuration of a mainframe system consists of the following
components (see Figure 20.4).
1. Host, front-end, and back-end computers. A mainframe computer system is
usually composed of several computers (subordinate computers) in addition to the
mainframe, or host computer. The host computer carries out most of the
computations and has direct control over all the other computers. The other
computers relieve the host computer of certain routine processing requirements.
For example, & front-end computer is used for handling communications to and
from all the user termini connected- to the computer system, thus relieving the
host computer of communications-related processing requirements. Similarly, a
back-end computer is used to handle data I/O operations, thus relieving the host
computer of locating a particular I/O device and transferring data to or from it.
Although the host computer could itself perform all these operations, the
subordinate computers provide a boost to the overall system efficiency by
relieving the host computer of time-consuming chores that do not require
processing speed. The host computer of many modern mainframe systems are
multiprocessor systems having multiple CPUs. As shown in the figure, the host
and other computes are located in the systems room to which entry is restricted to
system administrators and maintenance staff.
2. Console(s). One or more console terminals are also located in the systems
room. These terminals are directly connected to the host processor and are mainly
used by the system administrators to monitor the health of the system or to
perform some system administration activities, such as changing the configuration
of the system, installing new software on the system, taking system backup, etc.
3. Storage devices. For large volume data storage, a mainframe system has
several magnetic d drives, which are directly connected to the back-end computer.
All data to and from these magnetic disks are accessed by the host computer via
the back-end computer. The magnetic disk drives are also located in the systems
room. In addition, a mainframe system also has a few tape drives and a magnetic
tape library for restoration or backup of data from or to magnetic tapes. The tape
library is located in the systems room and is used by the system administrators to
take regular backups of the data from magnetic disks on to magnetic tapes. The
tape drives are located in the users room so that users who bring their input data on
tape or want to take their output data on tape can have access to the tape drives.
4. User terminals. The primary means of accessing the system by the users is the
user terminals, which are used by the users to write, test, and execute their
programs. In the figure, although all the user terminals are shown to be located in
the user room, some of them may be located at geographically distributed
locations. Moreover, a user terminal need not always be a dumb terminal, which
has no CPU or storage of its own and acts just as an I/O device to the mainframe
system. Often a PC is used as a user terminal in which case the program
development activity is carried on the user terminal and the mainframe system is
used only to test and execute the program. Since mainframe systems allow
multiple users to simultaneously use the system through the user terminals, their
operating systems support multiprogramming with timesharing so that all the users
get good response time and an illusion that their jobs are being attended to by the
system.
5. Output devices. The user terminals serve the purpose of soft copy output
devices. However, for hard copy outputs, «a mainframe system usually has several
printers and one or more plotters connected to the back-end computer. Different
printers may be of different print speeds and different print qualities. Plotters are
used to produce large, high-precision hard copies of graphs, charts, blueprints, and
drawings. These output devices are also located in the user room so that they are
accessible to the users for taking their outputs.

It is unlikely that you would find two mainframe systems configured in exactly the
same way. The configuration of a mainframe system depends a lot on the type of
usage and the kind of users it is meant for. The example of Figure 20.4 is just one
possible configuration.

Mainframe systems are much bigger and several times more expensive than
workstations. A typical mainframe system looks like a row of large file cabinets
and needs a large room with closely monitored humidity and temperature. A
mainframe system may cost anywhere from a few tens of lakhs to a few crores of
rupees depending on the configuration. A mainframe system having smaller
configuration (slower host and subordinate computers, lesser storage space, and
fewer user terminals) is often referred to as a minicomputer system. However,
there is no well-defined boundary for differentiating between the two. Two major
vendors of mainframe systems are IBM and DEC.

SUPERCOMPUTERS

Supercomputers are the most powerful and most expensive computers available at
a given time. They are primarily used for processing complex scientific
applications that require enormous processing power. For example, scientists build
models of complex processes and simulate the processes on a supercomputer. One
such process is nuclear fission. As a fissionable material approaches a critical
mass, scientists want to know exactly what will happen during every millisecond
of a nuclear chain reaction. A supercomputer is used to model the actions and
reactions of literally millions of atoms as they react. A typical scientific
application like this involves the manipulation of a complex mathematical model,
often requiring trillions of operations to resolve, and cannot be processed in a
reasonable time without the use of a supercomputer. Some of the well known
supercomputing applications (applications that need supercomputers for
processing) are as follows:
1. The petroleum industry uses supercomputers to analyze large volumes of
seismic data gathered during oil-seeking explorations to identify areas where there
is possibility of getting petroleum products inside the earth. This helps in more
detailed imaging of underground geological structures so that the expensive
resources for drilling oil wells and extraction of petroleum products from them can
be more effectively channelized to areas where the analysis results show better
possibility of getting petroleum deposits.
2. Aerospace industry uses supercomputers to simulate airflow around an
aircraft at different speeds and altitude. The advent of supercomputers has now
made it possible to simulate the airflow around any complex shaped object in 3-
dimensional space. This has significantly enhanced the accuracy of simulation,
reducing the design cycle time and cost. This in turn helps in producing an
effective aerodynamic design to develop aircrafts with superior performance.
3. Automobile industry uses supercomputers to do crash simulation of the.
design of an automobile before it is released for manufacturing. Doing crash
simulation of an automobile on computer screen is less expensive, more revealing,
and safer than crashing a real model of the automobile. This helps in producing
better autonfobile designs, which are safer to ride.
4. Structural mechanics industry uses supercomputers to solve complex structure
engineering problems that designers of various types of civil and mechanical
structures need to deal with to ensure safety, reliability, and cost effectiveness. For
example, the designer of a large bridge has to ensure that the bridge must work in
various atmospheric conditions and pressures from wind, velocity, etc., and under
different load conditions. Actual construction and testing of such expensive
structures is prohibitive in most cases. Hence simulation techniques are
extensively used in structural mechanics area. Computer simulation of these
problems is a complex activity and requires powerful supercomputers to complete
the simulation in a reasonable time. Using mathematical modeling techniques,
various combinations can be tried out without going for the
actual construction/manufacturing of the structure and the most optimum design
can be picked up.
5. Meteorological centers use supercomputers for weather forecasting. In
weather forecasting and in research involving the earth's atmosphere, weather data
supplied by a worldwide network of space satellites, airplanes, and ground stations
are fed into supercomputers. These data are analyzed by a series of computer
programs to arrive at forecasts. This analysis involves solving of complex
mathematical equations, which model the atmosphere and climate processes. For
example, in India, the National Center for Medium Range Weather Forecasting
(NCMRWF), located in New Delhi, currently uses the CRAY XMP-216
supercomputer for predicting the medium range weather forecasts, which is very
crucial for the Indian agriculture.
6. Material scientists and physicists use supercomputers to design new
materials. Termed as nanostructure technology, this field requires microscopic
investigation of mechanical, electrical, optical and structural properties of
materials. For this, scientists need to simulate the nanoscale materials like
clusters of atoms, quantum dots, quantum wires using first principles molecular
dynamics technique. Such simulations are highly compute intensive since they
combine the complexity of molecular dynamics and electronic structure. Hence
supercomputers are needed to complete these simulations in a reasonable time.
7. Film and TV industries use supercomputers to create special effects for
movies and TV programmes. Supercomputers help in producing computer-
generated images using advanced graphics features in a much shorter time than the
time taken to generate these images on smaller computers. The produced images
are incorporated into the movies or TV programmes to create special effects. Thus
the advent of supercomputers has drastically reduced the time needed to produce a
full-length feature film that uses several such special effects.

There are many more supercomputing applications. It is not possible to cover all
of them here. All these applications are impractical, if not impossible, on
mainframe systems.

Supercomputers use multiprocessing and parallel processing technologies to solve


complex problems faster. That is, they derive much of their speed from the use of
multiple processors, and parallel processing enables a complex problem to be
divided into smaller problems that can be assigned to different processors of the
system and processed in parallel. A parallel program is written in such a way that
the original problem is broken up into smaller computational modules, which can
be allocated to different processors, and multiple processors can work
independently and cooperate to solve the problem. Thus if the original problem
takes 100 hours to process on a single-processor system, and if it can be broken
into 100 smaller computational modules, it can be theoretically solved in about 1
hour by using a supercomputer that has 100 processors. Since modern
supercomputers employ parallel processing technology, they are also known as
parallel computers or parallel processing systems. Moreover, modern
supercomputers employ hundreds of processors and are also known as massively
parallel processors. Parallel computers are of the following two types:
1. Shared memory parallel computer. As shown in Figure 20.5, in this type of
parallel computer, there is a single system-wide primary memory that is shared by
all the processors. Any communication between the processors usually takes place
through the shared memory. These machines are easy to program, but the number
of processors that can be usefully deployed is usually small (16 to 32 CPUs) and
limited by the bandwidth of the shared memory.
2. Distributed memory parallel computer. As shown in Figure 20.6, in this type of
parallel computer, the processors do not share memory, and each processor has its
own local memory. All communication between the processors is done by passing
messages across the network that interconnects the processors. Hence distributed
memory parallel computers are also known as message passing parallel computers.
They are more freely scalable and can have an almost unlimited (several hundred)
number of processors.

Local memory Local memory Local memory Local memory


CPU CPU CPU CPU

Communication network

Figure 20.6. A distributed memory parallel computer.

The speed of modern supercomputers is measured in gigaflops and teraflops. A


gigqflop is one billion (109) floating-point arithmetic operations per. second, and a
teraflop is 1012 floating-point arithmetic operations second. The PARAM 10000
supercomputer (shown in Figure 20.7) developed by the Centre for Development
of Advanced Computing (C-DAC), India in the year 1998 is a 100 gigaflops
system.

Like mainframe systems, supercomputers also support multiprogramming and can


be accessed by multiple users at the same time. However, the main difference
between these two types of systems is that supercomputers primarily address
processor-bound applications whereas mainframe systems are oriented to
input/output-bound applications. In processor-bound applications, the amount of
work that can be performed by the computer system is limited primarily by the
speed of the CPU(s), whereas in I/O-bound applications, the amount of work that
can be performed by the computer system is limited primarily by the speeds of the
I/O devices. Supercomputers are rarely used for processing input/output-intensive
applications, such as payroll processing, accounting, or record-keeping
applications. To do so would waste an expensive and relatively rare resource.

Supercomputers are often treated as a national resource. This is mainly because it


is not economically viable to have many such facilities for developing countries
because of the cost involved in setting up the facility, maintaining the facility, and
fast obsolescence of technology. Another reason for this is that a nation's
leadership role in energy, space exploration, medicine, industry, and other critical
areas is unlikely to continue if its scientists must use computers that are less
powerful than those available to their counterparts in other countries. For example,
today's supercomputers are not fast enough to simulate airflow around an entire
aircraft. Builders of new airplanes must therefore simulate the passage of air
around separate pieces of the airplane and then combine the results to produce an
effective aerodynamic design. It is believed that the first nation to build a fast
enough supercomputer, which can simulate the airflow around a complete
airplane, will be the country that develops planes with superior safety, reliability,
and performance. The same holds good for other scientific research and
development areas.

Leaders in the development of supercomputers include Cray Research Company,


IBM, Silicon Graphics, Fujitsu, and Intel. In India, we have a CRAY XMP-216
supercomputer installed at the National Center for Medium Range Weather
Forecasting (NCMRWF) in Delhi, and an IBM SP/2 supercomputer installed at the
Supercomputer Education and Research Center (SERC) in the Indian Institute of
Science, Bangalore. Realizing the importance of supercomputers in the
advancement of a nation, some national efforts of building supercomputers
indigenously have also been initiated. This has resulted in the development of
PARAM series of supercomputers by the Centre for Development of Advanced
Computing (C-DAC), Anupam series of supercomputers by the Bhabha Atomic
Research Centre (BARC), and PACE series of supercomputers by the Defence
Research and Development Organization (DRDO), Hyderabad.

Because computer technology changes so quickly, the advanced capabilities of a


supercomputer today may become the standard features next year, and next year's
supercomputer will be vastly more powerful than today's. Supercomputers can
typically cost from few tens of lakhs to few tens of crores of rupees depending on
their processing capability and configuration.
CLIENTS AND SERVERS

This is a purely role-based classification of computer systems. With the increased


popularity of computer networks, it has become possible to interconnect several
computers together which can communicate and interact with each other over the
network. In such a computing environment, there are several resources/services,
which can be shared among multiple users for cost-effective usage and can be best
managed/offered centrally. A few examples of such resources/services are:
1. File server. A file server provides a central storage facility to store files of
several users on the network.
2. Database server. A database server manages a centralized database and
enables several users on 1 network to have shared access to the same database.
3. Print server. A print server manages one or more printers and accepts and
processes print requests from any user in the network.
4. Name server. A name server translates names into network addresses enabling
different computers on the network to communicate with each other.

In these cases, it is usual to have one process that "owns" the resource or service
and is in charge of managing it. This process accepts requests from other processes
to use the resource or service. The process that owns the resource and does this
management is called a server process and the computer on which the server
process runs is called a server computer because it services requests for use of the
resource. Other processes, which send service requests to the server, are called
client processes and the computers on which the client processes run are called
client computers. Note that there may be multiple client computers sending service
requests to the same server computer.
A generic client-server computing environment is shown in Figure 20.8. It is
comprised of the following entities:
1. Client. A client is generally a single-user PC or workstation that provides a
highly user-friendly interface to the end user. It runs client processes, which
send service requests to the server. Generally, there are multiple clients in a client-
server computing environment and each client has its own monitor, keyboard, and
mouse for allowing users to interface with the system.
2. Server. A server is generally a relatively large computer that manages a shared
resource and provides a set of shared user services to the clients. It runs the server
process, which services client requests for use of the resource managed by the
server. A server may be a workstation, a mainframe system, or even a
supercomputer. A server's operating system is generally designed to enable it to
support a multiuser environment. Servers are generally headless machines,
which do not have monitor, keyboard and mouse attached to them since users do
not directly interact with them, but use them only via the network.
3. Network. In addition to clients and servers, the third essential component of
a client-server environment is the network, which interconnects all the clients and
servers of the same computing environment. The network may be a single LAN or
WAN or an internet of networks.
A set of computers interconnected together to form a client-server computing
environment is collectively known as a distributed computing system or
distributed system. Client-server computing involves splitting an application into
tasks and putting each task on the computer where it can be handled most
efficiently. This usually means putting the processing for the presentation on the
user's machine (the client) and the data management and storage on a server.
Depending on the application and the software used, all data processing may occur
on the client or be split between the client and the server. Server software accepts
request for service from client software and returns the results of processing the
request to the client. The client then manipulates the received results and presents
it in the proper format to the user.

LAN or WAN or an Internet of Networks

Notice that the central feature of a client-server computing architecture is the


allocation of application-level tasks between clients and servers. The computers
and the operating systems of a client and a server may be different. For example, a
client may be a PC running MS-Windows OS, whereas a server may be a
mainframe system running Unix OS. In fact, there may be a number of different
types of client computers and operating systems and a number of different types of
server computers and operating systems in a single client-server computing
environment. As long as a particular client and server share the same
communications protocol and support the same applications, these lower-level
differences are irrelevant. It is the communications protocol that enables client and
server to inter-operate. One such standard communications protocol is the TCP/IP.

In a client-server computing environment, it is common for one server to use the


services of another server, and hence to be both a client and a server at the same
time. For example, suppose a client-server computing environment has clients, a
file server, and a disk block server. Any client can send a file access request to the
file server. On receiving such a request, the file server checks the access rights,
etc. of the user but does not actually read/write the file blocks itself. Instead, it
sends a request to the disk server for accessing the request data blocks. The disk
block server returns to the file server the requested data blocks. The file server
then extracts the actual data from the data blocks and returns it to the client. In this
scenario, the file server is both a server and a client. It is a server for the clients,
but a client for the disk block server. Hence the concept of client and server
computers is purely role-based and may change dynamically as the role of a
computer changes.
Figure 20.9 summarizes and presents a relative comparison of different types of
computers based on some key features.
Points to Remember

1. Traditionally, computers were classified by their size, processing speed and


cost. Based on these factors, computers were classified as microcomputers,
minicomputers, mainframes and supercomputers. However, with the rapidly
changing technology, this classification is no more relevant.
2. Today computers are classified based on their mode of use. According to
this classification scheme, computers are classified as notebook computers,
personal computers, workstations, mainframe systems, supercomputers, and
clients and servers.
3. Notebook computers are portable computers which are mainly meant for use
by people who need computing power wherever they go. They are small enough
to fit inside a briefcase, light enough to be easily carried around, and are designed
to operate with chargeable batteries so that they can be used even at places where
there is no power point available. They normally run MS-DOS or WINDOWS
operating system and are mostly used for word processing, spreadsheet computing,
data entry, preparing presentation materials, and making presentations.
4. A personal computer is a non-portable general-purpose computer that can
easily fit on a normal size office table and is generally designed to be used by one
person at a time. PCs are mainly used to meet the personal computing needs of
individuals either in their working places or at their homes. They are also used
both by children and adults for education and entertainment. They normally run
MS-DOS, MS-Windows, Windows-NT, Linux, or Unix operating system and
support multitasking, which eases user operation and saves lots of time when a
user has to switch between two or more applications while performing a job.
5. A workstation is a powerful desktop computer designed to meet the
computing needs of engineers, architects, and other professionals who need greater
processing power, larger storage, and better graphics display facility than what
PCs provide. Workstations are commonly used for computer-aided design,
multimedia applications, and simulation of complex scientific and engineering
problems and visualizing the results of simulation. Workstations generally run
the Unix operating system or a variation of it. A workstation's operating system is
generally designed to support a multiuser environment.
6. Mainframe systems are computer systems that are mainly used for handling
the bulk of data and information processing of such organizations as banks,
insurance companies, hospitals, railways, etc. They are also used in such
environments where a large number of users need to share a common computing
facility such as in research groups, educational institutions, engineering firms, etc.
A typical configuration of a mainframe system consists of a host computer, a
front-end computer, a back-end Computer, one or more console terminals, several
magnetic disk drives, a few tape drives, a magnetic tape library, several user
terminals, several printers, and one or more plotters. A typical mainframe system
looks like a row of large file cabinets and needs a large room. A mainframe
system having smaller configuration (slower host and subordinate computers,
lesser storage space, and fewer user terminals) is often referred to as a
minicomputer system.
7. Supercomputers are the most powerful and most expensive computers
available at a given time. They are primarily used for processing complex
scientific applications that require enormous processing power. Some of the well
known supercomputing applications include analysis of large volumes of seismic
data, simulation of airflow around an aircraft, crash simulation of the design of an
automobile, solving complex structure engineering problems, weather forecasting,
microscopic investigation of mechanical, electrical, optical and structural
properties of materials, and creating special effects for movies and TV
programmes. Like mainframe systems, supercomputers also support
multiprogramming. However, the main difference between these two types of
systems is that supercomputers primarily address processor-bound applications
whereas mainframe systems are oriented to input/output-bound applications.
8. Supercomputers use multiprocessing and parallel processing technologies to
solve complex problems faster, and hence they are also known as parallel
computers or parallel processing systems. Moreover, modern supercomputers
employ hundreds of processors and are also known as massively parallel
processors.
9. Parallel computers are of two types - shared memory parallel computer and
distributed memory parallel computer. In a shared memory parallel computer,
there is a systemwide primary memory that is shared by all the processors and any
communication between the processors usually takes place through the shared
memory. On the other hand, in a distributed memory parallel computer, the
processors do not share memory, and each processor has its own local memory.
All communication between the processors is done by passing messages across the
network that interconnects the processors. Hence distributed memory parallel
computers are also known as message passing parallel computers.
10. A client-server computing environment is comprised of multiple clients, one
or more servers, and a network. A client is generally a single-user PC or
workstation that provides a highly user-friendly interface to the end user. It runs
client processes, which send service requests to the server. A server is generally a
relatively large computer that manages a shared resource and provides a set of
shared user services to the clients. It runs the server process, which services client
requests for use of the resource managed by the server. The network may be a
single LAN or WAN or an internet of networks.
11. A set of computers interconnected together to form a client-server computing
environment is collectively known as a distributed computing system or
distributed system.
12. Client-server computing involves splitting an application into tasks and
putting each task on the computer where it can be handled most efficiently. The
computers and the operating systems of a client and a server may be different. As
long as a particular client and server share the same communications protocol and
support the same applications, these lower-level differences are irrelevant. In a
client-server computing environment, it is common for one server to use the
services of another server, and hence be both a client and a server at the same
time. Hence the concept of client and server computers is purely role-based and
may change dynamically as the role of a computer changes.

Questions

1. List out some of the parameters that were traditionally used to classify
computers. What were the major types of computers based on this classification
scheme? Why is this classification scheme no more valid?
2. On what basis are computers classified today? How many types of
computers are there based on this classification scheme?
3. What is a notebook computer? Why is it so called? What are its main uses?
4. What is a laptop personal computer? Why is it so called? Describe a typical
configuration of a laptop PC.
5. What is a docking station? Why is it used?
6. Notebook computers can be used even while traveling in a train or airplane.
Discuss this statement.
7. What operating systems do notebook computers normally use?
8. What features make a notebook computer portable?
9. What is a personal computer? Describe its typical uses.
10. PCs have changed the work culture and work habits of numerous
organizations and individuals. Discuss this statement.
11. Describe a typical configuration of a PC.
12. Which are the two commonly used models of PCs? How are they different?
13. How are a microprocessor, a motherboard, and a personal computer related?
14. Differentiate among the following types of microprocessor chips:
(a) 8/8 bit chip, 8/16 bit chip, and 16/16 bit chip.
(b) 16/32 bit chip, 32/32 bit chip, and 32/64 bit chip.
15. Why do some 16-bit PC systems have a maximum primary storage capacity
of 1 Megabyte while others can manage up to 16 Megabytes?
16. What is meant by the "clock speed" of a microprocessor chip? How does it
influence the processing capability of a processor?
17. List out three major techniques used by the microprocessor chip designers
for better performance of a processor?
18. How does a larger cache size help in better performance of a processor?
19. Differentiate between LI and L2 caches.
20. What is an expansion slot? How is it useful for a buyer of a PC?
21. What is an add-on card? List out four functional enhancements that can be
added to a PC by inserting one or more add-on cards into expansion slots.
22. Write short notes on:
(a) Fax modem card
(b) Expansion slot
(c) Add-on card
(d) Serial port
(e) Parallel port
(f) Network interface card
(g) Motion video card
(h) Color and graphics adapter card
23. What is a "port"? What are the two common types of ports available in PCs?
How are they different from each other?
24. What operating systems do PCs normally use?
25. What is "multitasking"? How is it different from "multiprogramming"?
26. Differentiate among multitasking, multiprogramming and multiprocessing.
27. Can a PC be configured to simultaneously have more than one operating
system? If yes, explain how is this feature useful. If no, give justification for your
answer.
28. What is a workstation? Wnat are its common uses?
29. List out the major differences between a PC and a workstation.
30. What is a Reduced Instruction Set Computers (RISC) technology? How does
it help in increasing the speed of a processor?
31. What operating systems do workstations normally use?
32. What is a mainframe system? What are its typical uses?
33. Describe a typical configuration of a mainframe system.
34. Differentiate among the host computer, front-end computer, and back-end
computer of a mainframe system.
35. What is the purpose of a console in a mainframe system?
36. What are the various types of storage devices normally used in a mainframe
system?
37. What are the various types of input/output devices normally used in a
mainframe system?
38. The components of a mainframe system are normally divided into two types
- those that are placed ii system room and those, which are placed in user room.
List out the main components of a mainframe system and mention against each
component as to which of the above two types it belongs to.
39. What is a minicomputer system?
40. Discuss how the subordinate computers of a mainframe system help in
improving the overall performance c the system.
41. What is a supercomputer? What are its primary uses?
42. Give examples of at least five supercomputing applications. Explain why do
these applications require supercomputer.
43. Explain the two key technologies that modern supercomputers employ for
solving complex problems faster.
44. What is parallel processing? Explain with an example how parallel processing
can help solve a complex problem faster.
45. Why are modern supercomputers also known as massively parallel processors?
46. What is a parallel computer? How many types of parallel computers are
there? Explain the differences between them and list out their relative advantages
and disadvantages.
47. What is the main difference between a supercomputer and a mainframe
system?
48. Supercomputers are often treated as a national resource. Discuss this
statement.
49. What is a message passing parallel computer? Why is it so called?
50. Write short notes on:
(a) Parallel processing
(b) Parallel computers
(c) I/O-bound applications
(d) Massively parallel processors
(e) Processor-bound applications
51. List out the main components of a client-server computing environment.
Describe the roles of each component.
52. Give three examples of resources/services that can best be handled by a
server in a client-server computing environment.
53. Is it possible to have a number of different types of client computers and
operating systems, and a number of different types of server computers and
operating systems in a single client-server computing environment? If no, explain
why? If yes, explain how will different clients and servers interact with each other.
54. In a client-server computing environment, is it possible for a computer to be
both a client and a server at the same time? If no, explain why? If yes, give an
example of such a scenario.
55. Write short notes on:
(a) Client computer
(b) Server computer
56. Write short notes on:
(a) Workstations
(b) Mainframe systems
(c) Supercomputers
(c) Distributed system
(d) Client-server computing environment
(d) Notebook computers
(e) Personal computers
(f) Classification of computers
57. List out the key desirable features of an operating system for each of the
following types of computers:
(a) Workstations (e) Notebook computers
(b) Supercomputers (f) Personal computers
(c) Client computers (g) Mainframe systems
(d) Server computers
58. Write short notes on:
(a) Multiprogramming
(b) Multiprocessing
(c) Multitasking
(d) Parallel Processing
Glossary

The purpose of this glossary is to present definitions for some of the terms that are
often used in the field of computers and data processing.
2
2G technology Second-generation wireless-networking technologies.
3
3G technology Third-generation wireless-networking technologies.
A
A Programming Language (APL): A powerful high-level language that is well
suited for specifying complex algorithms. It is a real-time language usually used in
an interpretive and interactive manner and was developed primarily for scientific
applications.

Abacus: The earliest device that qualifies as a digital computer. It permits the user
to represent numbers by the position of beads on a rack. Simple addition and
subtraction can be carried out rapidly and efficiently by positioning the beads
appropriately.

Access control: Deals with the policies and mechanisms to prohibit a user/process
from accessing those resources/information that he/she/it is not authorized to
access.
Access time: The time interval between the instant at which data is called for from
a storage device and the instant delivery begins.

Accumulator register (A): A register, which holds the initial data to be operated
upon, the intermediate results, and also the final results of processing operations.

Active database: A feature that makes a database capable of monitoring and


reacting to specific circumstances of relevance to an application.

Activity ratio: The ratio of the total number of records in transaction file and the
total number of records in master file.

Ada: A multi-purpose programming language developed for and used primarily by


the U.S. Department of Defense in military applications.

Adapter card: See add-on board.

Adder: A logic circuit capable of forming the sum of two or more quantities.

Add-on board: A circuit board that provides additional capabilities for a computer.
Also known as adapter card expansion board, add-on card.
Address: An identification, represented in the form of < name, label, or number,
for designating a particular location in storage area.

Address register: A local storage register, which contain the address of the next
instruction to be executed.

Algorithm: A sequence of precise and unambiguous instructions for solving a


problem in a finite number of operations.

ALGOrithmic Language (ALGOL) A programming language that was designed


for specifying algorithms, primarily of scientific nature. It was widely used in
Europe.

Alphabetic: Pertaining to a character set that contains the letters A to Z and the
blank character.Glossary

Alphanumeric: Pertaining to a character set that contains letters, digits, and usually
other special characters such as the comma, dollar sign, plus sign, etc.

American National Standards Institute (ANSI): A U.S. based national organization


that establishes uniform standards in several fields.

American Standard Code for Information Interchange (ASCII): A standard coding


system for computers. ASCII-7 is a 7-bit code and its extended version," ASCII-8,
is an 8-bit code.

Analog cellular: A wireless communication technology in which computing


equipment that are equipped with a modem can transfer data over analog cellular
telephone networks.

Analog computer: A computer that operates on data, which is in the form of


continuously variable physical quantities such as electrical current.

Anonymous ftp site: On the Internet, a computer that allows a user to log in with a
username of anonymous and then a password that is the user's e-mail address.

Antivirus utility: A program used to cure a computer from virus infection.

Application programmer: A programmer who prepares application software.

Application software: A set of one or more programs designed to solve a specific


problem or do a specific task such as pay calculation, processing of examination
results, stores accounting and inventory control, etc.
Archie: A keyword-based Internet search tool that allows files, stored at
anonymous sites of the Internet, to be searched either by their names or by their
contents.

Architecture: The organization and interconnection of the various components of a


computer system.

Archiving: The process of storing old data files on separate disks or tapes to make
room for new files on the hard disk of a computer.

Arithmetic Logic Unit (ALU): The unit of a computing system, which performs all
mathematical and logical operations. It is one of the components of the central
processing unit (CPU) of the computer.

Artificial intelligence: A branch of computer science that deals with computers


that possess reasoning, learning, and thinking capabilities that resemble those of
human beings.

Assembler: A computer program which translates an assembly language program


to its machine language equivalent.

Assembly language: A programming language, which allows instructions and


storage locations to be represented by letters and symbols instead of numbers.
Also known as symbolic language.

Assembly program: A program written in an assembly language. Also known as


symbolic program.

Asynchronous communication: Data transmission mode in which the sender can


send data at any convenient time and the receiver will accept it.

Automated tape library: A mass storage device, which uses a set of magnetic tapes
and tape drives with a controller mounted in a single unit. All the tapes of an
automated tape library form a single large storage unit. They are typically used for
data archiving and as an online data backup device for automated backup.

Automatic Teller Machine (ATM): An unattended machine used in banks that


allows a customer to deposit or withdraw cash by the use of an electronic card
without the need to interact with a bank employee.

Auxiliary memory: A storage that supplements the main memory of a computer.


Often referred to as secondary storage, this section of the computer's memory is
nonvolatile and has low cost per bit stored, but it generally has an operating speed
far slower than that of the primary storage.

B
Backbone: The main trunk lines of a computer network that facilitates the
interconnection of other computers and computer networks on the same network.

Background processing: The automatic execution of lower-priority (background)


computer programs when higher-priority (foreground) programs are not using the
system resources.

Backup: Alternate facilities of programs, data files, hardware equipment, etc. that
are used in case the original one is destroyed, lost or fails to operate.

Backup file: A copy of a file, created as a safety precaution against loss of data
caused due to corruption or inadvertent deletion of the original file.

Band printers: See chain printers.

Bandwidth: The range of frequencies available for data transmission. The wider
the bandwidth of a communications system, the more data it can transmit in a
given period of time.

Bar codes: Representation of alphanumeric data by a combination of adjacent


vertical lines (called bars) by varying their width and the spacing between them. A
barcode reader is a scanner used for reading (decoding) bar-coded data.

Base: The total number of digits (symbols) available to represent numbers in a


positional number system. Also known as radix.

Basic Input Output System (BIOS): Programs stored in a ROM chip of a computer
that checks the input and output devices when the system is started.

Batch processing: The running o£, several computer programs one after another
without the need of a human operator to run each program individually.

Baud: A unit for measuring data transmission speed. It is used to describe the
capacity of a carrier. In general usage, a baud is identical to bits per second.

Beginners: All-Purpose Symbolic Instruction Code (BASIC) An easy-to-learn,


high-level, interactive programming language that is frequently used with personal
computers and in timesharing environments.
Bernoulli disk: A magnetic disk-based storage medium in which a single hard disk
platter is encased in a plastic cartridge.

Beta testing: The use of beta version of a software by a selected set of users for
identifying errors that might have been overlooked during the regular testing
phase.

Beta version: The version of a software that is released to a selected set of users
for testing before its actual release.

Binary: A characteristic or property involving a selection, choice, or condition in


which there are two possibilities.

Binary Coded Decimal (BCD): One of the early coding systems, which is based on
the idea of converting each digit of a decimal number into its binary equivalent
rather than converting the entire decimal value into a pure binary form. For
example, the decimal number 42 is represented by 0100 0010 in 8-4-2-1 BCD
notation.

Binary number system: A number system with a base of two. It consists of two
digits: 0 and 1.

Biometric device: A device used for user authentication that verifies some
physical characteristic of a user, such as the person's appearance, fingerprints,
hand geometry, voice, or signature.

Bit: Acronym for binary digit, which stands for one binary piece of information.
This can be either 0 or 1.

Bitmap: A method of displaying graphic images on a monitor by altering the color


(or turning on or off) of individual dots (pixels) on the coordinate system.

Block: A group of related items (records, characters, etc.) handled as a unit during
input and output. A section of program code treated as a unit.

Blocking factor: The process of grouping two or more records together to form a
block of data is known as blocking and the number of records put together in each
block is called blocking factor.

Boolean algebra: An algebra that deals with logical propositions, which are either
true or false. This algebra is suitable for use with binary number system and is
very useful in designing logic circuits used by the processors of computer systems.
Boolean function: A mathematical function in Boolean algebra. For example, w =
x + y • z.

Boolean variable: A variable used in Boolean algebra. It can assume a value true
or false.

Booting: The process of automatic loading of the operating system to primary


storage and readying a computer system for use.

Branch instruction: An instruction that transfers program control to a non-


consecutive instruction.

Bridge: An internetworking tool that is used to connect networks that use the same
communication protocols above the data-link layer but may or may not use the
same protocols at the physical and data-link layers.

Broadband channel: Communication channels that are capable of data transfer


rates of 1 million baud (bits/second) or more. They are used to handle high
volumes of data and for high-speed computer-to-computer communication or for
simultaneous transmission of data to several different devices.

Browser: A software tool that provides several navigation facilities to help users
do Internet surfing easily and effectively.

Buffer: A small storage area used to store information on a temporary basis for
compensating the difference in rates of flow of data between various computer
devices. For example, when data flows from an I/O device to the CPU, it passes
through a buffer.

Bug: An error in a computer program.

Built-in-functions: Subprograms which are provided with the language so that the
programmer need only call them in a program to have them automatically
invoked. Also known as intrinsic subprograms.

Bulletin Board System (BBS): The electronic counterpart of a wall-mounted


bulletin board that allows users of a computer network to exchange information
(by posting or reading messages) via a centralized database.

Bundled: The inclusion of software with the hardware of a computer system as


part of th'e system's total price.
Bus: A set of wires, which carries a group of bits in parallel and has an associated
control scheme. It provides a communication path between two or more devices of
a computer system. For example, the path between the memory and a peripheral
device.

Byte: A fixed number of adjacent bits that represent a particular character or


symbol. Normally a byte consists of eight bits.

C: A programming language that was designed to have the virtues of high-level


programming languages (mainly machine independence) with the efficiency of an
assembly language.

C++: A programming language that contains all the elements of the basic C
language but has been expanded to include numerous object-oriented
programming features.

Cache memory: A small high speed memory, which is used to increase the speed
of processing by making current programs and data available to the CPU at a rapid
rate.

Call statement: A program statement, which transfers program control to a


subroutine.

Canonical form: A Boolean function whose terms contain all variables (or their
complements). This is the unreduced form of the Boolean function in minterms or
maxterms form.

Carrier: Any device that is used to transmit data from one location to another.
Cathode Ray Tube (CRT) An electronic tube with a TV like screen upon which
information may be displayed.

C-band transmission: The use of 4 GHz band of frequencies for transmission and
retransmission of microwave signals in a satellite communication system.

CD-ROM jukebox: A mass storage device, which uses a set of CD-ROM disks
and disk drives with a controller mounted in a single unit. All the CD-ROM disks
of a CD-ROM jukebox form a single large storage unit. They are typically used
for archiving read-only data.

Cell: The intersection of a row and column in a spreadsheet. A user enters text,
number, or formula in a cell.
Cellular Digital Packet Data (CDPD): A wireless communication technology in
which digital data to be transferred is broken into small packets and inserted into
analog cellular telephone networks.

Central Processing Unit (CPU): The control unit and the arithmetic logic unit of a
computer system are jointly known as the CPU. It is the brain of any computer
system in which all calculations and comparisons performed by a computer are
carried out. The CPU is also responsible for activating and controlling operations
of other units of a computer system.

Chain printers: Line printers that print characters by striking a set of hammers on
an inked ribbon and paper placed against a metallic chain/band on which all the
characters of the character set supported by the printer are embossed. Also known
as band printers.

Channel: (1) A path for carrying signals between a source and a destination. (2) A
track on a magnetic tape or a band on a magnetic drum.

Character addressable storage: A storage device in which each character has one
unique location with its own address. Another name for character addressable
storage is variable-word-length storage.

Character printer: A printer with a print mechanism that prints one character at a
time.

Charge-Coupled Device (CCD): A completely electronic storage device fabricated


on semiconductor chips. It stores data as pockets of charge in a semiconductor.

Chip: A thin wafer of silicon on which integrated electronic components are


deposited.

Circuit switching: The simplest method of data communication in which a


dedicated physical path is established between the sending and receiving stations
through the nodes of the network for the complete duration of information
exchange.

Class: In OOP, a class is a description of one or more similar objects.

Client computer: In a client-server computing environment, a computer that is


used by an end user to interact with the server computer. It runs client processes,
which send service requests to the server.
Client-server computing: A network of computers that consists of a server
computer (such as, file server, database server, print server, name server) and
multiple client computers that share programs and data from the server.

Clip art library: A collection of graphic images stored on disk that can be readily
used in word processing or desktop publishing documents, or in presentation
graphics, or for other purposes.

Clock speed: The number of times that the built-in electronic clock of a computer
system pulses in one second.

Clone: A hardware or software product that emulates an established product which


has good reputation in the market.

Coaxial cable: A cable made up of a single wire in the center of an insulator


wrapped in mesh. It is often used as a medium to transmit data between computers
and between computers and peripheral devices.

Code: (1) The statements of a computer program. (2) A set of rules outlining the
way in which data may be represented (like BCD, EBCDIC, ASCII).

Code generator: A very high-level programming language in which programmers


specify, through an interactive dialog with the system, the design specifications of
a system (which tasks are to be performed) and it automatically generates
(produces) the program source code for the system.

Coding: The process of writing computer instructions in a programming language.


Collate To combine items from two or more sequenced files into a single one.

Collating sequence: An ordering assigned to the characters of a character set to be


used for sequencing purposes. A commonly encountered collating sequence
involves the special characters, letters, and digits, in that order.

Combinational circuit: A group of logic gates interconnected to form a logic


circuit.

Command interpreter: The part of an operating system that serves as an interface


for the user to communicate with the computer via its operating system.

Command-line interface: A textual user interface in which the user gives


instructions to the computer by typing commands using the keyboard.
Comment: An entry in a computer program for the purpose of documentation or
explanation. Comments are used within a program to assist anyone reading the
source program listing. They do not contain any program logic and are ignored
(not translated) by the language processor.

Commercial online service: A method of connecting computer to the Internet, in


which a service organization offers a complete online environment and access to
some or all of the Internet's services by using telephone service to connect a
client's local call to the gateway computer o the service organization.

COmmon Business Oriented Language (COBOL): A high-level programming


language developed for business data processing applications. Common carriers
Data transmission service providers.

Communication protocol: A set of rules and procedure established to interconnect


and communicate between computers. It provides a method for orderly and
efficient exchange of data by establishing rules for the proper interpretation of
controls and data transmitted as raw bits and bytes.

Communications processor A processing unit that coordinates networks and data


communications. Within a computer network, it ensures that data flows to and
from different computer systems correctly and efficiently.

Communications satellite: A microwave relay station precisely positioned 36000


kms. above the equator with an orbit speed that exactly matches the earth's rotation
speed. It is used for data transmission between any two randomly chosen points in
a very-very large area.

Communications software Software that enable transfer of data and programs from
one computer system to another in a network of computers.

Compact Disk-Read-Only Memory (CD-ROM): A shiny, silver color metal disk


of S'/i-inch (12 cm) diameter having a storage capacity of about 650 Megabytes.
It is so called because of its enormous storage capacity on a compact-size disk,
and because it is a read-only storage medium.

Compile: To translate a program written in a high-level language into its


equivalent machine language program. Usually a single source statement yields
more than one machine instruction.

Compiler: A translator program (software package) that translates a high-level


language program into its equivalent machine language program.
Complement: For a number, which has n digits in it, a complement is defined as
the difference between the number and the base raised to the nth power minus one.
For example, complement of 37i0 = 102 - 1 - 37 = 6210. In Boolean algebra, the
complement of a variable is the reverse (NOT) of its value. For example,
complement of A is A.

Completely connected network: A network in which there is a separate physical


link for connecting each node to any other node in the network.

Complex Instruction Set Computer (CISC) architecture: An architecture of CPUs


with large instruction set, variable-length instructions, and a variety of addressing
modes.

Computer: An electronic device that can automatically accept and store input data,
process them, and produce output results by interpreting and executing
programmed instructions.

Computer Aided Design (CAD): Use of computers to automate design and


drafting operations.

Computer Aided Instruction (CAI): A general term that refers to a learning


situation in which the student interacts with (and is guided by) a computer through
a course of study aimed at achieving certain instructional goals. Also called
Computer Aided Education (CAE).

Computer Aided Manufacturing (CAM): Use of computers to automate


manufacturing operations.

Computer Aided Software Engineering (CASE) tools: A set of software tools that
provide a wide range of features for creation of better and more reliable software
products within less time and with less effort.

Computer animation: The area of computer science, which deals with the
generation, sequencing, and display (at a specified rate) of a set of images (called
frames) to create an effect of visual change or motion, similar to a movie film
(video). Animation is commonly used in those instances where videography is not
possible or animation can better illustrate the concept than video.

Computer audio: The area of computer science, which deals with synthesizing,
recording, and playback of audio or sound with the aid of a computer.
Computer graphics: The area of computer science, which deals with the
generation, representation, manipulation and display of pictures (line drawings and
images) with the aid of a computer.

Computer literacy: Having sufficient computer knowledge so that an individual


can work and live in a computerized society.

Computer network: A distributed data processing system in which multiple


computers are linked together for the purpose of data communication and resource
sharing.

Computer Output Microfilm (COM): An output device that records computer


output on a sheet or roll of microfilm as microscopic filmed images. It uses a
microfilm recorder for recording output information on a microfiche, and a
microfilm reader to view the information recorded on a microfiche.

Computer Supported Cooperative Working (CSCW): An application in which


multiple members working on a single project and located at distant locations
cooperate with each other using a network of computers.

Computer system: The various components (input and output devices, storage,
CPU) of a computer integrated together to perform the steps called for in the
program being executed.

Computer video: The area of computer science, which deals with the recording
and display of a sequence of images at a reasonable speed to create an impression
of movement.

Computer-Based Training (CBT): Using computer technologies for training and


education. The use of computers helps in making tutoring programs which are
tailored to the student's level of subject mastery and can provide immediate
feedback.

Conference on Data SYstems Languages (CODASYL): A committee of computer


users, manufacturers, and the United States government that helps to establish
programming standards for various programming languages.

Console In a mainframe system, the terminal that is directly connected to the host
(main) computer and is mainly used by the system administrators to monitor the
health of the system or to perform some system administration activities.

Constant: A value, written into a program instruction that does not change during
the execution of the program.
Control program: An operating system program, which controls the operations and
management of resources of a computer system. The control program's major
functions are job scheduling, input/output scheduling, and program monitoring.

Control unit: The unit of a computer system that manages and coordinates the
operations of all the other components of the computer system. It is one of the
components of the central processing unit (CPU) of the computer.

Cost/benefit analysis: A procedure for evaluation and selection of hardware and/or


software in which lists are made of all the costs and benefits of each proposed data
processing system.

Counter: A device, register or storage location for storing integers that is suitably
incremented or decremented to represent the number of occurrences of an event.

CPU scheduler: The part of the operating system that is concerned with deciding
which of the ready jobs should be allotted the CPU for execution.

CPU-bound jobs: Jobs which heavily utilize the CPU operations during the course
of their processing.

Crash: A hardware or software failure that causes a computer system to stop


functioning.

Cryptography: A means of protecting private information against unauthorized


access in those situations where it is difficult to ensure access control. The basic
idea behind this security technique is that if it is not possible to ensure access
control, it is better to prevent comprehension of information.

Cursor: A highlight on the screen of a monitor that indicates the location of the
next keyed-in character on the display screen. It can appear as a small rectangular
object, line, arrow, or I-beam pointer, or in a spreadsheet, as a large block
covering an entire cell.

Cybernatics: The use of computers coupled with automatic machinery to carry out
complex operations.

Cyberspace: The world-wide network of computers.

Cycle stealing: A memory cycle taken by the DMA controller from the CPU to
enable it to transfer data directly to memory.
Cycle time: The time interval between the instant at which a read/write command
is given to a memory and the instant when the next such instruction can be issued
to the memory (also known as memory cycle time).

Cylinder: In a disk pack, a set of corresponding tracks in all the surfaces is called a
cylinder. All tracks of a cylinder are accessible by a single movement of the access
mechanism.

D
Daisy wheel printer: A letter-quality printer that uses a printing head with the
appearance of daisy and/or a wheel. Each petal of the daisy wheel has a character
embossed on it.

Data: A collection of facts in raw form that become information after proper
organization or processing.

Data Base Management System (DBMS): A set of programs provided to facilitate


the users in organizing, creating, deleting, updating, and manipulating their data in
a database.

Data compression: Techniques used to reduce the volume of data in such a way
that the original data can be reproduced with the desired quality level whenever
required.

Data Definition Language (DDL): A language used to define the structure of a


database.

Data dependence: Dependency of data on the application.

Data dictionary: A document that maintains the data definitions of a database. It is


automatically created/updated by the DDL as the database schema is defined or
changed.

Data element: A meaningful collection of related characters. Also called a field or


data item.

Data entry: The conversion of human readable data into a form a computer system
can interpret. Also known as data preparation.

Data Flow Diagram (DFD): A graphical representation of the various inputs,


processes, and outputs of a system or program.
Data integrity: Consistency of data in all files. Data Manipulation Language
(DML) A language used to enter and manipulate the data in a database.

Data mart: A subset of an organization's data warehouse, which contains data that
is of value to a specific business unit or department rather than the whole
organization.

Data mining: The process of identifying interesting and useful patterns from large
databases or data warehouses. It is defined as the nontrivial process of extracting
implicit, previously unknown, and potentially useful information from data.

Data processing: See processing

Data processing system: A system that accomplishes data processing. It includes


the necessary resources, which are people, procedures and devices needed to
process the data.

Data redundancy: Repetition of the same data items in more than one file.

Data storage hierarchy: In data processing, organization of data into growing


hierarchy for easy manageability. A typical data storage hierarchy consists of bits,
characters, fields, records, files and database.

Data transfer rate: The speed at which data is transferred from main memory to
another medium on which data are recorded. For magnetic tape, the data transfer
rate is equal to the product of the tape speed and recording density. In a network
environment, it refers to the speed of transfer of data from one computer to
another on the network.

Data warehouse: A subject-oriented, integrated, time-variant, and non-volatile


collection of data in support of management's decision-making process.

Data warehousing: The process of creating a repository of integrated data for the
purpose of decision support and analysis.

Database: A collection of data files integrated and organized into a single


comprehensive file system, which is arranged to minimize duplication of data and
to provide convenient access to information within that system to satisfy a wide
variety of user needs.

Database administrator: One who is responsible for defining, updating, and


controlling access to a database.
Database client: A computer system that is primarily meant for accessing data
from the database in a client-server database system. It runs those modules of the
DBMS that facilitate specification of access requests.

Database model: The manner in which the various files of a database are linked
together. The four commonly used database models are hierarchical, network,
relational, and object-oriented.

Database schema: The database structure definition.

Database server: The computer system which stores and manages the database in a
client-server database system. It runs all modules of the DBMS that deal with the
maintenance and processing of data.

Database software: A set of programs that enables users to create a database,


maintain it (add, delete and update its records), organize its data in desired fashion,
and to selectively retrieve useful information from it.

De Morgan's theorem A theorem in Boolean algebra, which states how to


complement a Boolean expression.

Deadlock: The state of permanent blocking of a set of processes each of which is


waiting for an event that only another process in the set can cause. All the
processes in the set block permanently because all the processes are events that
could wake up any of the other members of the set.

Debugger: A software tool that helps the programmer in debugging the logic of a
program by allowing him/her to follow the program's execution step-by-step and
to display intermediate calculation results and field values whenever desired.

Debugging: The process of finding and correcting program errors (bugs).

Decimal number system: A number system with a base of 10. The ten allowable
digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. It is used in our day-to-day life.

Decision logic: See selection logic.

Decision Support System (DSS): A set of hardware and software tools to produce
and present information targeted to support management decision making
involving semistructured and unstructured problems.

Decision table: A table used to define clearly and concisely the word statement of
a problem in a tabular form. It displays the different conditions that could exist
and the different actions that the computer should take as a result of these
conditions.

Decoder: The part of CPU that has the necessary circuitry to decode and interpret
the meaning of each and every instruction supported by the CPU.

Dedicated line: See leased line.

Design phase: A phase in the life-cycle of software system during which the
detailed design of the system selected in the study phase occurs.

Desktop Publishing (DTP): An application software package that allows a user to


perform design, typesetting, and paste-up functions, and to produce high-quality,
camera-ready printed pages of the documents so prepared on a high-quality
printer.

Development phase: A phase in the life-cycle of a software system during which a


system is constructed to meet the requirements specified in the design phase.

Device controller: An interface unit between an I/O device and the system bus of a
computer system. On one side, it knows how to communicate with the I/O device
connected to it, and on the other side, it knows how to communicate with the
computer's CPU and memory through the system bus.

Diagnostic routines: Programs used to print error messages by a computer to


indicate system problems and improper program instructions.

Dial-up line: A data transmission service that operates in a manner similar to a


telephone call. Also known as switched line.

Digital cellular: A wifeless communication technology in which computing


equipment can transfer digital data over digital cellular telephone networks
without the need for a modem.

Digital computer: A computer that works with discrete quantities. It uses numbers
to simulate real-time processes. Compare with analog computer.

Digital library: A repository of large information in digital form. Such a library


(being virtual in nature because it stores reading material only in soft-copy form)
can remain open round the clock allowing users to access information from it at
their own convenient time and location (from remote locations over the network).
Digital Versatile Disk (DVD): A standard format for the distribution and
interchange of digital content in both computer-based and consumer electronic
products. The format is designed to store various types of large multimedia data on
a new and improved version of the CD which works on optical disk technology.

Digitizer: An input device used for converting (digitizing) pictures, maps and
drawings into digital form for storage in computers. This enables re-creation of the
drawing from the stored information whenever required as well as easy
incorporation of changes in the drawing as and when required.

Direct file: A file organization in which the desired record (piece of information)
can be directly located by its key field value without having to search through a
sequence of other records. Also known as random file.

Direct Memory Access (DMA) architecture: An architecture which leads to


more efficient CPU utilization because the I/O request is largely processed by the
DMA controller without direct participation of the CPU.

Direct/leased-Iine connection: A method of connecting a computer to the Internet


by using a dedicated (leased) telephone line.

Directory: A mapping table used by operating systems to map file names to their
corresponding file attributes and file data, and also to provide greater flexibility to
users in file naming.

Disaster recovery: Policies and mechanisms adopted by an organization to protect


valuable data from getting lost in case its main computing facility is destroyed by
a natural calamity. A copy of all valuable data is continuously created
on a storage system that is geographically far apart from the main computer
system. In case of a disaster, the data is recovered from this copy.

Disk: A flat, circular plate coated with a magnetic material on which data can be
stored by magnetization of portions of the flat surface.

Disk array: A mass storage device, which uses a set of hard disks and hard disk
drives with a controller mounted in a single box. All the disks of a disk array form
a single large storage unit. Also known as Redundant Array of Inexpensive Disks
(RAID).

Disk drive: A devise used for storage and retrieval of data stored on disk.
Disk pack: A removable direct-access storage medium containing multiple
magnetic disks mounted vertically on a single shaft.
Diskette: A low-cost, thin, flexible magnetic disk storage device used on small
computer systems. Also called a floppy disk.

Distributed computing system: A computer system consisting of interconnected,


multiple computers.

Distributed database: Seamless integration of multiple databases located on


different computers. A distributed database management system functions in such
a manner that the multiple distributed databases managed by it appear as a single
centralized database to the end users.

Distributed operating system: An operating system for a distributed computing


system in which the users view the system as a "virtual uniprocessor."

Documentation: Documentation of a software system involves collecting,


organizing, storing, and otherwise maintaining a complete historical record of
programs and other documents used or prepared during the different phases of the
system.

Domain name: In a network environment, the name/address given to a computer,


which uniquely identifies it.

Dot-matrix printers: Character printers that form characters and all kinds of
images as a pattern of dots.

Dots Per Inch (DPI): A measurement of the quality for printed output. It refers to
the number of dots that can be printed per linear inch, horizontally or vertically.

Downloading: Moving a file from a remote computer to ones own computer in a


network environment.

Downtime: The period during which a computer is malfunctioning or not


operating correctly due to machine failures.

Drilling down: The process of viewing information from a higher level (in the
hierarchy) to a more detailed view of information.

Drum printers: Line printers that print characters by striking a set of hammers on
an inked ribbon and paper placed against a solid cylindrical drum with characters
embossed on its surface in the form of circular bands.

Dual bus architecture: An interconnection architecture in which there are separate


set of buses for interconnecting the CPU with memory and with I/O devices.
Dumb terminal: A terminal that has no local processing capability.

Dynamic Data Exchange (DDE): A technique for linking applications that allows
a user to move data from one application into another, such as from a spreadsheet
into a word-processor. Changes made in one application are automatically
reflected in linked applications.

Dynamic RAM (DRAM): A type of RAM that uses an external circuitry to


periodically "regenerate" or refresh the storage charge to retain the stored data.

E
Edit: To modify the form or format of the data by inserting or deleting characters
where needed.

Editor: A software used to interactively review and modify text materials and
other program instructions.

Education software: Software that allows computer systems to be used as a


teaching and learning tool.

Electrically EPROM (EEPROM): An EPROM chip in which the stored


information is erased by using high voltage electric pulses. Also known as flash
memory.

Electronic card: A small plastic card having encoded data appropriate for the
application for which it is used. An electronic-card reader, which is normally
connected to a computer, is used to read the data encoded on an electronic card
and transfer it to the computer for further processing.

Electronic Data Interchange (EDI): The use of computers and data


communications to transmit data electronically between companies.

Electronic Data Processing (EDP): Pertaining to data processing equipment that is


predominantly electronic, such as an electronic digital computer.

Electronic Funds Transfer (EFT): A general term referring to a cashless approach


used to pay for goods and services. Electronic signals between computers are often
used to adjust the accounts of the parties involved in a transaction.

Electronic mail: A service on the Internet that allows an Internet user to send a
mail (message) to another Internet user in any part of the world in a near-real-time
manner. Popularly known as e-mail.
Electronic pen: An input device that serves as an effective point-and-draw device.

Electrostatic printer: A high-speed printer that uses charged pins to form character
matrices on chemically treated paper.

Electrothermal printer: A high-speed printer that uses heated elements to create


characters as matrices of small dots on heat-sensitive paper.

Elementary data item: A data item, which is not broken down into smaller units.
E-Mail See electronic mail.

Emulator: A program that permits one computer to execute the machine-language


instructions of another computer of different make.

Encryption: The process of transforming an intelligible information into an


unintelligible form.

End user: Any individual who uses the information generated by a computer based
system.

End-of-tape (EOT) marker: A reflective marker that indicates the end of the usable
tape.

End-to-end solution: A computerized solution offered to a user in which a single


vendor takes the responsibility of supplying all the hardware and software
components of the solution. Also known as turnkey solution.

Enhanced Small Device Interface (ESDI): A drive interface standard that can
address up to 1 terabyte (1012 bytes) of disk space and can reliably transfer up to 3
Megabytes per second.

Entertainment software: Software that allows computer systems to be used as an


entertainment tool.

Erasable Programmable Read Only Memory (EPROM): A memory chip in case of


which it is possible to erase information stored in it and the chip can be
reprogrammed to store new information.

Economically designed I/O devices: I/O devices designed in such a way that they
aim at achieving maximum efficiency of the users working with them by
designing them in such a way that they can be used with maximum comfort and
protect the users from accidents or medical problems caused due to continuous
usage of a device for long hours.
Ethernet: The most widely used LAN technology.

Execution time: The total time required to execute a program on a particular


system is called its execution time for that computer system.

Expansion board: See add-on board.

Expert system: A software package that stores data pertaining to a specialized area
(known as knowledge-base) and analyzes this knowledge-base to make
recommendations to users when it receives user queries. These recommendations
help the users in their decision-making. Expert systems employ artificial
intelligence techniques.

Explicit parallelism: A technique, used in EPIC-based processors for improved


performance, which allows the software to communicate explicitly to the
processor when operations can be done in parallel.

Explicitly Parallel Instruction Computing (EPIC): A technology, which is fast


emerging as the technology for next-generation processors. The three key features
used in this technology for improved processor performance are explicit
parallelism, predication and speculation.

Extended Binary Coded Decimal Interchange Code (EBCDIC): An 8-bit coding


system, developed by IBM, that is used to represent characters in many computers.

Extended Industry Standard Architecture (EIAS) bus: A 32-bit data bus that can
transmit data along either 16 or 32 data lines. It was designed to accept and use the
old ISA expansion slots.

External fragmentation: A situation when enough total free memory space exists
to satisfy the memory need of a process, but still the process cannot be loaded
because the available free memory is not contiguous (is fragmented into multiple
free blocks of memory).

F
Facsimile (FAX): Transmission of pictures, texts, maps, graphs, etc., over
transmission lines, phone lines, and other carriers between geographically
separated points: An image is scanned at a transmitting point and duplicated at a
receiving point.

Feasibility study: A study to determine whether the proposed solution is


technically and economically feasible in all respect.
Field In a record a meaningful collection of one or more related characters treated
as a unit.

Fifth generation computers: Computers built since 1989 till now. They use ultra
large-scale integrated circuits, very fast and large main memory and disk storage,
very powerful programming languages and operating systems.

File: A collection of related information.

File Management System (FMS): A set of programs provided to facilitate the users
in organizing, creating, deleting, updating, and manipulating their files.

File Transfer Protocol (FTP): An application level protocol that allows a user to
move a file from one computer to another in a network environment.

File utilities: A set of routines, which perform a variety of generalized operations


(such as, sorting, searching, merging, copying, printing and maintenance) on data
files.

Firewall: A software that usually runs on the proxy server of an organization and
controls the flow of incoming and outgoing messages from within an organization
for providing better security to the organization.

Firmware: A sequence of instructions (software) that is substituted for hardware


and stored in read-only memory (ROM).

First generation computers: Computers built between 1942 and 1955, which used
vacuum tubes and were programmed in assembly language. Few examples are
ENIAC, EDVAC and EDSAC.

Fixed wireless system: A wireless computing system that supports little or no


mobility of the computing equipment associated with the wireless network.

Fixed-head magnetic disk: A magnetic disk system that eliminates the use of an
access mechanism by distributing all the read/write heads over the disk surfaces.
Flash memory See Electrically EPROM (EEPROM).

Flip-flop: An electronic circuit, which can be placed in one out of two stable
states. Each state may be used to represent a binary digit.

Floating-point numbers: Signed numbers held in a fraction-exponent format. For


example, 3216 would be represented as 0.3216 x 104 in floating-point notation.
Floppy disk: See diskette.

Flowchart: A pictorial representation that uses predefined symbols to describe


either the logic of a computer program (program flowchart) or the data flow
and processing steps of a system (system flowchart).

Flowcharting: The process of drawing a flowchart for an algorithm.

Font: A complete set of characters with the same style and size.

Foreground processing: Automatic execution of high-priority (foreground) jobs by


preempting resources held by low-priority (background) jobs. Contrast with
background processing.

FORmula TRANsIation (FORTRAN): A high-level, programming language used


for scientific and engineering applications.

Fourth generation computers: Computers built between 1975 and 1989. They used
large-scale integrated circuits, semiconductor memories and powerful high-level
languages and operating systems.

Fourth-Generation Languages (4GLs): Programming languages that require the


programmer to specify only "what" to do, not "how" to do it.

Frequency Division Multiplexing (FDM): A method used to concurrently transmit


data between several transmitters and receivers over a single transmission
medium. The available bandwidth of a physical medium is divided into smaller,
disjoint logical bandwidths and each of the component bandwidths is used as a
separate communications line (channel).

Front-end processor: A processor designed specifically to handle the


communications processing task. Its main purpose is to off-load communications
processing task from the host computer, thereby the host computer can be
dedicated for applications and data processing jobs.

Full adder: An adder, which adds three binary digits and outputs a result bit and a
carry bit.

Full duplex: A data transmission mode in which data can be transmitted between a
source and a destination in both directions simultaneously.

Function: A subprogram that returns a single value.


Fuzzy logic: Logic that is based on rough match of attribute values instead of
exact matches. The truth values are not a definitive yes or no, on or off kind, but
can lie anywhere on the 0.0 to 1.0 interval of real numbers.

G
Garbage-in-garbage-out (GIGO): Refers to computer errors caused due to
incorrect input data or unreliable programs.

Gateway: (1) A computer that is connected to the Internet by using a dedicated


(leased) telephone line and is used to provide Internet connectivity to other
computers via it. (2) An internetworking tool that is used to interconnect dissimilar
networks that use different communication protocols.

Generation: In computer talk, it is a step in technology. It provides a framework


for the growth of the computer industry.

Gigabytes: (GB) Memory storage equal to 1,073,741,824 (230) bytes in a


computer.

Gigaflop: 109 floating-point arithmetic operations per second.

Google: An Internet search engine.

Gopher: A text-based Internet search tool that provides hierarchical collection of


information of all sorts across the Internet.

Graceful degradation: The ability of a system to continue providing service


proportional to the level of non-failed hardware when one or more of its hardware
components fail.

Graphical User Interface (GUI): An interface for computer users that provides
icons (pictures) and menus (list of choices) which users can select with a mouse
for telling the computer what they want it to do for them.

Graphics software: Software that enables users to use a computer system for
creating, editing, viewing, storing retrieving and printing designs, drawings,
pictures, graphs and anything else that can be drawn in a traditional manner.

Gray scales: The number of shades of a color that can be presented on a


monochrome (black and white) monitor's screen or on a monochrome printer's
output.

Groupware: See Computer Supported Co-opeative Working (CSCW).


H

Hacker: A computer enthusiast who uses the computer as a source of recreation by


pushing its capabilities to its limits (performance, security, storage, etc.).

Half adder: An adder, which adds two binary digits and outputs a result bit and a
carry bit (if any).

Half duplex: A communication system in which data can be transmitted between a


source and a destination in both directions, but only in one direction at a time.

Hard disk: A magnetic disk storage device that uses disks made of rigid metal
(frequently aluminium). The hard disk platters come in many sizes ranging from 1
to 14-inch diameter.

Hard-copy output: A computer output that is permanent in nature and can be kept
in paper files or can be looked at a later time when the person is n5t using the
computer. For example, output produced by printers or plotters on paper.

Hardware: The physical components of a computer system such as electronic,


magnetic, and mechanical devices.

Hashing: The process of using an address generating function (called hashing


algorithm) to map a record's key field value to its storage address.

Heavy-weight process: A process of a traditional system that does not support


multithreading.

Hertz: One cycle per second.

Hexadecimal number system: A number system with a base of 16. Its digits range
from 0 to F. It is commonly used as a shortcut notation for groups of four binary
digits.

Hierarchical database: A database model in which the data elements are linked in
the form of an inverted tree structure with the root at the top and the branches
formed below.

Hierarchical network: A communications network in which computers are


connected in a tree-like structure.

High Definition Multiple Analog Components (HD-MAC): An HDTV


broadcasting standard used in Europe.
High Definition Television (HDTV): A television broadcasting standard designed
to provide improved picture resolution, improved color resolution, wide screen
display, and large projection as compared to conventional television broadcasting
standards.

High-level language: A programming language whose structure is application


oriented and is independent of the structure of the computer. Each statement of
such a language is translated into many machine language statements.

HotBot: An Internet search engine.

Hotlist: A personal list of favorite URL addresses that an Internet user is likely to
frequently visit in future. A user's hotlist is automatically created and stored on
his/her local web client computer by a browser.

Hybrid network: A network that is a combination of two or more different network


topologies.

Hydra printers: Multifunctional devices that perform the functions of two or more
of the following office equipment - printer, fax machine, copy machine and
scanner.

Hypertext: Documents that are prepared by using special linking facility for easier
electronic access and manipulation.

HyperText Markup Language (HTML): A powerful language used for creating


hypertext documents.

HyperText Transport Protocol (HTTP): An Internet protocol for interaction


between the computers on the Internet.

I/O ports: Sockets used to plug-in I/O devices to a computer system.

I/O-bound jobs: Jobs whose CPU utilization is very low and mostly perform I/O
operations during the course of their processing.

Icon: A graphical object displayed on a visual display screen that is used in place
of words or phrases to allow users to select program options when selected with a
mouse or other pointing device.
Impact printer: A printer which prints characters by causing hammers to strike
against the paper on which information is to be printed.

Incremental backup: Backing up of only those files in which changes have been
made since the last backup was taken.

Indexed Sequential: Access indexed sequential file. Method (ISAM): See


Indexed sequential file A file organization in which an index (directory) file is
used to have both sequential and random access to the records of the file. Also
known as the Indexed Sequential Access Method (ISAM).

Industry Standard Architecture (ISA) bus: A 16-bit data bus that can transmit data
along either 8 or 16 data lines.

Inference Find: An Internet meta search engine.

Infopedia: A single CD-ROM disk that holds an encyclopedia, or a dictionary, or a


world atlas, or a dictionary of quotations, or biographies of great people, or
information about all educational institutions of a particular type in a country, etc.
Information Processed data obtained as the output of data processing. It is used by
people to enhance understanding and to achieve specific purposes.

Infoseek: An Internet search engine.

Inheritance: In OOP, inheritance is a mechanism for sharing code and behavior. It


allows a programmer to reuse the behavior of a class in the definition of new
classes.

InkJet printers: Character printers that form characters and all kinds of images by
spraying small drops of ink on to the paper.

Input: Data and instructions entered into a computer for processing purposes.

Input device: A device used to enter data and instructions into a computer.
Examples are keyboard, mouse, trackball, joystick, scanner, digitizer, voice
recognition system, and vision input system.

Input/Output (I/O): Pertaining to the techniques, media, and devices used for man-
machine interaction.

Input/Output Control System (IOCS): A set of routines for handling the many
detailed aspects of input and output operations.
Input/Output register (I/O): A register, which is used to communicate with the
input/output devices.

Instruction: A command or order given to a computer. It normally consists of a


code to indicate the operation to be performed and address(es) in memory where
the operand(s) would be found.

Instruction register (I): A register, which holds the current instruction that is being
executed.

Instruction set: A set of machine instructions that the CPU has built-in ability to
execute.

Integrated Circuits (ICs): Circuits consisting of several electronic components like


transistors, resistors, and capacitors grown on a single chip of silicon eliminating
wired interconnection between components.

Integrated Drive Electronics (IDE): A drive interface standard that provides data-
transfer rates of about 1 Megabytes per second under ideal conditions.

Integrated Services Digital Network (ISDN): A telephonic system that


provides digital (not analog) telephone and data services.

Intelligence Peripheral Interface-level 3 (IPI-3): A drive interface standard that is


used in minicomputer and mainframe systems for interfacing faster, larger disks
(having diameter of 8 inches or more) with the main computer system.

Intelligent terminal: A terminal having extensive local processing capability. It has


a built-in microcomputer that can be programmed by users.

Inter Block Gap (IBG): When several records are in one block, these gaps separate
the blocks of records on magnetic tape.

Inter Record Gap (IRG): Blank space between two consecutive records on a tape.
Interactive TV A facility that allows users to select TV programmes of their
interest from remote massive video archives, view at the time they wish without
leaving the comfort of their homes, and interact with the programmes via VCR-
like functions, such as fast-forward and rewind.

Interface: Electronic circuit used to interconnect I/O devices to a computer's CPU


or memory.
Internal fragmentation: A situation when a process is allocated more memory than
its actual memory requirement and the additional memory allocated to the process
remains unutilized because it is neither used by the process to which it is allocated
nor it can be allocated to any other process for use.

Internal storage: The addressable storage in a digital computer which is directly


under the control of the CPU.

Internet: A network of networks of computers that links many different types of


computers all over the world.

Internet search enginee: An application available on the WWW that helps users
locate the web sites containing useful information and references to such
information.

Internet Service Provider (ISP): An organization that maintains one or more


gateway computers and provides Internet access facility to other users by allowing
them to connect their computers to its own gateway computer(s) by using a
modem.

Internet surfing: The process of navigating the Internet to search for useful
information.

Internet telephony: Refers to the use of the public Internet for voice transmission.
It enables the subscriber of an Internet service to use his/her computer to make
long-distance calls.

Internetworking: Interconnecting of two or more networks to form a single


network. The resulting network is called an internetwork.

Interpreter: A language processor that translates a statement of a high-level


language and immediately executes it before translating the next source language
statement. It is the most common language processor for BASIC.

Intranet: A network that connects the computers and networks within an


organization by using the hardware and software that is used on the Internet.

Intrinsic subprograms: See built-in functions.

IPV4: The current Internet protocol.

IPV6: The next generation Internet protocol.


Iteration logic: A program construct used to produce loops in program logic when
one or more instructions may be executed several times depending on some
condition. Also known as looping logic.

Ixquick: An Internet meta search engine.

Java: A programming language that was designed to have machine-independent


compiled code. It is primarily used for Internet-based applications.

Job: See process

Job Control Language (JCL): A special purpose language used to describe to a


computer's operating system the resource requirements of a job fed to the
computer for processing.

Joint Photographic Experts Group (JPEG): A standard data compression technique


for still images.

Joystick: An input device that serves as an effective pointing device for


applications such as video games, flight simulators, training simulators, and for
controlling industrial robots.

Jump instruction: An instruction or signal, which, conditionally or


unconditionally, specifies the location of the next instruction and directs the
computer to that instruction. A jump instruction is used to alter the normal
sequence control of the computer.

Justification: The alignment of text at the left margin, the right margin, or both
margins.

Kernel: The central controlling part of an operating system that implements the
most primitive of the system's functions. It is the only part of an operating system
that a user cannot replace or modify.

Key field: A unique field in a record used to distinguish one record from another.
Keyboard An input device that enables data entry into a computer by pressing a set
of keys (labeled buttons), which are neatly mounted on a keyboard connected to
the computer system.

Key-to-tape: A device used to enter data onto a magnetic tape.


Kilobytes (KB): Memory storage equal to 1024 (210) bytes in a computer.

Kiosk: An unattended system that is used to store information of public interest


and allows common people to access the stored information as per their
requirement.

Knowledge Discovery in Databases (KDD): The field which deals with the
techniques and tools meant for extraction of knowledge from large datasets.

Ku-band transmission: The use of 11 GHz to 14 GHz band of frequencies for


transmission and retransmission of microwave signals in a satellite communication
system.

Label: One or more characters used to identify a statement, an instruction, or a


data field in a computer program.

Label record: A machine-readable record that is used to identify a data file. It is


the first record of the file.

Landscape mode: A mode of printing in which the printed lines are parallel to the
longer edge of the paper.

Language processor: A software used to convert source program instructions to


object or machine language instructions. Few examples are assembler, compiler
and interpreter.

Large Scale Integration (LSI): Integration of over 30,000 electronic components


on a single chip.

Laser disk: See optical disk.

Laser printers: Page printers that produce very high quality output by forming
characters and all kinds of images with very tiny ink particles. They use a
combination of laser-beam and electrophotographic techniques To create printed
outputs.

Latency: In case of disk storage, the relational delay time for the desired data
(sector) to come under the read/write head positioned over that track. Maximum
latency time equals the time taken by disk to rotate once.

Leased line: A data transmission service in which a special conditioned telephone


line directly and permanently connects two computers. A leased line can be used
for both voice and data transmissions. Also known as private line or dedicated
line.

Library routine: A tested routine maintained in a library of programs.

Light pen: A pen shaped device that is used as an input device in computers by
writing or sketching on the screen of a cathode ray tube.

Light-weight process: See thread.

Linker: A program that is used to properly combine all the object program files
(modules) of a software, and to convert them into the software's final executable
form.

Linux: An open-source operating system enhanced and backed by thousands of


programmers world-wide. It is a multi-tasking operating system that was
originally designed to be used on personal computers.

LISt Processing (LISP): A programming language suitable for manipulating non-


numeric data such as symbols and strings of text. It is used in the areas of pattern
recognition, artificial intelligence and for simulation of games.

Load module: The final executable form of a software produced by a linker.

Local Area Network (LAN): A computer network which interconnects computers


and other peripheral devices within a limited geographical area of a few
kilometers.

Local Multipoint Distribution System (LMDS) : A wireless communication


technology for supporting point-to-multipoint applications
.
Logic circuit: See combinational circuit.

Logic error: An error that occurs when the actual logic of a program is different
from the desired logic. Such errors cause the program to produce incorrect output.

Logic gate: An electronic circuit which operates on one or more input signals to
produce standard output signals. For example, AND, OR and NOT gates. Logic
gates are the building blocks of all the circuits in a computer.

Logical operators: Symbols used to show a logical relationship between two data
items. Examples in FORTRAN are .EQ. for equal and .GT. for greater than. The
symbols >, < and = are also logical operators.
Logo An easy-to-learn programming language, which is
Loop A sequence of instructions that is executed repeatedly until a terminal
condition occurs.

Looping logic: See iteration logic.

Low-level languages: Programming languages that normally translate from one


source instruction to one object instruction. These languages are machine
dependent.

Lycos: An Internet search engine.

Machine language: A low-level language that is directly understandable by the


computer system. Each model of a computer has a unique machine language.

Macro: A sequence of frequently used operations or keystrokes bundled together


as a single command or keystroke by software so that the invocation of the single
command or keystroke leads to the invocation of all the operations/keystrokes in
the specified sequence. This helps speed user interaction with the system.

Macro flowchart: A flowchart that outlines the main segments of a program or that
shows less detail.

Macro instruction: An instruction in a source language that is equivalent to a


specified sequence of machine instructions.

Magnetic core: Tiny rings made of magnetic material that can be polarized to
represent a binary 1 or 0.

Magnetic disk: See disk.

Magnetic Ink Character Recognition (MICR): A technology used by the


banking industry for faster processing of the large volume of cheques. This
technology also ensures accuracy of data entry because most of the information is
pre-printed on the cheque and is directly fed to the computer.

Magnetic storage: Storage devices such as disks, drums, tapes, cores, etc. that
utilize the magnetic properties of materials to store data.

Magnetic tape: A secondary storage device that uses a long plastic strip coated
with a magnetic material as a recording medium.
Magneto-optical disk: A storage disk, which integrates optical and magnetic disk
technologies to enable rewritable storage with laser-beam technology.

Mail-merge: A feature of word-processing packages that enables merging of


information from a database with a letter with the addresses in a database to
generate personalized letters.

Main memory: See primary storage.

Mainframe system: A computer system that is mainly used for handling the bulk
of data and information processing of such organizations as banks, insurance
companies, hospitals, railways, etc. They are also used in such environments
where a large number of users need to share a common computing facility such as
in research groups, educational institutions, engineering firms, etc.

Management Information System (MIS): An organized collection of people,


procedures, and devices used to provide the right information to the right person at
the right time for proper decision-making.

Manufacturer-programmed ROM: A ROM in which data is burnt in by the


manufacturer of the electronic equipment in which it is used.

Mass storage: Storage systems that provide access to several terabytes of stored
data. They are multiple units of storage media (such as multiple disks, multiple
tapes, multiple CD-ROMs) as a single secondary storage device.

Massively Parallel Processing (MPP): An approach to designing supercomputers


in which thousands of processors are integrated within a single computer so that
the supercomputer can perform thousands of tasks simultaneously.

Master file: A file containing relatively permanent data. This file is often updated
by records in a transaction file.

Maxterm: A Boolean quantity consisting of all terms (in its normal form or
complement form) ORed together. Any combination (2n for n variables) of terms
and complements is permissible, provided all are included in the term.

Medium Scale Integration (MSI): Integration of up to about 100 electronic


components on a single chip.

Megabytes (MB): Memory storage equal to 1,048,576 (220) bytes in a computer.


Memory A device or medium that can accept data, hold them, and deliver them on
demand at a later time.
Memory Address Register (MAR): A register, which holds the address of the
active memory location and loaded from the program control register when an
instruction is read from memory.

Memory Buffer Register (MBR): A register, which holds the contents of the
memory word read from, or written in, memory.

Memory dump: Contents of memory duplicated on another storage device or


printed on a printer.

Memory interleaving: A technique used to minimize memory-processor speed


mismatch.-. The memory is divided into multiple equal-size modules, which can
be simultaneously accessed for better performance.

Memory: partition In a multiprogramming system, the area occupied by each job


residing simultaneously in the main memory.

Menu: A list of processing choices displayed on the screen from which a user may
select.

Menu bar: A menu in which the options are displayed on a horizontal bar (usually
at the top of the display screen) displayed across the screen.

Merging: The combining of records from two or more ordered files into a single
ordered file.

Message: In OOP, message serves as the mechanism to support communication


between objects.

Message switching: A data communication method in which the data (message) to


be sent is first appended with the destination address and then sent across the
network to its destination.

Metadata: A catalog of information that keeps track of what is where, in a data


warehouse. In short, it is data about data, which provides users and developers
with a road map to the information in the data warehouse.

Method: In OOP, a method of an object defines the set of operations that the
object will execute when a message corresponding to the method is received by
the object.
Metropolitan Area Network (MAN): Networks that share some of the
characteristics of both LANs and WANs. They usually interconnect computers
spread over a geographical area of about 50 kilometers.

Micro Channel Architecture (MCA) bus: A 32-bit data bus that transmits data
along 32 data lines.

Micro flowchart: A flowchart with more details. It is also called a detailed


flowchart.

Microbrowser: A browser meant for use with Internet-enabled mobile devices.


Microcode The very basic directions that tell the CPU how to execute an
instruction; located in the control unit.

Microcomputer: The smallest category of computer fabricated using a


microprocessor, and other integrated circuits, namely a ROM, RAM, and I/O
interface chips.

Microfiche: An output device that uses combined electronic, photo-optical, and


electromechanical techniques to convert digital computer output to records that
can be stored as rolls of microfilm or as frames of microfilm stored on cards called
microfiche.

Microfilm: See microfiche.

Microkernel: Technology that allows operating systems to be modeled and


designed in a modular fashion.

Microprocessor: An IC chip that contains all the circuits needed to perform


arithmetic logic and control functions, the core activities of all computers, on a
single chip.

Microprogram: Firmware programs residing in read-only memory (ROM). They


deal with low-level machine functions and are essentially substitutes for additional
hardware.

Microsecond: One-millionth of a second

Millisecond: One-thousandth of a second.

Minterm: A Boolean quantity consisting of all terms (in its normal form or
complement form) ANDed together. Any combination (2n for n variables) of terms
and complements is permissible, provided all are included in the term.
MIPS: Millions of Instructions Per Second.

Mnemonic: Any kind of mental trick we use to help us remember. For example, a
computer may be designed to interpret the machine code of 1111 (binary) as the
subtract operation, but it is easier for a human being to remember it as SUB.

Mobile computing: A wireless computing system that supports mobility of the


computing equipment, which the users use to access the resources associated with
the wireless network. It allows mobile users to access information from anywhere
and at anytime. Also known as nomadic computing.

Mobile radio networks: Wireless networks which employ narrow bands for
creating mobile radio network infrastructure.

Modular approach: Dividing a project into segments and smaller units in order to
simplify the analysis, design, and programming efforts.

Modulation: The technique by which a digital signal is converted to its analog


form for transmission over an analog facility.

MOdulator-DEModulator (Modem): Devices used to convert digital signals (to be


communicated over an analog channel such as telephone line) to analog form at
the sending end and back to digital signals at the receiving end.

Monitor: A popular output device used for producing soft-copy output. It displays
the output on a television like screen.

Motherboard: The main circuit board of a computer system. It has the CPU chip,
RAM chips, ROM chips, I/O handling chips, etc. mounted on it. Also known as
system board.

Motion Pictures Experts Group (MPEG) video: A standard data compression


technique for digital video data.

Mouse: A small, hand-held input device that serves as an effective point-and-draw


device in today's computers.

MPEG audio: A standard data compression technique for digital audio data.

MS-DOS: Stands for Microsoft Disk Operating System. A single-user operating


system that was popularly used for personal computers in the 1980s.
Multi-access bus network: A network in which a single transmission medium is
shared by all nodes.

Multihop wireless networks: Wireless networks designed to provide wireless


communications capability in an environment where there is no wired
infrastructure yet connectivity must be maintained among users who can move
around arbitrarily and can at times not be in direct transmission range of each
other.

Multimedia: Use of more than one media (such as text, graphics, animation, audio
and video) for information presentation.

Multimedia computer system: A computer system that has the capability to


integrate two or more types of media (text, graphics, animation, audio, and video)
for the purpose of generation, storage, representation, manipulation and access of
multimedia information.

Multimedia database: A collection of multimedia data items, such as text,


graphics, animation, audio, and video.

Multimedia DBMS A set of programs to define, create, store, access, manage, and
query the multimedia databases.

Multimedia synchronization: Deals with mechanisms to ensure the desired


temporal ordering among a set of multimedia objects in a multimedia presentation.
Multiple SubNyquist Sampling Encoding (MUSE) An HDTV broadcasting
standard used in Japan.

Multiplexing: The method of dividing a physical channel into many logical


channels so that a number of independent signals may be simultaneously
transmitted on it.

Multiprocessing: A term used to describe interconnected computer configurations


or computers with two or more independent CPUs that have the ability to
simultaneously execute several programs.

Multiprocessor: A computer system consisting of two or more CPUs under a


common control.

Multiprogramming: Interleaved execution of two or more different and


independent programs by the same computer.
Multitasking: Concurrent execution of multiple jobs (often referred to as tasks of
same user) in a single-user system.

Multithreading: A popular technology that is used to improve application


performance through parallelism.

Musical Instrument Digital Interface (MIDI): An international standard


developed for digital music that determines the cabling, hardware, and
communications protocol needed to connect a computer with electronic musical
instruments and recording equipment.

Nanosecond: One-billionth (10'9) of a second.

Narrowband channel: Communication channels that handle low volumes of data,


typically from 45 to 300 baud. They are used mainly for telegraph lines and low
speed terminals.

National Television Systems Committee (NTSC): A television broadcasting


standard used in the US, Japan, and some Asian countries.

Netiquette: Deals with the rules of framing messages while interacting with other
Internet users.

Network: See computer network.

Network database: A database model in which the data elements are organized in
the form of parent-child relationships.

Network Interface Card (NIC): A hardware device that allows a computer to be


connected to a network, both functionally and physically.

Network operating system: An operating system for a distributed computing


system in which the users view the system as a collection of distinct computers.

Network topology: The structure of interconnection of nodes of a computer


network.

Neural network: A technology used to design experimental computers that can


perform human-type tasks. The circuits of these computers are patterned after the
complex interconnections existing among the human brain's neurons, or nerve
cells.
Newsgroup: A group of Internet/Intranet users who use the Usenet facility of the
Internet to exchange their views/ideas/information on some common topic that is
of interest to all the group members.

Node: An end point of a branch in a network, or a common junction of two or


more network branches.

Nomadic computing: See mobile computing.

Nonimpact printer: A printer, which performs some type of operation to the paper
instead of physically striking it (as in the case of an impact printer). To print
characters with nonimpact printers, the paper can be sprayed with ink, magnetized,
electrically charged, .heated, placed under pressure, or struck by laser beams.

Non-positional number system: A number system in which each symbol represents


the same value regardless of its position in the number and the symbols are simply
added to find out the value of a particular number. It is very difficult to perform
arithmetic with such a number system.

Non-procedural languages: Programming languages that allow the users to specify


"what" the output should be without describing all the details of "how" the data
should be manipulated to produce that result. For example, 4GLs.

Non-volatile storage: A storage medium that retains its contents when the power is
turned off or interrupted.

Notebook computer: A small, portable computer mainly meant for use by people
who need computing power wherever they go.

Numeric: Pertaining to a character set that contains the numbers 0 to 9.

Object: The primitive element of a program written in an OOP language.

Object Linking and Embedding (OLE): A feature found in application software


packages that allows joining of documents in different applications so that changes
in either document are reflected in the other document.

Object program: A fully compiled or assembled program that is ready to be loaded


into the computer. It results from the translation of a source program by a
language processor.
Objected-oriented software design: A technology to make programs generalized
and to build software systems by combining reusable pieces of program codes
called objects.

Object-oriented database: A database model that captures object-oriented concepts


such as class hierarchy, inheritance, and methods.

Object-Oriented Programming (OOP): A programming methodology that deals


with solving problems by identifying the real-world objects of the problem and the
processing required of those objects, and then creating simulations of those
objects, their processes, and the required communications between the objects.

Object-oriented programming languages: Programming languages that encapsulate


data as well as sequences of operations into abstract entities called objects,
providing a stronger encapsulation mechanism than procedures. Hence object-
oriented programming provides a more powerful modeling tool than procedure-
oriented programming.

Octal number system: A number system with a base of 8. The octal digits range
from 0 to 7. It is commonly used as a shortcut notation for groups of three binary
digits.

Off-line: A device or system not directly under the control of a computer system.
Off-line data entry devices Input devices through which data is recorded on some
media (such as floppies or tapes) and then entered later into the computer from the
media for processing.

On-line: A device or system directly connected to and under the control of a


computer system.

On-Line Analytical Processing (OLAP): A database architecture designed


specifically for effective data analysis.

On-line data entry devices: Input devices, which are connected directly to the
computer on which the entered data is processed.

On-Line Transaction Processing (OLTP): A database architecture designed


specifically for transaction processing.

Operand: The part of a machine level instruction, which tells the central processor
the location .of the data to be manipulated.
Operating system: An integrated set of programs that controls the resources of a
computer system and provides its users with an interface or virtual machine that is
more convenient to use than the bare machine.

Operation code (op code): The part of a machine level instruction which tells the
central processor what has to be done.

Operation phase: The life-cycle phase during which the system constructed in the
development phase is used.

Optical bar-code reader: An input device that is able to interpret combinations of


marks (bars) that represent data.

Optical Character Recognition (OCR) device: An input device (a scanner)


equipped with a character recognition software. It is used for inputting text
documents and store them in a form suitable for doing word processing of the
documents.

Optical disk: A storage medium that consists of a rotating disk, which is coated
with a thin metal or some other material that is highly reflective. Laser beam
technology is used for recording/reading of data on the disk. Also known as laser
disks.

Optical fiber: Hair-thin threads of glass or plastic used as a data transmission


medium. They use light signals for data transmission.

Optical Mark Reader (OMR): An input device (a scanner) that is capable of


recognizing a pre-specified type of mark made by pencil or pen. Any input data
that is of a choice or selection nature can be recorded for OMR input.

OSI protocol: A communication protocol to interconnect geographically dispersed


heterogeneous computers. This protocol has been standardized by the International
Standards Organization (ISO).

Output: The information generated as a result of processing by a system.

Output device: A device used in a computer system to supply information and


results of computation to the outside world. Examples are monitor, printer, plotter,
screen image projector, and voice response system.

Packed decimal format: A modified form of zoned decimal number that places two
decimal digits into each byte of the field with the exception of the rightmost byte,
which contains one digit and the sign of the field.
Packet switching: A data communication method in which the data (message) to
be sent is first split up into packets of fixed size; each packet is then appended
with source and destination addresses and some control information; and then the
packets are sent across the network to their destination. At the receiver end, the
packets are reassembled to recreate the message.

Page: A program segment that is loaded into the main memory only when it is
needed for execution.

Page printer: A high-speed printer with a mechanism that appears to print an entire
page at one time.

Paging: A memory management scheme used*"to solve the problem of external


fragmentation of memory. It does this by allowing a process's memory to be
noncontiguous, thus allowing a process to be allocated physical memory wherever
free memory blocks are available.

Palmtop computer: A battery-operated computer with personal assistance tools. It


is small-enough to fit in ones pocket and operated by keeping it on ones palm.

Parallel binary adder: An adder, in which all the bits of the two binary numbers are
added simultaneously.

Parallel port: An I/O port that can handle a higher volume of data than a serial port
because it transfers 8 or 16 bits of data at a time. It is used for connecting faster
I/O devices such as printer, analog-to-digital and digital-to-analog converters, etc.

Parallel processing: A technology in which a multiprocessor system is used to


solve complex problems faster by breaking the problem into sub-problems and
allowing different sub-problems to be processed simultaneously by different
processors of the multi-processor system.

Parity bit: An extra bit added to a string of bits that enables the computer to detect
internal errors in the transmission of binary data.

Pascal: A high-level programming language named after Blaise Pascal that


facilitates the use of structured programming techniques.

Password: A code by which a user gains access to a computer system. It is used


for security purposes.
Patch: A modifications of a software carried out between its two released versions.
A patch (modification) is created to fix a newly discovered bug. All the patches
are incorporated in a new release version of the software.

Peripherals: The various input/output devices and auxiliary storage units of a


computer system.

Personal assistance software: Software that enables users to use personal


computers for storing and retrieving personal information, and planning and
managing personal schedules, contacts, finances, and inventory of important
items.

Personal Communications Services (PCS): A wireless communication technology


that is used to offer greater network complexity and lower end-to-end latency in
wireless networks.

Personal Computer (PC): A small and inexpensive computer used by individuals


for carrying out personal jobs or for applications such as entertainment, home
management, and hobbies.

Personal Digital Assistant (PDA): A pocked-sized computer having facilities such


as calendar, calculator, notepad, etc.

Phase Alternating Line (PAL): A television broadcasting standard used in India


and Western Europe (except France).

Phase modulation: A form of modulation in which two binary values of digital


data are represented by the shift in phase of the- carrier signal. That is, a sine wave
with phase = 0° represents a digital 1 and a sine wave with phase = 180°
represents a digital 0.

Picosecond: One trillionth of a second.

Pixel: A picture element. It is used to represent one point in a raster scan display
device.

PL/1 (Programming Language One): A high-level programming language


designed for handling both scientific and business applications.

Plotter: An output device often used by architects, engineers, city planners, and
others who need to routinely generate high-precision, hard-copy graphic output of
widely varying sizes.
Point-and-draw devices: Input devices that can be used to rapidly point to and
select a particular graphic icon or menu item from the multiple options displayed
on the screen. Many of these devices can also be very effectively used to create
graphic elements on the screen, such as lines, curves and freehand shapes. Some of
the commonly used point-and-draw devices are mouse, trackball, joystick,
electronic pen and touch screen.

Point-Of-Sale (POS) device: An I/O device capable of immediately updating sales


and inventory records at a central CPU and producing a printed sales transaction
receipt.

Portrait mode: A mode of printing in which the printed lines are parallel to the
shorter edge of the paper.

Positional number system: A number system in which there are only a few
symbols called digits, and these symbols represent different values depending on
the position they occupy in the number. The value of each digit in such a number
is determined by the digit itself, the position of the digit in the number, and the
base of the number system.

Power On Self Test (POST): A self diagnosis test performed when a computer is
first turned on. It tests a computer's memory, its storage and peripheral devices for
their proper functioning and connectivity.

Predication: A technique, used in EPIC-based processors for improved


performance, which reduces the number of branches and branch mispredicts.

Preprocessor: A language processor that translates the statements pertaining to the


extensions of a standard language into a sequence of statements of the standard
language before the program can be successfully compiled by the standard
language compiler.

Preview: A feature of a word-processing package that permits the users to see


what the document will look like (almost, if not exactly) when it is printed.

Primary storage: A temporary storage area that is built into the computer hardware
and in which instructions and data of a program reside mainly when the program is
being executed by the CPU.

Printer: An output device used to produce hard-copy output.


Privacy filters: Specially designed plastic/glass plates used with monitors to
prevent others sitting/standing nearby the monitor from viewing the contents
displayed on it.

Private line: See leased line.

Procedural languages: Programming languages that require the programmer to


spell out the steps in processing procedures needed to achieve a desired result. For
example, FORTRAN, COBOL, BASIC languages.

Procedure: A subprogram that performs an action but returns no value.

Procedure-oriented programming languages: Programming languages that use


procedural abstractions that encapsulate sequences of operations into procedures
(also known as functions, subroutines, or subprograms).

Process: A program in execution. Also known as a job.

Processing: Performing a series of actions or operations on data in order to convert


them into useful information.

Processor: A unit of a computer system that interprets instructions and executes


them.

Profiler: A performance monitoring software that helps the user in analyzing the
performance of the various hardware components as well as the overall
performance of a computer system.

Program: A set of sequenced instructions (written in a language that can be


understood by a computer) used to direct and control the operations of the
computer in order to solve a problem or to perform a particular task.

Program Control (PC) register: A register, which holds the address of the next
instruction to be executed.

Program Design Language (PDL): See pseudocode.

Program library: A collection of complete programs, subroutines, and program


modules that have already been developed, tested, and documented usually as a
result of other programming projects.
Programmable Read-Only Memory (PROM): Similar to read only memory with
the exception that these chips can be reprogrammed by using special external
equipment.

Programmer: One who designs, writes, tests, and maintains computer programs.

PROgramming in LOGic (PROLOG): A nonprocedural programming language


that deals with the use of a formal logic notation to communicate some
computational process to a computer.

Programming language: A language used to express algorithms in computer


understandable form.

Protocol: See communication protocol.

Prototyping: The process of developing a small working model of a final


operational system to demonstrate the concepts, look, and feel of the final system.

Proxy server: A computer system that is specially configured to allow other


computers of an organization to interact with the Internet only through it.

Pseudo disk: See RAM disk.

Pseudocode: A programming analysis tool that is used for planning program logic.
It is an imitation of actual computer instructions written in a natural language such
as English. Also known as Program Design Language (PDL).

Public-domain software: A software that is available for free or for a very nominal
charge from the bulletin boards or user-group libraries on the Internet. Also
known as shareware or user-supported software.

Quantum: See time slice.

Query By Example (QBE): A software tool that enables database uses to specify
search criteria by providing a front end for the query language that collects the
facts about a query from the user and composes query language statements
internally.

Query language: A language that enables users to define their requirements for
extracting the desired information from the database in the form of queries.
R

Radio-router technology: An emerging wireless technology designed to make


links in an IP network mobile.

Radix: See base.

RAM disk: A block of semiconductor RAM chips (other than the RAM chips used
for the main memory) used in some computers as a simulated disk to make
applications execute faster. Also known as silicon disk or pseudo disk. Note that
RAM disk is not really a disk at all.

Random Access Memory (RAM): A memory in which the time to retrieve stored
information is independent of the address where it is stored.
Random file See direct file.

Random/direct-access storage device: A storage device in which access to any


stored information is direct, and approximately equal access time is required for
accessing any information irrespective of its location. Magnetic, optical and
magneto-optical disks are typical examples of such a storage device.

Rapid Application Development (RAD): A methodology for developing


applications software for computers. The methodology ensures quicker
development and greater user involvement than traditional methods.

Raster graphics: Graphic objects composed of patterns of dots called pixels.

Read-Only Memory (ROM): A non-volatile memory chip in which data are stored
permanently and cannot be altered by the programmer.

Real-time operating system: An operating system that is designed to handle the


processing requirements of real-time systems.

Real-time system: A system that must satisfy the requirement of producing the
desired results before a certain deadline.

Record: A collection of related items of data treated as a unit.

Record length: A measure of the size of a record, usually specified in units such as
characters.
Reduced Instruction Set Computer (RISC) architecture: An
architecture of CPUs with a small instruction set, fixed-length instructions, and
reduced references to memory to retrieve operands.

Redundant Array of Inexpensive Disks (RAID): See disk array.

Refresh rate: The number of times the electron beam of a display monitor scans
the entire screen per second.

Registers: Small, high-speed storage units, which are used to hold the information
on a temporary basis when there is an interpretation and execution of instructions
by the CPU. Data stored in a specific register have a special meaning to the CPU.

Relational database: A database model in which the data elements are organized in
the form of multiple tables and the data in one table is related to data in another
table through the use of a common field.

Reliability: Refers to the degree of tolerance of a system against errors and


component failures in the system.

Remote access: Accessing a computer from a distant station using communication


facilities.

Remote dial-up connection: A method of connecting a computer to the Internet via


a gateway computer of an Internet service provider.

Report file: A file that holds a copy of a report generated by a data processing
application in computer-accessible form until it is convenient to print it.

Report generator: A software that enables the users of a database to design the
layout of a report so that it can be presented in the desired format.

Report Program Generator (RPG): A business oriented, general purpose


programming language designed to generate the output reports resulting from the
processing of common business applications.

Response time: The elapsed time between submission of a job to the system for
processing and the first response produced by the system for the job.

Ring network: A computer network in which there is no host computer for


controlling other computers and each computer in the network has communicating
subordinates.
Rolling up: The process of viewing information from the detailed level (in the
hierarchy) to a higher level view of information.

Router: An internetworking tool that is used to interconnect those networks that


use the same high-level protocols above the network layer.

Routing: The selection of actual path to be used to transmit a message in a wide


area network environment.

RS-232-C interface: A standard interface used for interconnecting user terminals


to computers. It was defined by the Electronics Industrial Association of USA.

Run time: The time required to complete a single, continuous, execution of an


object program.

S
Scanner: An input device used for direct data entry into the computer system from
source documents.

Schema builder: A software tool that enables a user to define a database schema
interactively by prompting the user to enter the field name, field type, field size,
and so on for each field.

Screen image projector: An output device that is used to project information from
a computer on to a large screen (such as a cloth screen or a wall) so that it can be
simultaneously viewed by a large group of people.

Script: A program written in a scripting language.

Scripting language: A programming language that allows programmers to


integrate several command statements (used to instruct a computer to do some job)
into a single command so that the programmer need not type all the commands
every time he/she needs to perform the intended task.

Scrolling: Using program-specified ways (by the use of keys or mouse) to move
the items displayed in a window up or down, or left or right, in order to see parts
of the file that extend past the bottom or top or sides of the window.

Second generation computers: Computers built during the period 1955 and 1964.
They used transistors in CPU and magnetic cores for main memory. On software
front, they used high-level languages like FORTRAN and COBOL for
programming and batch operating systems.
Secondary storage: See auxiliary memory.

Sector: The smallest unit with which any disk can work. Disk drives are designed
to access only whole sectors at a time.

Security: Policies and mechanisms that deal with protecting the various resources
and information of a computer system against destruction and unauthorized
access.

Seek time: In a disk system, the time required for a read/write head to move to the
track where the data to be read or written is stored. Maximum seek time equals the
time taken for the head to move from the outermost track to the innermost track.

Selection logic: program construct used for selecting the proper path out of two or
more alternative paths in the program logic. Also known as decision logic.

Self-documenting languages: Programming languages that do not require much


explanation in order to be understood by someone reading the program
instructions. For example, COBOL language.

Semiconductor storage: A storage device whose storage elements are formed as


solid-state electronic components on an integrated circuit chip.

Sequence logic: A program construct used for performing instructions one after
another in sequence.

Sequential Couleur Avec Memoire (SECAM): A television broadcasting standard


used in France, Eastern Europe, Russia, and Middle East.

Sequential file: A file in which records are stored one after another in an ascending
or descending order determined by the value of the key field of the records.

Sequential processing: A technique in which a number of similar items or


transactions to be processed are grouped together and processed in a designated
sequence.

Sequential-access storage device: A storage device in which information can only


be retrieved in the same sequence in which it is stored. Magnetic tape is a typical
example of such storage device.

Serial port: An I/O port used to connect any device that can send or receive a
stream of bytes serially, one bit at a time. It is used for connecting slow I/O
devices such as terminal, keyboard, mouse, modem, etc.
Server computer: In a client-server computing environment, a computer that
manages a shared resource and provides a set of shared user services to the clients.
It runs the server process, which services client requests for use of the resource
managed by the server.

Shareware: See public-domain software. Silicon disk See RAM disk.

Simplex: A data transmission mode in which data can flow only in one direction.

Simulation: To represent and analyze properties or behavior of a physical or


hypothetical system by the behavior of a system model.

Single In-line Memory Module (SIMM): A memory board with memory chips on
it. Memory chips can be added on the board to increase the computer's main
memory capacity.

SLIP/PPP connection: SLIP (Serial Line Internet Protocol) and PPP (Point-to-
Point Protocol) are software that allow a client computer to be connected via a
modem to a gateway computer of an Internet service provider in such a manner
that all the software tools that are on the client computer can be used by a user of
the client computer to access the Internet, rather than depending on the gateway
computer's software.

Small Computer System Interface (SCSI): A drive interface standard that uses a
generic device controller (called SCSI controller) on the computer system and
allows any device with an SCSI interface to be directly connected to the SCSI bus
of the SCSI controller.

Small Scale Integration (SSI): Integration of only about ten to twenty electronic
components on a single chip.

Smart card: An electronic card having a built-in microprocessor chip. Data to be


encoded on the card is permanently stored in the memory of the microprocessor
chip.

Smart terminal: A terminal having local data editing capability and the ability to
consolidate input data prior to sending them to the main computer. It has a
microprocessor and some internal storage in addition to I/O capabilities.

Snowflake schema: A data warehouse model, which consists of normalized


dimension tables, by attribute level with each smaller dimension table pointing to
an appropriate aggregated fact table.
Soft-copy output: A computer output that is temporary in nature and vanishes after
use. For example, output displayed on a terminal screen or spoken out by a voice
response system.

Software: A set of computer programs, procedures, and associated documents


(flowcharts, manuals, etc.) related to the effective operation of a computer system.

Software engineering: A branch of engineering that deals with the systematic


application of the principles of computer science and mathematics in creating and
building cost-effective software solutions.

Software package: A group of programs that solve a specific problem or perform a


specific type of job. For example, a word-processing package.

Software piracy: The illegal copying or use of software.

Solid state: Electronic components whose operation depends on the control of


electric or magnetic phenomena in solids, such as transistors and diodes.

Sort: The process of arranging data into a desired sequence.

Source program: A program written in a symbolic or high-level language such as


assembly language, COBOL, BASIC, etc.

Special character: A graphic character that is neither a letter, a digit, nor a space
character; for example, the dollar sign, comma, period, etc.

Special purpose computer: A computer that is meant for doing only a particular
type of jobs.

Speculation: A technique, used in EPIC-based processors for improved


performance, which reduces the effect of memory-to-processor speed mismatch.

Speech synthesizer: A voice response system that converts text information into
spoken sentences.

Spooling: A mechanism to reduce the speed mismatch between slow I/O devices
and CPU, and to convert mutually exclusive I/O devices into non-mutually
exclusive I/O devices.

Spreadsheet: A numeric data analysis tool (software package) that allows users to
create a kind of computerized ledger.
SQL: A standard query language for relational databases.

Stack: A memory in which information, which is stored last is on top and is


retrieved first. Also known as LIFO (Last-In-First-Out) storage.

Stand-alone: In a distributed data processing system, it refers to a computer system


that has an independent (from a central-site computer) processing and storage
capability.

Star network: A network in which multiple computers are connected to a central


host computer. These computers are not linked directly to each other and can
communicate only via the host computer.

Star schema: A data warehouse model, which consists of one fact (major) table
and many dimension (minor) tables. The fact table stores the primary keys for all
dimension tables.

Statement: In programming, an expression or generalized instruction in a source


language.

Static RAM (SRAM): A type of RAM that does not need any special generator
circuits to retain the stored data. It is faster, costlier, and consumes more power
than dynamic RAM.

Storage: See memory.

Storage hierarchy: A hierarchy of storage technologies (such as cache memory,


main memory, secondary storage and mass storage) used in a computer system.
This is usually done because a single type of storage in not superior in speed of
access, capacity, and cost.

Stored program computer: A computer where the program to solve a problem and
the necessary data are stored in its memory.

StriNg Oriented symBOlic Language (SNOBOL): A programming language


designed to manipulate strings of characters and used for non-numeric
applications.

Structured design: A system design approach in which a difficult problem is


broken into smaller problems that is small enough to manage but independent
enough to solve separately.
Structured programming: An organized approach to programming involving the
use of the three basic control structures - sequence, selection, and iteration, and the
use of top-down concepts to decompose main functions into lower-level
components for modular coding purposes.

Study phase: A system life-cycle phase during which a problem is identified,


alternative solutions are studied, and the most feasible solution is selected.

Subprocedure: See subroutine.

Subprogram: See subroutine.

Subroutine: A standardized program written in such a way that it can be used as


part of another program whenever necessary. A subroutine is normally invoked
through other programs by the use of CALL statements. Also known as
subprogram or subprocedure.

Supercomputer: Computer systems characterized by their very high processing


speeds. They are generally used for complex scientific applications.

Superscalar architecture: An architecture which permits more than one instruction


to be executed in each clock cycle.

Swapping: Storing programs on disk and then transferring these programs into
main storage as and when they are needed. The technique is used to process large
programs or several programs with limited memory.

Switched line: See dial-up line.

Symbolic language: See assembly language.

Symbolic program: See assembly program.

Synchronous communication: Data transmission mode in which the sender and


receiver must synchronize with each other to get ready for data transmission
before it takes place.

Syntax: A set of rules of a programming language that define the pattern or


structure of the word order and punctuation of an instruction. It is analogous to
rules of grammar in English language.
Syntax errors: Errors in computer programs that typically involve incorrect
punctuation, incorrect word sequence, undefined terms, or misuse of terms. These
errors are automatically detected and pointed out by language processors.

System: A group of integrated parts (people, methods, machines, and materials)


that have a common purpose of achieving some objective(s).

System analysis: A detailed step-by-step investigation of related procedures to see


what must be done and the best way of doing it.

System analyst: The individual responsible for planning a computer data


processing system. He/she utilizes tools such as flowcharts, decision tables,
program design language, etc. These plans are then passed to the computer
programmer.

System commands: Commands used to communicate with the operating system of


the computer.

System programmer: A programmer who prepares system software.

System software: A set of one or more programs designed to control the operation
and extend the processing capability of a computer system

Tape density: The amount of data that can be placed over a given length of tape.
The density is usually expressed in bytes or characters per inch.

Tape drive: A device used for storage and retrieval of data stored on magnetic tap
medium.

Telecommunications: Transmission of data between computer systems and/or


terminals at different locations through telephone facilities.

Telnet: An application level protocol that allows a user to log in to another


computer from his/her current computer in a network environment.

Template: A standard format used to quickly create new •documents in the same
format.

Terabytes (TB): Memory storage equal to about one trillion (1012) bytes.

Teraflop: 1012 floating-point arithmetic operations per second.

Terminal: See Video Display Terminal (VDT).


Terminal emulator: A program that runs on a PC or workstation and pretends that
it is a terminal when the PC or workstation is connected to a network and
communicates with other computers on the network.

Testing: The process of making sure that the program performs the intended task.

Thermal printer: A printing device that utilizes paper that is sensitive to heat.

Third generation computers: Computers built between 1964 and 1975 that used
integrated circuits in CPU, high speed magnetic core main memories, powerful
high-level languages and saw the advent of time-sharing operating system.

Thread: In a multithreading system, the basic unit of CPU utilization is a thread. A


process consists of an address space and one or more threads of control. All the
threads of a process share the same address space, but each thread has its own
program counter, its own register states, and its own stack. Also known as light-
weight process.

Throughput: The total amount of useful processing carried out by a computer


system within a given time period. It is measured as the number of processes that
are completed by the system per unit time.

Time division multiplexing: A method of sharing a communication channel in


which the total time available in the channel is divided between several users and
each user of the channel is allotted a time slice during which he/she may transmit a
message. The channel capacity is fully utilized by interleaving a number of data
streams belonging to different users into one data stream.

Time log: A log documentation automatically maintained by many computer


systems that describe in detail how the computer system was used during the day.

Time slice: The short period of time during which a user process gets the attention
of the CPU in a time-sharing system. Also known as time slot or quantum.

Time slot: See time slice.

Time-sharing: A mechanism to provide simultaneous interactive use of a computer


system by many users in such a way that each user is given the impression that
he/she has his/her own computer. It uses multiprogramming with a special CPU
scheduling algorithm to achieve this.
Top-down approach: A disciplined approach to system design or program design
in which top-level functions are decomposed into a hierarchy of understandable
lower-level modules for better management and easy handling.

Touch screen: A simple, intuitive, and easy to learn input device that enables the
users to choose from available options by simply touching with their finger the
desired icon or menu item displayed on the computer's screen.

Track: In case of magnetic disk storage, one of many circular concentric rings
used for storing data. In case of magnetic tape storage, a horizontal strip, or
channel, running the full length of the tape and used for recording data.

Trackball: An input device that serves as an effective pointing device.

Transaction file: A file in which current data are stored for subsequent processing
usually in combination with a master file.

Transducer: A device capable of changing signals from analog form to digital


form or vice-versa.

Transistor: A controlled electronic switch fabricated using a semiconductor. It is


extensively used in the design of various electronic equipment.

Transponder: A device mounted on a communication satellite, which receives,


amplifies and retransmits signals from earth stations.

Time division multiplexing: A method of sharing a communication channel in


which the total time available

Trojan horse: A computer virus disguised as a useful program, but containing


hidden instructions to perform some malicious task instead.

Truth table: A table which gives the output values for the various input
combinations in case of a logical expression.

Tuple: A group of related fields (a row of a table) in a relational database.

Turnaround time: The elapsed time between the submission of a job to a computer
system for processing and the completion of the job.

Turnkey solution: See end-to-end solution.

Twisted-pair cable: A simple, inexpensive, and slow wired transmission medium.


UART: A chip on the device controller's card that converts parallel data from the
system bus of the computer into serial data that can flow through a serial cable or
telephone wire.

Ultra Large Scale Integration (ULSI): Integration of about ten million electronic
components on to a single chip.

Ultra Voilet EPROM (UVEPROM): An EPROM chip in which the stored


information is erased by exposing the chip for some time to ultraviolet light.

Unbundled: A term, which means that the application software is priced separately
from the computer hardware.

Unconditional transfer: A program instruction that causes the program control to


flow out of normal sequence unconditionally.

Unibus architecture: An interconnection architecture in which there is a single data


bus, a single address bus, and a single control bus used to interconnect the CPU
with both the memory and I/O devices.

Unicode: A code for internal representation of characters. It uses two bytes to


represent more than 65,000 characters or symbols. It is targeted to cover all
languages of the world and mark computer programs and data internationally
interchangeable.

Uniform Resource Locator (URL): An addressing scheme used by WWW


browsers to locate sites on the Internet.

Uninterrupted Power Supply (UPS): A battery-supported power unit between an


external power source and a computer system that supplies clean and continuous
power even during power failures.

Universal gate: A logic gate, which is alone sufficient to implement any Boolean
function. For example, NAND and NOR gates.

Universal Product Code (UPC): A universal or standardized optical bar code


which normally appears on retail packages and which is read by a laser beam
scanner.

Unix: A multi-user, time-sharing operating system. It is a very popular operating


system and can be used on a wide variety of computers ranging from notebook
computers to super computers.
Uploading: Moving a file from ones own computer to a remote computer in a
network environment.

Uptime: The time duration when the computer system is in operation.

Upward compatible: The ability of hardware or software to function with all of the
same equipment and software with which its predecessors could function.

Usenet: A service on the Internet that allows a group of Internet users to exchange
their views/ideas/information on some common topic that is of interest to all the
members belonging to the group.

User authentication: Deals with the problem of verifying the identity of a user
(person or program) before permitting access to the requested resource.

User-friendly: A program or computer system designed in such a manner that even


individuals who lack computer experience can easily use the system without much
training.

User-programmed: ROM A PROM in which the user can load and store "read-
only" programs and data.

User-supported software: See public-domain software.

Utilities: A set of programs that help users in system maintenance tasks and in
performing tasks of routine nature.

Value Added Network (VAN): Enhanced data transmission service provided by


doing value addition to the standard services of the common carriers. Added value
may include features such as electronic mail, data encryption/decryption, access to
commercial databases, and code conversion for communication between
incompatible computers.

Variable name: In a program, the name assigned to a data field that can assume
any field that can assume any of a given set of values.

Vector graphics: Graphic objects composed of patterns of lines, points, circles,


arcs, and other geometric shapes (vectors) which can be easily represented by few
geometric parameters.

Very Large Scale Integration (VLSI): An electronic circuit with about 10,000
transistors fabricated in a single silicon chip.
Very Small Aperture Terminals (VSATs): Smaller dish antennas having lower
power transmitters and receivers which can be installed at users' sites, it enables a
large number of users to benefit from satellite communication.

Video conferencing: A system in which persons sitting at CRT screens see and
talk to each other via a computer-communications network. It saves traveling cost
and the valuable time of executives.

Video Display Terminal (VDT): A monitor and a keyboard used together as both
an input and an output device. Also known as terminal.

Video Graphics Array (VGA): An add-on board that enables the interfacing of
very high-resolution monitors to a computer system.

Virtual classroom: A learning environment created by using computing


technologies. Students can join and leave the learning environment at their own
convenient time and can learn at their own pace of learning.

Virtual machine: The concept of adding the operating system layer on top of the
bare hardware to manage all parts of the system, and present the users with an
interface that is easier to program and use.

Virtual memory: A memory management scheme that allows the execution of


processes that might not be completely loaded in the main memory. The three
basic concepts used for the realization of virtual memory are on-line secondary
storage, swapping and demand paging.

Virtual reality: A technology using which the user can put a pair of goggles and
glove and tour a three-dimensional world that exists only in the computer, but
appears realistic to the user.

Virtual shop: A shopping environment created by using computing technologies. It


remains open 24 hours and allows the customers to do purchases at the time they
wish without leaving the comfort of their homes.

Virus: A computer virus is a piece of code attached to a legitimate program that,


when executed, infects other programs in the system by replicating and attaching
itself to them. In addition to this replicating effect, a virus normally does some
other damage to the system, such as corrupting/erasing files.

Vision input system: An input device that allows a computer to accept input just
by seeing an object. The input data in this case is normally an object's shape and
features in the form of an image.
Visualization: Deals with exploring data and information graphically for better
comprehension.

Voice recognition device: An input device that allows a person to input data to a
computer system by speaking to it.

Voice reproduction system: A voice response system that produces audio output
by selecting appropriate audio output from a set of pre-recorded audio responses.

Voice response system: An output device that enables a compute to talk to its
users.

Voiceband: Data communications system that handles moderate volumes of data,


typically from 300 to 9600 bauds. Phone lines that we use to talk to other people is
an example
.
Volatile storage: A storage medium that loses its contents in the event of power
failure or when power is switched off.

Web client: Any computer on the Internet that can access web servers.

Web page: A hypertext document on the Internet,

Web server: Any computer on the Internet that uses the HTTP protocol.

Wide Area Network (WAN): A computer network which interconnects computers


spread over a large geographical area. It may also enable LANs to communicate
with each other. This type of network may be developed to operate nationwide or
worldwide and the transmission medium used are normally public systems such as
telephone lines, microwave and satellite links.

Wildcard (character): A special character, usually a ? or a *, that is used in


software commands as a generic reference to any character or any combination of
characters, respectively.

Winchester disk: Medium-sized, non-interchangeable metal disks permanently


housed in sealed, contamination-free containers. Read/write heads are built-in with
the disk.

Window: A rectangular portion of a computer screen that is dedicated to specific


activity or application at a particular instance of time. The display screen can be
separated into several windows to simultaneously show the status of the different
applications at any- instance of time.
Windows: An operating system developed by Microsoft for use on personal
computers. Its various release versions are Windows 3.0, Windows 95, Windows
98, Windows 2000 and Windows XP.

Windows NT: A multi-user, timesharing operating system developed by Microsoft


that has Unix-like features. It is designed to be used for powerful workstations and
network and database servers.

Wireless Application Protocol (WAP): A technology that allows development of


wireless applications that are independent of the underlying wireless access
technology and that also enables access of information from existing web sites
using mobile devices.

Wireless computing system: A computer network that uses wireless


communication technologies. It enhances the functionality of computing
equipment by freeing communication from the location constraints of the wired
computing systems.

Wireless LAN (WLAN): A LAN having a wireless interface to enable wireless


communication among the equipment that are part of the LAN.

Wireless Local Loops (WLLs): A wireless communication technology designed to


support fixed wireless systems.

Wireless Markup Language (WML) : A version of HTML optimized for mobile


devices.

Word: A group of bits or characters considered as an entity and capableof being


stored in one storage location. Also fixed-size storage areas that form the primary
memory of a computer system.

Word length: A measure of the size of a word, usually specified in units such as
characters or bits. Each location of a computer system can store a fixed number of
characters or bits called its word length.

Word processing: The use of computers to create, view, edit, format, store,
retrieve, and print text materials.

Word wrap: A word processing feature that automatically moves words down to
the beginning of the next line if they extend beyond the right margin.

Word-addressable storage: Storage designed to store a fixed number of characters


(equal to its word-length in bytes). For such a storage device, storage space is
always allocated in multiples of word-length. Its another name is fixed-word-
length storage.

Workstation: A powerful desktop computer designed to meet the computing needs


of engineers, architects, and other professionals who need greater processing
power, larger storage, and better graphics display facility than what PCs provide.

World Wide Web (WWW or W3): Network of computers across the globe (world)
interconnected together on the Internet, and using the concept of hypertext to link
Internet sites and information on the Internet.

Worm: A computer virus designed to erase/alter the data/program from a


computer system's memory/disk.

Write-Once, Read-Many (WORM) disk: An optical disk that looks like a standard
CD-ROM disk, but allows the user to record his/her own information on it by
using a CD-Recordable (CD-R) drive.

WYSIWYG: Stands for What You See Is What You Get. This feature of a word-
processing package allows the users to display a document on the screen in a form
that closely resembles what the printed document will look like.

X terminal: A graphics terminal that has a rich set of commands to display


characters, move the cursor position, draw graphics and images, and manage
multiple windows on the screen.

Yahoo: An Internet search engine.

Zip disk: See Bernoulli disk.

Zoned decimal number: Any numeric character coded in the Extended Binary Coded
Decimal Interchange Code (EBCDIC). Each decimal digit occupies one byte of storage.

***********************************************************************
*

You might also like