Você está na página 1de 104

qwertyuiopasdfghjklzxcvbnmqwertyui

opasdfghjklzxcvbnmqwertyuiopasdfgh
jklzxcvbnmqwertyuiopasdfghjklzxcvb
Fundamental of Computer Science
nmqwertyuiopasdfghjklzxcvbnmqwer
B.Sc- IT
AMITY eLEARNING
tyuiopasdfghjklzxcvbnmqwertyuiopas
dfghjklzxcvbnmqwertyuiopasdfghjklzx
cvbnmqwertyuiopasdfghjklzxcvbnmq
wertyuiopasdfghjklzxcvbnmqwertyuio
pasdfghjklzxcvbnmqwertyuiopasdfghj
klzxcvbnmqwertyuiopasdfghjklzxcvbn
mqwertyuiopasdfghjklzxcvbnmqwerty
uiopasdfghjklzxcvbnmqwertyuiopasdf
ghjklzxcvbnmqwertyuiopasdfghjklzxc
vbnmqwertyuiopasdfghjklzxcvbnmrty
uiopasdfghjklzxcvbnmqwertyuiopasdf
ghjklzxcvbnmqwertyuiopasdfghjklzxc
vbnmqwertyuiopasdfghjklzxcvbnmqw
ertyuiopasdfghjklzxcvbnmqwertyuiop
Amity University

1.1

WHAT IS A COMPUTER?

Computer is an electronic device. As mentioned in the introduction it can do arithmetic


calculations faster. But as you will see later it does much more than that. It can be compared to a
magic box, which serves different purpose to different people. For a common man computer is
simply a calculator, which works automatic and quite fast. For a person who knows much about
it, computer is a machine capable of solving problems and manipulating data. It accepts data,
processes the data by doing some mathematical and logical operations and gives us the desired
output.

Therefore, we may define computer as a device that transforms data. Data can be anything like
marks obtained by you in various subjects. It can also be name, age, sex, weight, height, etc. of
all the students in your class or income, savings, investments, etc., of a country. Computer can be
defined in terms of its functions. It can
i)

accept data

ii)

store data,

iii)

process data as desired,

iv)

retrieve the stored data as and when required

v)

print the result in desired format. You will know more about these functions as you go
through the later lessons.

Fig. 1.1 below depicts a personal computer.

1.4

CHARACTERISTICS OF COMPUTER

Let us identify the major characteristics of computer. These can be discussed under the headings
of speed, accuracy, diligence, versatility and memory.

1.4.1 Speed
As you know computer can work very fast. It takes only few seconds for calculations that we take
hours to complete. Suppose you are asked to calculate the average monthly income of one
thousand persons in your neighborhood. For this you have to add income from all sources for all
persons on a day to day basis and find out the average for each one of them. How long will it take
for you to do this? One day, two days or one week? Do you know your small computer can finish
this work in few seconds? The weather forecasting that you see every day on TV is the results of
compilation and analysis of huge amount of data on temperature, humidity, pressure, etc. of
various places on computers. It takes few minutes for the computer to process this huge amount of
data and give the result.

You will be surprised to know that computer can perform millions (1,000,000) of instructions
and even more per second. Therefore, we determine the speed of computer in terms of
microsecond (10-6 part of a second) or nano-second (10-9 part of a second). From this you can
imagine how fast your computer performs work.

1.4.2 Accuracy
Suppose some one calculates faster but commits a lot of errors in computing. Such result is
useless. There is another aspect. Suppose you want to divide 15 by 7. You may work out up to 2
decimal places and say the dividend is 2.14. I may calculate up to 4 decimal places and say that
the result is 2.1428. Some one else may go up to 9 decimal places and say the result is
2.142857143. Hence, in addition to speed, the computer should have accuracy or correctness in
computing.

The degree of accuracy of computer is very high and every calculation is performed with the
same accuracy. The accuracy level is determined on the basis of design of computer. The errors
in computer are due to human and inaccurate data.

1.4.3 Diligence
A computer is free from tiredness, lack of concentration, fatigue, etc. It can work for hours
without creating any error. If millions of calculations are to be performed, a computer will
perform every calculation with the same accuracy. Due to this capability it overpowers human
being in routine type of work.

1.4.4 Versatility
It means the capacity to perform completely different type of work. You may use your computer
to prepare payroll slips. Next moment you may use it for inventory management or to prepare
electric bills.

1.4.5 Power of Remembering


Computer has the power of storing any amount of information or data. Any information can be
stored and recalled as long as you require it, for any numbers of years. It depends entirely upon
you how much data you want to store in a computer and when to lose or retrieve these data.

1,4.6 No IQ
Computer is a dumb machine and it cannot do any work without instruction from the user. It
performs the instructions at tremendous speed and with accuracy. It is you to decide what you
want to do and in what sequence. So a computer cannot take its own decision as you can.

1.4. 7 No Feeling
It does not have feelings or emotion, taste, knowledge and experience. Thus it does not get tired
even after long hours of work. It does not distinguish between users.

1.4.8 Storage
The Computer has an in-built memory where it can store a large amount of data. You can also
store data in secondary storage devices such as floppies, which can be kept outside your
computer and can be carried to other computers.

1.5

HISTORY OF COMPUTER

History of computer could be traced back to the effort of man to count large numbers. This
process of counting of large numbers generated various systems of numeration like Babylonian
system of numeration, Greek system of numeration, Roman system of numeration and Indian
system of numeration. Out of these the Indian system of numeration has been accepted
universally. It is the basis of modern decimal system of numeration (0, 1, 2, 3, 4, 5, 6, 7, 8, 9).
Later you will know how the computer solves all calculations based on decimal system. But you
will be surprised to know that the computer does not understand the decimal system and uses
binary system of numeration for processing.

We will briefly discuss some of the path-breaking inventions in the field of computing devices.

1.5 .1 Calculating Machines


It took over generations for early man to build mechanical devices for counting large numbers.
The first calculating device called ABACUS was developed by the Egyptian and Chinese people.

The word ABACUS means calculating board. It consisted of sticks in horizontal positions on
which were inserted sets of pebbles.It has a number of horizontal bars each having ten beads.
Horizontal bars represent units, tens, hundreds, etc.

1.5.2

Napiers bones

English mathematician John Napier built a mechanical device for the purpose of multiplication
in 1617 A D. The device was known as Napiers bones.
1.5.3 Slide Rule
English mathematician Edmund Gunter developed the slide rule. This machine could perform
operations like addition, subtraction, multiplication, and division. It was widely used in Europe
in 16th century.

1.5.4 Pascal's Adding and Subtractory Machine


You might have heard the name of Blaise Pascal. He developed a machine at the age of 19 that
could add and subtract. The machine consisted of wheels, gears and cylinders.

1.5.5 Leibnizs Multiplication and Dividing Machine


The German philosopher and mathematician Gottfried Leibniz built around 1673 a mechanical
device that could both multiply and divide.
1.5.6 Babbages Analytical Engine
It was in the year 1823 that a famous English man Charles Babbage built a mechanical machine
to do complex mathematical calculations. It was called difference engine. Later he developed a
general-purpose calculating machine called analytical engine. You should know that Charles
Babbage is called the father of computer.

1.5.7 Mechanical and Electrical Calculator


In the beginning of 19th century the mechanical calculator was developed to perform all sorts of
mathematical calculations. Up to the 1960s it was widely used. Later the rotating part of
mechanical calculator was replaced by electric motor. So it was called the electrical calculator.

1.5.8 Modern Electronic Calculator


The electronic calculator used in 1960 s was run with electron tubes, which was quite bulky.
Later it was replaced with transistors and as a result the size of calculators became too small.

The modern electronic calculator can compute all kinds of mathematical computations and
mathematical functions. It can also be used to store some data permanently. Some calculators
have in-built programs to perform some complicated calculations.

Fig.: Vacuum tube, transistor, IC

1.6

COMPUTER GENERATIONS

You know that the evolution of computer started from 16th century and resulted in the form that
we see today. The present day computer, however, has also undergone rapid change during the
last fifty years. This period, during which the evolution of computer took place, can be divided
into five distinct phases known as Generations of Computers. Each phase is distinguished from
others on the basis of the type of switching circuits used.

1.6.1 First Generation Computers


First generation computers used Thermion valves. These computers were large in size and
writing programs on them was difficult. Some of the computers of this generation were:

ENIAC: It was the first electronic computer built in 1946 at University of Pennsylvania, USA by
John Eckert and John Mauchy. It was named Electronic Numerical Integrator and Calculator
(ENIAC). The ENIAC was 30 50 feet long, weighed 30 tons, contained 18,000 vacuum tubes,
70,000 registers, 10,000 capacitors and required 150,000 watts of electricity. Today your favorite
computer is many times as powerful as ENIAC, still size is very small.

EDVAC: It stands for Electronic Discrete Variable Automatic Computer and was developed in
1950. The concept of storing data and instructions inside the computer was introduced here. This
allowed much faster operation since the computer had rapid access to both data and instructions.
The other advantages of storing instruction was that computer could do logical decision
internally.

Other Important Computers of First Generation


EDSAC: It stands for Electronic Delay Storage Automatic Computer and was developed by
M.V. Wilkes at Cambridge University in 1949.

UNIVAC-1: Ecker and Mauchly produced it in 1951 by Universal Accounting Computer setup.

Fig. 1.4: Univac Computer


Limitations of First Generation Computer
Followings are the major drawbacks of First generation computers.

1. The operating speed was quite slow.


2. Power consumption was very high.
3. It required large space for installation.
4. The programming capability was quite low.

1.6.2 Second Generation Computers


Around 1955 a device called Transistor replaced the bulky electric tubes in the first generation
computer. Transistors are smaller than electric tubes and have higher operating speed. They have
no filament and require no heating. Manufacturing cost was also very low. Thus the size of the
computer got reduced considerably.

It is in the second generation that the concept of Central Processing Unit (CPU), memory,
programming language and input and output units were developed. The programming languages
such as COBOL, FORTRAN were developed during this period. Some of the computers of the
Second Generation were

1. IBM 1620: Its size was smaller as compared to First Generation computers and mostly used
for scientific purpose.
2. IBM 1401: Its size was small to medium and used for business applications.
3. CDC 3600: Its size was large and is used for scientific purposes.

1.6.3 Third Generation Computers


The third generation computers were introduced in 1964. They used Integrated Circuits (ICs).
These ICs are popularly known as Chips. A single IC has many transistors, registers and
capacitors built on a single thin slice of silicon. So it is quite obvious that the size of the
computer got further reduced. Some of the computers developed during this period were IBM360, ICL-1900, IBM-370, and VAX-750. Higher level language such as BASIC (Beginners All
purpose Symbolic Instruction Code) was developed during this period.
Computers of this generations were small in size, low cost, large memory and processing speed
is very high.

1.6.4 Fourth Generation Computers


The present day computers that you see today are the fourth generation computers that started
around 1975. It uses large scale Integrated Circuits (LSIC) built on a single silicon chip called
microprocessors. Due to the development of microprocessor it is possible to place computers
central processing unit (CPU) on single chip. These computers are called microcomputers. Later
very large scale Integrated Circuits (VLSIC) replaced LSICs.

Thus the computer which was occupying a very large room in earlier days can now be placed on
a table. The personal computer (PC) that you see in your school is a Fourth Generation
Computer.

1.6.5 Fifth Generation Computer


The computers of 1990s are said to be Fifth Generation computers. The speed is extremely high
in fifth generation computer. Apart from this it can perform parallel processing. The concept of
Artificial intelligence has been introduced to allow the computer to take its own decision. It is
still in a developmental stage.

2.3

BASIC COMPUTER OPERATIONS

A computer as shown in Fig. 2.1 performs basically five major operations or functions
irrespective of their size and make. These are
1) . Input Function : This is the process of entering data and programs in to the computer
system.

2) Storing data : The process of saving data and instructions permanently is known as storage.
3) Processing :The task of performing operations like arithmetic and logical operations is called
processing it can process data as required by the user,
4) Outputting :This is the process of producing results from the data for getting useful
information.
5) Controlling: it controls all operations inside a computer.

2.4

FUNCTIONAL UNITS

In order to carry out the operations mentioned above the computer allocates the task between its
various functional units. The computer system is divided into three separate units for its
operation.

1. Input Unit :It includes the input interface and input devices. You should know that computer
is an electronic machine like any other machine which takes as inputs raw data and performs
some processing giving out processed data. Therefore, the input unit takes data from us to the
computer in an organized manner for processing. 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 a accept. Units called input interfaces accomplish this transformation.Input interfaces
are designed to match the unique physical or electrical characteristics of input device to the
requirements of the computer system. In short, the following functions are performed by an input
unit:
1. It accept (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.

D. Output Unit
The job of an output unit is just the reverse of that of an input unit. It supplies information and
results of computation to the outside world. Thus it links the compute with the external
environment. As computers work with binary code, the results produced are also in the binary

10

form. Hence, before supplying the result to the outside world, it must be converted to human
acceptable (readable0 form. This task is accomplished by units called 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 code from 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.

2. Storage Unit : Data has to be fed into the system before the actual processing starts. It is
because the processing speed of Central Processing Unit (CPU) is so fast that the data has to be
provided to CPU with the same speed. Therefore the data is first stored in the storage unit for
faster access and processing. This storage unit or the primary storage of the computer system is
designed to do the above functionality. It provides space for storing data and instructions.
The storage unit performs the following major functions:
All data and instructions are stored here before and after processing.
Intermediate results of processing are also stored here.

2.4.3 Central Processing Unit (CPU)


The ALU and the CU of a computer system are jointly known as the central processing unit. You
may call CPU as the brain of any computer system. It is just like brain that takes all major
decisions, makes all sorts of calculations and directs different parts of the computer functions by
activating and controlling the operations.The Central Processing Unit (CPU) takes data and
instructions from the storage unit and makes all sorts of calculations based on the instructions
given and the type of data provided. It is then sent back to the storage unit. It consists of
Arithmetic Logical Unit (ALU) and Control Unit (CU)

11

4.12

Arithmetic Logical Unit (ALU)

After you enter data through the input device it is stored in the primary storage unit. The actual
processing of the data and instruction are performed by Arithmetic Logical Unit. The major
operations performed by the ALU are addition, subtraction, multiplication, division, logic and
comparison. Data is transferred to ALU from storage unit when required. After processing the
output is returned back to storage unit for further processing or getting stored.
Arithmetic Logic Unit (ALU)

does all of the mathematics in a computer


does all of the logic comparisons of values
some common logic comparison symbols
= equal to
< less than
> greater than
<= less than or equal to
>= greater than or equal to
<> not equal

2.4.2 Control Unit (CU)


The next component of computer is the Control Unit, which acts like the supervisor seeing that
things are done in proper fashion. The control unit determines the sequence in which computer
programs and instructions are executed. Things like processing of programs stored in the main
memory, interpretation of the instructions and issuing of signals for other units of the computer
to execute them. It also acts as a switch board operator when several users access the computer
simultaneously. Thereby it coordinates the activities of computers peripheral equipment as they
12

perform the input and output. Therefore it is the manager of all operations mentioned in the
previous section..
The Control Unit

directs the flow of information into the CPU and/or memory or storage
controls which instructions the CPU will do next

Personal Computer Configuration


Now let us identify the physical components that make the computer work. These are
1. Central Processing Unit (CPU)
2. Computer Memory (RAM and ROM)
3. Data bus
4. Ports
5. Motherboard
6. Hard disk
7. Output Devices
8. Input Devices
All these components are inter-connected for the personal computer to work.

PROBLEM SOLVING USING COMPUTERS


Computers are used to solve all the problems of todays world. It is possible by using various
tools like
a. Algorithms
b. Flowcharts
c. Pseudocodes
Algorithm
An informal definition of an algorithm as "a set of instructions for solving a problem" and we
illustrated this definition with a recipe, directions to a friend's house, and instructions for
changing the oil in a car engine. You also created your own algorithm for putting letters and
numbers in order. While these simple algorithms are fine for us, they are much too ambiguous

13

for a computer. In order for an algorithm to be applicable to a computer, it must have certain
characteristics. We will specify these characteristics in our formal definition of an algorithm.
An algorithm is a well-ordered collection of unambiguous and effectively
computable operations that when executed produces a result and halts in a finite
amount of time [Schneider and Gersting 1995].

With this definition, we can identify five important characteristics of algorithms.


1.
2.
3.
4.
5.

Algorithms are well-ordered.


Algorithms have unambiguous operations.
Algorithms have effectively computable operations.
Algorithms produce a result.
Algorithms halt in a finite amount of time.

These characteristics need a little more explanation, so we will look at each one in detail.
Algorithms are well-ordered
Since an algorithm is a collection of operations or instructions, we must know the correct
order in which to execute the instructions. If the order is unclear, we may perform the wrong
instruction or we may be uncertain which instruction should be performed next. This
characteristic is especially important for computers. A computer can only execute an
algorithm if it knows the exact order of steps to perform.
Algorithms have unambiguous operations
Each operation in an algorithm must be sufficiently clear so that it does not need to be
simplified. Given a list of numbers, you can easily order them from largest to smallest with
the simple instruction "Sort these numbers." A computer, however, needs more detail to sort
numbers. It must be told to search for the smallest number, how to find the smallest number,
how to compare numbers together, etc. The operation "Sort these numbers" is ambiguous to a
computer because the computer has no basic operations for sorting. Basic operations used for
writing algorithms are known as primitive operations or primitives. When an algorithm is
written in computer primitives, then the algorithm is unambiguous and the computer can
execute it.

14

Algorithms have effectively computable operations


Each operation in an algorithm must be doable, that is, the operation must be something that
is possible to do. Suppose you were given an algorithm for planting a garden where the first
step instructed you to remove all large stones from the soil. This instruction may not be
doable if there is a four ton rock buried just below ground level. For computers, many
mathematical operations such as division by zero or finding the square root of a negative
number are also impossible. These operations are not effectively computable so they cannot
be used in writing algorithms.
Algorithms produce a result
In our simple definition of an algorithm, we stated that an algorithm is a set of instructions for
solving a problem. Unless an algorithm produces some result, we can never be certain
whether our solution is correct. Have you ever given a command to a computer and
discovered that nothing changed? What was your response? You probably thought that the
computer was malfunctioning because your command did not produce any type of result.
Without some visible change, you have no way of determining the effect of your command.
The same is true with algorithms. Only algorithms which produce results can be verified as
either right or wrong.
Algorithms halt in a finite amount of time
Algorithms should be composed of a finite number of operations and they should complete
their execution in a finite amount of time. Suppose we wanted to write an algorithm to print
all the integers greater than 1. Our steps might look something like this:
1. Print the number 2.
2. Print the number 3.
3. Print the number
While our algorithm seems to be pretty clear, we have two problems. First, the algorithm must have
an infinite number of steps because there are an infinite number of integers greater than one. Second,
the algorithm will run forever trying to count to infinity. These problems violate our definition that an
algorithm must halt in a finite amount of time. Every algorithm must reach some operation that tells it
to stop.

15

When writing algorithms, we have several choices of how we will specify the operations in
our algorithm. One option is to write the algorithm using plain English. An example of this
approach is the directions to John's house given in the introduction lesson. Although plain
English may seem like a good way to write an algorithm, it has some problems that make it a
poor choice. First, plain English is too wordy. When we write in plain English, we must
include many words that contribute to correct grammar or style but do nothing to help
communicate the algorithm. Second, plain English is too ambiguous. Often an English
sentence can be interpreted in many different ways. Remember that our definition of an
algorithm requires that each operation be unambiguous.
Another option for writing algorithms is using programming languages. These languages are
collections of primitives (basic operations) that a computer understands. While programming
languages avoid the problems of being wordy and ambiguous, they have some other
disadvantages that make them undesirable for writing algorithms. Consider the following
lines of code from the programming language C++.
a = 1;
b = 0;
while (a <= 10)
{
b = b + a;
a++;
}

cout << b;
This algorithm sums the numbers from 1 to 10 and displays the answer on the computer
screen. However, without some special knowledge of the C++ programming language, it
would be difficult for you to know what this algorithm does. Using a programming language
to specify algorithms means learning special syntax and symbols that are not part of standard
English. For example, in the code above, it is not very obvious what the symbol "++" or the
symbol "<<" does. When we write algorithms, we would rather not worry about the details of
a particular programming language.
What we would really like to do is combine the familiarity of plain English with the structure
and order of programming languages. A good compromise is structured English. This
approach uses English to write operations, but groups operations by indenting and numbering
lines. An example of this approach is the directions for changing motor oil in the introduction

16

lesson. Each operation in the algorithm is written on a separate line so they are easily
distinguished from each other. We can easily see the advantage of this organization by
comparing the structured English algorithm with the plain English algorithm.

How to change your motor oil


Plain English
First, place the oil pan underneath the oil plug of your car.
Next, unscrew the oil plug and drain the oil. Now, replace
the oil plug. Once the old oil is drained, remove the oil cap
from the engine and pour in 4 quarts of oil. Finally, replace
the oil cap on the engine.

1.
2.
3.
4.
5.
6.
7.

Structured English
Place the oil pan underneath the oil plug of your
car.
Unscrew the oil plug.
Drain oil.
Replace the oil plug.
Remove the oil cap from the engine.
Pour in 4 quarts of oil.
Replace the oil cap.

FLOWCHARTING
INTRODUCTION
The flowchart is a means of visually presenting the flow of data through an information
processing systems, the operations performed within the system and the sequence in which
they are performed. In this lesson, we shall concern ourselves with the program flowchart,
which describes what operations (and in what sequence) are required to solve a given
problem. The program flowchart can be likened to the blueprint of a building. As we know a
designer draws a blueprint before starting construction on a building. Similarly, a
programmer prefers to draw a flowchart prior to writing a computer program. As in the case
of the drawing of a blueprint, the flowchart is drawn according to defined rules and using
standard flowchart symbols prescribed by the American National Standard Institute, Inc.
OBJECTIVES
At the end of this lesson, you will be able to understand:
the meaning of flowchart
the basic parts of the flowchart such as flowchart symbols and the flow lines connecting these
symbols.
the advantages and limitations of flowchart

17

MEANING OF A FLOWCHART
A flowchart is a diagrammatic representation that illustrates the sequence of operations to be
performed to get the solution of a problem. Flowcharts are generally drawn in the early stages
of formulating computer solutions. Flowcharts facilitate communication between
programmers and business people. These flowcharts play a vital role in the programming of a
problem and are quite helpful in understanding the logic of complicated and lengthy
problems. Once the flowchart is drawn, it becomes easy to write the program in any high
level language. Often we see how flowcharts are helpful in explaining the program to others.
Hence, it is correct to say that a flowchart is a must for the better documentation of a complex
program.
25.4 GUIDELINES FOR DRAWING A FLOWCHART
Flowcharts are usually drawn using some standard symbols; however, some special symbols
can also be developed when required. Some standard symbols, which are frequently required
for flowcharting many computer programs are shown in Fig. 25.1

Start or end of the program

Computational steps or processing function of a


Program

Input or output operation

Decision making and branching

Connector or joining of two parts of program

18

Magnetic Tape

Magnetic Disk

Off-page connector

Flow line

Annotation
Display

Fig. 25.1 Flowchart Symbols


The following are some guidelines in flowcharting:
a. In drawing a proper flowchart, all necessary requirements should be listed out in logical
order.
b. The flowchart should be clear, neat and easy to follow. There should not be any room for
ambiguity in understanding the flowchart.
c. The usual direction of the flow of a procedure or system is from left to right or top to
bottom.
d. Only one flow line should come out from a process symbol.

or
e. Only one flow line should enter a decision symbol, but two or three flow lines, one for
each possible answer, should leave the decision symbol.

19

f. Only one flow line is used in conjunction with terminal symbol.

g. Write within standard symbols briefly. As necessary, you can use the annotation symbol
to describe data or computational steps more clearly.

h. If the flowchart becomes complex, it is better to use connector symbols to reduce the
number of flow lines. Avoid the intersection of flow lines if you want to make it more
effective and better way of communication.
i. Ensure that the flowchart has a logical start and finish.
j. It is useful to test the validity of the flowchart by passing through it with a simple test data.
25.5 ADVANTAGES OF USING FLOWCHARTS
The benefits of flowcharts are as follows:
1. Communication: Flowcharts are better way of communicating the logic of a system to all
concerned.
2. Effective analysis: With the help of flowchart, problem can be analysed in more effective
way.
3. Proper documentation: Program flowcharts serve as a good program documentation,
which is needed for various purposes.
4. Efficient Coding: The flowcharts act as a guide or blueprint during the systems analysis
and program development phase.
5. Proper Debugging: The flowchart helps in debugging process.
6. Efficient Program Maintenance: The maintenance of operating program becomes easy
with the help of flowchart. It helps the programmer to put efforts more efficiently on that
part

20

25.6 LIMITATIONS OF USING FLOWCHARTS


1. Complex logic: Sometimes, the program logic is quite complicated. In that case,
flowchart becomes complex and clumsy.
2. Alterations and Modifications: If alterations are required the flowchart may require redrawing completely.
3. Reproduction: As the flowchart symbols cannot be typed, reproduction of flowchart
becomes a problem.
4. The essentials of what is done can easily be lost in the technical details of how it is done.
IN-TEXT QUESTIONS
1. Fill in the blank.
i.
ii.
iii.
iv.
v.
vi.
vii.
viii.
ix.
x.

A program flowchart indicates the_________ to be per formed and the __________ in which they
occur.
A program flowchart is generally read from _____________ to ________________
Flowcharting symbols are connected together by means of ___________________
A decision symbol may be used in determining the ____________ or ___________ of two data
items.
__________ are used to join remote portions of a flowchart
____________ connectors are used when a flowchart ends on one page and begins again on other
page
A ________ symbol in used at the beginning and end of a flowchart.
The flowchart is one of the best ways of ________ a program..
To construct a flowchart, one must adhere to prescribed symbols provided by the __________ .
The programmed uses a ____________ to aid him in drawing flowchart symbols.

FEW EXAMPLES ON FLOWCHARTING


Now we shall present few examples on flowcharting for proper understanding of this
technique. This will help in student in program development process at a later stage.
Example 1
Draw a flowchart to find the sum of first 50 natural numbers.
.

21

Fig. Sum of first 50 natural numbers


Fig Flowchart for computing the sum of first 50 natural numbers.
Example 2
Draw a flowchart to find the largest of three numbers A,B, and C.
Answer: The required flowchart is shown in Fig 25.3

22

Fig Flowchart for finding out the largest of three numbers


Example 3
Draw a flowchart for computing factorial N (N!)
Where N! = 1 2 3 N .
The required flowchart has been shown in fig 25.4
Answer:

23

Fig Flowchart for computing factorial N

Pseudocodes
Pseudocode is a compact and informal high-level description of a computer programming
algorithm that uses the structural conventions of some programming language, but is intended
for human reading rather than machine reading. Pseudo-code typically omits details that are
not essential for human understanding of the algorithm, such as variable declarations, systemspecific code and subroutines. The programming language is augmented with natural
language descriptions of the details, where convenient, or with compact mathematical
notation.
The purpose of using pseudocode is that it is easier for humans to understand than
conventional programming language code, and that it is a compact and environmentindependent description of the key principles of an algorithm. It is commonly used in

24

textbooks and scientific publications that are documenting various algorithms, and also in
planning of computer program development, for sketching out the structure of the program
before the actual coding takes place.
No standard for pseudocode syntax exists, as a program in pseudocode is not an executable
program. Pseudo code resembles, but should not be confused with, skeleton programs
including dummy code, which can be compiled without errors. Flowcharts can be thought of
as a graphical alternative to pseudocode.
As the name suggests, pseudocode generally does not actually obey the syntax rules of any
particular language; there is no systematic standard form, although any particular writer will
generally borrow style and syntax for example control structures from some conventional
programming language. Popular syntax sources include Pascal, BASIC, C, C++, Java, Lisp,
and ALGOL. Variable declarations are typically omitted. Function calls and blocks of code,
for example code contained within a loop, is often replaced by a one-line natural language
sentence.
Depending on the writer, pseudocode may therefore vary widely in style, from a near-exact
imitation of a real programming language at one extreme, to a description approaching
formatted prose at the other.
Example:
<variable> = <expression>
if <condition>
do stuff
else
do other stuff
while <condition>
do stuff
for <variable> from <first value> to <last value> by <step>
do stuff with variable
function <function name>(<arguments>)
do stuff with arguments
return something

<function name>(<arguments>)

// Function call

25

Here are a few general guidelines for checking your pseudocode:


1. Mimic good code and good English. Using aspects of both systems means adhering to the
style rules of both to some degree. It is still important that variable names be mnemonic,
comments be included where useful, and English phrases be comprehensible (full sentences are
usually not necessary).

2. Ignore unnecessary details. If you are worrying about the placement of commas, you are using
too much detail. It is a good idea to use some convention to group statements (begin/end,
brackets, or whatever else is clear), but you shouldn't obsess about syntax.

3. In many cases, the type of a variable is clear from context; unless it is critical that it is
specified to be an integer or real, it is often unnecessary to make it explicit.
4. Take advantage of programming shorthands. Using if-then-else or looping structures is more
concise than writing out the equivalent in English; general constructs that are not peculiar to a
small number of languages are good candidates for use in pseudocode. Using parameters in
specifying procedures is concise, clear, and accurate, and hence should not be omitted from
pseudocode.

5. Consider the context. If you are writing an algorithm for quicksort, the statement use quicksort
to sort the values is hiding too much detail; if we have already studied quicksort in class and later
use it as a subroutine in another algorithm, the statement would be appropriate to use.

6. Don't lose sight of the underlying model. It should be possible to see through" your
pseudocode to the model below; if not (that is, you are not able to analyze the algorithm easily),
it is written at too high a level.

7. Check for balance. If the pseudocode is hard for a person to read or di_cult to translate into
working code (or worse yet, both!), then something is wrong with the level of detail you have
chosen to use.

26

Introduction to Computer and Communication


4.1

INTRODUCTION

Today computer is available in many offices and homes and therefore there is a need to share
data and programs among various computers with the advancement of data communication
facilities. The communication between computers has increased and it thus it has extended the
power of computer beyond the computer room. Now a user sitting at one place can communicate
computers of any remote sites through communication channel. The aim of this chapter is to
introduce you the various aspects of computer network.

4.2

OBJECTIVES

After going through this lesson you will be in a position to:

explain the concept of data communication


understand the use of computer network
identify different components of computer network
identify different types of network
explain communication protocols
understand what is internet and email and its uses in modern communication
appreciate the use of satellite communication.

4.3

DATA COMMUNICATION

We all are acquainted with some sorts of communication in our day to day life. For
communication of information and messages we use telephone and postal communication
systems. Similarly data and information from one computer system can be transmitted to other
systems across geographical areas. Thus data transmission is the movement of information using
some standard methods. These methods include electrical signals carried along a conductor,
optical signals along an optical fibers and electromagnetic areas.

Suppose a manager has to write several letters to various clients. First he has to use his PC and
Word Processing package to prepare his letter. If the PC is connected to all the client's PCs
through networking, he can send the letters to all the clients within minutes. Thus irrespective of

27

geographical areas, if PCs are connected through communication channel, the data and
information, computer files and any other program can be transmitted to other computer systems
within seconds. The modern form of communication like e-mail and Internet is possible only
because of computer networking.

Basic Elements of a Communication System


The following are the basic requirements for working of a communication system.
1. A sender (source) which creates the message to be transmitted.
2. A medium that carries the message.
3. A receiver (sink) which receives the message.

In data communication four basic terms are frequently used. They are
Data: A collection of facts in raw forms that become information after processing.
Signals: Electric or electromagnetic encoding of data.
Signaling: Propagation of signals across a communication medium.
Transmission: Communication of data achieved by the processing of signals.

4.3.1 Communication Protocols


You may be wondering how do the computers send and receive data across communication
links. The answer is data communication software. It is this software that enables us to
communicate with other systems. The data communication software instructs computer systems
and devices as to how exactly data is to be transferred from one place to another. The procedure
of data transformation in the form of software is commonly called protocol.

The data transmission software or protocols perform the following functions for the efficient and
error free transmission of data.
Data sequencing: A long message to be transmitted is broken into smaller packets of fixed size
for error free data transmission.
Data Routing: It is the process of finding the most efficient route between source and
destination before sending the data.
Flow control: All machines are not equally efficient in terms of speed. Hence the flow control
regulates the process of sending data between fast sender and slow receiver.

28

Error Control: Error detecting and recovering is the one of the main function of communication
software. It ensures that data are transmitted without any error.

4.3.2 Data Transmission Modes


There are three ways for transmitting data from one point to another
1. Simplex: In simplex mode the communication can take place in one direction. The receiver
receives the signal from the transmitting device. In this mode the flow of information is Uni.directional. Hence it is rarely used for data communication.
2. Half-duplex: In half-duplex mode the communication channel is used in both directions, but
only in one direction at a time. Thus a half-duplex line can alternately send and receive data.
3. Full-duplex: In full duplex the communication channel is used in both directions at the same
time. Use of full-duplex line improves the efficiency as the line turn-around time required in
half-duplex arrangement is eliminated. Example of this mode of transmission is the telephone
line.

B
Simplex A to B only

B
Half-Duplex A to B or B to A

B
Full-Duplex A to B and B to A

Fig. 4.1

4.3.3 Digital and Analog Transmission


Data is transmitted from one point to another point by means of electrical signals that may be in

29

digital and analog form. So one should know the fundamental difference between analog and
digital signals. In analog signal the transmission power varies over a continuous range with
respect to sound, light and radio waves. On the other hand a digital signal may assume only
discrete set of values within a given range. Examples are computer and computer related
equipment. Analog signal is measured in Volts and its frequency in Hertz (Hz). A digital signal is
a sequence of voltage represented in binary form. When digital data are to be sent over an analog
form the digital signal must be converted to analog form. So the technique by which a digital
signal is converted to analog form is known as modulation. And the reverse process, that is the
conversion of analog signal to its digital form, is known as demodulation. The device, which
converts digital signal into analog, and the reverse, is known as modem.

Time

Analog Signal
MODEMS :They translate data from digital to analog form at the sending end of the communications path and
from analog to digital at the receiving end .Put simply, the object of a modem is to change the characteristics of a
simple sine wave, referred to as a carrier signal. We know this carrier signal has several properties that can be
altered to represent data. It has amplitude (height); it has frequency (a unit of time); and it has phase (a relative
starting point). Modems are capable of altering one or more of these characteristics to represent data. The job a
modem performs can be divided into two discrete parts or phases at each end of the communications link.
At the sending end, it converts digital bit streams (strings of 0s and 1s) into analog sine waves. This is
the encoding process. Another component within the modem then changes (modulates) the analog signal
so the data may be transmitted simultaneously with other data and voice traffic that has also been modulated.
This process is basically reversed at the receiving end. There, the analog signal is brought back to its basic level
(demodulated), and the analog sine waves are reconverted (decoded) back into their corresponding bit
streams

30

Digital data as it is encoded, modulated, transmitted, demodulated, and decoded. 2-3

4.3.4 Asynchronous and Synchronous Transmission


Data transmission through a medium can be either asynchronous or synchronous. In
asynchronous transmission data is transmitted character by character as you go on typing on a
keyboard. Hence there is irregular gaps between characters. However, it is cheaper to implement,
as you do not have to save the data before sending. On the other hand, in the synchronous mode,
the saved data is transmitted block by block. Each block can contain many characters.
Synchronous transmission is well suited for remote communication between a computer and
related devices like card reader and printers.

Following are the major communication devices used to day.


Wire Pairs: Wire pairs are commonly used in local telephone communication and for short
distance digital data communication. They are usually made up of copper and the pair of
wires is twisted together. Data transmission speed is normally 9600 bits per second in a
distance of 100 meter.

31

Some features are:

consist of two insulated copper wires arranged in a regular spiral pattern to minimize the
electromagnetic interference between adjacent pairs
low frequency transmission medium
low cost, small size, and ease of installation
limited distance, usually less than 100 meters
the most popular and is generally the best option for school networks
Categories of UTP Cable
Category 1 Voice Only (Telephone Wire)
Category 2 Data to 4 Mbps (LocalTalk)
Category 3 Data to 10 Mbps (Ethernet)
Category 4 Data to 20 Mbps (16 Mbps Token Ring)
Category 5 Data to 100 Mbps (Fast Ethernet)
The standard connector for UTP cable is an RJ-45 connector, which looks like a large
telephone modular connector

Wireless
use high frequency radio signals or infrared light beams to communicate between the
workstations and the server
need transciever/antenna to send and receive data
widely used for connecting laptop computers to the LAN
expensive
poor security
slower than LANs using cabling
susceptible to electrical interference from lights and radios

Coaxial Cables: Coaxial cable is groups of specially wrapped and insulted wires that are able to

32

transfer data at higher rate. They consist of a central copper wire surrounded by an insulation
over which copper mesh is placed. They are used for long distance telephone lines and local
area network for their noise immunity and faster data transfer.
Coaxial (Coax) Cable
Some features are:

like the wire used to connect a TV or VCR


has an inner conductor surrounded by a braided mesh
both conductors share a common center axial, hence the term "co-axial"
bandwidth of up to 400 Mhz
highly resistant to signal interference
used for long distance (300-600 meters)
quite bulky and sometimes difficult to install
the most common type of connector used with coaxial cables is the BNC (Bayone-NeillConcelman) connector

has two types of coaxial cable:


Thin coaxial cable
o refers to as thinnet
o 10Base2 is the IEEE standard for Ethernet running on thin coaxial cable
o the 2 refers to the approximate maximum segment length being 200 meters
o is popular in school networks, especially linear bus networks
Thick coaxial cable
refers to as thicknet
10Base5 is the IEEE standard for Ethernet running on thick coaxial cable
the 5 refers to the approximate maximum segment length being 500 meters
has an extra protective plastic cover that helps keep moisture away from the
center
conductor
difficult to bend and install

33

used for long distance linear bus networks

Fiber Optic

Fiber Optic Cable


Fiber optic cabling consists of a center glass core surrounded by several layers of protective
materials (See fig. 5). It transmits light rather than electronic signals eliminating the problem of
electrical interference. This makes it ideal for certain environments that contain a large amount
of electrical interference. It has also made it the standard for connecting networks between
buildings, due to its immunity to the effects of moisture and lighting.
Fiber optic cable has the ability to transmit signals over much longer distances than coaxial and
twisted pair. It also has the capability to carry information at vastly greater speeds. This capacity
broadens communication possibilities to include services such as video conferencing and
interactive services. The cost of fiber optic cabling is comparable to copper cabling; however, it
is more difficult to install and modify. 10BaseF refers to the specifications for fiber optic cable
carrying Ethernet signals.

consist of a center glass core surrounded by several layers of protective materials


immunity to environmental interference
greater capacity (bandwidth of up to 2 Gbps)
used for distances up to 100 kilometers
carry information at vastly greater speeds
very expensive
small size and lighter weight
difficult to install and modify, require highly skilled installers

34

adding additional nodes is difficult


10BaseF refers to the specifications for fiber optic cable carrying Ethernet signals

Microwave: Microwave system uses very high frequency radio signals to transmit data through
space. The transmitter and receiver of a microwave system should be in line-of-sight because
the radio signal cannot bend. With microwave very long distance transmission is not
possible. In order to overcome the problem of line of sight and power amplification of weak
signal, repeaters are used at intervals of 25 to 30 kilometers between the transmitting and
receiving end.

Communication Satellite: The problem of line-sight and repeaters are overcome by using
satellites which are the most widely used data transmission media in modern days. A
communication satellite is a microwave relay station placed in outer space. INSAT-1B is
such a satellite that can be accessible from anywhere in India. In satellite communication,
microwave signal is transmitted from a transmitter on earth to the satellite at space. The
satellite amplifies the weak signal and transmits it back to the receiver. The main advantage
of satellite communication is that it is a single microwave relay station visible from any point
of a very large area. In microwave the data transmission rate is 16 giga bits per second. They
are mostly used to link big metropolitan cities.

4.4

COMPUTER NETWORK

A computer network is an interconnection of various computer systems located at different


places. In computer network two or more computers are linked together with a medium and data
communication devices for the purpose of communicating data and sharing resources. The
computer that provides resources to other computers on a network is known as server. In the
network the individual computers, which access shared network resources, are known as
workstations or nodes.
NEED of COMPUTER NETWORK
Sharing information: the computer can help you centralize the
information and maintain control over it if you select one computer to

35

store the shared information and have all other computers reference the
information on that computer over the network. Sharing hardware
resources: a network allows anyone connected to the network to use
printers, fax modem, scanners, tape backup units or almost any other
device that can be attached to a computer.
Sharing software resources: administrator can centrally install and
configure the software and also restrict access to the software. It is easier
than doing it on every one of the computers in an organization.
Preserving information: a network also allows for information to be
backed up to a central location. It is difficult to maintain regular backups
on a number of stand-alone computers so important information can be
lost easily by mistake or by accident.
Protecting information: a network provides a more secure environment
for a company's important information than stand-alone computers.
Networks provide an additional layer of security by way of passwords.
Electronic-mail (e-mail): the computer network can also help people
communicate by e-mail. You can attach electronic documents to mail
message like photo, sound and video clip.

Computer Networks may be classified on the basis of geographical area in two broad categories.
1. Local Area Network (LAN)
2. Wide Area Network (WAN)
4.4.1 Local Area Network
Networks used to interconnect computers in a single room, rooms within a building or buildings
on one site are called Local Area Network (LAN). LAN transmits data with a speed of several
megabits per second (106 bits per second). The transmission medium is normally coaxial cables.
LAN links computers, i.e., software and hardware, in the same area for the purpose of sharing
information. Usually LAN links computers within a limited geographical area because they must
be connected by a cable, which is quite expensive. People working in LAN get more capabilities

36

in data processing, work processing and other information exchange compared to stand-alone
computers. Because of this information exchange most of the business and government
organisations are using LAN.

Major Characteristics of LAN


every computer has the potential to communicate with any other computers of the network
high degree of interconnection between computers
easy physical connection of computers in a network
inexpensive medium of data transmission
high data transmission rate

Advantages
The reliability of network is high because the failure of one computer in the network does not
effect the functioning for other computers.
Addition of new computer to network is easy.
High rate of data transmission is possible.
Peripheral devices like magnetic disk and printer can be shared by other computers.
Disadvantages
If the communication line fails, the entire network system breaks down.

Use of LAN
Followings are the major areas where LAN is normally used

File transfers and Access


Word and text processing
Electronic message handling
Remote database access
Personal computing
Digital voice transmission and storage

4.4.2 Wide Area Network

37

The term Wide Area Network (WAN) is used to describe a computer network spanning a
regional, national or global area. For example, for a large company the head quarters might be at
Delhi and regional branches at Bombay, Madras, Bangalore and Calcutta. Here regional centers
are connected to head quarters through WAN. The distance between computers connected to
WAN is larger. Therefore the transmission medium used are normally telephone lines,
microwaves and satellite links.

4.4.3 Characteristics of WAN


Followings are the major characteristics of WAN.
1. Communication Facility: For a big company spanning over different parts of the country
the employees can save long distance phone calls and it overcomes the time lag in overseas
communications. Computer conferencing is another use of WAN where users communicate
with each other through their computer system.
2. Remote Data Entry: Remote data entry is possible in WAN. It means sitting at any location
you can enter data, update data and query other information of any computer attached to the
WAN but located in other cities. For example, suppose you are sitting at Madras and want to
see some data of a computer located at Delhi, you can do it through WAN.
3. Centralised Information: In modern computerised environment you will find that big
organisations go for centralised data storage. This means if the organisation is spread over
many cities, they keep their important business data in a single place. As the data are
generated at different sites, WAN permits collection of this data from different sites and save
at a single site.

4.4.4 Examples of WAN


1. Ethernet: Ethernet developed by Xerox Corporation is a famous example of WAN. This
network uses coaxial cables for data transmission. Special integrated circuit chips called
controllers are used to connect equipment to the cable.

2. Aparnet: The Aparnet is another example of WAN. It was developed at Advanced Research
Projects Agency of U. S. Department. This Network connects more than 40 universities and
institutions throughout USA and Europe.

38

Difference between LAN and WAN


LAN is restricted to limited geographical area of few kilometers. But WAN covers great
distance and operate nationwide or even worldwide.

In LAN, the computer terminals and peripheral devices are connected with wires and coaxial
cables. In WAN there is no physical connection. Communication is done through telephone
lines and satellite links.

Cost of data transmission in LAN is less because the transmission medium is owned by a
single organisation. In case of WAN the cost of data transmission is very high because the
transmission medium used are hired, either telephone lines or satellite links.

The speed of data transmission is much higher in LAN than in WAN. The transmission speed
in LAN varies from 0.1 to 100 megabits per second. In case of WAN the speed ranges from
1800 to 9600 bits per second (bps).

Few data transmission errors occur in LAN compared to WAN. It is because in LAN the
distance covered is negligible.

4.5

NETWORK TOPOLOGY

Network Topology
Network topology are the physical layout of the network that the locations of the computers and
how the cable is run between them. It is important to use the right topology. Each topology has
its own strengths and weakness.
Bus topology
A bus topology connects computers along a single or more cable to connect linearly as figure 1.
A network that uses a bus topology is referred to as a "bus network" which was the original form
of Ethernet networks. Ethernet 10Base2 (also known as thinnet) is used for bus topology.

39

Bus topology is the cheapest way of connecting computers to form a workgroup or departmental
LAN, but it has the disadvantage that a single loose connection or cable break can bring down
the entire LAN
Termination is important issue in bus networks. The electrical signal from a transmitting
computer is free to travel the entire length of the cable. Without the termination, when the signal
reaches the end of the wire, it bounces back and travels back up the wire. When a signal echoes
back and forth along an unterminated bus, it is called ringing. The terminators absorb the
electrical energy and stop the reflections.
Advantages of the bus are following.
Bus is easy to use and understand and inexpensive simple network
It is easy to extend a network by adding cable with a repeater that boosts the signal and allows it
to travel a longer distance.
Disadvantages are following.
A bus topology becomes slow by heavy network traffic with a lot of computer because networks
do not coordinate with each other to reserve times to transmit.
It is difficult to troubleshoot a bus because a cable break or loose connector will cause reflections
and bring down the whole network.
Star topology
A star topology links the computers by individual cables to a central unit, usually a hub as in
figure 2. When a computer or other networking component transmits a signal to the network, the
signal travels to the hub. Then, the hub forwards the signal simultaneously to all other
components connected to the hub. Ethernet 10BaseT is a network based on the star topology.

40

Star topology is the most popular way to connect computers in a workgroup or departmental
network.

Figure 2: Star topology


Advantages of star topology are such as:\
The failure of a single computer or cable doesn't bring down the entire network.
The centralized networking equipment can reduce costs in the long run by making network
management much easier.
It allows several cable types in same network with a hub that can accommodate multiple cable
types.
Disadvantages of star topology are such as:
Failure of the central hub causes the whole network failure.
It is slightly more expensive than using bus topology.
Ring topology
A ring topology connects the computers along a single path whose ends are joined to form a
circle as figure 3. The circle might be logical only but the physical arrangement of the cabling
might be similar to star topology, with a hub or concentrator at the center. The ring topology is
commonly used in token ring networks that the ring of a token ring network is concentrated
41

inside a device called a Multistation Access Unit (MAU) and fiber Distributed Data Interface
(FDDI) networks that the ring in this case is both a physical and logical ring and usually runs
around a campus or collection of buildings to form a high-speed backbone network.

Figure 3: Ring topology


Advantages are following:
One computer cannot monopolize the network.
It continue to function after capacity is exceeded but the speed will be slow.
Disadvantages are following:
Failure of one computer can affect the whole network.
It is difficult to troubleshoot.
Adding and removing computers disrupts the network.
Mesh topology
In a mesh topology, each computer on network has redundant data paths as showing in figure 4.
The mesh topology provides fault tolerance-if a wire, hub, switch, or other component fails, data
can travel along an alternate path. A diagram of a mesh network looks like a fishing net. A mesh
topology is most often used in large backbone networks in which failure of a single switch or
router can result in a large portion of the network going down.
42

Figure 4: Mesh topology

Overview of the Internet


What is the Internet?
The Internet is a worldwide connection of millions of computers connected to thousands of
different networks. These computers "communicate" that is, share, exchange, and transmit data
to another computer on the same or another network.
43

Who runs it?


Nobody owns or controls the Internet. It is a global information system similar in some respects
to telephone networks that allow anybody to call any other number anytime, anywhere. Each
network is run by its own operating center subject to the laws in their country and international
conventions. There are, instead, several "councils of elders," consortiums, societies, and
communities whereby representatives from various countries, institutions, and organizations
collaborate occasionally to establish common standards for hardware, software, and
telecommunications technologies.
How did it come to be?
The Internet was born in the era of the Cold War. At that time the U.S. Department of Defense
was interested in establishing a communication system using computer, radio and satellite
networks that will be able to work around power outtages in the event of a nuclear attack. How
will the government communicate if the communication network is destroyed? The answer was
to do away with a centralized communication network and come up with separate networks
where each will be independently responsible for getting messages across through any route. An
experimental network called the ARPAnet was set up in 1968 to enable scientists and researchers
in universities to collaborate on this project. Some universities were later permitted during the
1970s to connect their local area networks to ARPAnet. Demand grew as networking spread
among schools. With the invention of the first e-mail program in 1972, academic resources
started using the network not only for long-distance computing but more to exchange
information and gossip with their colleagues. Concerned by security risks, the military broke off
and established a separate network in 1983. By the late 1980s the National Science Foundation
commissioned its own network called NSFNET to share its information resources for scholarly
research. Major universities were connected to five computer centers using telephone lines. To
avoid the cost of laying down telephone cables for every institution to connect directly to the
computer centers, regional networks were created. This resulted in a chain that allowed schools
to connect to their nearest neighbor, thus permitting their computers to forward messages from
one link to another.

44

How does it work?


This ability of computers and networks all over the world to share information was made
possible by two important communication protocols - the Transmission Control Protocol (TCP)
and the Internet Protocol (IP). Together they are often referred to as TCP/IP, and together they
make the Internet known as a "packet-switched network.".
A good analogy will be the postal service. Your computer is both your
address and post office. To send a message to another computer you
need to put the address of your destination, too.When you transmit, your
message travels through cable lines or signals, in the case of wireless
technologies. However, your message does not travel in one piece. It is
first broken down into numbered, bite-size chunks called "packets" and
sent separately through different routes, and then recombined again in
their original form at their destination by Transmission Control Protocol.
The Internet Protocol handles how these packets are routed. The packets
are placed in separate IP "envelopes" and are sent through a series of
switches or routers.
Speed and efficiency are essential, as you will soon find out. Many
breakthroughs in Internet and computer technologies are guided by the
principle of sending and receiving data in the shortest time possible. The
data is broken down into packets for faster transmission. As the packets
travel in IP envelopes routers examine the addresses of these envelopes
and determine the most efficient path for sending each packet to the
nearest available router until these reach their final destination. Since the
traffic load on the Internet constantly changes every second, the packets
may travel in different routes and arrive in different order. At the their
destination the TCP will reassemble the packets into their original form

45

according to their numbered order. If a packet is missing the TCP


determines that the file or message was corrupted in transit, and will
request for retransmission.
Here's another analogy. You have a big family who are traveling from one country to attend a
reunion in another country. There are not enough seats on the plane to accommodate everyone so
the TCP breaks up everybody in different planes (IP). These flights take different routes and
make different stops. It is likely that the passengers in each flight have different destinations. At
each of these stops or airports, the router checks the destination of every passenger's ticket and
directs each to the next available flight towards their final destination. The members of the
convention group arrive at their final destination separately. To regroup them the TCP will do a
headcount making sure everybody is accounted for, and then usher them out of the airport in
proper order, that is, grandpa first, grandma second, eldest child next, and so on.

What is an Internet address?


As you have learned how messages are transmitted from one computer to another, every
computer in the Internet must have a unique and specific address. An Internet or IP address, as it
is sometimes called, consists of four numbers separated by periods. The smallest address would
be 0.0.0.0 while the biggest would be 1234.5678.9101.1121. Don't worry, only computers are
expected to remember all these numbers without getting confused. For humans, we use the
Domain Name System (DNS).
What are domains?
Like IP addresses which are numerical, the alphabetical domain names are also separated by
periods or dots. Thus, the U.S. Library of Congress will have an IP address of 140.147.248.7 and
the domain name will be www.loc.gov.
Domain names have the format: hostname.subdomain.top-level-domain. My school's domain
name, for example, is ocean.otr.usm.edu. This naming structure will give you clues about the
address. Ocean is the name of the host computer, otr stands for "Office of Technology
Resources" which manages the system, usm is the abbreviation for University of Southern

46

Mississippi, the sub-domain, and edu signifies that this is an educational institution. The gov for
the Library of Congress indicates it is a government institution.
Here are the existing top-level domains in the Internet:
com - commercial
.edu - educational
.net - network
.org - organization
.gov - government
.mil - military
Other countries sometimes add their codes at the end, such as .au for Australia, .ph for
Philippines, and .fr for France.

Internet Services

Most of these Internet Services operate on the client/server model or concept. A computer is a
client if it is receiving files, and is a server if it is sending files. Another way of putting it is you,
your computer, and the corresponding software for each type of service are all clients. A server is
a software that allows a computer to offer a service to another computer. The computer on which
the server software runs is also called a server. To gain access to the Internet most people open
an account with an Internet Service Provider (ISP) in their area. To connect they "dial-up" to
their ISP's server and "log-in" with their account name and password. If you noticed, these
services are loosely and interchangeably used as nouns and verbs, i.e. "please e-mail me."
Electronic Mail
E-mail, so far, is still the most popular service of the Internet. Most users get acquainted with the
Internet using this service. It is better than "snail mail" by post because your message can be
transmitted in seconds. It is better than telephones because the recipient doesn't have to be
around to receive the message. A person also has the option to read and respond to the messages
at one's convenience. Cheaper than long distance phone calls, some people are even able to send

47

and receive e-mail wherever they go when they travel as long as they have access to a connected
computer. Better than fax, through e-mail people can send forms, documents, colored pictures,
etc. as attachments.
Mailing List
Listserv, a popular type of mailing list, is short for "list server" and is based on the e-mail
protocol. As an electronic mailing list it is very convenient when somebody wants to send a
message or newsletter, for example, to many people at once. There are thousands of listservs for
every imaginable purpose, interest, service, and information like online newsletters, online sales
or services, and class listservs. To join a listserv means to be included in the mailing list. You
send an e-mail saying you want to subscribe and you will henceforth receive announcements,
notices, and information through your e-mail inbox.
Newsgroups
This is the Internet equivalent of a discussion group or an electronic bulletin board. There are
newsgroups for every conceivable topic and more, from educational technology and Brazil
culture to stamp collecting and mountaineering. Those with specific hobbies or unusual interests
are quiet happy to have this service in the Internet when there are so few people in their area to
discuss their interests with. You can usually tell a newsgroup by its name. Computer newsgroups
start with comp as in comp.apps.spreadsheets. while recreational newsgroups start with
rec as in rec.arts.cinema. The others are alt for alternate, soc for social, sci for science,
and news for news.
Some newsgroups are moderated, others are not. If it is moderated a
human moderator screens all messages and decides if these are worth
posting. Discussions can be "threaded." For example, in a newsgroup for
beer (alt.beer), one member might ask about good beer pubs in England and
another will start discussing how to keep a beer fresh. More than one
threaded discussion can occur at the same time with different members
posting their opinions and reactions to either one or more threads.

48

Chat
Another popular form of communication over the Internet. Unlike e-mail, listservs, and
newsgroups, chat allows people to converse in "real time." People may actually see you type
your questions and responses. Chats are also organized in chat channels and chat rooms
according to different factors. There are chat rooms for "techies," cat lovers, singles, etc.
FTP
File Transfer Protocol is the standard method for transferring files, whether downloading or
uploading, to and from your computer with another computer on the Internet. It is fairly simple
to use and is the most popular way to download software and other files from the Internet. All
the files in this web site -- the HTML, graphics, etc. -- were uploaded into the Web using
WS_FTP95. There are private FTP sites that require you to log-in with your account or user
name and password before you are allowed to enter. There are also anonymous FTP sites that
allow you to enter using "anonymous" as your user name and your e-mail address as your
password.
Telnet
Telnet is short for "terminal emulation." It is one amazing feature of the Internet that lets you use
the resources of another computer in another part of the world. This is done by remotely logging
to the distant computer which is called the host. Once you are connected you can operate a
remote computer using your keyboard. Some systems require you to log in as a "guest" and
others require your name and address, or user name and password. The telnet is most useful to
access the databases of public services like library catalogs and government directories. Telnet
also allows you to access your e-mail account if you can remotely log in to your ISP's server
computer.
The World Wide Web
The World Wide Web is one of the latest information service to arrive on the Internet but is
arguably the technology that revolutionized the Internet. It is the fastest growing and most
exciting feature. People who "surf" or "browse" are describing activities on the WWW. Other
words pertaining to the Web are homepages, websites, URL, HTML, and HTTP. This section
certainly deserves a page or two of its own so please click on the "Next" button to proceed.

49

How internet is useful in Education


There are many advantages to using the services of the Internet, particularly the tools and
resources on the Web, in education. Instruction materials such as syllabi, lecture notes,
presentations assignments, and announcements could be made available online.
The Internet puts the concept of "anytime, anywhere" into a higher level as far as learning is
concerned. Students will be able to learn at their pace. The primary beneficiaries would be
students and adult learners who are too far or too busy to attend classes. Even traditional students
will benefit when instructional materials are available to support or complement classroom
attendance. Students will be able to prepare for the next class if they are reminded of the
assignments and topics of discussion. Those who missed class or missed the teacher's point can
go over the lecture notes and presentation.
Both teacher and student will also benefit from being able to research any topic from library
catalogs, topical databases, and the World Wide Web. Anonymous FTP and Telnet will alow
them to access public databases maintained by government institutions. Services like e-mail and
mailing lists can support communication between teacher and student, and among peers (teacher
to teacher, student to student). Using a combination of e-mail and the Web, teachers and students
can collaborate on research and creative projects even with those who don't live in the same city
or country.

The World Wide Web


What is the difference between the Internet and the World Wide Web?
Think of the Net as primarily hardware and software, you know, technical stuff -- and the Web
as wholly content and information, as in creative and intellectual in nature. The Net consists of
cables, computers, satellites, and networks. Computers are able to communicate using different
software and protocols with each other, connected either by cable or wireless technology. The
Web, on the other hand, is an abstract concept that exists in cyberspace. When we speak of the
Web we talk of text, sound, graphics, and videos that are presented in Web page formats. To

50

navigate, surf, or browse around the Web is to move from one site to another, from one page to
another, one file to another using the hypertext links.
Who invented it?
The father of the World Wide Web is Tim Berners-Lee, a physicist working at CERN, the
European Particle Physics Laboratory in Switzerland. In 1989 he developed a network protocol
called Hypertext Transfer Protocol (HTTP) as a way for physicists to send documents over the
internet to share research information. He is also credited as the man who coined the words
"World Wide Web" and defined standards such as the Uniform Resource Locator (URL) and
Hypertext Mark-up Language (HTML).
What is a Web page?
It is a document written in HTML code that contains text and links to other pages, files, or parts
of the document. The earliest Web pages were all-text documents and at present there are still
text-based browsers like Lynx. Although Tim Berners-Lee also wrote the first multimedia
browser in 1990, graphical user-interface (GUI) browsers didn't become popular until Mosaic
came along in 1993.
What are browsers?
Browsers are viewer programs that display Web pages. There are also browsers to view e-mail ,
newsgroup discussions, etc. The most popular GUI browsers today are Netscape and Internet
Explorer. Marc Anderssen, the founder of Netscape, is
also the brains of Mosaic.
Web browsers interpret HTML codes how
to

display

text,

graphics,

links,

and

multimedia files in a page. When your


computer loads a web page, that is, an
HTML file, you don't see these codes
unless

you

give

the

"View

at

Page

Source" command. To see what the HTML

51

code for this page looks like press CtrlandUat the same time, or
click on the word View in the toolbar above you, and select Page
Source.

Not all files on the Web can be displayed by a browser. There are, for
example, applications that perform specific tasks when you click on the
appropriate link, like e-mail.
With their "point-and-click" features, GUI browsers dramatically made the
Internet user-friendly to novice users and its popularity exploded when
people were able to dial-in using a home computer and modem to an
Internet

Service

Provider.

Before

this

only

large

institutions

like

universities, corporations, and government organizations that could afford


to install cables have access to the Internet. These two innovations
opened up the Internet to a critical mass of individual users, people who
don't have the time or inclination to learn technical stuff, and people who
use computers at home for work and personal activities.
Next to the e-mail, the Web is the most popular service on the Internet.
According to the Online Computer Literacy Center, as of June 28, 1999,
there are 4.8 million Web sites all over the world, a 71 percent increase
from 1998.
Websites, Homepages, and URL
A website is a collection of pages in the Web. Home page, as the name suggests, is the main or
opening page of a website. You will notice that several websites use the word "Home" or an
image of a house to guide surfers back to the main page. The URL or Unform Resource Locator
is

the

specific

address

of

webpage,

like

http://geocities.com/toe6000/www1.html for this particular page. If you look up


at your Location Toolbar above you will see this address displayed. Sometimes, the URL of
another website is all you need to go to that site. Try this, click and delete the URL of this page

52

and in its place, type http://cnn.com which is the URL for the home page of "CNN
Interactive," and hit Enter. You can always click on the Back button to return to this page.
URLs are also used in newsgroups, FTP, and telnet to access other addresses and files.
What makes the Web so popular?
Ease of use, thanks to the graphical user interface and point-and-click features. Navigation is
non-linear and non-hierarchical. The hypertext links allows you to jump from one section, page,
file, or site to another in any direction as you please. The variety of file types makes it interactive
and multimedia. Once again, the hypertext links to different file types allows you to perform any
task such as read articles and documents; write an e-mail; view pictures or computer-generated
animation; watch a video clip; listen to music and radio; take an online test; fill out a survey
form; and download files and software.
This section will help you identify the most common file types on the Web
by their file names and extensions on the URL. You already know that a
URL that ends with "html" is a web page.
Common File Types
In general, on the Internet you'll find two kinds of files: ASCII (American Standard Code for
Information Interchange) and binary. These are also the commonly used ways to transfer data by
FTP. ASCII files are simple text files, with the computer codes defining the alphabetical
characters. Examples of ASCII file types are plain text files, HTML, and most e-mail files.
Binary file types are more sophisticated in that the codes also carry
formatting and graphical information, like spreadsheets, sound, images,
video, animation, and Adobe Acrobat's PDF (Portable Document File).
They are called binary because the codes are in 0's and 1's.
Text
Plain text files are identified by the filename extension of .txt. The beauty of plain text
files is they can be translated by any text editor and word processor program, whether
your computer has Notepad, Microsoft Word, or WordPerfect.

53

HTML. Files in this format are called Web pages and have extensions of either html or
htm. The formatting instructions that tell the browser how to display the page are called
tags. For example, to align a sentence on the center, the sentence will begin with
<CENTER> and end with </CENTER>.
DOC and WPD. These are the file extensions of the most common word processor
formats, namely, Microsoft Word for .doc and WordPerfect for .wpd. Since web
browsers do not typically support this format, your computer will be asked or prompted
by what application to open or save this file.
Image
There are at least 10 computer graphic formats out there but the two types you will often come
across in the Web are .gif developed by Compuserve and .jpeg by the Joint Photographic Experts
Group.
Gif (pronounced "jif") images are efficient in that there is no distortion when during
compression and decompression. Thus, they take up less kilobyte space and therefore
load faster, but are limited to 256 colors only.
JPEG (pronounced "jay-peg") can contain a million colors and are ideal for photos or
pictures. JPEG graphics usually don't support transparent backgrounds and shadow
features. Some JPEG files have extensions of .jpg.
The World Wide Web Consortium (W3C) has introduced .png. PNG stands for Portable
Network Graphics and was designed to be fast-loading, efficient, and patent-free. Newer
websites will likely use this format.
Sound/Audio
There are .wav, .mid., and .ra audio files. Each format requires a different software player,
fortunately, most of these come with your multimedia PC, or built-in with your browser, or may
be downloaded at no or minimal cost. These players have panel controls to stop, play, and pause
using the same symbols found on regular cassette players and VCR. The more elaborate ones

54

have volume control, counter, and channel selector. You can even choose and download customdesigned "skins" if you want, say, a zebra stripe theme or metallic look for your control panel.
Waveform is the most common, and both Netscape and Internet Explorer are able to play
this audio file type. Many sound effects such as glass breaking, horn blowing, and animal
sounds are in wave format.
MIDI, which stands for Musical Instrument Digital Interface, is a music synthesizer
format that takes up a lot less space than waveform.
RealNetworks.com developed what is called "real-time audio streaming" which allows
the Internet to function like a radio, broadcasting music and voices in real time. There are
several Internet radios and channels now playing music and talk programs in different
countries. You can listen to a channel that plays nothing but classical music while you are
working on the computer, or hear a live concert, or listen to an interview with a famous
rock star.

MP3 is short for MPEG-1 Layer-3, a technology that compresses digital audio files like
CD music without losing sound quality. Its flexible format makes the MP3 easy to
download, copy, and play on any sequence you want. Sometimes called MPEG Audio
Layer 3 to differentiate it from MPEG digital video files, otherwise, the rest of the world
knows it by its more popular, rather, controversial name of MP3.

Video
Both Netscape Communicator and Internet Explorer have built-in players for video file types
.mpg, .avi, and .mov and .qt.
AVI ("audio video interleave") was developed by Microsoft and is, naturally, the most
common format in Windows. Although there are less and less video files in this format
now it still comes in handy at times.

55

MOV and QuickTime are products of Apple. The beauty of QuickTime is it can run on
either Mac
MPEG, developed by the Motion Picture Experts Group, is an emerging digital video
format with applications on the Web, CDs, cable TV, direct satellite broadcasts, and
high-definition television (HDTV). It is endorsed by the International Standards
Organization (ISO) that formed the MPEG committee, and recognized by over 70
companies including IBM, Apple, Philips, and Sony.
Animation
Animation helps make a page appear more alive, although too much of it can cause headaches.
There are animated gifs such as the ones used in this site, i.e. rotating apple. Dynamic HTML
(DHTML), also creates special effects that makes pages more interactive and, yes, dynamic. A
programming language like JavaScript can create DHTML effects like pop-up windows,
scrolling text, buttons or images that change colors when your mouse moves over them, and in
this

particular

page,

the

slideshow

on

the

upper

left

corner.

Module II
Input output units
INPUT DEVICES
Input devices are the electronic or electromechanical equipment that provides a means of
communicating with the computer system for the input of data. As previously stated, the
processing unit requires this data in the appropriately formatted electronic signals. The input
device that most users are familiar with is the keyboard. This converts a key press in a particular
position on the board into an electronic signal sequence that can be interpreted by the processing
unit as representing a particular character.
What are Input Output Components?
Input output components

Parallel port

56

Parallel because it can move a whole byte at a time

Mainly used for connection to a printer

Nowadays it can handle bi-directional traffic

Serial port

One bit at a time Uses thin cable

Slow inexpensive

Universal serial bus (USB) replaces those

It is a new, rectangular port device

4 wires
2 for power
2 for communication

USB has a hub/slave technology

One USB line can connect to a hub

The hub has several outgoing lines that connect to other devices

This is achieved by a complex set of software

Keyboard
This is what you use to type information into your computer. It is the most Common input
device. Keyboards usually have a Qwerty layout.

Keys on the keyboard

Typewriter keys

Function keys

Arrow keys

Editing keys

Numeric keypad

Alt and Control keys


57

Escape, windows key

Obsolete keys

Different keys on the keyboard have different names. They are used to do different things.
Function keys perform a specific task. The program you are using sets this task. For example,
pressing F1 usually displays the help screen. Special purpose keys perform special preset tasks.
For example, in Word 97 pressing the Print Scrn (Print Screen) key transfers a picture of your
screen to the clipboard. The typewriter keys are used for typing text. They can also be used to
perform tasks that appear on the programs menus. For example, in Word 97, Ctrl+V (hold down
the control and the V key at the same time) does the same action as Edit / Paste(select Paste from
the Edit menu).Pressing TAB moves you to the next tab in a word processing program and the
next cell in a spreadsheet program. Caps Lock sets to capitals all the text you write. The Enter
key causes data to be accepted by the computer. If you are typing, pressing the enter key begins a
new paragraph. The cursor control keys move your cursor (the flashing bar where text appears)
around the screen. Numeric keys allow you to enter numbers quickly.

Dvorak keyboard-

An efficient keyboard for the English language, patented by August

Dvorak, cousin of the composer.

Result of efforts to study typewriting behavior.

Studies in the US Navy suggest that the payback period would be 10 days from learning

Dvorak.
Mouse
This is another common input device. A mouse is used to point to information on the screen and
either Click on it or Click and drag the information.

There are two-button and three button mice.

Since MS uses two buttons, three button mice are a dying species.

The third (middle) button can be emulated on two-button mice by pressing the left and

the right button at the same time.

Use of the mouse is best avoided!

The two buttons


Primary button usually left
Secondary button usually right
Actions in Microsoft windows

58

Left click
Right click
Left double click (time adjustable)
Left drag and drop
Right drag and drop
A Mouse can have one, two or three buttons.
On a two button mouse:

To Click means to quickly press down and release the left mouse button.

To Double Click means to give two clicks very quickly, one after the other.

To Right Click means to click with the right mouse button. This will perform a different

action to normal clicking (done with the left


mouse button).

To Click and Drag means to point the mouse at an object, hold down the left mouse

button, move the mouse, and release the left


mouse button. This moves the object you pointed to from where it was to where it is when you
release the mouse button.

A device that controls the movement of the cursor or pointer on a display screen. A

mouse is a small object you can roll along a hard, flat surface. Its name is derived from its shape,
which looks a bit like a mouse, its connecting wire that one can imagine to be the mouses tail,
and the fact that one must make it scurry along a surface. As you move the mouse, the pointer on
the display screen moves in the same direction. Mice contain at least one button and sometimes
as many as three, which have different functions depending on what program is running. Some
newer mice also include a scroll wheel for scrolling through long documents. Invented by
Douglas Engelbart of Stanford Research Center in 1963, and pioneered by Xerox in the 1970s,
the mouse is one of the great breakthroughs in computer ergonomics because it frees the user to a
large extent from using the keyboard. In particular, the mouse is important for graphical user
interfaces because you can simply point to options and objects and click a mouse button. Such
applications are often called point-and-click programs. The mouse is also useful for graphics
programs that allow you to draw pictures by using the mouse like a pen, pencil, or paintbrush.
There are three basic types of mice:

59

1. mechanical: Has a rubber or metal ball on its underside that can roll in all directions.
Mechanical sensors within the mouse detect the direction the ball is rolling and move the screen
pointer accordingly.

fig. mouse

2.

optomechanical: Same as a mechanical mouse, but uses optical sensors to detect motion

of the ball.
3.

optical: Uses a laser to detect the mouses movement. You must move the mouse along a

special mat with a grid so that the optical mechanism has a frame of reference. optical mice have
no mechanical moving parts. They respond more quickly and precisely than mechanical and opt
mechanical mice, but they are also more expensive.

Fig. optical mouse


4. Cordless mice arent physically connected at all. Instead they rely on infrared or radio waves
to communicate with the computer. Cordless mice are more expensive than both serial and bus
mice, but they do eliminate the cord, which can sometimes get in the way.

Fig. cordless mouse

Touch Screen

60

A type of display screen that has a touch-sensitive transparent panel covering the screen. Instead
of using a pointing device such as a mouse or light pen, you can use your finger to point directly
to objects on the screen.
Although touch screens provide a natural interface for computer novices, they are unsatisfactory
for most applications because the finger is such a relatively large object. It is impossible to point
accurately to small areas of the screen. In addition, most users find touch screens tiring to the
arms after long use.
Voice Recognition
The field of computer science that deals with designing computer systems that can recognize
spoken words. Note that voice recognition implies only that the computer can take dictation, not
that it understands what is being said. Comprehending human languages falls under a different
field of computer science called natural language processing.
A number of voice recognition systems are available on the market. The most powerful can
recognize thousands of words. However, they generally require an extended training session
during which the computer system becomes accustomed to a particular voice and accent. Such
systems are said to be speaker dependent.
Many systems also require that the speaker speak slowly and distinctly and separate each word
with a short pause. These systems are called discrete speech systems. Recently, great strides
have been made in continuous speech systems voice recognition systems that allow you to
speak naturally. There are now several continuous-speech systems available for personal
computers.
Because of their limitations and high cost, voice recognition systems have traditionally been used
only in a few specialized situations. For example, such systems are useful in instances when the
user is unable to use a keyboard to enter data because his or her hands are occupied or disabled.
Instead of typing commands, the user can simply speak into a headset. Increasingly, however, as
the cost decreases and performance improves; speech recognition systems are entering the
mainstream and are being used as an alternative to keyboards.
Other pointing devices

61

Replacements for a mouse are


Trackballs
touch pads
Joysticks
Pen-based devices
Vary with respect to text recognition
The Joystick
These are used mainly in computer games. Moving the joystick will move the car / person /
object on the screen.

Fig. joystick

The Trackball
A trackball has been described as an upside down mouse. It is a small ball with buttons around it
that is either part of the keyboard or attached to the keyboard. Moving the ball moves the pointer
on the computer screen. The buttons are used to do the same things as the buttons on a mouse. A
trackball is used instead of a mouse in notebook and laptop computers.

Fig. trackball

Scanner

62

A device that can read text or illustrations printed on paper and translate the information into a
form the computer can use. A scanner works by digitizing an image dividing it into a grid of
boxes and representing each box with either a zero or a one, depending on
whether the box is filled in. (For color and gray scaling, the same principle applies, but each box
is then represented by up to 24 bits.) The resulting matrix of bits, called a bit map, can then be
stored in a file, displayed on a screen, and manipulated by programs.
Optical scanners do not distinguish text from illustrations; they represent all images as bit maps.
Therefore, you cannot directly edit text that has been scanned. To edit text read by an optical
scanner, you need an optical character recognition (OCR ) system to translate the image into
ASCII characters. Most optical scanners sold today come with OCR packages.
Scanners differ from one another in the following respects:
scanning technology: Most scanners use charge-coupled device (CCD) arrays, which consist
of tightly packed rows of light receptors that can detect variations in light intensity and
frequency. The quality of the CCD array is probably the single most important factor affecting
the quality of the scanner. Industry-strength drum scanners use a different technology that relies
on a photo multiplier tube (PMT), but this type of scanner is much more expensive than the more
common CCD -based scanners.
resolution: The denser the bit map, the higher the resolution. Typically, scanners support
resolutions of from 72 to 600 dpi.

63

bit depth: The number of bits used to represent each pixel. The greater the bit depth, the more
colors or grayscales can be represented. For example, a 24-bit color scanner can represent 2 to
the 24th power (16.7 million) colors. Note, however, that a large color range is useless if the
CCD arrays are capable of detecting only a small number of distinct colors.
size and shape: Some scanners are small hand-held devices that you move across the paper.
These hand-held scanners are often called half-page scanners because they can only scan 2 to 5
inches at a time. Hand-held scanners are adequate for small pictures and
photos, but they are difficult to use if you need to scan an entire page of text or graphics.

Larger scanners include machines into which you can feed sheets of paper. These are called
sheet-fed scanners. Sheet-fed scanners are excellent for loose sheets of paper, but they are unable
to handle bound documents.
A second type of large scanner, called a flatbed scanner, is like a photocopy machine. It consists
of a board on which you lay books, magazines, and other documents that you want to scan.

fig. flatbed scanner

Overhead scanners (also called copy board scanners) look somewhat like overhead projectors.
You place documents face-up on a scanning bed, and a small overhead tower moves across the
page. This is used to put both text (writing) and graphics (pictures) into the computer. It digitizes
the text and images i.e. it converts theminto a form that can be used in the computer. This
process is known as optical character recognition (O.C.R). Before the text can be used on the
computer, it has to be converted into characters by optical recognition software.
a. Text and Code Scanners
Bar-code readers
A barcode reader (or barcode scanner) is an electronic device for
reading printed barcodes. Like a flatbed scanner, it consists of a light source,
a lens and a light sensor translating optical impulses into electrical ones.
Additionally, nearly all barcode readers contain decoder circuitry analyzing

64

the barcode's image data provided by the sensor and sending the
barcode's content to the scanner's output port.

Fig. barcode reader

Magnetic ink character recognition such as on bank checks.

Magnetic Ink Character Recognition, or MICR, is a character recognition technology adopted


mainly by the banking industry to facilitate the processing of cheques..
The major MICR fonts used around the world are E-13B and CMC-7. The E-13B font was
chosen by George Jacobi, who was working for General Electric at the time. Almost all Indian,
US, Canadian and UK checks now include MICR characters at the bottom of the paper in the E13B font. Some countries, including France, use the CMC-7 font developed by Bull.

The 14 characters of the E-13B font. The control characters bracketing each numeral block are
(from left to right) transit, on-us, amount, and dash.

An example of the CMC-7 MICR font. Shown are the 15 characters of the CMC-7 font. The
control characters after the numerals are (from left to right) internal, terminator, amount,
routing, and an unused character.

65

In addition to their unique fonts, MICR characters are printed with a magnetic ink or toner,
usually containing iron oxide. Magnetic printing is used so that the characters can be reliably
read into a system, even when they have been overprinted with other marks such as cancellation
stamps.

Fig. MICR reader

Optical mark recognition


Optical Mark Recognition (also called Optical Mark Reading and
OMR) is the process of capturing human-marked data from document
forms such as surveys and tests.
Many traditional OMR devices work with a dedicated scanner device that
shines a beam of light onto the form paper. The contrasting reflectivity at
predetermined positions on a page is then utilized to detect the marked
areas because they reflect less light than the blank areas of the paper.
Some OMR devices use forms which are preprinted onto 'transoptic' paper
and measure the amount of light which passes through the paper, thus a
mark on either side of the paper will reduce the amount of light passing
through the paper.

Optical character recognition

66

Optical character recognition, usually abbreviated to OCR, is the


mechanical or electronic translation of images of handwritten, typewritten
or printed text (usually captured by a scanner) into machine-editable text.
OCR is a field of research in pattern recognition, artificial intelligence and
machine vision. Though academic research in the field continues, the
focus on OCR has shifted to implementation of proven techniques. Optical
character recognition (using optical techniques such as mirrors and
lenses) and digital character recognition (using scanners and computer
algorithms) were originally considered separate fields. Because very few
applications survive that use true optical techniques, the OCR term has
now been broadened to include digital image processing as well.

b. Image scanners
Most widely used digitization device
You can try to run OCR once you have the image
Resolution measured in dots per inch. dpi
More dpi: crisper image
Fewer dpi: smaller file
Audio Input
Microphone with speech recognition software

This used to be mainly for those who cannot type

But the quality has improved, and maybe we will use itfor more general input. Other

analog to digital sound converters

Sound cards

MIDI board

Output Devices
An output device is any peripheral device that converts machine-readable
information into people-readable form such as a monitor, printer, plotter
and voice output device.

67

Monitors
Printers
Plotters
Voice Output Devices
Modems

Computer Display (Monitors)


A computer display is also called a display screen or video display terminal (VDT). A monitor is
a screen used to display the output. Images are represented on monitors by individual dots called
pixels. A pixel is the smallest unit on the screen that can be turned on and off or made different
shades. The density of the dots determines the clarity of the images, the resolution.

Screen resolution: This is the degree of sharpness of a displayed character or image. The
screen resolution is usually expressed as the number of columns by the number rows. A
1024x768 resolution means that it has 1024 dots in a line and 768 lines. A smaller screen
looks sharper on the same resolution. Another measure of display resolution is a dot
pitch.

Interlaced/Non-interlaced: An interlaced technique refreshes the lines of the screen by


exposing all odd lines first then all even lines next. A non-interlaced technology that is
developed later refreshes all the lines on the screen form top to bottom. The noninterlaced method gives more stable video display than interlaced method. It also requires
twice as much signal information as interlaced technology.

There are two forms of display: cathode-ray tubes (CRTs) and flat-panel display.
Cathode Ray Tubes (CRT)
A CRT is a vacuum tube used as a display screen for a computer output device. Although the
CRT means only a tube, it usually refers to all monitors. IBM and IBM compatible
microcomputers operate two modes unlike Macintosh based entirely on graphics mode. They are

68

a text mode and a graphics mode. Application programs switch computers into appropriate
display mode.
Monochrome Monitors
A monochrome monitor has two colors, one for foreground and the other for background. The
colors can be white, amber or green on a dark (black) background. The monochrome monitors
display both text and graphics modes.
Color Monitors
A color monitor is a display peripheral that displays more than two colors. Color monitors have
been developed through the following paths.
o

CGA: This stands for Color Graphics Adapter. It is a circuit board introduced by IBM
and the first graphics standard for the IBM PC. With a CGA monitor, it is harder to read
than with a monochrome monitor, because the CGA (320 X 200) has much fewer pixels
than the monochrome monitor (640 X 350). It supports 4 colors.

EGA: It stands for Enhanced Graphics Adapter. EGA is a video display standard that has
a resolution of 640 by 350 pixels and supports 16 colors. EGA supports previous display
modes and requires a new monitor.

VGA: VGA stands for Video Graphics Array. This is a video display standard that
provides medium to high resolution. In a text mode, the resolution of this board is 720 by
400 pixels. It supports 16 colors with a higher resolution of 640 by 480 pixels and 256
colors with 320 X 200 pixels.

Super VGA: This is a very high resolution standard that displays up to 65,536 colors.
Super VGA can support a 16.8 million colors at 800 by 600 pixels and 256 colors at 1024
by 768 pixels. A high-priced super VGA allows 1280 by 1024 pixels. Larger monitors
(17" or 21" and larger) with a high resolution of 1600 by 1280 pixels are available. VESA
(Video Electronics Standards Association) has set a standard for super VGA.

Flat Panel Displays


Portable computers such as a lap top use flat panel displays, because they are more compact and
consume less power than CRTs. Portable computers use several kinds of flat panel screens:
Liquid-Crystal Displays (LCDs)

69

A display technology that creates characters by means of reflected light and is commonly used in
digital watches and laptop computers. LCDs replaced LEDs (light emitting diodes) because
LCDs use less power. LCDs are difficult to read in a strong light, because they do not emit their
own light. Portable computers wanted to have brighter and easier to read displays. Backlit LCDs
are used for the purpose now.
o

Backlit LCDs: This is a type of LCD display having its own light source provided from
the back of the screen. The backlit makes the background brighter and clear, as a result
the texts and images appear sharper. However, this still is much less clear than CRTs.
Thus, better technology is needed.

Active Matrix LCDs: This is an LCD display technique in which every dot on the screen
has a transistor to control it more accurately. This uses a transistor for each monochrome
or each red, green and blue dot. It provides better contrast, speeds up screen refresh and
reduces motion smearing.

Electroluminescent (EL) Displays


A flat panel display technology that actively emits light at each pixel when it is electronic
charged. This provides a sharp, clear image and wide viewing angle. The EL display type of flat
panel is better than LCD.
Gas Plasma Displays
This is also called a gas panel or a plasma panel and is another flat screen technology. A plasma
panel contains a grid of electrodes in a flat, gas filled panel. The image can persist for a long
time without refreshing in this panel. The disadvantages of the gas plasma displays are that they
must use AC power and cannot show sharp contrast.

Printers
A printer is an output device that produces a hard copy of data. The resolution of printer output
is expressed as DPI. Printers can be classified into different types in several ways. First, the
printers can be divided into three categories by the way they print.

Serial Printers: Also called a character printer. Print a single character at a time. They
are usually inexpensive and slow.

70

Line Printers: Print a line at a time. They are expensive and very fast. Line printers use a
band, a chain, etc.

Page Printers: Also called a laser printer. Print a page at a time. They usually use a laser
to produce page images. Quality is best. This is a little bit expensive, but the price of the
personal laser printer is decreasing. The price range of the personal laser printer is around
$400, today.

Second, printers can be classified into two forms according to the use of a hammer.

Impact Printers: Impact printers transfer the image onto paper through a printing mechanism
that strikes the paper, ribbon and character together. Most impact printers use continuous-form
paper, which means the paper is connected together to produce a continuous flow through the
printer. Examples of impact printers are Dot Matrix printers, and Band and Chain Printers.

Nonimpact Printers: Nonimpact printing means that printing occurs without having a
mechanism strike the paper. Ink can be be sprayed against the paper or heat and pressure are used
to fuse a fine black powder into the shape of a character. Examples of nonimpact printers are InkJet printers, Laser printers, Page printers, and Thermal printers.

Another classification can be made by the way they form characters.

Bit-Mapped Printers: Images are formed from groups of dots and can be placed
anywhere on the page. They have many printing options and good printing quality. They
use PostScript as a standard language for instructing a microcomputer.

Character-based Printers: Printer print characters into the lines and columns of a page.
These printers use predefined set of characters and are restricted in position of characters.

Microcomputers use five kinds of printers. They are daisy wheel printers, chain printers, dotmatrix printers, ink-jet printers, and laser printers.
Daisy-Wheel Printer
Daisy-Wheel is a printer mechanism that uses any kind of hub (wheel) having a set of spokes at
the margin of the hub. The wheel can be removed to use a different character set. The end of
each spoke is a raised image of a type character. When the wheel is turned and the required
character is aligned to the print hammer, the character is then struck into a ribbon and onto a

71

paper

with

the

hammer.

Daisy-Wheel Printer prints typewriter-like very high quality characters. However, they are
slower and less reliable than dot-matrix printers. Microcomputer users seldom use this printer,
because the better dot-matrix printers and inexpensive laser printers are available today.

Fig. Daisy wheel printer

Dot-Matrix Printer
Dot-matrix printers are printers that write characters and form graphic images using one or two
columns of tiny dots on a print head. The dot hammer moving serially across the paper strikes an
inked-ribbon and creates images on paper. A dot matrix printer creates a character with a series
of tiny pins or wires that strike the ribbon or page and leave an image in dots. The resolution of
the matrix is defined in terms of rows and columns of dots. A 7 by 9 matrix uses seven dots
horizontally and nine dots vertically to create a character. Some dot matrix printers have a 36 by
24 matrix. The size of the matrix determines the quality of the printed character. Dot matrix
printers are near letter quality, faster than daisy wheel printers, and have speeds ranging from 60
to 350 cps. Figure below shows the letter L created by a dot matrix printer,

72

Dot matrix printers are popular printers used with microcomputers, because the printers are
highly reliable and inexpensive. They are used for tasks where a high-quality image is not
essential. Many users, however, move from dot printers to laser printers, because the price of
laser printers is falling down. Several kinds of dot matrix printers are available with print heads
that have 7, 9, 18, or 24 pins.
Ink-Jet Printer
Ink-jet is a printer mechanism that sprays one or more color of ink at high speed onto the paper
and produces high-quality printing. Characters are formed as a result of electrically charged or
heated ink being sprayed in fine jets onto the paper. Individual nozzles in the printing head
produce high resolution (up to 400 dots per inch or 400 dpi) dot matrix characters.
This printer also produces color printing as well as high-quality image. That is, ink-jet printers
can be used for variety of color printing at a relatively low cost. Ink-jet printing has two
methods: Continuous stream method and drop-on- demand method.

Fig. inkjet printer

73

Laser Printer
A laser printer is a printer that uses the electrophotograpic method used in a copy machine. The
printer uses a laser beam light source to create images on a photographic drum.

Fig: laser printer


A photoconductive drum is initially charged and then a high intensity laser beam is used to
discharge selected areas on the drum. These discharged areas correspond to the white areas of the
printed document.
Toner is attracted to parts of the drum with a high charge. The drum rotates and transfers the
toner to the paper which has an even greater electrical charge. Finally a heater fixes the toner
onto the paper.

How a laser printer works

74

In 1984, Hewlett-Packard introduced the first desktop laser printer, called the LaserJet. The laser
printer revolutionized personal computer printing and has spawned desktop publishing.
The laser printer produces high-resolution letters and graphics quality images, so it is adopted in
applications requiring high-quality output. Although a high-priced color laser printer is also
available in the market, a less expensive, desktop gray scale laser printer is widely used.
Recently, the laser printer is gaining its market share dramatically, mainly because the lowered
price and the quality.

Drum Printers In a drum printer, the character set is inscribed as raised fonts on a hollow metal
drum. These raised characters are formed into lines or bands on the drum. Figure 12-5 shows a
typical print drum. All the As are on one line, all the Bs are on the next line, and so forth, until
all the characters in the set form a line each. The character set is repeated for each column that
the printer

Figure 12-5.A print drum showing character lines. 12-7

is capable of printing. If the printer is an 80-column printer, the drum has 80 characters on each
line. The character drum is rotated at a high speed. As the desired character faces the paper, a
print hammer for that column is activated or fired, forcing the paper and inked ribbon against the
drum. The character on the drum is imprinted on the paper shown in figure 12-6. Normally, the

75

hammer bank contains one hammer for each character column of a line. If the printer has a
capacity to print 132 columns, then the hammer bank will consist of 132 hammers. As a line is
printed, each hammer is fired as the character to be printed in its column faces the paper. A drum
printer prints one line of data for each rotation of the drum. Drum printers can print from 300 to
1,200 lines per minute, depending of the rotational speed of the drum and how fast the printer
can setup to print the next line.

Chain and Band Printers


Chain Printer
Chain printers use a print chain as a source of raised characters. The links of the chain are
engraved character-printing slugs. The chain is made up of several sections; each section
contains one complete character set. The print chain is rotated at a high rate of speed past the
print positions (columns). As the desired character faces the paper, the print hammer for that
column is fired, printing the character on the paper. Band printers work on the same principle as
chain printers except that a scalloped, steel print band is used instead of a print chain. Figure
12-7 illustrates part of the band printers print mechanism. To change the font (typeface) on a
chain or band printer, you change the print chain or band. Character sets of the chain and band
printers vary, but are typically 48 to 64 characters. Since hammers are of a fixed size changing
the size of the fonts is not possible because each column printed must have its own print
hammer. Band and chain printer characters are generally printed at 10 characters per inch (cpi),
although a few printers have been manufactured to print 12 cpi. Chain and band printers are
medium- and high-speed printers.
They print over 300 lines per minute.

76

, Figure Drum, ribbon, and paper relationship during printer operations.

Plotters
A plotter is a special-purpose output device that draws images with ink pens. That is, the plotter
is a graphics printer for making sophisticated graphs, charts, maps, and three-dimensional
graphics as well as high-quality colored documents. It can also produce larger size of documents.
Plotters require data in a vector graphics format that can produce images with a series of lines.
There are two main types of plotters:

Drum Plotter: This is a plotter that has a drum. A paper wraps the drum that rotates to
produce plots. Pens in a drum plotter move across the paper while the drum is turning. A
drum plotter is usually used to produce smaller drawings.

77

A drum plotter

The size of the graph is therefore limited only by the width of the drum and can be of any length.

Flatbed Plotter: This is a plotter that has a bed. This is also called a table plotter. The plotter
draws graphics on the paper placed on the bed. There are several size of beds. This plotter is
usually used for producing large drawings. This is a plotter where the paper is fixed on a flat
surface and pens are moved to draw the image. This plotter can use several different colour pens
to draw with.
The size of the plot is limited only by the size of the plotter's bed.

Top view of a flat bed plotter

Voice-Output Devices

78

This device produces a human speech like sound, but actually is prerecorded vocalized sounds.
Voice output is used in the telephone information system, where the requested number is
reported using a voice output system. Voice synthesis has a robotic sound due to the difficulties
of replicating the complexities of human speech and pronunciation.
Voice answer back (VAB) is used to respond to telephone enquiries, such as the speaking clock.

Fig.

A speak and spell toy

For example, when a student enrolls courses using a telephone registration system, he or she
hears voice output upon your request. Voice output is becoming common in voice messaging
systems.

Modem
Another form of the output device is a modem. A modem is short for "MOdulatorDEModulator." Modulation is the process of converting from digital to analog. Demodulation
is

the

process

of

converting

from

analog

to

digital.

The modem enables digital microcomputers to send output through analog telephone lines. Both
voice and data can be carried over through the modem. The modem is not only an output device
but also an input device that receives data and voice through a communication channel.

LANGUAGE/SOFTWARE

79

3.1

INTRODUCTION

In the previous lesson we discussed about the different parts and configurations of computer. It
has been mentioned that programs or instructions have to be fed to the computer to do specific
task. So it is necessary to provide sequence of instructions so that your work can be done. We
can divide the computer components into two major areas, namely, hardware and software.
Hardware is the machine itself and its various individual equipment. It includes all mechanical,
electronic and magnetic devices such as monitor, printer, electronic circuit, floppy and hard disk.
In this lesson we will discuss about the other part, namely, software.

3.2

OBJECTIVES

After going through this lesson you will be able to


explain the concept of software
distinguish between different types of software
differentiate application software from system software
define a language
differentiate between different types of language
distinguish between compiler and interpreter

3.3

WHAT IS SOFTWARE?

As you know computer cannot do anything without instructions from the user. In order to do any
specific job you have to give a sequence of instructions to the computer. This set of instructions
is called a computer program. Software refers to the set of computer programs, procedures that
describe the programs, how they are to be used. We can say that it is the collection of programs,
which increase the capabilities of the hardware. Software guides the computer at every step
where to start and stop during a particular job. The process of software development is called
programming.

You should keep in mind that software and hardware are complementary to each other. Both
have to work together to produce meaningful result. Another important point you should know
that producing software is difficult and expensive.

80

3.4

SOFTWARE TYPES

Computer software is normally classified into two broad categories.


Application Software
System software

Application Software: Application Software is a set of programs to carry out operations for a
specific application. For example, payroll is an application software for an organization to
produce pay slips as an output. Application software is useful for word processing, billing
system, accounting, producing statistical report, analysis of numerous data in research, weather
forecasting, etc. In later modules you will learn about MS WORD, Lotus 1-2-3 and dBASE III
Plus. All these are application softwares.

Another example of application software is programming language. Among the programming


languages COBOL (Common Business Oriented Language) is more suitable for business
application whereas FORTRAN (Formula Translation) is useful for scientific application. We
will discuss about languages in next section.

System Software: You know that an instruction is a set of programs that has to be fed to the
computer for operation of computer system as a whole. When you switch on the computer the
programs written in ROM is executed which activates different units of your computer and
makes it ready for you to work on it. This set of program can be called system software.
Therefore system software may be defined as a set of one or more programs designed to control
the operation of computer system.

System software are general programs designed for performing tasks such as controlling all
operations required to move data into and out of the computer. It communicates with printers,
card reader, disk, tapes etc. monitor the use of various hardware like memory, CPU etc. Also
system software are essential for the development of applications software. System Software
allows application packages to be run on the computer with less time and effort. Remember that
it is not possible to run application software without system software.

81

Development of system software is a complex task and it requires extensive knowledge of


computer technology.

Due to its complexity it is not developed in house. Computer

manufactures build and supply this system software with the computer system. DOS, UNIX and
WINDOWS are some of the widely used system software. Out of these UNIX is a multi-user
operating system whereas DOS and WINDOWS are PC-based. We will discuss in detail about
DOS and WINDOWS in the next module.

So without system software it is impossible to operate your computer. The following picture is
shown in Fig. 3.1 relation between hardware, software and you as a user of computer system.

Fig. 3.1

3.5

Relation between hardware, software.

WHAT IS LANGUAGE?

You are aware with the term language. It is a system of communication between you and me.
Some of the basic natural languages that we are familiar with are English, Hindi, Oriya etc.
These are the languages used to communicate among various categories of persons. But how you
will communicate with your computer. Your computer will not understand any of these natural
languages for transfer of data and instruction. So there are programming languages specially
developed so that you could pass your data and instructions to the computer to do specific job.
You must have heard names like FORTRAN, BASIC, COBOL etc. These are programming
languages. So instructions or programs are written in a particular language based on the type of
job. As an example, for scientific application FORTRAN and C languages are used. On the other
hand COBOL is used for business applications.

82

3.5.1 Programming Languages


There are two major types of programming languages. These are Low Level Languages and
High Level Languages. Low Level languages are further divided in to Machine language and
Assembly language.

3.5.2 Low Level Languages


The term low level means closeness to the way in which the machine has been built. Low level
languages are machine oriented and require extensive knowledge of computer hardware and its
configuration.

(a)

Machine Language

Machine Language is the only language that is directly understood by the computer. It does not
needs any translator program. We also call it machine code and it is written as strings of 1's (one)
and 0s (zero). When this sequence of codes is fed to the computer, it recognizes the codes and
converts it in to electrical signals needed to run it. For example, a program instruction may look
like this:

1011000111101

It is not an easy language for you to learn because of its difficult to understand. It is efficient for
the computer but very inefficient for programmers. It is considered to the first generation
language. It is also difficult to debug the program written in this language.

Advantage
The only advantage is that program of machine language run very fast because no translation
program is required for the CPU.

Disadvantages
1. It is very difficult to program in machine language. The programmer has to know details of
hardware to write program.
2. The programmer has to remember a lot of codes to write a program which results in program
errors.

83

3. It is difficult to debug the program.

(b)

Assembly Language

It is the first step to improve the programming structure. You should know that computer can
handle numbers and letter. Therefore some combination of letters can be used to substitute for
number of machine codes.

The set of symbols and letters forms the Assembly Language and a translator program is
required to translate the Assembly Language to machine language. This translator program is
called `Assembler'. It is considered to be a second-generation language.

Advantages:
1.

The symbolic programming of Assembly Language is easier to understand and saves a lot of
time and effort of the programmer.

2.

It is easier to correct errors and modify program instructions.

3.

Assembly Language has the same efficiency of execution as the machine level language.
Because this is one-to-one translator between assembly language program and its corresponding
machine language program.

Disadvantages:
1. One of the major disadvantages is that assembly language is machine dependent. A program
written for one computer might not run in other computers with different hardware configuration.

3.6

HIGH LEVEL LANGUAGES

You know that assembly language and machine level language require deep knowledge of
computer hardware where as in higher language you have to know only the instructions in
English words and logic of the problem irrespective of the type of computer you are using.

Higher level languages are simple languages that use English and mathematical symbols like +, , %, / etc. for its program construction.

84

You should know that any higher level language has to be converted to machine language for the
computer to understand.

Higher level languages are problem-oriented languages because the instructions are suitable for
solving a particular problem. For example COBOL (Common Business Oriented Language) is
mostly suitable for business oriented language where there is very little processing and huge
output. There are mathematical oriented languages like FORTRAN (Formula Translation) and
BASIC (Beginners All-purpose Symbolic Instruction Code) where very large processing is
required.

Thus a problem oriented language designed in such a way that its instruction may be written
more like the language of the problem. For example, businessmen use business term and
scientists use scientific terms in their respective languages.

Advantages of High Level Languages


Higher level languages have a major advantage over machine and assembly languages that
higher level languages are easy to learn and use. It is because that they are similar to the
languages used by us in our day to day life.

3.6.1 Compiler
It is a program translator that translates the instruction of a higher level language to machine
language. It is called compiler because it compiles machine language instructions for every
program instructions of higher level language. Thus compiler is a program translator like
assembler but more sophisticated. It scans the entire program first and then translates it into
machine code.

The programs written by the programmer in higher level language is called source program.
After this program is converted to machine languages by the compiler it is called object
program.

85

Higher Level Language


----------------------------------

(Compile)

Program

Machine Language

Program

Fig. 3.2

A compiler can translate only those source programs, which have been written, in that language
for which the compiler is meant for. For example FORTRAN compiler will not compile source
code written in COBOL language.

Object program generated by compiler is machine dependent. It means programs compiled for
one type of machine will not run in another type. Therefore every type of machine must have its
personal compiler for a particular language. Machine independence is achieved by using one
higher level language in different machines.

3.6.2 Interpreter
An interpreter is another type of program translator used for translating higher level language
into machine language. It takes one statement of higher level languages, translate it into machine
language and immediately execute it. Translation and execution are carried out for each
statement. It differs from compiler, which translate the entire source program into machine code
and does involve in its execution.
.
The advantage of interpreter compared to compiler is its fast response to changes in source
program. It eliminates the need for a separate compilation after changes to each program.
Interpreters are easy to write and do not require large memory in computer. The disadvantage of
interpreter is that it is time consuming method because each time a statement in a program is

86

executed then it is first translated. Thus compiled machine language program runs much faster
than an interpreted program.

3.8

TERMINAL QUESTIONS

1.

What is software and hardware?

2.

What is computer Language?

3.

Name the three different categories of computer languages.

4.

What is machine language? Why is it required?

5.

What are advantages and disadvantages of machine language .

What is assembly language? What are its advantages over machine languages?

What is the difference between source program and object program?

What is higher level languages? Why are higher level languages are easier to use.

What is compiler? Why is it required?

10

What is interpreter? How does it differ from compiler?

3.9

FEEDBACK TO IN-TEXT QUESTIONS

IN-TEXT QUESTIONS 1
1. Program is a set of instructions given to the computer by the user. Software is a set of
computer programs and procedures that describe the programs. Programming is the process of
software development.
2. Application Software is a set of programs to carry out operations for a specific application.
System software is a set of programs written for performing tasks such as controlling all
operations required to move data into and out of the computer.
3. (a) False

b) T rue

(c) True

IN-TEXT QUESTIONS 2
1. FORTRAN is used for scientific applications whereas COBOL is used for business
applications.
2. Machine Languages are the only language that is directly understood by the computer. It is
written in binary form that is 0 and 1. The set of symbols and letters forms the Assembly
Language.
3. (a) True

(b) False

(c) True

87

IN-TEXT QUESTIONS 3
1. Both compiler and interpreter are program translators used for translating higher level
language into machine language. While compiler scans the entire program first and then
translates it into machine code, an Interpreter translates the program line by line.
2. FORTRAN (Formula Translation) and BASIC (Beginners All-purpose Symbolic Instruction
Code) are some of the high level languages.
3. (a) True (b) False (c) True

Module VI: Introduction to Operating Systems


Introduction

An operating system, or OS, is a software program that enables the


computer hardware to communicate and operate with the computer
software. Without a computer operating system, a computer would be
useless.
An operating system (sometimes abbreviated as "OS") is the program that, after being initially loaded into
the computer by a boot program, manages all the other programs in a computer. The other programs are
called applications or application programs. The application programs make use of the operating system
by making requests for services through a defined application program interface (API). In addition, users
can interact directly with the operating system through a user interface such as a command language or a
graphical user interface (GUI).

Need of Operating System


At the simplest level, an operating system does two things:
1. It manages the hardware and software resources of the system. In a desktop computer, these
resources include such things as the processor, memory, disk space, etc. (On a cell phone, they
include the keypad, the screen, the address book, the phone dialer, the battery and the network
connection.)
2. It provides a stable, consistent way for applications to deal with the hardware without having to
know all the details of the hardware.

88

The first task, managing the hardware and software resources, is very
important, as various programs and input methods compete for the
attention of the central processing unit (CPU) and demand memory,
storage and input/output (I/O) bandwidth for their own purposes. In this
capacity, the operating system plays the role of the good parent, making
sure that each application gets the necessary resources while playing
nicely with all the other applications, as well as husbanding the limited
capacity of the system to the greatest good of all the users and
applications.
The second task, providing a consistent application interface, is especially
important if there is to be more than one of a particular type of computer
using the operating system, or if the hardware making up the computer is
ever open to change. A consistent application program interface (API)
allows a software developer to write an application on one computer and
have a high level of confidence that it will run on another computer of the
same type, even if the amount of memory or the quantity of storage is
different on the two machines.
Even if a particular computer is unique, an operating system can ensure
that applications continue to run when hardware upgrades and updates
occur. This is because the operating system and not the application is
charged with managing the hardware and the distribution of its resources.
One of the challenges facing developers is keeping their operating
systems flexible enough to run hardware from the thousands of vendors
manufacturing computer equipment. Today's systems can accommodate
thousands of different printers, disk drives and special peripherals in any
possible combination.
The operating system is the interface between the hardware and the user.
If there were no O/S, the computer would be an expensive door stop.

89

An operating system performs these services for applications:


In a multitasking operating system where multiple programs can be running at the same time, the
operating system determines which applications should run in what order and how much time
should be allowed for each application before giving another application a turn.
It manages the sharing of internal memory among multiple applications.
It handles input and output to and from attached hardware devices, such as hard disks, printers,
and dial-up ports.
It sends messages to each application or interactive user (or to a system operator) about the status
of operation and any errors that may have occurred.
It can offload the management of what are called batch jobs (for example, printing) so that the
initiating application is freed from this work.
On computers that can provide parallel processing, an operating system can manage how to
divide the program so that it runs on more than one processor at a time.

Types of Operating Systems


BATCH OPERATING Systems
A batch system is one in which jobs are bundled together with the
instructions necessary to allow them to be processed without intervention.
Often jobs of a similar nature can be bundled together to further increase
economy
The monitor is system software that is responsible for interpreting and
carrying out the instructions in the batch jobs. When the monitor started
a job, it handed over control of the entire computer to the job, which then
controlled the computer until it finished.
Often magnetic tapes and drums were used to store intermediate data
and compiled programs.

90

1. Advantages of batch systems


o

move much of the work of the operator to the computer

increased performance since it was possible for job to start as soon as the previous job
finished

2. Disadvantages
o

turn-around time can be large from user standpoint

more difficult to debug program

due to lack of protection scheme, one batch job can affect pending jobs (read too many
cards, etc)

a job could corrupt the monitor, thus affecting pending jobs

a job could enter an infinite loop

As mentioned above, one of the major shortcomings of early batch


systems was that there was no protection scheme to prevent one job
from adversely affecting other jobs.
The solution to this was a simple protection scheme, where certain
memory (e.g. where the monitor resides) were made off-limits to user
programs. This prevented user programs from corrupting the monitor.
To keep user programs from reading too many (or not enough) cards, the
hardware was changed to allow the computer to operate in one of two
modes: one for the monitor and one for the user programs. IO could only
be performed in monitor mode, so that IO requests from the user
programs were passed to the monitor. In this way, the monitor could
keep a job from reading past it's on $EOJ card.
To prevent an infinite loop, a timer was added to the system and the $JOB
card was modified so that a maximum execution time for the job was
passed to the monitor. The computer would interrupt the job and return
control to the monitor when this time was exceeded.
Spooling Batch Systems (mid 1960s - late 1970s)

91

One difficulty with simple batch systems is that the computer still needs
to read the the deck of cards before it can begin to execute the job. This
means that the CPU is idle (or nearly so) during these relatively slow
operations.
Since it is faster to read from a magnetic tape than from a deck of cards,
it became common for computer centers to have one or more less
powerful computers in addition to there main computer. The smaller
computers were used to read a decks of cards onto a tape, so that the
tape would contain many batch jobs. This tape was then loaded on the
main computer and the jobs on the tape were executed. The output from
the jobs would be written to another tape which would then be removed
and loaded on a less powerful computer to produce any hardcopy or other
desired output.
It was a logical extension of the timer idea described above to have a
timer that would only let jobs execute for a short time before interrupting
them so that the monitor could start an IO operation. Since the IO
operation could proceed while the CPU was crunching on a user program,
little degradation in performance was noticed.
Since the computer can now perform IO in parallel with computation, it
became possible to have the computer read a deck of cards to a tape,
drum or disk and to write out to a tape printer while it was computing.
This process is called SPOOLing: Simultaneous Peripheral Operation
OnLine.
Spooling batch systems were the first and are the simplest of the
multiprogramming systems.

92

One advantage of spooling batch systems was that the output from jobs
was available as soon as the job completed, rather than only after all jobs
in the current cycle were finished.
Multiprogramming Systems (1960s - present)
As machines with more and more memory became available, it was
possible to extend the idea of multiprogramming (or multiprocessing) as
used in spooling batch systems to create systems that would load several
jobs into memory at once and cycle through them in some order, working
on each one for a specified period of time.
At this point the monitor is growing to the point where it begins to
resemble a modern operating system. It is responsible for:
starting user jobs
spooling operations
IO for user jobs
switching between user jobs
ensuring proper protection while doing the above

Multiprogramming is a rudimentary form of parallel processing in which


several programs are run at the same time on a uniprocessor. Since there
is only one processor , there can be no true simultaneous execution of
different programs. Instead, the operating system executes part of one
program, then part of another, and so on. To the user it appears that all
programs are executing at the same time.
If the machine has the capability of causing an interrupt after a specified
time interval, then the operating system will execute each program for a
given length of time, regain control, and then execute another program
for a given length of time, and so on. In the absence of this mechanism,
the operating system has no choice but to begin to execute a program

93

with the expectation, but not the certainty, that the program will
eventually return control to the operating system.
If the machine has the capability of protecting memory , then a bug in one
program is less likely to interfere with the execution of other programs. In
a system without memory protection, one program can change the
contents of storage assigned to other programs or even the storage
assigned to the operating system. The resulting system crashes are not
only disruptive, they may be very difficult to debug since it may not be
obvious which of several programs is at fault.
Timesharing Systems (1970s - present)
Back in the days of the "bare" computers without any operating system to
speak of, the programmer had complete access to the machine. As
hardware and software was developed to create monitors, simple and
spooling batch systems and finally multiprogrammed systems, the
separation between the user and the computer became more and more
pronounced.
Users, and programmers in particular, longed to be able to "get to the
machine" without having to go through the batch process. In the 1970s
and especially in the 1980s this became possible two different ways.
The

first

involved

timesharing

or

time

slicing.

The

idea

of

multiprogramming was extended to allow for multiple terminals to be


connected to the computer, with each in-use terminal being associated
with one or more jobs on the computer. The operating system is
responsible for switching between the jobs, now often called processes,
in such a way that favored user interaction. If the context-switches
occurred quickly enough, the user had the impression that he or she had
direct access to the computer.

94

Interactive processes are given a higher priority so that when IO is


requested (e.g. a key is pressed), the associated process is quickly given
control of the CPU so that it can process it. This is usually done through
the use of an interrupt that causes the computer to realize that an IO
event has occurred.
It should be mentioned that there are several different types of time
sharing systems. One type is represented by computers like our VAX/VMS
computers and UNIX workstations. In these computers entire processes
are in memory (albeit virtual memory) and the computer switches
between executing code in each of them. In other types of systems, such
as airline reservation systems, a single application may actually do much
of the timesharing between terminals. This way there does not need to be
a different running program associated with each terminal.
Personal Computers
The second way that programmers and users got back at the machine
was the advent of personal computers around 1980. Finally computers
became small enough and inexpensive enough that an individual could
own one, and hence have complete access to it.
Real-Time, Multiprocessor, and Distributed/Networked Systems
A real-time computer is one that execute programs that are guaranteed
to have an upper bound on tasks that they carry out. Usually it is desired
that the upper bound be very small. Examples included guided missile
systems and medical monitoring equipment. The operating system on
real-time computers is severely constrained by the timing requirements.
Dedicated computers are special purpose computers that are used to
perform only one or more tasks. Often these are real-time computers and

95

include applications such as the guided missile mentioned above and the
computer in modern cars that controls the fuel injection system.
A multiprocessor computer is one with more than one CPU. The
category of multiprocessor computers can be divided into the following
sub-categories:
shared memory multiprocessors have multiple CPUs, all with
access to the same memory. Communication between the the
processors is easy to implement, but care must be taken so that
memory accesses are synchronized.
distributed memory multiprocessors also have multiple CPUs, but
each CPU has it's own associated memory. Here, memory access
synchronization is not a problem, but communication between the
processors is often slow and complicated.
Related to multiprocessors are the following:

Networked

systems

consist

of

multiple

computers

that

are

networked together, usually with a common operating system and


shared

resources.

Users,

however,

are

aware

of

the

different

computers that make up the system.


Distributed systems also consist of multiple computers but differ
from

networked

systems

in

that

the

multiple

computers

are

transparent to the user. Often there are redundant resources and a


sharing of the workload among the different computers, but this is all
transparent to the user.
Module VII: Classification of Computer Systems
Digital and Analog Transmission
Data is transmitted from one point to another point by means of electrical signals that may be in
digital and analog form. So one should know the fundamental difference between analog and

96

digital signals. In analog signal the transmission power varies over a continuous range with
respect to sound, light and radio waves. On the other hand a digital signal may assume only
discrete set of values within a given range. Examples are computer and computer related
equipment. Analog signal is measured in Volts and its frequency in Hertz (Hz). A digital signal is
a sequence of voltage represented in binary form. When digital data are to be sent over an analog
form the digital signal must be converted to analog form. So the technique by which a digital
signal is converted to analog form is known as modulation. And the reverse process, that is the
conversion of analog signal to its digital form, is known as demodulation. The device, which
converts digital signal into analog, and the reverse, is known as modem.

Time

Analog Signal

Digital Signal

97

Fig.

MODEMS :They translate data from digital to analog form at the sending end of the
communications path and from analog to digital at the receiving end .Put simply, the object of a
modem is to change the characteristics of a simple sine wave, referred to as a carrier signal. We
know this carrier signal has several properties that can be altered to represent data. It has
amplitude (height); it has frequency (a unit of time); and it has phase (a relative starting point).
Modems are capable of altering one or more of these characteristics to represent data. The job a
modem performs can be divided into two discrete parts or phases at each end of the
communications link. At the sending end, it converts digital bit streams (strings of 0s and
1s) into analog sine waves. This is the encoding process. Another component within
the modem then changes (modulates) the analog signal so the data may be transmitted
simultaneously with other data and voice traffic that has also been modulated. This process is
basically reversed at the receiving end. There, the analog signal is brought back to its basic
level (demodulated), and the analog sine waves are reconverted (decoded) back into
their corresponding bit streams

Digital data as it is encoded, modulated, transmitted, demodulated, and decoded. 2-3

98

TYPES OF COMPUTERS
Now let us discuss the varieties of computers that we see today. Although they belong to the fifth
generation they can be divided into different categories depending upon the size, efficiency,
memory and number of users. Broadly they can be divided it to the following categories.
1. Microcomputer: A microcomputer is a computer with a microprocessor as its central
processing unit. Another general characteristic of these computers is that they occupy
physically small amounts of space when compared to mainframe and minicomputers. Many
microcomputers (when equipped with a keyboard and screen for input and output) are also
personal computers (in the generic sense). Microcomputer is at the lowest end of the
computer range in terms of speed and storage capacity. Its CPU is a microprocessor. The first
microcomputers were built of 8-bit microprocessor chips. The most common application of
personal computers (PC) is in this category. The PC supports a number of input and output
devices. An improvement of 8-bit chip is 16-bit and 32-bit chips. Examples of
microcomputer are IBM PC, PC-AT .

microcomputer

2. MiniComputer: T A minicomputer (colloquially, mini) is a class of multi-user computers


that lies in the middle range of the computing spectrum, in between the largest multi-user
systems (mainframe computers) and the smallest single-user systems (microcomputers or
personal computers). The class at one time formed a distinct group with its own hardware and
operating systems, but the contemporary term for this class of system is midrange computer,
such as the higher-end SPARC, POWER and Itanium -based systems from Sun Microsystems,
IBM and Hewlett-Packard.

99

This is designed to support more than one user at a time. It possesses large storage capacity and
operates at a higher speed. The mini computer is used in multi-user system in which various
users can work at the same time. This type of computer is generally used for processing large
volume of data in an organisation. They are also used as servers in Local Area Networks (LAN).

Fig. minicomputer

3. Mainframes: A mainframe (also known as "big iron") is a high-performance computer


used for large-scale computing purposes that require greater availability and security than a
smaller-scale machine can offer.
And because of the sheer development costs, mainframes are typically manufactured by
large companies such as IBM, Amdahl, Hitachi.

Fig. mainframe
These types of computers are generally 32-bit microprocessors. They operate at very high speed,
have very large storage capacity and can handle the work load of many users. They are generally
used in centralised databases. They are also used as controlling nodes in Wide Area Networks
(WAN). Example of mainframes are DEC, ICL and IBM 3000 series.

100

A mainframe has 1 to 16 CPU's (modern machines more)


Memory ranges from 128 Mb over 8 Gigabyte on line RAM
Its processing power ranges from 80 over 550 Mips
It has often different cabinets for
o

Storage

I/O

RAM

Separate processes (program) for


o

task management

program management

job management

serialization

catalogs

inter address space

communication

Historically, a mainframe is associated with centralized computing opposite from


distributed computing. Meaning all computing takes (physically) place on the mainframe
itself: the processor section.

(3)

101

Mainframe

Year

ENIAC

1942

MarkI

1944

BINAC

1949

Whirlwind

1960

UNIVAC

1952

IBM 701

1953http://www.thocp.net/hardware/ibm_360_family.htm

IBM 360

1963

4. Supercomputer: Supercomputing means "mass computing at ultra high speed."


They are the fastest and most expensive machines. They have high processing speed compared to
other computers. They have also multiprocessing technique. One of the ways in which
supercomputers are built is by interconnecting hundreds of microprocessors. Supercomputers are
mainly being used for whether forecasting, biomedical research, remote sensing, aircraft design
and other areas of science and technology. They are also used to help governments eavesdrop on
anything passing through telephone, data lines, e-mail, or radio waves; and anything that is
written, etc. Examples of supercomputers are CRAY YMP, CRAY2, NEC SX-3, CRAY XMP
and PARAM from India.

102

Laptops are portable computers. Originally, laptops were large, heavy, short battery life beasts.
Nowadays, laptops (also referred to as notebooks) are light, powerful, have good battery life, and
serve as a desktop replacement for many individuals (including myself).

Fig. laptop

A server is a machine developed to allow for file or print serving, application hosting, or some
other task usually involving many simultaneous connections. Common features of servers
include

redundancy, multiple drives, large amounts of memory, multiple

processors.

Fig. server
PDAs
A Personal Digital Assistant (PDA) is a commonplace item in many businesses
and homes. Spurred by the success of Palm Pilots, the PDA industry has had
tremendous growth in the past few years.
A PDA is a device which allows an individual to keep their notes, email, schedule,
small documents, and other information with them at all times. It is a useful device for record
keeping and usually syncs with your computer to allow your contact list and emails to be "in
sync" with each other in your handheld and normal computers.

103

Palm Pilots are the most prevalent PDAs on the market, with a market share of about 30%.
Most PDAs are based on either the Palm operating system or the Microsoft PocketPC operating
system.
Palm Pilots present an interesting challenge to IT staff who are trying to support it.
At one firm I worked at, we went through several different policies in regards to
supporting PDAs. Originally, we would not support any PDA, though if a member of
management were to purchase one, we would support them individually. Eventually, we decided
on a standard and if anyone were to buy the standard PDA we would support it. This allowed us
to designate an expert (which coincidentally happened to be me) on PDAs and be able to develop
support procedures for the specific PDA we would support.

104

Você também pode gostar