0% found this document useful (0 votes)
228 views

Programing Techniques

feqq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
228 views

Programing Techniques

feqq
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 268

CSB004 - Programming Techniques and Practices

CORNELL INFOMATICS PVT LTD 1 PROG TECHNIQUE & PRACTICE


Tool Tips
You will find these Icons in the content. Find below a brief description of each Icon.

Notes
This Icon represents ‘Notes’. Notes consists of additional information about
the topic

Reading Reference
This icon represents ‘Reading Reference’. Reading Reference lists the
books that the students must read for more understanding of the topic

Task
This icon represents ‘Tasks’. Tasks are related to the topic or even a
paragraph.

Caution
This Icon represents ‘Caution’. You are given instructions to be followed in
order to avoid errors or about precautions to be taken etc.

Did You Know?


This Icon represents ‘Did You Know?’ which lists interesting details or
fascinating facts related to the topic.

CORNELL INFOMATICS PVT LTD 2 PROG TECHNIQUE & PRACTICE


1.0 Objective Chapter 1: Programming Environment

At the end of this introductory chapter on programming environment you will be able to:
· Understand the concept of Program and Program development.
· State the Steps in Task Analysis.
· Different methods of expressing the logic for problem solving.
· Solve some basic problems.

1.1 Introduction
Computers are now affecting every sphere of human activity and bringing about many changes in
industry, government, education, manufacturing, scientific research, law, social sciences and
even in arts like music and painting.
The areas of applications of computers are confined only by limitations on human creativity and
imagination. In fact, any task that can be carried out systematically, using a precise step-by-step
method, can be performed by a computer. Therefore it is essential for every educated person
today to know about a computer, its strengths, its weaknesses and its internal structure.
This chapter is an overview to the programming environment and it takes you through an
understanding of the systematic step-by-step approach that is required for programming.

1.2 The Concept of a Program


In order to solve any problem using a computer it is necessary to evolve a detailed and precise
step-by-step method of solution. This Step-by-step method for solving problems is not new or
peculiar to computers. They have been in use for a very long time, and in almost all walks of life.
Thus, a program can be defined as “a series of steps carried out by accepting the inputs from
the user and to process it to achieve a desired output or aim”.
If you see this definition carefully, we can break this in parts to understand the meaning of
definition:
1. A series of steps.
2. Accepting inputs
3. Processing on it
4. To get desired output.
By merely writing a series of instructions is not enough, they should be written in a logical
sequence. There must be some inputs or data, which can be processed and transformed into the
expected output. Even the outcome or result of the operations is known.
In short program writing is a skill and writing programs in a scientific way is what you will be
learning in this subject.
Computer programs are designed according to certain set of well-defined rules, with a view of
solving a problem. In order that the program be developed to solve the problem and be executed
to get the desired result, a number of steps are involved.
They include :
· Formulation of a problem
· Preparation of algorithm
· Preparation of systems and program flowchart
· Writing the program
· Detecting errors
· Preparation of data
· Keying in the data and program
· Compilation of program
· Execution of program
· Documentation.

Various computational steps are involved in problem solving. The procedure of how the
computation is carried out for getting the desired result can be expressed by a sequence of
instructions designed for solving a problem in such a manner that if the same sequence is
executed in the same manner indicated, it would produce the desired output.

1.3 Task Analysis


As the famous saying goes,

“Before solving any problem, first understand it thoroughly”.

That is, before finding a solution for the problem, try to understand:

What is the problem?


What is expected out of the process?

COPYRIGHT CORNELL INFOMATICS PVT LTD 2 PROG TECHNIQUE & PRACTICE


What we are expecting to achieve?

At the end of this session you will be able to:

State steps in Task Analysis.


Use different methods of expressing the logic for problem solving.
Understand Algorithms as a method of problem solving.
Understand Flowcharting as a method of problem solving.
Understand different symbols used in Flowcharting.
Solve some problems (examples).

1.3.1 What is the Task to be performed?


It is very critical to clearly understand and define the task that needs to be performed. Once you
understand what is the Task or work, finding the solutions for that will be much more easier. If the
task itself is not clearly understood, then the solution, which you desire, may land up in generating
a different output. So the entire effort taken for solving the problem will be of no use or a mere
waste. It is very important to first understand the task.
Once it is understood, try to know the details of the task or do the task analysis. Otherwise, you
will be inviting the concept of “GIGO” i.e. Garbage In - Garbage Out.
Thus in order to solve a problem using a computer, it is necessary to evolve a detailed and
precise step-by-step method of analysis of the Task. This is commonly termed as “Task
Analysis”.
Let us understand Task Analysis better using an example:
Recipe for potato bondas:
Ingredients:
Potatoes 250gms.,
Chopped Onions 3 (small),
Finely chopped chilies 5,
Gram flour 100gms.,
Oil for frying,
Water for batter,
Salt 2 teaspoons.
Method:

COPYRIGHT CORNELL INFOMATICS PVT LTD 3 PROG TECHNIQUE & PRACTICE


· Step 1. Boil the potatoes till cooked, peel and mash them until they are soft.
· Step 2. Mix onions, green chilies and salt with the mashed potatoes.
· Step 3. Take little portion of the mixture and make small balls.
· Step 4. Mix gram flour, water and a little salt and beat well till a smooth and creamy batter
is obtained.
· Step 5. Dip the potato balls in the batter. Take out and deep fry in oil on a low fire.
· Step 6. Take out when the balls are fried to a golden brown color.
Result A dozen potato bondas ready to be served hot with tomato sauce.
We have illustrated one simple step-by-step method of solving the above problem. As you can
see from the above illustration, the task of making the potato Bondas is broken up into finite,
clearly defined tasks.

1[1] 2[2]

We will now explain when a step-by-step method can be called an algorithm.

1.4 Algorithm
An algorithm may be defined as a finite sequence of instructions (to solve a problem) which has
the following five basic characteristics:
1. An algorithm begins with instructions to accept inputs. These inputs are processed by
the subsequent instructions in the algorithm.
2. The processing rules specified in the algorithm must be precise, clear and
unambiguous.
3. Each instruction must be sufficiently basic such that it can, in principle, be carried out in
a finite time by a person with paper and pencil.
4. The total time to carry out all the steps in the algorithm must be finite. As algorithms
may contain instructions to repetitively carry out a group of instructions, this
requirement implies that the number of repetitions must be finite.

1[1] Task Analysis: Task analysis is a process required to build a solid software design foundation. Task analysis is also a way to
substantiate all aspects of the requirements of a given software application by rigorously examining the user task flow. Task analysis
also helps software designers to focus on solving the operational problems rather than implementation problems. By collaborating with
all team members, designers using task analysis can consider the design from new perspectives, ultimately making a difference for the
end users. The goal of task analysis is to empower the user beyond the original task requirements.

2[2] Write out a detailed step-by-step tasks for fixing a puncture on a bicycle.

COPYRIGHT CORNELL INFOMATICS PVT LTD 4 PROG TECHNIQUE & PRACTICE


5. An algorithm must produce one or more outputs.
Based on the above definition we see that the recipe example for making the potato bondas does
not qualify as an algorithm as it is not precise. Here in the example we are not specifying the
precise quantities to be used for all the ingredients.

1.5 Problem solving using Computers


In order to solve a problem using a computer the following steps are followed:
1. The given problem is analysed.
2. The solution method is broken down into a sequence of elementary tasks.
3. Based on this task analysis, an algorithm to solve the problem is formulated. The algorithm
should be precise, concise and unambiguous. Based on our discussions we realise that
algorithm formulation is difficult and time-consuming.
4. The algorithm can also be expressed as a precise mathematical expression. An algorithm
expressed using a precise notation is the core or the heart of the computer program. The
techniques of writing these precise notations is called computer programming language.
5. The computer program is fed to the computer.
6. The computer’s processing unit interprets the instructions in the program, executes them
and sends the results to the output unit.
There are various ways of representing an algorithm.
The algorithm can be written in our own English like language too. When a algorithm is written in
one of the available natural languages it becomes an algorithm of that problem in that language. If
the algorithm is written as per the syntax of a computer language then it becomes a program in
that language. If the same is in the diagrammatic form it is known as a flowchart.
We will now consider an example of formulating a computer algorithm and write a computer
program corresponding to the algorithm.
Exercise:
Find the highest marks obtained in an examination and the roll number of the student obtaining
the highest mark. For simplicity it is assumed that only one student obtains the highest marks.
Input
We first decide the format in which the marks would be presented. We assume that each
student’s paper will have a roll number and total marks obtained.
Method
Having decided the data format, we formulate the steps needed in a procedure to pick the highest
marks.
Step 1 Read the first students paper and note down the roll number and the total-marks.

COPYRIGHT CORNELL INFOMATICS PVT LTD 5 PROG TECHNIQUE & PRACTICE


Step 2 Repeat step 3 and 4 until no more papers are left.
Step 3 Read the next students’ paper; compare the marks in this paper with the highest marks
found so far.
Step 4 If the marks read in step 3 is greater than the highest marks noted, then erase that and
replace it by the marks read in step3 and replace the roll-number noted down earlier by
this new roll number. Else do not do anything.
Remark : As soon as all papers have been examined we go to step 5. Until then step 3 and step
4 are repeated.
Step 5 Print the roll number and the maximum marks noted.

Description:
Take a few examination answer sheets. Each of these papers will bear the names of students,
their roll numbers and the marks that they have obtained.e.g. Ganesh, roll number : 2005, marks
obtained : 68; similarly take Umesh, roll number: 2010; marks obtained : 59. Continue in the same
fashion, noting the marks obtained by another student Avi : 56; whose roll number is : 2008. ; and
lastly, Gopal roll number 2004 who has top scored with 72 marks.
This data must be simultaneously and separately entered onto a fresh sheet of paper which will
display the marks obtained by all the students under consideration. This sheet should be held as
the final data.

1.6 Flowcharting
Flowcharting is an important method of representing computer programming steps in a graphical
manner. At the end of this lesson you will be able to:
· Know and state the definition of Flowcharting.
· Define different symbols used to represent different processes.
· Draw flowcharts for different logic.
· Develop small program logic with the help of Flowchart.

COPYRIGHT CORNELL INFOMATICS PVT LTD 6 PROG TECHNIQUE & PRACTICE


In the previous lesson we have seen how algorithms can be used for solving a problem. You have
been introduced to yet another method of logic representation and development of program.
We have seen that, before a computer program can be written, it is necessary to identify all the
logical paths that make up the solution for the task at hand. It is also important to clearly isolate
each and every step that can occur during the course of problem solving. The job is made
effective by a diagrammatic technique called as flowcharting.
Thus we can define a flowchart as the pictorial representation of logical steps indicated with the
purpose of guiding the programmer to prepare the program for a particular task.
As the saying goes " A picture can speak more than words do".
Anybody who refers to flowcharts will be able to understand the logic developed by someone else
very easily. The technique of drawing the flowchart is called flowcharting.
Preparation of flowcharts by the programmer is similar to preparation of a plan (blue print) by an
architect. The purpose of both of them is to get the solution of their tasks.
There are different symbols used to represent different actions or activities. Some of the
commonly used symbols are listed below:

COPYRIGHT CORNELL INFOMATICS PVT LTD 7 PROG TECHNIQUE & PRACTICE


COPYRIGHT CORNELL INFOMATICS PVT LTD 8 PROG TECHNIQUE & PRACTICE
COPYRIGHT CORNELL INFOMATICS PVT LTD 9 PROG TECHNIQUE & PRACTICE
1.7 Summary
In this chapter on programming environment we have looked at the basic concept of a Program. A
program can be defined as “a series of steps carried out by accepting the inputs from the user
and to process it to achieve a desired output or aim”.
We have also seen that in order to solve a problem using a computer, it is necessary to evolve a
detailed and precise step-by-step method of analysis of the Task, commonly termed as “Task
Analysis”.
The heart of any problem solving using a computer involves an algorithm. An algorithm is defined
as a finite sequence of instructions (to solve a problem) which has the following five basic
characteristics:
1. An algorithm begins with instructions to accept inputs.
2. The processing rules specified in the algorithm must be precise, clear and
unambiguous.
3. Each instruction must be sufficiently basic such that it can, in principle, be
carried out in a finite time by a person with paper and pencil.
4. The total time to carry out all the steps in the algorithm must be finite.
5. An algorithm must produce one or more outputs.
We have also seen that in order to solve a problem using a computer certain steps are followed
where the given problem is analysed, the solution method is broken down into a sequence of
elementary tasks, an algorithm is formulated , the computer program is fed to the computer and
the computer’s processing unit interprets the instructions in the program, executes them and
sends the results to the output unit.
We have also looked at Flowcharting which is an important method of representing computer
programming steps in a graphical manner.

COPYRIGHT CORNELL INFOMATICS PVT LTD 10 PROG TECHNIQUE & PRACTICE


1.8 Recapitulation
Fill in the blanks:
a. __________is a series of steps carried out by accepting the inputs from the user and to
process it to achieve a desired output or aim.
b. An ___________ may be defined as a finite sequence of instructions to solve a problem.
c. In order to solve a problem using computer, it is necessary to evolve a detailed and precise
step-by-step method of analysis called ________________.
d. The concept of GIGO means _____________________.
e. ______________ is an important method of representing computer programming steps in a
graphical manner.
f. The two commonly used program design tool are ____________________ &
_________________________.

Short Answer Questions:


1. Explain the concept of Program.
2. Why it is advisable to plan for logic of a program before writing it.
3. Explain Different methods of expressing the logic for problem solving.
4. What is an algorithm? Why it is used. Give Example.
5. What re the characteristics of an algorithm.
6. What is the use of flow charts? Why do we need them?
7. How a flow chart does helps in program development?

Long Answer Questions:


1. Why do we need to solve a problem.. What are4 the steps involved in it. Explain with
example.
2. How do we analyze a task, what are the Steps in Task Analysis? Give example.
3. Discus the function of various flowcharting symbols.
4. Any program is an algorithm but reverse is not true. Discus this statement.
5. What are the various guidelines that should be followed while drawing a flowchart?

COPYRIGHT CORNELL INFOMATICS PVT LTD 11 PROG TECHNIQUE & PRACTICE


Answers:
a. Program
b. Algorithm
c. Computer Programming Language
d. Garbage-In Garbage-Out
e. Flowcharting
f. Algorithm, Flowchart.

COPYRIGHT CORNELL INFOMATICS PVT LTD 12 PROG TECHNIQUE & PRACTICE


Chapter 2: Representation of Data

2.0 Objective
At the end of this unit you will be able to:
· Understand how information is stored on to a computer.
· Different types of Data Representation and number systems.
· Conversion of Numbers between number systems.
· Binary Arithmetic.
· Representation of computer Characters.

2.1 Introduction
In the earlier chapter we have seen that the computer understands the
instructions given to it in a systematic manner, interprets these
instructions and executes these instructions as specified by the computer
program.
In this section we will look at the fundamental representation of Data.
Data is inputted into the computer may be in numerical form or in
alphabet form or even in alphanumeric form. Such numbers and
alphabets need to be recognised by the computer and stored in an
electronic form.
In this section we will define the number systems and will also provide
several examples for you to practice the conversion processes from one
number system to another. We have explained the number systems in
detail in your course on Elements of Information Technology and hence
we will restrict this chapter to more problems to be solved by you.

2.2 Representation of data


Lesson objectives:
At the end of this lesson you will be able to:

COPYRIGHT CORNELL INFOMATICS PVT LTD 13 PROG TECHNIQUE & PRACTICE


— Describe how the data is stored into a computer
— Understand different types of numbering systems.
— Requirements of a numbering system.
— Define the concept of Bits and Bytes.
— State the conversion process of data from decimal to binary.
— State the conversion process of data from decimal fractions to
binary equivalent.
— Understand the process of converting binary data to decimal
equivalent form.
— Solve few conversion examples.

The computer stores and processes two basic types of data i.e.
characters and numbers. The character type data includes alphabets and
some special symbols. For example, name of students in a class,
description of an item in an inventory, are character data.
The numeric data contains numbers and symbols like decimal point,
minus sign, etc.
For example, roll numbers of students in a class, part numbers of an item
in inventory, phone number of persons in a locality is numeric data.
The symbols understood by the people and by the computer are different.
The representation of data in a system, which is understood by people, is
called as external data representation. The data in this form is not directly
usable by the computer. Hence it needs a conversion to a form
understood by the computer. Such a representation, directly usable by
the machine is called as internal data representation.
Internal representation matches the technology used by the computer to
store, access and process the data.

2.3 Types of Number Systems


There are different number systems, which are used to represent numeric
data. Every system is characterised by:
a. Base: Number of distinct symbols in the system.
b. Set of the distinct symbols used in the system, which are
combined to represent numeric data.

COPYRIGHT CORNELL INFOMATICS PVT LTD 14 PROG TECHNIQUE & PRACTICE


Explanation:
There are various number systems. These are characterised by two
parts, a base and a scope. The Base refers to number of elements and
scope represents the different possible values. For example: the decimal
system has a base of 10 and has number from 0 through 9.
Hence if we have a number 35 , this is a decimal number with base 10
and a combination of 3 and 5. This is more explained when we look at the
different types of number systems.

The different number systems are:


1. Binary
Base - 2. The distinct symbols used are 0 and 1.
2. Decimal:
Base - 10. Symbols used are 0 through 9.
3. Octal :
Base - 8. Symbols used are 0 through 7.
4. Hexadecimal:
Base - 16. Symbols used are 0 through 9 and A to F.
Explanation:
We have various number systems such as decimal, binary, octal and
hexadecimal. We have earlier seen that each number has a base and a
scope. Hence we can consider the various number systems accordingly.
We have seen that the decimal system has the base of 10 and every
number is represented as a combination of digits between 0 to 9. The
number also has different weight-ages namely units, tens , hundreds and
so on. Hence given a number 35 , has 5 at units place and 3 at tens
place. ( 30 + 5 = 35).
Similarly we have the Binary system, which has base 2, and the
numbers are 0 and 1.
The Octal system has base of 8 and the numbers are 0 to 7.
Similarly the Hexadecimal system has base of 16 and the numbers from 0
to 9, A,B,C,D,E,F
Any given number can be represented by all of the number systems. We
shall explain the individual representations for a given number later.
As the names suggest, Binary has 2 , Decimal has 10 , Octal has 8 and
hexadecimal has 16 as the respective bases.

COPYRIGHT CORNELL INFOMATICS PVT LTD 15 PROG TECHNIQUE & PRACTICE


3[3]

2.4 Need for Binary System


Data has to be internally stored and represented within a computer in the
digital format. Since the CPU is made of digital electronic devices, the
data has to be in terms of 1's and 0's (1 is represented as a signal level of
5V and 0 as a signal level of 0V).
Hence in order to represent data within the computer , only binary number
system can be used. Any number is represented only in terms of 1's and
0's. An individual 1 or 0 is called a 'bit'. Eight bits form a 'byte'.
Every bit in the binary number is assigned a 'weight'. These weights are
as follows:
……, 24, 23, 22, 21, 20 .
If the binary number contains a decimal point, the weights assigned are:
……, 24, 23, 22, 21, 20 ,2-1, 2-2, 2-3, ……
The decimal number is the number formed by adding the products of the
bit and its corresponding weight.

Conversion from one system to another.

· Binary to Decimal Conversion

Let us look at the conversion from a Binary system to the Decimal


system.
Consider the weight associated with each bit position.
· Multiply each bit with the weight associated.
· Add all of them to get the decimal equivalent.

3[3] Why do have so many types of number systems? Over the years the microprocessors have evolved
from 8 bit processors to 32 bits. This means that the processing speeds have increased and made it
necessary for data representation to take place with corresponding bit sizes

COPYRIGHT CORNELL INFOMATICS PVT LTD 16 PROG TECHNIQUE & PRACTICE


Example :1.
110.010
·
weights = 22, 21, 20 2-1, 2-2, 2-3

so = 4x1 + 2x1+ 1x0 · + 0.5x0 + 0.25x1 + 0.125x0

=4 +2 · +0.25
= 6.25.

Example :2.
Data = 110011
Decimal Number =1 x 25 + 1x24 +0 x 23 + 0x22 + 1x21 + 1x20
= 32 + 16 + 0 + 0 + 2 + 1
= 51

Example :3
Data = 1101.01
Decimal Number = 1x23 +1 x22 + 0x21 + 1x20 . 0x2-1+ 1x 2-2
=8 +4 +0 +1 . 0 +1/4
= 13 . 0.25
= 13.25

4[4]

· Decimal to Binary Conversion


A decimal number is converted to binary using the double dabble method.

4[4]
Write the following in Decimal Form.

W In Fractional number representations the fractional part is multiplied by 2 as opposed to the


5 division for the complete number. Also the MSB is the topmost carry forward number and the LSB
is the lowermost carry forward number. This is continued till the final carry over is 1. Hence
process is opposite to that of the whole number.
Convert the following decimal number to its binary equivalent :
1) 146 2) 420 3) 46.3 4) 54.6 5) 6325
Convert the following binary to it's decimal equivalent:
1. (1110101)2
2. (1000101)2
3. ( 111)2
4. (1010.001 )2
5. (100.01 )2

COPYRIGHT CORNELL INFOMATICS PVT LTD 17 PROG TECHNIQUE & PRACTICE


The decimal number is successively divided by 2 till the quotient becomes
0. The first remainder found is called LSB (Least Significant Bit) and the
last is called MSB (Most Significant Bit). The remainder written from MSB
to LSB gives the binary equivalent.
Example : Decimal Number = 50
To convert this to the binary system, it is divided by 2 continuously until
the remainder is 1.

Therefore Binary equivalent of 50 = 110010


If we have to check this number let us convert it back using what we have
learnt earlier.
10010 = 1x25 +1 x24 + 0x23 +0 x22 + 1x21 + 0x20
= 32 + 16 + 0 + 0 + 2 + 0
= 50

5[5]

2.5 Octal and Hexadecimal Number System


We have looked at the binary and the decimal systems earlier which have
the base of 2 and 10 respectively. Let us now look at the Octal and
Hexadecimal systems which have the base of 8 and 16 respectively.
2.5.1 Octal Number System
Octal number system has a base of 8 and the symbols used are numbers
0 to 7.
To convert a decimal number to octal, the number is successively divided
by 8 till the quotient becomes 0. The first remainder is LSB and last is
MSB. The remainder is written from MSB to LSB.
Example:
Let us look at the decimal number 97 and convert this to Octal.
We have to successively divide the number by 8 till we get a 0 remainder.

COPYRIGHT CORNELL INFOMATICS PVT LTD 18 PROG TECHNIQUE & PRACTICE


Hence 97 divided by 8 gives 12 and remainder 1
12 divided by 8 gives 1 and remainder 4
Remainder 1 is taken as the MSB. 1

6[6]

Therefore, (97)10 = (141)8


If the number has a fractional part, it is successively multiplied by 8 till the
fractional part becomes 0 or the decimal number of digits are obtained.
The carry is written from MSB to LSB.
· Octal to Decimal Conversion
The weights associated with each octal digit are
….. 82, 81, 80, 8-1, 8-2, 8-3,……
The decimal number is obtained as the sum of products of the octal digit
and its corresponding weight.

Let us look at the previous example where we have (97)10 = (141)8


Let us convert this from Octal to Decimal.

Hence we have,
(141)8 = 1 x 82+ 4 x 81 + 1 x 80
= 1 x 64 + 4 x 8 + 1
= 97

6[6] Whenever the remainder is less than the divisor then this is taken as the MSB.

COPYRIGHT CORNELL INFOMATICS PVT LTD 19 PROG TECHNIQUE & PRACTICE


· Binary to Octal Conversion
Let us now look at the conversion from Binary system to Octal system.
The bits in the binary number are grouped into 3 bit starting from the LSB
side. Each group of 3 digits is converted to a digit by using the following
weights, of 20, 21 and 22.

This grouping is called as nibble.

Example : convert 1101110 to Octal.


= 001 101 110
= 1 5 6
= 156
Therefore, (1101110)2 = (156)8

Let us look at the conversion of binary to octal.


We have a number represented as 1101110.
We now have to group the digits in groups of 3 bits starting from the LSB
or the right hand side.
Hence we have 1 101 110.

7[7]

Now each group of 3 digits is converted to a digit by using the following


weights, of 20, 21 and 22 This grouping process is called as nibble.
Hence we have the groups as follows:

7[7] If while doing this we do not get a complete group of 3 digits then we assume the other digits to be 0
on the left hand side.

COPYRIGHT CORNELL INFOMATICS PVT LTD 20 PROG TECHNIQUE & PRACTICE


Description:
Let us look at the conversion of binary to octal.
We have a number represented as 1101110.
We now have to group the digits in groups of 3 bits starting from the LSB
or the right hand side.
Hence we have 1 101 110
Now each group of 3 digits is converted to a digit by using the following
weights, of 20 21 and 22
This grouping process is called as nibble
Hence we have the groups as
= 001 101 110
= 0x22 + 0x21 + 1x20 1x22 + 0x21 + 1x20 1x22 + 1x21 + 0x20
= 0+0+1 4+ 0 +1 4+ 2 +0
= 1 5 6
= 156
Hence the number 1,1,0,1,1,1,0 to the base 2 is represented as 156 to
the base 8

Hence the number 1,1,0,1,1,1,0 to the base 2 is represented as 156 to


the base 8.
· Octal to Binary Conversion
Consider each digit of the octal number. Write its binary equivalent in 3
bits.
Example : (563.213)8 to binary

COPYRIGHT CORNELL INFOMATICS PVT LTD 21 PROG TECHNIQUE & PRACTICE


Octal 5 6 3 . 2 1 3
Binary 101 110 011 010 001 011
Therefore,(563.213)8 = (101110011.010001011)2

Description:
Octal to Binary Conversion. Consider each digits of the Octal number
write its binary equivalent in 3 bits e.g. 563.213 base 8 to binary. Octal
would be 563.213 binary is 101 110 011.010 001 011 therefore 563.213
to the base 8 equals 101110011.010001011 to the base 2. Hexadecimal
number system the hexadecimal number system has a base 16 the
symbols used are 0 to 9 and A to F decimal numbers 0 to 9 are the 0 to 9
in hexadecimal and the decimal numbers 10 to 15 are A B C D E and F in
hexadecimal respectively. The weights assigned to a hexadecimal
number are 163 162 161 160.16-1 16-2 hence the weights are 163 162 161
160 starting from the decimal point and moving to the left and giving the
weights of 16-1 16–2 starting from the decimal points and moving towards
the right.

COPYRIGHT CORNELL INFOMATICS PVT LTD 22 PROG TECHNIQUE & PRACTICE


2.5.2 Hexadecimal Number System
The Hexadecimal system has a base 16. The symbols used are 0-9 and
A-F.
Decimal numbers 0 to 9 are the 0-9 in Hexadecimal and the Decimal
numbers 10 to 15 are A B C D E and F in Hexadecimal respectively.
The weights assigned to a Hexadecimal number are,
…, 163, 162, 161, 160 . 16-1, 16-2,…
Hence the weights are , 163, 162, 161, 160, starting from the decimal point
and moving to the left . and giving the weights of 16-1, 16-2,… starting from
the decimal point and moving towards the right.
A Hexadecimal number is converted to decimal by adding the products of
the hexadecimal symbol and its associated weights.
Let us understand this better with an example as given below:
Example : Convert (1A2.3D)16 to Decimal
Hexadecimal Number = 1 A 2 . 3 D
Weights 162 161 160 16-1 16-2
Decimal equivalent = 1 x 162 + A x 161 + 2 x 160 + 3 x 16-1 + D x 16-2
= 256 + 160 + 2 + 3/16 + 13/256
= 418.238

8[8]

· Decimal to Hexadecimal conversion


We have earlier seen how to convert a given decimal number to a binary
number and an octal number. Similarly we can convert a decimal number
to a hexadecimal number.
The decimal number is successively divided by 16 till the quotient
becomes 0 and the remainder are written in the order MSB - LSB.
The fraction part is successively multiplied by 16 till it becomes 0 or till the
required number of digits are obtained.

8[8]
Convert the following Binary numbers to Octal.
1. 1111
2. 101010
3. 1011
4. 10.001
5. 1.001

COPYRIGHT CORNELL INFOMATICS PVT LTD 23 PROG TECHNIQUE & PRACTICE


Example : Convert (1712.5)10 to Hexadecimal.

· Binary to Hexadecimal conversion


The bits are grouped into 4 bits from the LSB. Each group is converted to
a digit by adding product of the bit and its corresponding weight.

9[9]

Example : Convert ( 1101110.01101)2 to Hexadecimal


= 0110 1110 0110 1000
= 6 13 6 8
= 6C.68
Therefore, ( 1101110.01101)2 = (6C.68)16

9[9] In the Octal we consider a grouping of 3 bits as the octal is 8 which is equal to 23 . Hence we
consider a grouping of 3. Similarly for the hexadecimal the base is 16. i.e. 24 Hence we consider the
grouping of 4.

COPYRIGHT CORNELL INFOMATICS PVT LTD 24 PROG TECHNIQUE & PRACTICE


Description:
We have to consider the conversion of the number (1101110.01101)2 to
Hexadecimal. We group this number into groups of 4 bits starting from the
right hand side to the left hand side we have to take the decimal point as
the start = 0110 1110.0110 1000 we assume the values of 0 to complete
the groups.
We now take each group and multiply each bit with weights of 0,1,2,3.
Hence we have
0110 1110.0110 1000
= 0x23 +1x22+1x21+0x20 1x23 +1x22+1x21+0x20. 0x23
+1x22+1x21+0x20 1x23+0x22+0x21+0x20
=6 13.6 8
As 13 is represented as C in hexadecimal system we have
= 6C.68
Therefore, (1101110.01101)2 = (6C.68)16
· Hexadecimal to Binary Conversion
We now look at the conversion from Hexadecimal to Binary.
Consider each digit/symbol of the hexadecimal number. We have to write
the binary equivalent using 4 bits.

Example : Convert ( 4A.1F)16 to Binary


Hexadecimal 4 A 1 F
Binary 0100 1010 0001 1111
Therefore, ( 4A.1F)16 = (01001010.00011111)2

COPYRIGHT CORNELL INFOMATICS PVT LTD 25 PROG TECHNIQUE & PRACTICE


Description:
We now look at the conversion from Hexadecimal to Binary.
Consider each digit of the hexadecimal number. We have to write the
binary equivalent using 4 bits.
Let us Convert (4A.1F)16 to Binary
This number is written as Hexadecimal
4 A . 1 F
We now have to represent each hexadecimal number as a binary
considering a group of 4.
Now 4 can be written as 0x 23 +1x22 + 0 x 21 + 0 x 20
= 0+4+0+0=4
We know that A is 10.
Similarly we can write A as 1x 23 +0x22 + 1 x 21 + 0 x 20
= 8+0+2+0 = 10
Similarly we can write 1 as 0x 2 +0x2 + 0 x 2 + 1 x 20
3 2 1

= 0+0+0+1 =1
We know that F is 15
Similarly we can write F as 1x 23 +1x22 + 1 x 21 + 1 x 20
= 8+4+2+1 = 15
This gives us the binary representation as 0100 1010 0001 1111
Therefore, ( 4A.1F)16 = (01001010.00011111)2

2.6 Binary Arithmetic


It deals with all the operations with binary numbers. Just as with decimal
numbers, addition, subtraction, multiplication, and division is possible with
binary numbers. Here we consider all operations with unsigned numbers
only.
2.6.1 Binary Addition
The law of binary addition are as follows:

A B Sum Carry
0 + 0 = 0 0
1 + 0 = 1 0
0 + 1 = 1 0
1 + 1 = 0 1

COPYRIGHT CORNELL INFOMATICS PVT LTD 26 PROG TECHNIQUE & PRACTICE


Example :
Carry 1 1 1 1
1 0 1 1 . 1 0 1
+ 1 1 0 1 . 1 0 0

1 1 0 0 1 . 0 0 1

Description:
Let us add 2 numbers represented as 1011.101 and 1101.100.
This is written as 1 0 1 1 . 1 0 1
+ 1 1 0 1 . 1 0 0
Starting from the right hand side we have 1 + 0 = 1; 0 + 0 = 0; 1 + 1 = 0
carry 1;
Carry 1 plus 1 is 0 carry 1 and 0 plus 1 is 1. Hence this gives 1 with a
carry 1.
Now
Now carry 1 plus 1 is 0 carry 1, 0 + 0 is 0.
Now
Now carry 1 plus 0 is 1 , and 1 + 1 is 0 carry 1
Carry 1 plus 1 is 0 carry 1, 0 plus 1 is 1. Hence this is written as 1 carry 1.
Now the carry number 1 is taken below and the entire value is written as
11001.001.

2.6.2 Binary Subtraction


The law of binary subtraction is as follows:

COPYRIGHT CORNELL INFOMATICS PVT LTD 27 PROG TECHNIQUE & PRACTICE


A B Difference Borrow
0 - 0 = 0
1 - 0 = 1
0 - 1 = 1 1
1 - 1 = 0
Consider 0 - 1 here we consider borrowing 1 from the next place. So we
have 1, 0 - 1 = 1 because 1, 0 is 2 and 2- 1 = 1.
Therefore 0 - 1 = 1 with borrow 1
An easy way to get the subtraction of binary numbers is the method of
two's complement.
Consider two numbers A and B and we have to get A- B.
Find 2's complement of B add it to A. If carry is 1, neglect it and we get
the required subtraction. Here A > B.
However if A < B then the answer is not the actual subtraction but it's 2's
complement and no carry will be generated.

Example:
Let A = 1 0 1 1 0
Let B = 1 1 1 1

First we have to get the two's complement of B.


Two's complement of a number is obtained by taking its one's
complement and adding 1 to it. One's complement of a number is
obtained by replacing 1 by 0 and vice versa.

Here B = 01111.
Thus its One's complement is 10000.
Two's complement of B is 10000 + 1 = 10001.
Now add two's complement of B to A.
1 0 1 1 0 + 10 0 0 1 = 10 0 1 1 1

COPYRIGHT CORNELL INFOMATICS PVT LTD 28 PROG TECHNIQUE & PRACTICE


We neglect the carry and we get 0 0 1 1 1 which is 7.
2.6.3 Binary Multiplication
The laws of Binary multiplication are as follows:

A B Product
0 X 0 = 0
1 X 0 = 0
0 X 1 = 0
1 X 1 = 1

Example :

COPYRIGHT CORNELL INFOMATICS PVT LTD 29 PROG TECHNIQUE & PRACTICE


Description:
Let us look at the multiplication of numbers A and B
A is 1 1 and B is 1 0 .
As A is 1 1 this is the value 3 in decimal and B is value 2 in decimal. The
products of this is 3x2 = 6.
Let us write down the binary numbers for multiplication as above
Therefore we multiply 0 into 1 = 0 and 0 into 1 equal 0.
Now taking the next value 1 we have to move to the next position in
simply arithmetic multiplication. Hence 1 into 1 is 1 and 1 into 1 is 1. We
now have to add these to get the final product. Hence 0 plus nil is 0 , 0
plus 1 is 1 and nil plus 1 is 1. Thus we have the final product as 1 1 0.
We notice that the decimal conversion of this is 6.

2.6.4 Binary Division


The law of binary division are as follows:
A B Division
0 / 0 = not allowed
1 / 0 = not allowed
0 / 1 = 0
1 / 1 = 1
Example :
We have 2 numbers A and B as A is 1100 and B is 100. We have to
divide A by B. Refer to the problem below:

COPYRIGHT CORNELL INFOMATICS PVT LTD 30 PROG TECHNIQUE & PRACTICE


Description:
Example :
We have 2 numbers A and B as A is 1100 and B is 100. We have to
divide a by B. As shown above
Divide the number 1100 by 100 giving 1 . This is then minused from 1100.
we get 0100 as the quotient. Now this is further divided by 100, giving 1
again.
This is further minused getting 0000. Hence we can say that 1100 is
divided by 100 equals 11.
Now 1100 is 12 in decimal and 100 is 4 in decimal. This division gives us
11 which is 3 in decimal.

2.7 Representation of Characters


In the above section we saw how to represent numeric data. However, we
also need to represent other types of data like alphabets (both capital and
small), digits and special characters like *, ?, %, ; etc.
There are two coding system developed for representing characters.
These are
· EBCDIC Codes
· ASCII Codes.

2.7.1 The EBCDIC CODE


This is a 8 bit code which can code up to 256 characters. The first 4
bits are zone bits and the remaining 4 represent digit values.
This code includes:
1. All 128 ASCII Codes
2. Additional foreign language, technical and graphical characters.
It is mainly used on IBM mainframe computers.

2.7.2 The ASCII Code


This is used extensively in small or personal computers and also for
computer-to-computer communication. It is a 7 bit code which can code
upto 128 characters including alphabets, digits, symbols and control
characters.
The representation is as follows:

COPYRIGHT CORNELL INFOMATICS PVT LTD 31 PROG TECHNIQUE & PRACTICE


The last position or the 8th position is for the parity bit. This can also code
a maximum of 128 characters which is 27 . This means that each position
can have a zero or a 1, hence we have a total of 128 characters which
can be represented in this fashion. The binary representations for some
of these characters is given in the table below.
The complete ASCII code set is given below :

LSB Most significant bits b6, b5, b4


Code b3 (MSB)
b2 b1 b0
000 001 010 011 100 101 110 111
0000 NUL DLE SPACE 0 @ P p
0001 SOH DC1 ! 1 A Q a q
0010 STX DC2 " 2 B R b r
0011 ETX DC3 # 3 C S c s
0100 EOT DC4 $ 4 D T d t
0101 ENQ NAK % 5 E U e u
0110 ACK SYN & 6 F V f v
0111 BEL ETB ' 7 G W g w
1000 BS CAN ( 8 H X h x
1001 HT EM ) 9 I Y i y
1010 LF SUB * : J Z j z
1011 VT ESC + ; K I k {
1100 FF FS , < L \ l |
1101 CR GS - = M ] m }
1110 SO RS . > N ^ n ~
1111 SI US / ? O - o DEL

COPYRIGHT CORNELL INFOMATICS PVT LTD 32 PROG TECHNIQUE & PRACTICE


Description:
Let us look how characters are represented in ASCII code.
Consider the Name “UMESH”. This consists of the characters U- M- E- S-
H
From the table we can now represent these characters . We know that
every character is written as a combination of MSB and LSB.
Hence U is represented as 101 as MSB and 0101 as LSB. .There fore
U is 101 0101
Similarly M is represented as 100 as MSB and 1101 as LSB. .There fore
M is 100 1101
In the same fashion we can see that
E is 100 0101
S is 101 0011
H IS 100 1000
In this fashion several characters are represented as a combination of 0
and 1 as given by the ASCII code table.

10[10]

2.8 Summary

In this chapter we have looked at the various number systems present


namely the decimal, binary, octal and hexadecimal systems.
We have learnt to represent data according to these systems as well as
conversions between each of these systems.
We have also studied the ASCII code tables and learnt to represent
characters with reference to these tables.
This representation of numbers and characters within the computer
system is the back bone for understanding the internal workings of the
computer and forms the foundation for better understanding of
programming.

10[10]
From the above ASCII codes table represent your name in ASCII code.

COPYRIGHT CORNELL INFOMATICS PVT LTD 33 PROG TECHNIQUE & PRACTICE


1.9 Recapitulation
Fill in the blanks:
1. In Binary 1 + 1 = ________
2. In Binary 1 + 0 = ________
3. In Binary 0 + 1 = ________
4. In Binary 0 + 0 = ________
5. In Binary 1 - 1 = ________
6. In Binary 1 - 0 = ________
7. In Binary 0 - 1 = ________
8. In Binary 0 - 0 = ________
9. In Binary 1 * 1 = ________
10. In Binary 1 * 0 = ________
11. In Binary 0 * 1 = ________
12. In Binary 0 * 0 = ________
13. In Binary 1 / 1 = ________
14. In Binary 1 / 0 = ________
15. In Binary 0 / 1 = ________
16. In Binary 0 / 0 = ________
17. EBCDIC stands for _____________________________
18. ASCII Stands for _____________________________
19. In EBCDIC the first 4 bits are _________ and the remaining 4
represent numbers.
20. _____________ is a 7 bit code which can code upto 128
characters including alphabets, digits, symbols and control
characters.

Short Answer Questions:


1. Define the term “byte”. What is the basic difference between a bit
& byte
2. Write the 5 bit BCD code for following decimal numbers.
a) a) 34 b) 45

COPYRIGHT CORNELL INFOMATICS PVT LTD 34 PROG TECHNIQUE & PRACTICE


b) c) 1024 d) 76
3. Why BCD Code was extended to EBCDIC?
4. How many different characters are possible in following encoding
schemes?
a) ASCII-7
b) ASCII-9
c) BCD
d) EBCDIC
5. Why are octal & hexadecimal shortcut notations used. Write
shortcut notations BCD & EBCDIC codes.
6. Convert the following binary numbers to decimal numbers
a) 10101 b) 011110
c) 1100110 d) 010101111.

Long Answer Questions:


1. What do you mean by a number system. What are the different
types of number systems. Explain with example.
2. Which number system is used by the computer system Explain
how it works. Why do we need it.
3. Explain using example the process of converting a binary to
decimal & vice-versa.
4. What are computer codes & why do we need them. What
different Computer codes are available. Explain each of them in
detail.
5. What are the Octal & Hexadecimal number systems & where they
are used. Explain using example the process of converting a
Hexadecimal to octal & vice-versa.

COPYRIGHT CORNELL INFOMATICS PVT LTD 35 PROG TECHNIQUE & PRACTICE


Answers:
1. 0 with carry 1
2. 1
3. 1
4. 0
5. 0
6. 1
7. 1 with borrow 1
8. 0
9. 0
10. 0
11. 0
12. 0
13. 1
14. Not allowed
15. 0
16. Not allowed
17. Extended Binary coded Decimal Interchange Code
18. American Standard Code for Information Interchange.
19. Zone bits
20. ASCII.

COPYRIGHT CORNELL INFOMATICS PVT LTD 36 PROG TECHNIQUE & PRACTICE


Chapter 3: Programming Language

3.0 Objective
At the end of this lesson you will be able to know:
· Different programming languages.
· How Instructions are written in each Programming Language.

3.1 Introduction
Languages are media, which are basically meant for communication. The
natural languages, which we speak, can effectively communicate the
ideas, feelings and facts. In this case the grammar of language although
well defined is not strict, in the sense many a time we can communicate
our ideas even with the incorrect use of grammar. The vocabulary of the
language in this case is unlimited. On the other hand computer languages
are the one, which are used for communicating only the facts with the
computer. There is no scope for communicating a feeling. The grammar
(syntax) of the computer language is very much rigid and the vocabulary
(semantics) is limited. In this section you will be introduced to the various
types of computer languages and their purpose.

Figure 3.1 Different Programming Languages.

Computer although can execute instructions in only machine code the


communication can be primarily done in a language which can be either

COPYRIGHT CORNELL INFOMATICS PVT LTD 37 PROG TECHNIQUE & PRACTICE


in machine readable form or in human readable form. Accordingly
computer languages can be classified into following categories:

Figure 3.2 Classification of Programming Languages

3.2 Classification of Programming Languages


Programming Language Generations
There are commonly considered to be four generations of programming
languages:

· First Generation, also known as "Machine Language''


· Second Generation, also known as "Assembly Language''
· Third Generation, also referred to as "3GL'' and "High Level
Language''
· Fourth Generation, also referred to as "4GL''

3.2.1 Machine Language


The Machine languages uses the strings of 0's and 1's (binary digits)
which is not understood very easily by us. The instructions in machine
language have the format as indicated below.

Operation Code Operand

A machine language program can be described as a set of instructions,


which are prepared in conjunction with the computer design. Therefore,
every computer has its own machine language, which is the only
language that it understands. Hence it is not convenient to write the
programs in machine language because they are highly machine
dependent. However the use of the machine language is in existence
ever since the production of the first digital computer (ENIAC).
Programming in machine language has a distinct advantage of being
used for developing the operating systems and certain other types of

COPYRIGHT CORNELL INFOMATICS PVT LTD 38 PROG TECHNIQUE & PRACTICE


system (secret) software. Also that machine language programs can be
directly executed to give results.

3.2.2 Assembly Language


This language stands in between machine and high-level language
incorporating the features of both. The instructions in assembly language
have three parts although not all of them need occur compulsorily in a
given instruction.
The format of the assembly language instruction is as follows:

Label Operation Code Operand

Clearly the instructions in assembly language are identical to the machine


language instructions except that the instructions in the former case
contain a label in addition to operation code and operand. Here, the
labels are pragmatically defined symbols and the operation codes are
replaced by mnemonics such as DCA, HLT etc. Operands are in symbolic
forms, which are supplied by the programmer. Assembly language came
into existence with the production of second generation computers.
In order to execute an assembly program on a computer, it should first be
translated to its equivalent machine language program. This is necessary
because the computers circuitry is designed to execute only the operation
codes of the machine. The mnemonic operation codes should be
converted to absolute numeric operation codes. The symbolic addresses
of operands used in assembly language should also be converted to
absolute numeric addresses.
The translator which does this is known as an assembler.

Figure 3.3 Depicting an assembler


Explanation
The input to an assembler is the assembly language program and is
known as the source program. Its output is the equivalent machine

COPYRIGHT CORNELL INFOMATICS PVT LTD 39 PROG TECHNIQUE & PRACTICE


language program and is known as the object program. The assembler is
a system program which is supplied by the computer manufacturer. It is
written by system programmers with great care.

The input to an assembler is the assembly language program and is


known as the source program. Its output is the equivalent machine
language program and is known as the object program. The assembler is
a system program which is supplied by the computer manufacturer. It is
written by system programmers with great care.
Before a machine language program can be executed it must be stored in
the memory of the computer. The program itself may be stored in a floppy
disk. This program is to be read into memory by another program called a
loader which is already stored in the memory. The loader or initial
program (IPL) is automatically stored in the memory by the hardware of
the computer when computer is switched on. (After bootstrap process).
The progression of storing various programs in main memory is illustrated
below:

COPYRIGHT CORNELL INFOMATICS PVT LTD 40 PROG TECHNIQUE & PRACTICE


COPYRIGHT CORNELL INFOMATICS PVT LTD 41 PROG TECHNIQUE & PRACTICE
Figure 3.4 Illustrating memory allocation for loader and assembler.
Description
In the above figure we have the representation of the memory.
· To start with let us assume that the memory is empty. This is
when the computer is put on.
· Once the computer is put on, the Initial program loader is loaded
onto the memory. Let us assume that this occupies X amount of
space in the memory. The IPL looks for the available space within the
RAM.
· Once the system is completely on and the space is available, then
the Full Loader program starts getting loaded. Let us assume this to
be L. and the memory is full loaded with X + L.
· Once this is done, the Assembler starts loading onto the memory.
Let us assume this to be A. Hence level (X+L+A) is reached.
· Now the User program is loaded. And the system is ready for
execution.
Some space is left for Data storage

The assembler is a machine language program. Since machine language


program are difficult to write, it would be preferable to keep them small.

COPYRIGHT CORNELL INFOMATICS PVT LTD 42 PROG TECHNIQUE & PRACTICE


One method of doing it would be to define an assembly language with
minimal features and write an assembler for this language. A higher level
assembly language may then be defined. A program written in this higher
level assembly language may be translated by a program written in the
rudimentary assembly language for which a translator already exits. This
is very powerful method and is called bootstrap method.

11[11]

3.2.3 High-Level Language


Contrary to the machine language and assembly language programs,
high level programs resemble very much in structure to English language.
A single instruction in high level language can correspond to several
instructions in machine language. Since the programs written in high level
languages are in human readable form they require to be translated into
machine codes so that computer can recognise them. For this reason
they are sometimes called as compiler languages. They are also known
as procedure oriented languages.

Advantages of High-Level Languages


The advantages of using High-level languages are listed here:

· Since the terminology in high-level language is almost English


like, they can be easily learned and understood by a beginner.
· They are relatively more standardised (machine independent) and
therefore the programs written in these languages require little
modification for being executed on any computer.
· They provide better documentation and require less time for
preparation.
· They are mostly general-purpose languages.
· Correcting and maintaining programs is easier.

11[11] Click on the link below to learn a little more on Programming Languages
http://www.cs.adfa.oz.au/teaching/studinfo/itf/lect200015.html

COPYRIGHT CORNELL INFOMATICS PVT LTD 43 PROG TECHNIQUE & PRACTICE


However the only major disadvantage is that it requires interpretation
(translation) into machine language. The example of high level languages
are: BASIC, COBOL, FORTRAN, ALGOL, Pascal etc.
BASIC : Beginners All-purpose Symbolic Instruction Code.
COBOL : Common Business Oriented Language.
FORTRAN : FORmula TRANslation.

Figure 3.5 Illustrating terminology used in High-level language


translation

There are two approaches to writing language translators. One method is


to take one statement of a high level language at a time and translate it
into a machine instruction which is immediately executed. This is called
an interpreter. The interpreters are easy to write and they do not require
large memory space in the computer. The main disadvantage of
interpreters is that they require more time to execute on a computer.
The other approach to translation is to store the high level language
program, scan it and translate the whole program into an equivalent
machine language program. Such a translator is known as a Compiler. A
compiler is a complex program compared to an interpreter. It takes more
time to compile than to interpreter. However, a compiled machine
language program runs much faster than an interpreted program.

12[12]

3.3 Compiling High Level Language Program

Find out more information about BASIC, COBOL, Pascal and Fortran languages with reference
12[12] to program structure, purpose/applications, advantages and disadvantages.

COPYRIGHT CORNELL INFOMATICS PVT LTD 44 PROG TECHNIQUE & PRACTICE


Broadly the compilation process consists of two steps. The first step is the
analysis of the source program and the second is the synthesis of the
object program in the machine language of the specified machine. The
analysis step uses the precise description of the source programming
language. A source language is described using Lexical rules, Syntax
rules, and Semantic rules.

Figure 3.6 Block Diagram of a language processor

Lexical rules specify the valid syntactic elements or words of the


language. Syntax rule specify how the valid syntactic elements are
combined to form statements of the language. Semantic rules assign
meaning to valid statement of the language.

COPYRIGHT CORNELL INFOMATICS PVT LTD 45 PROG TECHNIQUE & PRACTICE


Figure 3.7 Steps in translation of high level language to machine
language

The Steps used in the process of translating a high level language source
program to executable code is given in Fig. above. The first block is
lexical analyser (or Scanner). It reads successive lines of a program and
breaks them into individual lexical items, namely identifier, operator,
delimiter etc. and attaches a type tag to each of these. Besides this it
constructs a symbol table for each identifier and finds the internal
representation of each constant. The symbol table is used later to allocate
memory to each variable.
The second stage of translation is called syntax analysis or parsing. In
this phase expressions, statements, declarations etc., are identified by
using the results of lexical analysis. Syntax analysis is aided by using
techniques based on formal grammar of the programming language.
In the semantic analysis phase the syntactic units recognised by the
syntax analyser are processed. An intermediate representation of the final
machine language code is produced. This phase bridges the analysis and
synthesis phase of translation.
The last phase of translation is code generation. A number of optimisation
processes to reduce the length of machine language program are carried
out during this phase. The output of the code generator is the machine
language program of the specified computer.
If subroutines are separately compiled the addresses of the resulting
machine language instruction will not be their final address when all the
routines are placed together in main memory. The linker's job is to find
the correct location of the final executable program. The loader will then
place them in the memory at their right addresses.

COPYRIGHT CORNELL INFOMATICS PVT LTD 46 PROG TECHNIQUE & PRACTICE


3.4 Summary
The set of programs which provides the environment to write application
programs is known as the system software of the computer. A program
written using the binary codes specified for the processors operations and
absolute binary memory addresses is known as the machine language of
the computer. An assembly language has a one-to-one correspondence
with the machine language of a computer and is thus machine
dependent. High level languages were developed to allow application
programs to be run on a variety of computers. These languages are
machine independent and procedure oriented. A program written in High
level Language is converted to a machine language program by a
translator program. Translators are of two types: interpreter and compiler.
An interpreter translates a program, one statement at a time, and
immediately executes it. A compiler on the other hand translates the
entire program into the lower level language and then executes it.
C is now a popular language. It is similar to Pascal but is more concise
and efficient. It allows extensive use of pointers and has instructions for
bit manipulation.
Object-Oriented programming (OOPs) is becoming popular as it allows
reuse of old code and program generalisation. C++ is an object oriented
language. The emergence of large computer networks gave an impetus
to develop languages which can be "imported" from different machines
new applications can be developed using these. JAVA is an object
oriented language which has been designed to enable easy application
development using a network of computers.

COPYRIGHT CORNELL INFOMATICS PVT LTD 47 PROG TECHNIQUE & PRACTICE


3.5 Recapitulation
Evaluate
1. The ________________________ languages uses the strings of
0's and 1's which is not understood very easily by us.
2. _______________ language stands in between machine and
high-level language incorporating the features of both.
3. In order to execute an assembly program on a computer, it should
first be translated to its equivalent ____________ language program.
4. The input to an assembler is the assembly language program and
is known as the _______________ .
5. Assembly languages output is the equivalent machine language
program and is known as the ___________ .
6. The _____________ is automatically stored in the memory by the
hardware of the computer when computer is switched on.
7. Contrary to the machine language and assembly language
programs, _______________ programs resemble very much in
structure to English language.
8. The _______________ are easy to write and they do not require
large memory space in the computer.
9. A compiled machine language program runs much faster than
______________ .
10. _______________ rules specify the valid syntactic elements or
words of the language. Syntax rule specify how the valid syntactic
elements are combined to form statements of the language.

Multiple Choice Questions:


1. Which of the following is not a high level language?
a) FORTRAN b) Pascal
c) Assembly d) C++

2. Which of the following is used for converting a assembly language


program into binary form.
a) Complier b) Interpreter
c) Linker d) Assembler

COPYRIGHT CORNELL INFOMATICS PVT LTD 48 PROG TECHNIQUE & PRACTICE


3. Which of the following is a scripting language.
a) c b) Pascal
c) JavaScript d) C++

4. Which of following is usually used for developing system


software?
a) Visual Basic b) FORTRAN
c) COBOL d) c

5. Pascal Language belongs to which of the following generations.


a) First b) Second
c) Third d) Fourth

Short Answer Questions:

1. What do you mean by an assembler? Why it is needed.


2. What do you mean by a high-level language? Name a few high
level languages.
3. How the instructions are represented in machine language.
4. Draw & explain block diagram of a language processor.
5. What are the advantages of high-level languages?
6. What is the difference between source & object program?
7. Discus the analogy between natural languages & computer
languages.

Long Answer Questions:


6. Explain different generations of computer languages.

COPYRIGHT CORNELL INFOMATICS PVT LTD 49 PROG TECHNIQUE & PRACTICE


7. Explain with the help of diagram the process of memory allocation
for loader & Assembler.
8. Explain with the help of diagram the process of compiling a
program in a high level language.
9. What are the advantages & imitations of assembly & machine
languages?
10. What are the different programming languages? What are the
different types of applications for which they are used. Give
suitable examples.

COPYRIGHT CORNELL INFOMATICS PVT LTD 50 PROG TECHNIQUE & PRACTICE


Answers
1. Machine
2. Assembly
3. machine
4. source program
5. Object program
6. loader or initial program (IPL)
7. high level
8. interpreters
9. an interpreted program
10. Lexical

COPYRIGHT CORNELL INFOMATICS PVT LTD 51 PROG TECHNIQUE & PRACTICE


Chapter 4: Structured Programming

4.0 Objective
At the end of this chapter you will able to:
· Know the structured programming
· Essentials of structured programming
· Advantages of writing structured programs
· Qualities of a program
· Know how to Debug a Program?

4.1 Introduction
A computer program is said to be structured, if it has a modular design
and uses only the three types of logical structures, sequences, decisions
and loops.
· Sequences: Statements are executed one after another.
· Decisions: One of two blocks of program code is executed based
on a test for some condition.
· Loops (Iteration): One or more statements are executed
repeatedly as long as a specified condition is true.
One major shortcoming of earlier programming languages was their
reliance on the GoTo statement. This statement was used to branch (that
is jump) from one line of the program to another. It was common for a
program to be composed on a convoluted tangle of branching that
produced confusing code sometimes referred to as spaghetti code.
The logic of a structured program can be pictured using a flowchart that
flows smoothly from the top to the bottom without unstructured branching
(GoTos). Here is an example of a flowchart showing the structure with
and without the GoTo statement:
Many programming text teach the instruction formats and coding rules
necessary for writing programs without ever fully explaining the way
programs should be designed.

COPYRIGHT CORNELL INFOMATICS PVT LTD 52 PROG TECHNIQUE & PRACTICE


· Program logic should be mapped using a planning tool:
If programs are systematically planned before they are coded, they
will be better designed. Planning tools such as flowchart, pseudo
code, and hierarchy charts helps programmer map art program logic.

· Program should be structured:


Well-designed structured programs are those that have a series of
logical constructs, where the order in which instructions are executed
is standardised. In structured programs, each set of instructions that
performs specific function is represented as a module or program
segment.

Figure 4.1 Flowchart with and without GOTO Statement

4.2 Advantages of Structured Programming


The goal of structured programming is to create correct programs that are
easy to write, understand and change.

1. Easy to write

COPYRIGHT CORNELL INFOMATICS PVT LTD 53 PROG TECHNIQUE & PRACTICE


Modular design increases the programmer's productivity by allowing
them to look at the big picture first and focus on details later. Several
Programmers can work on a single, large program, each working on a
different module Studies show structured programs take less time to
write than standard programs. Procedures written for one program
can be reused in other programs requiring the same task. A
procedure that can be used in many programs is said to be reusable.

2. Easy to debug
Since each procedure is specialised to perform just one task, a
procedure can be checked individually. Older unstructured programs
consist of a sequence of instructions that are not grouped for specific
tasks. The logic of such programs is cluttered with details and
therefore difficult to follow.

3. Easy to Understand
The relationship between the procedures shows the modular design
of the program. Meaningful procedure names and clear
documentation identify the task performed by each
module/Meaningful variable names help the programmer identify the
purpose of each variable.

4. Easy to Change
Since a correctly written structured program is self-documenting, it
can be easily understood by another programmer.

A module can also be called as a routine or a function.

COPYRIGHT CORNELL INFOMATICS PVT LTD 54 PROG TECHNIQUE & PRACTICE


Figure 4.2 Concept of calling and called Module

Example:
When you visit your friends place, you enter his house from main-door.
Then you inquire where he is and accordingly approach to that room
where he is sitting. Similarly, during program execution different modules
or routines are called as and when they are required.
According to Tom Harbron, the Fundamental Principle of Structured
Programming is that at all times and under all circumstances, the
programmer must keep the program within his intellectual grasp. The
well-known methods for achieving this can be briefly summarised as
follows:
1) Top-down design and construction,
2) Limited control structures, and
3) Limited scope of data structures
The bald truth is that natural language is ill-suited for writing
specifications. As a corollary to this theorem, the most concise and
intellectually manageable form for the specification of an algorithm is the
algorithm itself.
A study of program structure has revealed that programs can differ
tremendously in their intellectual manageability. A number of rules have
been discovered, violations of which will either seriously impair or totally
destroy the intellectual manageability of the program.... I now suggest that
we confine ourselves to the design and implementation of intellectually
manageable programs. - E. Dijkstra

COPYRIGHT CORNELL INFOMATICS PVT LTD 55 PROG TECHNIQUE & PRACTICE


13[13]

Hierarchical systems seem to have a property that something considered


as an undivided entity on one level is considered as a composite object
on the next lowest level of greater detail: as a result, the natural grain of
space or time that is applicable at each level decreases by an order of
magnitude when we shift our attention from one level to the next lower
level. We understand walls in terms of bricks, bricks in terms of crystals,
crystals in terms of molecules, etc. - E. Dijkstra
Reusable Software: The good programmer writes software that can be
reused, even if he doesn't see a reuse immediately on the horizon. His
experience... assures him that someone from the next hallway,
reasonably soon, will be asking, "Do you have a module that...." He also
knows that writing reusably will force him to define clean interfaces. - D.
Boundy
How to structure data for intelligibility: limit the scope of variables,
explicitly declare all variables, use meaningful data names and use
hierarchical data structures.
The wise programmer does not give two names to one thing nor attribute
two things to one name.
Names are meaningful and specific, and their length is proportional to
their scope. A loop variable used only once in a two-statement loop may
be called "i", but a global variable that may be used anywhere in the
program will have a long name that accurately describes its usage. - D.
Boundy

· Program should use a Top-Down Approach


Well-designed program modules should also be coded in a
hierarchical order, with main modules written first followed by
secondary modules that include the detailed code. The coding of
modules in a hierarchical manner is called "Top-Down Programming
approach". This top-down approach is sometimes called "stepwise
refinement".

13[13]
An unconditional branch or transfer control statement (usually GOTO) in most of the languages
are avoided entirely in a well designed structure program.

COPYRIGHT CORNELL INFOMATICS PVT LTD 56 PROG TECHNIQUE & PRACTICE


· Programs should be modular
Each well defined unit or program segment should be written as a
module and executed by calling that module or subroutine.
Subordinate modules can be written after the main structure or overall
logic has been mapped out.
Example:

Figure 4.3 Modular Structure of different Modules

In brief there are number of advantages of writing programs in


structured manners like-

· The procedure or module can be independently developed


and tested.
· It is easy to alter the program due to its modular structure.
· The program is easy to understand. It can be read from top
to bottom.
· The program is well documented.
· As each module or procedure is small and performs a well-
defined task, the overall system consisting of those
modules is more reliable.

4.3 Qualities of a Perfect Computer Program


A quality assured computer program should posses the following
properties:-
· Completeness:

COPYRIGHT CORNELL INFOMATICS PVT LTD 57 PROG TECHNIQUE & PRACTICE


The program must fully reflect the problem areas. Documentation
must completely describe the algorithm used. Documentation must be
available for each stage of program development.
· Correctness:
A program must produce result that are "correct" in terms of the
algorithm being exercised. A mathematical argument sometimes can
be developed to demonstrate that a program will perform a defined
function. Within the criteria of proof, a program must execute
correctly. Program proof can be either formal or informal.
· Credibility:
The ability of a program to perform as advertised must be established.
Establishing credibility includes verifying that the code correctly
translates the algorithm.
· Appropriateness for intended use:
The extent and content of software documentation is dependent on
the intended used of the software. Documentation requirements may
be minimal for a program written by the person who is its exclusive
user. At the other extreme, documentation must be extensive for
software developed for a general user community with access to a
variety of computers.
· Reliability:
The degree of stability demonstrated by a program over a long period
of time is called the reliability. A reliable program will function properly
for a long time.
· Usability:
Software must be easy to use. This implies conditions for both the
program and its documentation. Input/output must be simple and
straight-forward. The program must be fully documented both
internally and externally.

A systematic approach to program verification must assure that the seven


requisite software properties listed above are met with an acceptable
level of confidence. Primarily emphasis should be placed on the
properties of completeness, correctness, reliability and uniqueness.
An additional problem related to quality assurance is one of portability
and adaptability of software. Portability becomes a major consideration
when a program is moved from one machine and operating system

COPYRIGHT CORNELL INFOMATICS PVT LTD 58 PROG TECHNIQUE & PRACTICE


environment to a different machine or operating system, or both.
Portability concerns arise when an organisation secures a program for
use on a project and wishes to implement code on its own in-house
hardware. Also internal portability problems exist with a change of in-
house hardware or operating systems, or to move to another service
bureau vendor.

There are five aspects of portability that must be addressed:


- The portability of the source language syntax and
semantics;
- The portability of arithmetic operations (i.e. precision);
- The portability of the operating system commands
necessary to invoke information flow within the system;
- The portability of the run-time routines used in an operation
(i.e., the system routines used by an application program);
and
- The portability of the data files that the application program
reads, exercises and updates.
Adaptability must be considered when a program is altered to suit a user's
needs. This problem area is most critical in the adaptation of a computer
code to meet new design requirements, especially new regulatory
requirements.
Quality assurance considerations related to portability and adaptability
can be structured on several levels. In some cases, a full-scale quality
assurance review will be necessary when codes are ported or adapted, or
both. On the other hand, criteria can, and should be established which will
relate the level of supplemental quality assurance review to the extent of
porting or adaptation involved.

4.4 Object-Oriented Development


The Step-by-Step Method helps you create the "right" systems by
uncovering their true needs, but it doesn't ensure that the resulting
systems are reliable and maintainable. "Structured programming" is a
discipline that helps you avoid convoluted logic in your programs, but that
doesn't scale up to large systems. What is needed is a way to treat
software as "components," just the way engineers think of silicon chips as
black boxes whose insides can be largely ignored.

COPYRIGHT CORNELL INFOMATICS PVT LTD 59 PROG TECHNIQUE & PRACTICE


Object-oriented design hides inside modules the details of how a function
is implemented and what data it needs. The programmer need only know
the external interfaces to the module: the definition of what it does. The
implementation of the module can change at any time as long as the
external interfaces remain the same. Object-oriented tools like C++ and
Java make this easier by providing programming constructs to explicitly
define interfaces and hide data (attributes) and functions (methods). The
good news is that object-oriented designs can be implemented in almost
any programming language or system.

4.5 How to Debug a Program


When you have eliminated the impossible, whatever remains, however
improbable, must be the truth. - Sherlock Holmes in "The Sign of the
Four"
The primary difference between a programmer right out of college and
one with five years' experience is the ability to debug programs.
Debugging is still an art, not a science; but there are some techniques
that can help.
Begin finding bugs by reproducing the problem. Start by getting exact
input if you can. Try reproducing the problem in your test environment
with as little data as possible. Ask about all the conditions present when
the problem occurred (for example, other users, batch jobs, etc.)
Parker Brothers produces a popular game called Clue. The objective of
Clue is to deduce the solution to a crime by a process of elimination. With
programs, you can do the same thing by doing numerous, carefully-
selected test runs, each of which changes only one factor. From the
differences in the results, you can often deduce which module the error is
in and even which data structure is involved.
Examine all the evidence. This includes the input data, output data, the
source code, any library routines, and anything else that might help, even
the documentation. Check your premises before you invest too many
hours.
Keep an open mind. If you think you identified the section of the program
that contains the bug, but there appears to be nothing wrong with it, look
somewhere else. Showing the code to another person can highlight the
problems with those pieces of code "that couldn't have a bug". If you have
a really bad bug, leave it overnight. Often, the answer will be sitting there
in the morning.

COPYRIGHT CORNELL INFOMATICS PVT LTD 60 PROG TECHNIQUE & PRACTICE


"LISTEN, KID, HOW MANY
TIMES DO I HAVE TO EXPLAIN
IT TO YOU... BUGS DON'T
BECOME PROGRAMMERS."

Figure 4.4 Debugging


Include code in your subroutines to check the parameters that are passed
into it. Do not assume that the caller, who may simply be yourself on a
bad day, follows the rules or has the latest manual. Include assertions in
your program, even if they are just comments. An assertion is something
that must be true for the next piece of code to work: "when this section is
performed, the variable MCU-CUST-NUMBER must contain the correct
customer number." Monitor the program during execution, checking the
contents of key variables. Can you explain the values they contain?
Use structured programming to write your code. If you work on another
person's code, try to find the assertions. These usually lead the way to
understanding and debugging the code. Rewrite bad code, and write and
test code in small pieces.
Errors are most frequent on boundary conditions. For example, beginning
of file, end of file, empty file, full file, beginning of loop, end of loop, entry
to module, exit from module, value less than limit (instead of less than or
equal), table overflow, or table empty. When verifying code, check that
the boundary conditions are what you expect.

4.6 Programming Tools


Definition: A software tool is a system program which
1. Interfaces a program with the entity generating its
input data, or
2. Interfaces the results of a program with the entity
consuming them.

COPYRIGHT CORNELL INFOMATICS PVT LTD 61 PROG TECHNIQUE & PRACTICE


The entity generating the data or consuming the results may be a
program or a user.

Figure 4.5 Shows a Schematic of a Software Tool

A file rewriting utility organises the data in a file, in a format suitable for
processing by a program. The utility may perform blocking/deblocking of
data padding and truncation of fields and records, sorting of records, etc.
The file rewriting utility is a software tool according to Part I of Definition.

4.6.1 Program Design and Coding


Two categories of tools used in program design and coding are:
1. Program generators
2. Programming environments
As described earlier, a program generator generates a program, which
performs a set of functions described in its specification. Use of a
program generator saves substantial design efforts since a programmer
merely specifies what functions a program should perform rather than
how the functions should be implemented Coding effort is saved since the
program is generated rather than coded by hand. A programming
environment supports program coding by incorporating awareness of the
programming language syntax and semantics in the language editor.

4.6.2 Program Entry Editing


These tools are text editors or more sophisticated programs with text
editors as front ends. The editor functions in two modes. In the command
mode, it accepts user commands specifying the editing function to be

COPYRIGHT CORNELL INFOMATICS PVT LTD 62 PROG TECHNIQUE & PRACTICE


performed. In the data mode, the user keys in the text to be added to the
file. Failure to recognise the current mode of the editor can lead to mix up
of commands and data. This can be avoided in two ways.
In one approach, a quick exit is provided from the data mode, e.g. by
pressing the escape key, such that the editor enters the command mode.
The vieditor of Unix uses this approach. Another popular approach is to
use the screen mode (also called the what-you-see-is-what-you-get
mode), wherein the editor is in the data mode most of the time. The user
is provided special keys to move the cursor on the screen. A stroke of any
other key is taken to imply input of the corresponding character at the
current cursor position. Certain keys pressed along with the control not be
explicitly indicated by user.

4.6.3 Program Testing and Debugging


Important steps in program testing and debugging are selection of test
data for the program, analysis of test results to detect errors (if any), and
debugging, i.e. localisation and removal of errors. Software tools to assist
the programmer in these step come in the following forms:

Test data generators help the user in selecting test data for this program.
Their use helps in ensuring that a program is thoroughly tested.
Automated test drivers help in regression testing, wherein a program’s
correctness is verified by subjecting it to a standard set of tests after
every modification. Regression testing is performed as follows: Many sets
of test data are prepared for a program. These are given as inputs to the
test driver. The driver selects one set of test data at a time and organises
execution of the program on the data.

Figure 4.6 Automated Test Driver

COPYRIGHT CORNELL INFOMATICS PVT LTD 63 PROG TECHNIQUE & PRACTICE


Debug monitors help in obtaining information for localisation of errors.
Source code control systems help to keep track of modification in the
source code.
Test data selection uses the notion of an execution path which is a
sequence of program statements visited during an execution path. A test
data generator determines the conditions which must be satisfied by the
program’s inputs for control to flow along a specific execution path. A test
data is a set of input values which satisfy these conditions.

4.6.4 Producing debug information


Classically, localisation and removal of errors has been aided by special
purpose debug information. Such information can be produced statically
by analysing the source program or dynamically during program
execution. Statistically produced debug information takes the form of
cross reference listings, list of undefined variables and unreachable
statement, etc. All these are useful in determining the cause of a program
malfunction. Techniques of data flow analysis are employed to collect
such information.
Dynamically produced debug information takes the form of value dumps
and execution traces produced during the execution of program. This
information helps to determine the execution path followed during an
execution and the sequence of values assumed by a variable. Most
programming languages provide facilities to produce dynamic debug
information.
A debug monitor is a software which provided debugging support for a
program. The debug monitor executes the program being debugged
under its own control. This provides execution efficiency during
debugging. It also enables the monitor to perform dynamically specified
debugging actions. A debug monitor can be made language independent,
in which case it can handle programs written in many languages. The
dynamic debugging technique (DDT) of DEC — 10 is well a know
example of this approach.

4.6.5 Enhancement of Program Performance


Program efficiency depends on two factors — the efficiency of the
algorithm and the efficiency of its coding. An optimising compiler can
improve efficiency of the code but it cannot improve efficiency of an
algorithm. Only a program designer can improve efficiency of an
algorithm by rewriting it. However, this is a time consuming process

COPYRIGHT CORNELL INFOMATICS PVT LTD 64 PROG TECHNIQUE & PRACTICE


hence some help should be provided to improve its cost-effectiveness.
For example, it is better to focus on only those sections of a program
which consume a considerable amount of execution time. A performance
tuning tool helps in identifying such parts. It is empirically observed that
less than three percent of program code generally accounts for more than
50 percent of program execution time. This observation promises major
economies of effort in improving a program.
A profile monitor is a software tool that collects information regarding the
execution behaviour of a program, e.g. the amount of execution time
consumed by its module, and presents it in the form of an execution
profile. Using this information the programmer can focus attention on the
program sections consuming a significant amount of execution time.

4.6.6 Program Documentation


Most programming projects suffer from lack of up-to-date documentation.
Automatic documentation tools are motivated by the desire to overcome
this deficiency. These tools work on the source program to produce
different forms of documentation, e.g. flow chart, IO specifications
showing files and their records, etc.

4.7 Design of Software Tools

4.7.1 Program preprocessing and instrumentation


Program preprocessing techniques are used to support static analysis of
programs. Tools generating cross reference listings and lists of
unreferenced symbols; test data generators, and documentation aids use
this techniques. Program instrumentation implies insertion of statements
in a program. The instrumentated program is translated using a standard
translator. During execution, the inserted statements perform a set of
desired functions. Profile and debug monitors typically use this technique.
In a profile monitor, an inserted statement updates a counter indicating
the number of times a statement executed, whereas debug monitors an
inserted statement indicates that execution has reached a specific point in
the source program.

COPYRIGHT CORNELL INFOMATICS PVT LTD 65 PROG TECHNIQUE & PRACTICE


Figure 4.7 Software Tools using Interpretation and Program
Generation

4.7.2 Program interpretation and program generation


Figure 4.7 shows the schematic of software tools using the techniques of
interpretation and program generation. Use of interpreters in software
tools is motivated by the same reasons that motivate the use of
interpreters in program development, viz. absence of translation phase in
processing a program. Since most requirements met by software tools
are ad hoc, it is useful to eliminate the translation phase. However,
interpreter based tools is only as portable as the interpreter it uses. A
generated program is more efficient and can be made portable.

4.8 Editors
Test editors come in the following forms:

COPYRIGHT CORNELL INFOMATICS PVT LTD 66 PROG TECHNIQUE & PRACTICE


Figure 4.8 Editor Structure

Text editors
OK, it's probably time to explain what a text editor is, and how it differs
from a word processor. A modern text editor looks a bit like a word
processor. It has the usual apparatus of pull-down menus and/or clickable
icons for functions like opening and saving files, searching and replacing,
checking spelling, and so on. But it has no typesetting functionality. The
text you type appears on screen in a clear visual representation, but with
no pretense at representing the final printed appearance of the document.

4.9 Debug Monitors


4.9.1 Debug monitors facilities
Debug monitor provide the following facilities for dynamic debugging:
· Setting breakpoints in the program
· Initiating a debug conversation when control reaches a breakpoint
· Displaying values of variables- Assigning new values to variables
· Testing user defined assertions and predicates involving program
variables

The debug monitor functions can be easily implemented in an interpreter.


However interpretation incurs considerable execution time penalties.
Debug monitors therefore reply on instrumentation of a compiled program

COPYRIGHT CORNELL INFOMATICS PVT LTD 67 PROG TECHNIQUE & PRACTICE


to implement its functions. To enable the use of a debug monitor, the user
must compile the program under the debug option. The compiler now
inserts the following instructions:
A few no-op instructions of the form
No-op <statement no>

4.9.2 Steps in debugging


The sequence of steps involved in dynamic debugging of a program is as
follows:
1. The user compiles the program under the debug option. The
compiler produces two files — the compiled code file and the
debug information file.
2. The user activates the debug monitor and indicates the name
of the program to be debugged. The debug monitor opens the
compiled code and debug information files for the program.
3. The user specifies his debug requirements — a list of
breakpoints and actions to be performed at breakpoints. The
debug monitor instruments the program, and builds a debug
table containing the pairs (statement number, debug action).
4. The instrumented program gets control and executes up to a
breakpoint.
5. A software interrupt is generated when the <SI_instrn> is
executed. Control now returns to the debug monitor which
consults the debug table and performs the debug actions
specified for the breakpoint. A debug conversation is now
opened during which the user may issue some debug
commands (which are implemented through interpretation) or
modify breakpoints and debug actions associated with
breakpoints. Control now returns to the instrumented program.

Steps 4 and 5 are repeated until the end of the debug session.Unix
supported two debuggers — sdb which is a PL level debugger and adb
which is an assembly language debugger. Debug of IBM PC is an object
code level debugger.

4.10 Testing Assertions

COPYRIGHT CORNELL INFOMATICS PVT LTD 68 PROG TECHNIQUE & PRACTICE


A debug assertion is a relation between the values of program variables.
An assertion can be associated with a program statement. The debug
monitor verifies the assertion when execution reaches that statement.
Program execution continues if the assertion is fulfilled, else a debug
conversation is opened. The user can now perform actions to locate the
cause of the program malfunction. Use of debug assertions eliminates the
need to produce voluminous information for debugging purposes.

4.11 User Interface


A user interface (UI) plays a vital role in simplifying the interaction of a
user with an application. Classically, User Interface functionalities have
two important aspects — issuing of commands and exchange of data. In
early days of computing, a user was often the application designer or
developer. Hence an understanding of commands and data was implicit
in the use of an application. In those days User Interface ’s did not have
an independent identity. This situation changed because of two reasons.
First, as applications became large a user was no longer expected to
know all details concerning an application. Hence presentation of
commands and prompts for data became important. Second, as
applications grew to newer fields, it became necessary to assume a lower
level of computer skills in an application user. This increased the
importance of User Interface’s by adding a new aspect, viz. on line help,
to their functionality. The on line help component of the User Interface
servers the function of educating the user in the capabilities of an
application between a grudging set of users and an excited user
population (and even a fan following!) for an application.
A User Interface can be visualised to consist of two components — a
dialog manager and a presentation manager. The dialog manager
manages the conversation between the user and the application. This
involves prompting the user for a command and transmitting the
command to the application. The presentation manager displays the data
produced by the application in an appropriate manner on the user’s
display or printer device.

4.12 Command Dialogs


Commands are issued to an application through a command dialog.
Three ways to implement command dialogs are:
· Command Languages

COPYRIGHT CORNELL INFOMATICS PVT LTD 69 PROG TECHNIQUE & PRACTICE


· Command menus
· Direct manipulation

Command languages for computer applications are similar to command


languages for operating systems. Primitive command languages support
imperative commands with the syntax <action> <parameters>. More
sophisticated command languages have both declarative and imperative
commands and a syntax and semantics of their own. A practical difficulty
in the use of a command language is the need to learn it before using the
application. This implies a large commitment of time and effort on the part
of the user, which makes casual use of the application forbidding. On line
help can provide some relief by avoiding the need to memorise the syntax
of commands, however it cannot eliminate the need to invest time and
effort in initial learning of the command language.
Command menus provide obvious advantages to the casual user of an
application, as the basic functionalities of the application are reflected in
the menu choices. A hierarchy of menus can be used to guide the user
into the details concerning a functionality. Interesting variations like pull-
down menus are designed to simplify the use of menu systems. Most
Turbo compilers use pull down command menus. A direct manipulation
system provides the user with a visual display of the universe of the
application. The display shows the important objects in the universe.
Actions or operations over objects are indicated using some kind of
pointing device e.g. a cursor or a mouse.

4.13 Principles of Command Dialog Design


Psychologists and human factors engineers have formulated a set of
principles to ensure the effectiveness of command dialogs. Some of these
are:
Ease of use Consistency in command structure Immediate feedback on
user commands Error handling, On line help to avoid memorising
command details Undo facility, Shortcut for experienced user.

4.14 Presentation of Data


Data for an application can be input through free form typing.
Alternatively, a form filling approach may be used when large volume of
data is involved. Application results can be presented in the form of

COPYRIGHT CORNELL INFOMATICS PVT LTD 70 PROG TECHNIQUE & PRACTICE


tables. Summary data can be presented in the form of graphs, pie chart,
etc.

4.15 On Line Help


On line help is very important to promote and sustain interest in the use of
an application. It minimises the effort of initial learning of commands and
avoids the distraction of having to consult a printed document to resolve
every doubt. On line help to the users can be organised in the form of the
on line explanations, demonstrations, tutorials or on line manuals
concerning commands. The on line help facility should be organised such
that desired information can be efficiently located using the structure of
the information, e.g. by searching for section heading, subtitles, figure or
table names, footnotes, etc. Another effective method of organising on
line help is to provide context sensitive help, whereby a query can fetch
different responses depending on the current position of the user in the
application.

4.16 Hypertext
Hypertext visualises a document to consist of a hierarchical arrangement
of information units, and provides a variety of means to locate the
required information. This takes the form of:
· Tables and indexes
· String searching functions
· Means to navigate within the document
· Backtracking facilities
Effectiveness of a hypertext document depends on the care with which it
is organised. Hypertext authoring systems have been developed to help
the application designer in the design of hypertext documents.

4.17 Structure of a User Interface


Figure 4.9 shows a User Interface schematic using a standard graphics
package. The User Interface consists of two main components,
presentation manager and dialog manager. The presentation manager is
responsible for managing the user’s screen and for accepting data and
presenting results. The dialog manager is responsible for interpreting user
commands and implementing them by invoking different modules of the

COPYRIGHT CORNELL INFOMATICS PVT LTD 71 PROG TECHNIQUE & PRACTICE


application code. The dialog manager is also responsible for error
messages and on line help functions, and for organising changes in the
visual context of the user.

Figure 4.9 User Interface

4.18 User Interface Management Systems


A user interface management system (UIMS) automates the generation
of user interfaces. The UIMS accepts specification of the presentation
and dialog semantics to produce the presentation and dialog managers of
the User Interface respectively. The presentation and data managers
could be generated programs specific to the presentation and dialog
semantics. Alternatively, the presentation and dialog managers could use
interpretive schematics to implement the presentation and dialog
semantics. A variety of formalisms have been used to describe dialog
semantics. These include grammars, event descriptions and finite state
machines. In a grammar based description, the syntax and semantics of
commands are specified in a YACC like manner. Thus, the interface is
activated when a user types in a command. The event based approach
uses a visual model of the interface. A screen with icons is displayed to
the user. Selection of an icon by clicking the mouse on it causes an
event. The action specified against the event is now performed.
The grammar and event description approaches lack the notion of a
sequence of actions. The finite state machine approach can efficiently
incorporate this notion. The basic principle in this approach is to associate
a finite state machine with each window or each icon. Actions are
specified on the basis of conditions involving the states of these
machines. This approach has the additional power of coordinating the

COPYRIGHT CORNELL INFOMATICS PVT LTD 72 PROG TECHNIQUE & PRACTICE


concurrent activities in different windows. In the following we describe two
UIMSs using the event description approach.
· Menulay
· Hypercard

4.18.1 Menulay
Menulay is an early UIMS using the screen layout as the basis for the
dialog model. The UI designer starts by designing the user screen to
consist of a set of icons. A semantic action is specified for each icon. This
action is performed when the icon is selected. The interface consists of a
set of screens. The system generates a set of a icon tables giving the
name and description of an icon, and a list of (event, function_id) pairs
indicating the application function to be called when an event is selected.

4.18.2 Hypercard
This UIMS from Apple incorporates object oriented approach. A card has
an associated screen layout containing buttons and fields. A button can
be selected by clicking the mouse on it. A field contains editable text.
Each card has a specific background. A hypercard program is thus a
hierarchy of cards called a stack. User Interface behaviour is specified by
associating an action, in the form of a HyperTalk script, with each button,
field and card. The action for an event is determined by using the
hierarchy of cards as an inheritance hierarchy. Hypercard uses an
interpretive schematic to implement a User Interface

4.19 Software Life Cycle and Program Maintenances


4.19.1 Software Life Cycle
The linear sequential model for software engineering is sometimes called
the "classic life cycle" or the "Waterfall Model".
This linear sequential model suggests a systematic, sequential approach
to software development that starts at the system level and proceeds
through analysis and design, coding, testing and maintenance.
· System/Information engineering and modeling
· Software requirements analysis
· Design

COPYRIGHT CORNELL INFOMATICS PVT LTD 73 PROG TECHNIQUE & PRACTICE


· Code generation
· Testing
· Maintenance

Figure 4.10 Waterfall Model or Classical Life Cycle

The linear sequential model has been evolved after the conventional
engineering cycle, and it involves the following activities:

· System/Information engineering and modeling


Because software is always part of a larger system (or business),
work begins by establishing requirements for all system elements and
then allocating some subset of these software requirements. This
system view is essential when software must interface with other
elements such as hardware, people and databases. System
engineering and analysis involves requirements gathering at the
system level with a small amount of top-level analysis and design.
Information engineering on the other hand encompasses
requirements gathering at the strategic business level and at the
business area level.
· Software requirements analysis

COPYRIGHT CORNELL INFOMATICS PVT LTD 74 PROG TECHNIQUE & PRACTICE


The requirement gathering process is intensified and focused
specifically on software. To understand the nature of program(s) to be
built, the software engineer (analyst) must understand the information
domain for the software as well as required function, behaviour,
performance and interfacing. Requirements for both the system and
the software are documented and reviewed with the customer. This
involves the knowledge of the system functionality as well as certain
conventions which may need to be followed. For example the order
payment can be processed only after the material delivery has
happened.
· Design
Software design is actually a multi-step process that focuses on four
distinct attributes of a program:
- data structure
- software architecture
- interface representation
- procedural (algorithmic) details
The design process translates requirements into a representation of
the software that can be assessed for quality before the code
generation begins. Like requirements, the design is documented and
becomes part of the software configuration.
· Code generation
The design must be translated into a machine readable form. The
code generation step performs this task. If design is performed in
detailed manner, code generation can be accomplished mechanically.
· Testing
Once code has been generated, program testing begins. The testing
process focuses on the logical internals of the software, assuring that
all statements have been tested, and on the functional externals, i.e.,
conducting tests to uncover errors and ensure that defined input will
produce the actual results that agree with required results.
Functionality testing in simple terms checks whether the software
does what it is supposed to do effectively and efficiently.
· Maintenance
Software will undoubtedly undergo change after it is delivered to the
customer. Change will occur because errors have been encountered,
because the software must be adapted to accommodate changes in

COPYRIGHT CORNELL INFOMATICS PVT LTD 75 PROG TECHNIQUE & PRACTICE


its external environments (e.g., a change required because of new
operating system or peripheral device), or because the customer
requires functional or performance enhancements. Often it is seen
that once the software is deployed in its actual environment, several
issues may get noticed which need some modifications and
maintenance.

4.19.2 Problem Areas in Maintenance


With the growth of computer based systems and applications the libraries
of computer software began to expand. In house developed software
projects produced a lot of lines of programming code. Software products
purchased from the outside also added hundreds of thousands of new
code. All of these programs had to be corrected or adapted whenever
new hardware that was purchased. These activities were collectively
called "software Maintenance".
The maintenance phase focuses on changes associated with error
identification, error correction, adaptation due to software enhancements
and concerns due to changes brought about by changing customer
requirements.
Usually Four types of changes are encountered during the maintenance
phase:
· Correction
Even with the best quality assurance activities, it is likely that the
customer will uncover defects in the software. Corrective maintenance
changes the software to correct defects.
· Adaptation
Over time, the original environment for which software was developed
is likely to change. Adaptive maintenance results in modification to the
software to accommodate changes to its external environment.
· Enhancements
As software is used, the customer/users will recognise additional
functions that will provide benefit. Such maintenance extends the
software beyond its original functional requirements to cover newer
functionalities.
· Prevention
Computer software deteriorates due to change and because of this,
preventive maintenance (often called software re-engineering), must

COPYRIGHT CORNELL INFOMATICS PVT LTD 76 PROG TECHNIQUE & PRACTICE


be conducted to enable the software to serve the needs of its end
users. In essence preventive maintenance makes changes to
computer programs so that they can be more easily corrected,
adapted and enhanced. Thus maintenance is a set of software
engineering activities that occur after software has been delivered to
the customer and put into operation.

4.20 Summary
In this chapter we have seen, what is Structured Programming? When a
program is said to be a structured program. Different advantages that can
be achieved by writing the structured programs. We discussed in details
different qualities of a program. How to write a program?, what program is
used for writing these programs. If any errors are there how to find out
those errors and how to correct the same or remove such errors.
We have seen how a user interact with the computer program. We
discussed Software life cycle and Software maintenance. Different steps
involved in Software maintenance.

COPYRIGHT CORNELL INFOMATICS PVT LTD 77 PROG TECHNIQUE & PRACTICE


4.21 Recapitulation
Evaluate
1. A computer program is said to be ______________ if it has a
modular design and uses only the three types of logical structures,
sequences, decisions and loops.
2. The logic of a structured program can be pictured using a
__________ that flows smoothly fro the top to the bottom without
unstructured branching.
3. A module can also be called as a ______________ .
4. A ________________ is a system program which interfaces a
program with the entity generating its input data, or interfaces the results
of a program with the entity consuming them.
5. A __________ monitors help in obtaining information for
localization of errors.
6. A _________________ is a software which provided debugging
support for a program.
7. A ______________ is a software tool that collects information
regarding the execution behaviour of a program.
8. A ______________ is a relation between the values of program
variables.
9. A _____________ can be visualized to consist of two components
– a dialog manager and a presentation manager.
10. A _________________ visualizes a document to consist of a
hierarchical arrangement of information units, and provides a variety
of means to locate the required information.

Multiple Choice Questions:


6. Which of the following is not a part of software cycle.
a) Testing b) maintenance
c) design d) linking
7. Which of the following is not a way to implement command dialogs
a) Compilation b) Command
Languages

COPYRIGHT CORNELL INFOMATICS PVT LTD 78 PROG TECHNIQUE & PRACTICE


c) Command manipulation d) Command
menus
8. Which of the following is not an essential quality of a perfect
program.
a) Reliability b) Completeness
c) Completeness d) Visibility

Answers:
1. structured
2. flowchart
3. routine or a function
4. software tool
5. Debug
6. debug monitor
7. profile monitor
8. debug assertion
9. User Interface
10. Hypertext

COPYRIGHT CORNELL INFOMATICS PVT LTD 79 PROG TECHNIQUE & PRACTICE


Chapter 5: System Documentation Techniques

5.0 Objective
At the end of this chapter you will able to:
· Know different System Documentation Techniques.
· Understand Process Chart.
· Understand the Functional Decomposition Diagram.
· Understand the System Flow Charts.
· Understand HIPO Charts and VTOC Charts.
· Understand Program Structure Charts.
· Understand Structured Flowcharts (Nassi-Shneiderman Diagram).

5.1 Process Chart


A system consists of many different activities of process. It contains
independent but interactive Modules. Process hierarchy chart shows
hierarchy or levels of process in the system. Any activity that generates,
modifies or uses information should be included in process chart.

Figure 5.1 Process Chart

COPYRIGHT CORNELL INFOMATICS PVT LTD 80 PROG TECHNIQUE & PRACTICE


5.2 Functional Decomposition Diagram
The functional decomposition diagram (FDD) is a business planning tool
that depicts the hierarchy of business functions, processes, and
subprocesses within an organization. The exercise of breaking down, or
decomposing, the business functions into processes makes complex
systems much easier to understand and analyze.

5.2.1 Objectives
· Understand the rules and style guidelines for functional
decomposition diagrams (FDDs).
· Understand the process used to create FDDs.
· Be able to create a Functional Decomposition Diagram.
Organizations perform a variety of different functions. Traditionally,
managers thought of the functions of a business as departments, such as
Marketing, Finance, and Accounting. However, they are beginning to view
business functions as important processes that occur throughout the
organization's value chain, which is the series of interdependent activities
that bring a product or service to the customer.
The process of starting at a high level and moving into smaller and
smaller subsystems is called decomposition. The functional
decomposition diagram (FDD) is a planning tool for identifying business
functions and the processes that comprise them. The functional
decomposition diagram itself does not depict process flows, but rather the
hierarchical organization of functions and the processes that they include.

5.2.2 Reading a Functional Decomposition Diagram

Figure 5.2 shows a functional decomposition diagram of the Department


of Motor Vehicles. Notice that it depicts a more traditional view of the
organization in that the primary functions (i.e., rectangles) correspond to
the departments within the DMV: Registration, Licensing, and Regulation.
By examining this FDD, an analyst can understand the high-level
functions that the DMV performs and the system that is needed to support
each function. Take a moment and examine the diagram before reading
the next paragraph. How much do you understand?

COPYRIGHT CORNELL INFOMATICS PVT LTD 81 PROG TECHNIQUE & PRACTICE


Function
A functional decomposition diagram is composed of functions, which are
denoted by rectangles with square corners representing collections of
both manual and automated processes. A traditional view is that functions
correspond to departments within an organization, such as research and
development, purchasing, and marketing; however, the current trend is
for functions to represent major organizational processes that may cross
departmental boundaries, such as order fulfillment or inventory
management.

Figure 5.2 Department of Motor Vehicles Functional Decomposition


Diagram (FDD)
Functions are denoted by rectangles with square corners representing
collections of both manual and automated processes. Figure 5.3 shows
the basic elements of a function, and how they are usually recorded in
CASE tools. Every function has a name, and a description, which is
described in the CASE repository. Descriptions clearly and precisely
describe the collection of activities within the function, and ultimately they
are used to guide the analysts who need to determine what systems are
needed within the organization to support the business.

COPYRIGHT CORNELL INFOMATICS PVT LTD 82 PROG TECHNIQUE & PRACTICE


Functions may include a variety of subfunctions. These are functions that
are drawn below a function on the FDD and connected with a straight
line. Organizations are very complex, and the use of subfunctions allows
analysts to break down functions into simpler components that are easier
to understand and plan. A function is a parent to a subfunction, and a
subfunction is a child of a function. If a function only has one child, the
child usually is not included on the FDD because it adds little to the
meaning of the diagram. Also, a child can have only one parent.

Figure 5.3 FDD Elements

Process
The FDD can include several levels of functions that are broken down into
finer gradations called processes. A process is an activity that is
performed for some specific business reason, and it is denoted by a
rectangle with rounded corners. The conceptual dividing point is
somewhat arbitrary, but you can usually differentiate a process from a
function by the amount of activity that it represents. A process represents
a tangible activity that occurs within the organization, such as issuing a
driving test or creating a license. Names should be short, yet contain
enough information so that the reader can easily understand exactly what
they do. In general, each process performs only one activity, so most

COPYRIGHT CORNELL INFOMATICS PVT LTD 83 PROG TECHNIQUE & PRACTICE


system analysts avoid using the word "and" in process names because it
suggests that the process performs several activities.
Like functions, processes include actions that must be performed no
matter how the system is implemented, and they can be broken down into
smaller parts called subprocesses. Another similarity with functions is that
child processes can be a parent of more than one subprocess, and a
child process can only have one parent.

Connectors
Connectors are lines between functions, processes, and from a function
to a process. They specify hierarchical relationships among the
components of the FDD. Unlike processes and functions, connectors are
not named, but instead their presence implies the phrase "consists of."
For example, the Driver's Licensing System process consists of the Issue
Driving Tests and Issue License subprocesses. Every component on an
FDD should be connected to at least one other component.
A related symbol found on the FDD is the off-page connector. FDDs can
become quite unwieldy, especially when depicting a large or complex
program. A hexagon is used to continue the diagram on another page.

5.2.3 Checklist for Functional Decomposition Diagram Quality

ü All functions and processes are connected to at least one other


function or process
ü Every parent has at least two children

ü Every child only has one parent

ü Labels are descriptive


ü Connectors are not named (assumed to be "consists of")

ü Each process on the first level of a FDD becomes a system on a


context diagram
ü Each subprocess on the second level of an FDD becomes a
process on the Level 0 data flow diagram

The functional decomposition diagram (FDD) shows the business


functions within an organization and the main processes needed to
perform each function. The FDD is a business planning tool that depicts

COPYRIGHT CORNELL INFOMATICS PVT LTD 84 PROG TECHNIQUE & PRACTICE


the hierarchy of business functions, processes, and subprocesses within
an organization that are later described in detail using process models.

Task : Case Study


1. Create a functional decomposition diagram for the dentist
office whose processes are described below:
Whenever new patients are seen for the first time, they complete a
patient information form that asks their name, address, phone number
and brief medical history, which are stored in the patient information
file. When a patient calls to schedule a new appointment or change
an existing appointment, the receptionist checks the appointment file
for an available time. Once a good time is found for the patient, the
appointment is scheduled. If the patient is a new patient, an
incomplete entry is made in the patient file; the full information will be
collected when they arrive for their appointment. Because
appointments are often made so far in advance, the receptionist
usually mails a reminder postcard to each patient two weeks before
their appointment.
2. Create a functional decomposition diagram for the video store
whose processes are described below:
A Video Store (AVS) runs a series of fairly standard video stores.
Before a video can be put on the shelf, it must be catalogued and
entered into the video database. Every customer must have a valid
AVS customer card in order to rent a video. Customers rent videos
for three days at a time. Every time a customer rents a video, the
system must ensure that they do not have any overdue videos. If so,
the overdue videos must be returned and an overdue fee paid before
customer can rent more videos. Likewise, if the customer has
returned overdue videos, but has not paid the overdue fee, the fee
must be paid before new videos can be rented. Every morning, the
store manager prints a report that lists overdue videos; if a video is
two or more days overdue, the manager calls the customer to remind
them to return the video. If a video a is returned in damaged
condition, the manager removes it from the video database and may
sometimes charge the customer.

5.3 Hierarchical Input Process Output (HIPO) Chart


HIPO (hierarchical input-processing-output) charts became needed as
complex packages were developed, and it was necessary to get an

COPYRIGHT CORNELL INFOMATICS PVT LTD 85 PROG TECHNIQUE & PRACTICE


overall view of their organization. They show which task can link to which
other task, and what sections of the program can access the various input
and output files. They are placed from the point of view of the analyst or
the user.
HIPO (hierarchical input-processing-output) charts concern themselves
with the overall organization of a program, and are used only for large,
intricate programs. Let's use an example to illustrate the concept. We
have a data base used to keep track of administrative activities in a
university.
Three files are necessary to assign classrooms: Professors which
contains the list of the professors, ClassRooms which contains the list of
all classrooms with their attributes (size, type of blackboard, ...), and
Schedule.
Three files are necessary to pay adjunct professors: Professors,
Schedule, and Rates. One file is necessary to hire, dismiss, or update the
profile of professors: Professors. Each semester, a report is made of full
time professors' load. It accesses the files Professors, Grants, Admin
which contains the list of administrative activities performed by
professors, and Schedule. Monthly, a report is made of grants activities. It
accesses the files Grants and Professors.
There are many more tasks, but it's enough to illustrate the concept

COPYRIGHT CORNELL INFOMATICS PVT LTD 86 PROG TECHNIQUE & PRACTICE


Figure 5.4 HIPO Charts

This methods used for developing software (developed by IBM). HIPO


diagrams are graphical rather than prose or narrative description of
system. They assist the analyst is answering three guiding question.
1. WHAT does the system module do? (Asked when designing
the system)
2. HOW does it do? (Asked when reviewing the code for testing)
3. WHAT are the inputs & outputs? (Asked when reviewing the
code for testing or maintenance)
A Hipo description for a system consisted of the Visual Table of content
and the Functional Diagram.

5.4 Program Structure Charts


Well structured designs improve the maintainability of a system. A
structured system is one that is developed from the top down and
modular, that is, broken down into manageable components. The module
should be designed so that they have minimal effect on other modules in
the system. The connections between modules are limited and the
interaction of data is minimal. Such design objectives are intended to
improve system quality while easing maintenance tasks.
Structure charts show the relation or processing modules in computer
software.

5.4.1 Purpose of structure charts


A structure chart is a design tool that visually displays the relationship
interact and also graphically depicts the data that are communicated
between various modules.
Structure charts are developed prior to the writing of program code. They
are not intended to express procedural logic, a task left to flowcharts and
pseudo-code Nor do they describe the actual physical interface between
processing functions. They identify the data passes existing between
individual modules that interact with another.
Example : A manufacturing company has decided to give bonus to all it
employees. Bonus amount is calculated as Bonus Amount = Basic *
85/100. It is stored in the employee record of the employee file. The

COPYRIGHT CORNELL INFOMATICS PVT LTD 87 PROG TECHNIQUE & PRACTICE


company has already computerized all the applications/operations. The
Employee Number is input, validated matched with the appropriate record
and the bonus is computed and stored.

(1)

(2)

COPYRIGHT CORNELL INFOMATICS PVT LTD 88 PROG TECHNIQUE & PRACTICE


(3)

(4)

COPYRIGHT CORNELL INFOMATICS PVT LTD 89 PROG TECHNIQUE & PRACTICE


Figure 5.5 Structure Charts

Description
Let us look at one example of building a structure chart for above
example.
Step 1: Draw Data Flow Diagram.
· Operator enters the Employee Number and request the number to
process.
· The employee number then will be validated from the employee
file, there are two possibilities: either the number could be valid or
invalid, i.e., the number may be existing or not existing. Here the
process returns the flag indicating whether it is available or not in
the Employee master file.
· When the flag returns true value, then the employees record will
be found and vouched. Then Bonus is computed and accordingly
the figures are updated.
· Otherwise, if invalid number is entered, then operator will be given
a message about the same and requested to reenter the valid
number.

Step 2: Identify the input, central transform and output part of the DFD.
The Central transform depicts the portion of the DFD where the

COPYRIGHT CORNELL INFOMATICS PVT LTD 90 PROG TECHNIQUE & PRACTICE


input is in its pure form and the output has just been produced but
not yet formatted.
Step 3: Draw a structure chart i.e. provide a manager module and
connect the input, transform and output pertaining it.
Step 4: Introduce intermediate modules for input and output portions to
prevent the main module from dealing with incorrect data. The
following figure shows input, central transform and output modules
with intermediate modules like Get Employee Number, Validate
Employee Number, find Employee Record etc.
Step 5: Redraw the bubbles as rectangles, add data and control couples,
add error-handling modules and give suitable names to the various
modules.

5.4.2 Notations of structure charts


Program module are identified by rectangles with the module name
written inside the rectangle. Arrow indicate calls, which are any
mechanisms used to invoke a particular module. The annotations on the
structure chart indicate the parameters that are passed and the direction
of the data movement. Arrow with hollow circle indicate passing
information where arrow with closed circle control information (error
message) etc.

COPYRIGHT CORNELL INFOMATICS PVT LTD 91 PROG TECHNIQUE & PRACTICE


Figure 5.6 Notations of Structure Charts

5.5 Yourdon and Coad Diagrams


Yourdon & Coad's Object-Oriented Analysis and Design (OOA/OOD) is
an object-oriented method that precedes UML. To draw a Yourdon &
Coad diagram, simply complete these five steps:

find classes and


objects
identify the structures
define subjects
define attributes
define services

COPYRIGHT CORNELL INFOMATICS PVT LTD 92 PROG TECHNIQUE & PRACTICE


Figure 5.7 A Yourdon & Coad Class Diagram

COPYRIGHT CORNELL INFOMATICS PVT LTD 93 PROG TECHNIQUE & PRACTICE


Figure 5.8 Common Yourdon & Coad Notations

14[14]

5.6 Entity Relationship Diagrams (ERDs)


Entity Relationship Diagrams (ERDs) illustrate the logical structure of
databases.

14[14]
To know more about this topic visit :
http://www.smartdraw.com/resources/centers/orgcharts

COPYRIGHT CORNELL INFOMATICS PVT LTD 94 PROG TECHNIQUE & PRACTICE


Figure 5.9 Typical Entity-Relationship Diagram

Peter Chen developed ERDs in 1976. Since then Charles Bachman and
James Martin have added some sligh refinements to the basic ERD
principles. The ER model was adopted as the meta model for the ANSI
Standard in Information Resource Directory System (IRDS), and the ER
approach has been ranked as the top methodology for database design
by several surveys of FORTUNE 500 companies.
The Entity-Relationship model is described in most textbooks on
databases and information systems analysis. It is included as a
fundamental topic in the ACM/IEEE recommended curriculum on
computer science and information systems. The ER model also serves as
the foundation of some of the recent work on Object-Oriented analysis
and design methodologies and Semantic Web.
The hypertext concept, which makes the World Wide Web extremely
popular, is very similar to the main concept in the ER model.
Entity-Relationship models are a common tool for specification and
design of information systems. They use a graphical technique for
displaying the objects of the system and relationships among them. The
design process can be enhanced by specifying constraints of the system
and the natural environment for these is the categorical notion of sketch.

COPYRIGHT CORNELL INFOMATICS PVT LTD 95 PROG TECHNIQUE & PRACTICE


Here we argue that the finite-limit, finite-coproduct sketches with a
terminal node are the appropriate class and call them ER sketches.

COPYRIGHT CORNELL INFOMATICS PVT LTD 96 PROG TECHNIQUE & PRACTICE


COPYRIGHT CORNELL INFOMATICS PVT LTD 97 PROG TECHNIQUE & PRACTICE
Figure 5.10 Entity Relationship Diagram Notations

Figure 5.11 E-R Diagram showing Entity and it’s Attributes

5. 7 System Flow Chart


It is a diagrammatic representation of information expressed in time
sequence. This chart gives the total path of information and stepwise
indication of process and input in transformation of data into information.
This chart is useful in — understanding process system
· designing or evaluating a new system
· to illustrate proposed system for information of other persons.

COPYRIGHT CORNELL INFOMATICS PVT LTD 98 PROG TECHNIQUE & PRACTICE


Figures 5.12 Symbols used in System Flow Chart

5.8 Visual Table of Content (VTOC)


This shows the relation between each of module making up a package. It
consists of hierarchy chart that identifies the modules in a system by
number and in relation to each other and gives brief description of each
module.

COPYRIGHT CORNELL INFOMATICS PVT LTD 99 PROG TECHNIQUE & PRACTICE


Figure 5.13 Visual Table of Content(VTOC)

5.9 Structured Flowcharts (Nassi-Shneiderman


Diagram)
The Nassi-Schneiderman, or N/S chart, named for I. Nassi and B.
Schneiderman, who published this technique in 1982. (West Coast
advocates may recognize these as Chapin charts.)
The N/S chart starts with the basic characterization of modern day
languages as being block-structured languages. In these languages,
procedures are blocks. A block has a beginning and an end. When the
procedure is called, or when the process is entered, instruction execution
begins at the beginning (or top) of the block and proceeds to the end (or
bottom) of the block.
Let us consider a simple example of an N/S representation of a program.
A server named MSGAB must service a queue of messages. There are
but two types of messages, A and B, to be processed by the procedures
MSGA and MSGB, respectively. Once given control, the server processes
all messages, if any, in its queue. If there are no messages, then the
server must return an “I’m Alive” message to indicate to the calling

COPYRIGHT CORNELL INFOMATICS PVT LTD 100 PROG TECHNIQUE & PRACTICE
procedure that it is still operational. Before exiting, it updates statistics.
One exception condition is the receipt of an erroneous message type (not
A or B). In this case an error message is returned and processing of
further messages is terminated.
The N/S chart for this server is shown in Figure 7. It comprises three main
blocks. The first one initializes various parameters in the program. The
second one performs the message processing. The third block updates
statistics.
The message processing block checks to see if there are any messages
in the queue. If not, an “I’m Alive” message is sent. If the queue contains
messages, their message types are analyzed via a case statement which
calls the appropriate message processing routine (MSGA or MSGB). If an
erroneous message type is found, an error message is sent and an exit is
made from the server.
Note that three new notations have been introduced:
· The procedure or process name is indicated at the top of the
chart.
· Called procedures are noted with asterisks (e.g., *MSGA*).
· The EXIT operator is an implied transfer of control to the bottom of
the block, thus terminating the procedure or process.

COPYRIGHT CORNELL INFOMATICS PVT LTD 101 PROG TECHNIQUE & PRACTICE
Figure 5.14 N/S Example

In this example, the nesting of structure is clearly shown in the message


processing block. This block is an IF structure which contains a DO-
WHILE structure which contains a CASE structure.
The power of N/S charts as a design tool useful for controlling the quality
of a design group can be appreciated by noting the following:
· A procedure can have only one entry point (the top) and only one
exit point (the bottom).
· No off-page connectors exist, so the program is forced to be
modular. Large procedures simply cannot be represented. They
must be organized into control structures which call other
procedures.
· Only acceptable structures can be used.
· Nesting of structures is limited by the fineness of one’s pencil
point. It is difficult to draw IF statements nested 11 deep.

COPYRIGHT CORNELL INFOMATICS PVT LTD 102 PROG TECHNIQUE & PRACTICE
· There is no way to represent a GOTO. GOTO-less coding is
assured. (The EXIT operator is the only case of a very limited use
of GOTO in some languages.)
· Structured coding proceeds pleasantly and effortlessly from these
charts. Whereas (in Nassi and Schneiderman’s words) “the
translation from flow chart to computer program is a one to many
relationship whose output ranges over programs only some of
which are legible, concise and efficient,” N/S charts give rise to
code that is quite consistent in its content and quality.

In these days of being tied to the keyboard, no tool is adequate unless it


can be automated at the developer’s desktop. Fortunately there is an
excellent NS tool that is even integrated with Word, allowing NS charts to
be treated as objects in a Word document. One simply types in the
psuedo code for the desired NS chart, and out comes a pleasantly
constructed chart.
Structured flowcharts use no arrows or continuation on separate page.
Each structured flowchart is shown on a single sheet of paper. When
designing a structured flowchart, the logic is specified in a top-down
fashion. The first consideration in a process or decision is the top
element. The second in sequence is the next one shown, and so forth.
Similarly, there is a single exit from the process. Each process is named.
The structure chart reads from top to bottom and left to right. Each activity
is nested within the iteration and alternative process of which it is part. In
addition, each condition is clearly shown.
Building structure charts
Creating a structure chart is usually a three-step process. First, the
analyst identifies the major functions of the business and the subfunctions
that they include. Second, the analyst adds the processes and
subprocesses that are needed to perform the functions. Third, uses the
FDD to draw process models, making sure that the two diagrams are
balanced. Over time the analyst reviews the FDD and revises it again and
again until it is complete.

5.10 Logic Representation Techniques

COPYRIGHT CORNELL INFOMATICS PVT LTD 103 PROG TECHNIQUE & PRACTICE
Figure 5.15 Decision table (Decision Making)

5.10.1 Decision table


It is used for more complex circumstances where several criteria
(conditions) determine an action. Let us consider a discount policy for
customers with the following details:
If a customer places an order worth Rs.20,000 or more, the company
offers him a discount of 15% on the purchase amount. However, if the
customer is old to the company, the lower limit of purchase amount is
reduced to Rs. 10,000. In all other cases, a 10% discount is offered for
nay purchase of Rs. 10,000 or more.
This statement involves complex decision-making, which can become
even more complex as more clauses are added for discount provisions.
DFD is not a suitable tool for such a level of detail. A decision table or
decision tree is particularly used for such decision rules.
A decision table is a matrix of rows and columns. The table is divided into
4 parts as shown in the following figure. The left hand parts denote
possible conditions and actions. The right hand parts define the rules.
Condition is a possible state of an entity. As conditions vary, they are also
called decision variable. An alternative step or procedure that an
individual takes or follows when confronted with a condition is called an
action. A rule defines an action to be taken corresponding to a defined
combination or conditions.
Decision table for the above stated discount policy statement is given in
the following figure:

COPYRIGHT CORNELL INFOMATICS PVT LTD 104 PROG TECHNIQUE & PRACTICE
Figure 5.16 Layout of a Decision Table

5.10.2 Steps for drawing a decision table

· Identify all the conditions and the actions.


· Identify the possible entries for each condition statement.
· Workout the total number of decision rules by multiplying the
number of possibilities.
· Create the conditions and actions stub.
· Fill up all the condition entries to ensure that all possible
combinations of conditions have been filled up.
· Identify the actions corresponding to each combination of the
conditions.
· Check the rule table to remove contradictory rules, if any.
· Remove redundant rules, if any.

Applying these rules, the decision table for the discount policy can be
created as in figure below. The rules have been given serial numbers 1 to
8. Rules 1 and 5 been marked with C to indicate contradictions as the
purchase amounts cannot be in the two ranges simultaneously. To further
define this table, rule 4 and 8 can be combined, as the action is
determined irrespective of the entry values of old customer condition. In
this case, we call the rule as indifferent to the condition and the show it
with the symbol of indifference (-).

COPYRIGHT CORNELL INFOMATICS PVT LTD 105 PROG TECHNIQUE & PRACTICE
The table is shown in the following figure.

Figure 5.17 Decision Table

The table represented above contains only limited values of condition


values, i.e. Y and N indicating Yes and No situations. X in the action entry
stub indicates the corresponding action to be taken. Such a table is called
Limited Entry Form. Another form of the table, widely used, is the
Extended Entry Form, which allows the descriptive values in the condition
or action entry stubs, e.g. the above figure could have a decision variable
as ‘Purchase amount’ and the entry values as “> = 20000, ‘between
10000 and 20000’ and ‘Less that 10000’. Similarly, action entries could
have complete descriptions rather descriptions rather than the symbol ‘X’.

COPYRIGHT CORNELL INFOMATICS PVT LTD 106 PROG TECHNIQUE & PRACTICE
Figure 5.18 Modified Decision Table for the Discount Policy

A decision table gives a compact format of decision rules. It is particularly


helpful if the number of decision and action variables is quite large. It is
particularly true in the case of DSS and ES, involving complex decision-
making. However, a simpler tool to represent smaller set of decisions is
also available in the form of Decision Trees.

5.10.3 Extended Entry Table


The difference between this type of a table and a limited entry table is that
the stub part of the table are not complete in themselves. It is necessary
to considered together both the stub and the entry parts to determine
whether a condition or action is relevant to a specific rule.

5.10.4 Decision Tree

COPYRIGHT CORNELL INFOMATICS PVT LTD 107 PROG TECHNIQUE & PRACTICE
A decision tree is a diagram that presents conditions and actions
sequentially and thus, shows which conditions to considered first, which
second and so on. It resembles the branches of a tree and hence the
name. A decision tree corresponding to the decision policy mentioned in
the previous section is given in the following figure:

Figure 5.19 Decision Tree

The nodes of the tree represents condition and indicates that a


determination must be made about which condition exists before the path
to be chosen. The right side indicates actions to be taken.
A decision tree gives a clear picture and a pathway to reach from a set of
decision variables represented as branches of a tree and traces down to
the ultimate point of action, also called the leaf or node of the tree. This
representation becomes clumsy and unwieldy as conditions increase in
number.

5.10.5 Structured English


Structured English is another tool to deal with the ambiguity of language.
It states the decision rather than showing them. It is quite close to the
natural English language with some standard conventions to eliminate
vague expressions and enhance the clarity of documentation. It is used to
express the complete logic of the process, which includes the
representations given by the DFD and decision models. However, the
DFD and Decision models give a comprehensive pictorial view of their

COPYRIGHT CORNELL INFOMATICS PVT LTD 108 PROG TECHNIQUE & PRACTICE
own specified areas and thus, structured English should not be confused
as an alternative to these

5.11 Shlaer - Mellor Diagrams


Shlaer-Mellor's method of software design describes a set of integrated
models and diagrams that are used to analyze large software application
projects. Developed by Sally Shlaer and Stephen Mellor, this system is
also known as the Object-Oriented Systems Analysis (OOSA). OOSA
contains a wide variety of diagrams including: a domain chart diagram,
object information model diagram, state transition model, an action data
flow diagram, a class diagram, and a class structure chart.
Domain chart diagrams partition the system into domains and
subsystems. Domains are distinct, independent subject matters within the
application.

Figure 5.20 Domain Chart Diagrams

COPYRIGHT CORNELL INFOMATICS PVT LTD 109 PROG TECHNIQUE & PRACTICE
COPYRIGHT CORNELL INFOMATICS PVT LTD 110 PROG TECHNIQUE & PRACTICE
Figure 5.21 Domain Chart Notations

5.12 Draw Data Flow Diagrams (DFD)


Data flow diagrams illustrate how data is processed by a system in terms
of inputs and outputs.

Figure 5.22 Data flow Diagram

A context diagram is a top level (also known as Level 0) data flow


diagram. It only contains one process node (process 0) that generalizes
the function of the entire system in relationship to external entities.

COPYRIGHT CORNELL INFOMATICS PVT LTD 111 PROG TECHNIQUE & PRACTICE
Figure 5.23 Context Level Data Flow Diagram

COPYRIGHT CORNELL INFOMATICS PVT LTD 112 PROG TECHNIQUE & PRACTICE
Description
Context Level DFD
· In this diagram notice that, we have few entities and a process.
· Arrow indicates the flow of data, and arrow head indicates the
direction.
In short, this depicts the flow of data from entity to process or from
process to entity.

DFD levels
The first level DFD shows the main processes within the system. Each of
these processes can be broken into further processes until you reach
pseudocode.

Figure 5.24 An example of First Level Data Flow Diagram

COPYRIGHT CORNELL INFOMATICS PVT LTD 113 PROG TECHNIQUE & PRACTICE
Figure 5.25 An Example of Typical Data Flow Diagram
Description
Let us try to understand the process of drawing data flow diagram for a
college payroll system. The purpose of this exercise is to make you aware
of the different levels of data flow diagram.
Suppose we have a Context Level diagram and now we would like to
explode this to the next level.
First let us look at the diagram, External entities are Employee, Accounts
Dept., and Bank. There are three processes.
(1.0) Prepare Attendance and Leave statement.
(2.0) Prepare payroll register.
(3.0) Prepare Bank statement and Deduction Report.
Notice that from external entity arrows are either flowing to the process or
vice versa. When such flow takes place, some data is exchanged, which
is shown along the arrows.
Also notice that since this process uses few files that is also mentioned in
open ended rectangles. Carefully, go through this entire diagram.
To understand the sub-processes, click on the process circles (to know
sub-processes of 1.0 click on circle 1.0). Click on Back (key) to return to
the original figure.
A. This is the exploded figure of process 1.0.

COPYRIGHT CORNELL INFOMATICS PVT LTD 114 PROG TECHNIQUE & PRACTICE
B. This is the exploded figure of process 2.0.
C. This is the exploded figure of process 3.0.
Arrows moving from process to data store indicates that data is recorded
or stored on the disk (File). Similarly, arrows coming from data store to
process indicates that the data has been read/retrieved from the file.

COPYRIGHT CORNELL INFOMATICS PVT LTD 115 PROG TECHNIQUE & PRACTICE
5.13 Summary
In this chapter we have seen some basic programming documentation
techniques. We have learned different tools and methods which are used
in documentation like Process chart, Functional Decomposition Diagram
(FDD), System Flow Charts, HIPO charts, VTOC charts, Program
Structure charts, Structured Flowchart, Entity-Relationship diagram (E-R
Diagram), Data Flow Diagrams etc.
While understanding different methods of documentation and
representation we have seen different notations that can be used for
documentation purpose.

COPYRIGHT CORNELL INFOMATICS PVT LTD 116 PROG TECHNIQUE & PRACTICE
5.14 Recapitulation
Evaluate
1. A _____________ chart shows hierarchy or levels of process in
the system.
2. The ___________________ is a business planning tool that
depicts the hierarchy of business functions, processes, and
subprocesses within an organization.
3. A functional decomposition diagram is composed of
____________ .
4. A ____________ is an activity that is performed for some specific
business reason, and it is denoted by a rectangle with rounded
corners.
5. A ___________ are lines between functions, processes, and from
a function to a process.
6. HIPO chart stands for ____________________ .
7. A ______________ is a design tool that visually displays the
relationship interact and also graphically depicts the data that are
communicated between various modules.
8. Structure charts are developed prior to the writing of
____________ code.
9. ________________ models are a common tool for specification
and design of information systems.
10. A ________________ is a matrix of rows and columns.

Short Answer Questions:

1. What are the characteristics of a good Functional


Decomposition Diagram?
2. What Notations are used for drawing structure charts
3. Explain the Yourdon and Coad Diagrams
4. What is an E-R Diagram. Which symbols are used by it.
5. What is the importance of E-R Diagram? Why do we need it?

COPYRIGHT CORNELL INFOMATICS PVT LTD 117 PROG TECHNIQUE & PRACTICE
Long Answer Questions:
1. Explain the different System Documentation Techniques
2. Explain the Functional Decomposition Diagram with example.
3. What are the I HIPO Charts and VTOC Charts. Why do we need
them. Explain in detail.
4. Why do we need Program Structure Charts. Describe their usage
with example.
5. Explain Structured Flowcharts (Nassi-Shneiderman Diagram).`
6. Explain various Logic Representation Techniques with suitable
examples.
7. What is a DATA Flow Diagram. Describe various symbols used by
it. How many levels can be there for a DFD. Explain each of them.

Answers:
1. Process hierarchy
2. functional decomposition diagram
3. functions
4. process
5. Connectors
6. hierarchical input-processing-output
7. structure chart
8. program
9. Entity-Relationship
10. decision

COPYRIGHT CORNELL INFOMATICS PVT LTD 118 PROG TECHNIQUE & PRACTICE
COPYRIGHT CORNELL INFOMATICS PVT LTD 119 PROG TECHNIQUE & PRACTICE
Chapter 6: Bootstrap Process

6.0 Objective
At the end of this chapter you will be able to know the Bootstrap Process or Booting
Process or Power-On-Self-Test (POST) Process.

6.1 Booting
The process of starting the Computer is called as BOOTING. The word ‘booting’ has
been derived from the word “BOOT STRAP”.
There are three parts to the startup of the computer. The ROM-BIOS (present in the
ROM) contains the startup routines, which get the computer started when the power
is switched on.
The first part of the Basic input is the output services routines, which test whether the
computer is in good working order. These also include memory test and erasing of
any previous information that may be present in the memory (whenever we talk of
memory we mean RAM not ROM).
The second part is the initialization part. In this are included the steps that tell ROM-
BIOS what equipment is present. This is done by reading the permanent memory or
CMOS that records the equipment that the computer has.
The last part of the startup routines is the “boot” routine. This loads the operating
system needed to work on the computer. To be able to work on the computer, the
operating system must always be present in the memory. In case of DOS, the system
files are:

IO.SYS.
MSDOS.SYS.
COMMAND.COM.

Is called Bootable-disk.
The COMMAND.COM is the only file that can be seen by you; the other two being
hidden files. These files are present in the first sector (called as the boot sector) of
the disk. After the computer is switched on, ROM-BIOS searches for the operating
system on the disk(s) in the sequence specified in its CMOS. On finding it, the
operating system is loaded into the memory.
After the start-up procedure is finished, the computer is ready to accept our
commands. There are other two parts of the ROM-BIOS that form a key part in the
running of the computer. These are hardware-interrupt handling and service-
handling. The service-handling routines carryout whatever services are required by
our programs. These routines perform services related to the computer’s hardware

COPYRIGHT CORNELL INFOMATICS PVT LTD 120 PROG TECHNIQUE & PRACTICE
devices such as the screen, keyboard, disks, printers etc. You shall see them for
yourself when you start working with the programs. The hardware-interrupt handling
part takes care of the independent needs of the computer’s hardware.
If the operating system is Windows NT then the booting process is as follows. After
the first and the second part of booting, the bootstrap process starts. This consists of
loading the operating system in the memory. Windows NT requires the following files
for booting, Ntldr, Boot.ini and Ntdetect.com. All these files are hidden and are read-
only. The sequence is run as follows:
Ntldr switches the processor into 32-bit memory mode, starts appropriate system
drivers, reads the Boot.ini file and displays the operating system selections, loads the
OS selected by the user. Now if Windows NT is selected, Ntldr runs Ntdetect.com, if
other OS is selected, Ntldr loads and runs Bootsect.dos and passes control to it.
Ntldr now loads Ntokml.exe and the boot process ends.

15[15]

6.2 Types of Booting


Booting is of two types:

Cold Boot — When the Electricity is put off and when switch-on the
system.
Warm Boot—When the Control, Alt and Delete keys are pressed
simultaneously or when the Rest key is pressed. In this case the first and
the second steps of booting are skipped.

Depending on the operating system used, the computer will display a command
prompt to let you know that the booting process is complete.
If the operating system is DOS and the C disk is used for booting then the command
prompt is C:>, if the A disk is used then the command prompt will be as A:> (Booting
is generally never done from the B drive and never from the D drive).

6.3 The Booting Process of the PC


The process begins when the power supply is switched on:
The power supply performs a self-test:
When all voltages and current levels are acceptable (+5v, +3.0 through +6.0
is generally considered acceptable), the supply indicates that the power is
stable and sends the "Power Good" signal to the motherboard.

15[15] Different Operating System have different booting sequences.

COPYRIGHT CORNELL INFOMATICS PVT LTD 121 PROG TECHNIQUE & PRACTICE
The "Power Good" signal is received by the microprocessor timer chip, which
controls the reset line to the microprocessor. The time between turning on the
switch to the generation of the "Power Good" signal is usually between 0.1
and 0.5 seconds.
In the absence of the "Power Good" signal, the timer chip continuously resets
the microprocessor, which prevents the system from running under bad or
unstable power conditions.
The microprocessor timer chip receives the "Power Good" signal:
After the power supply is switched on, the microprocessor timer chip
generates a reset signal to the processor (the same as if you held the reset
button down for a while on your case) until it receives the "Power Good"
signal from the power supply.
After the reset signal turns off, the CPU begins to operate. Code in RAM
cannot be executed since the RAM is empty. The CPU manufacturers pre-
program the processor to always begin executing code at address
"FFFF:0000" (usually the ROM BIOS) of the ROM.
The CPU starts executing the ROM BIOS code:
The CPU loads and executes the ROM BIOS code starting at ROM memory
address "FFFF:0000" which is only 16 bytes from the top of ROM memory.
As such, it contains only a JMP (jump) instruction that points to the actual
address of the ROM BIOS code.
The BIOS searches for adapters (usually video adapters) that may need
to load their own ROM BIOS routines:
Video adapters provide the most common source of adapter ROM BIOS. The
start-up BIOS routines scan memory addresses "C000:0000" through
"C780:0000" to find video ROM.
An error loading any adapter ROM generates an error such as: "XXXX ROM
Error" where XXXX represents the segment address of the failed module.
The ROM BIOS checks to see if this is a 'cold boot' or a 'warm boot':
To determine whether this is a "cold boot" or a "warm boot" the ROM BIOS
startup routines check the value of the two bytes located at memory location
"0000:0472".
Warm boot - A word value of 1234th in this location is a flag that indicates a
"warm boot", which causes the memory test portion of the POST (Power-On
Self-Test) to be skipped.
Cold boot - Any other word value in this location indicates a "cold boot" and
full POST.
POST (Power-On Self-Test):

COPYRIGHT CORNELL INFOMATICS PVT LTD 122 PROG TECHNIQUE & PRACTICE
The POST is a series of diagnostic tests that run automatically when you turn your
computer on. The actual tests can differ depending on how the BIOS is configured,
but usually the POST tests the following:
The Video adapter - It is initialised, the video card and video memory is tested,
and configuration information or any errors are displayed.
The RAM - A read/write test of each memory address is performed and a running
sum of installed memory is displayed.
The keyboard - PS/2 ports or USB ports are checked to verify whether the
keyboard is connected or not.
The Processor - The cache memory is checked and the CPU type and speed are
displayed.
CMOS - Read/write test.
ROM BIOS checksum.
RAM refresh verification.

16[16]

Any errors found during the POST are reported by a combination of beeps and
displayed error messages. The errors which occur during the POST can be classified
as either 'fatal' or 'non-fatal'. A non-fatal error (e.g. problem in the extended memory)
will typically display an error message on the screen and allow the system to
continue the boot process.
A fatal error (e.g. problem in the processor), on the other hand, stops the process of
booting the computer and is generally signalled by a series of beep-codes. However,
successful completion of the POST is indicated by a single beep.
The BIOS locates and reads the configuration information stored in
CMOS:
CMOS (Complementary Metal-Oxide Semiconductor) is a small area of
memory (64 bytes) which is maintained by the current of a small battery
attached to the motherboard. Most importantly, for the ROM BIOS startup
routines (boot sequence), CMOS determines the order in which drives should
be examined for an operating system (floppy disk first, CD-Rom first, or fixed
disk first). Furthermore, it holds some essential information such as hard drive
size, memory address location, and Date & Time.
Shadow RAM: (Optional, you can turn it off/on using the CMOS settings):

16[16] "The POST operations are not the same for the all BIOS software".

COPYRIGHT CORNELL INFOMATICS PVT LTD 123 PROG TECHNIQUE & PRACTICE
Shadow RAM is where a copy of BIOS routines from ROM is stored in a
special area of RAM, so that the BIOS routines can be accessed more
quickly.
Loading the OS (Operating System):
The BIOS will attempt booting using the boot sequence determined by the
CMOS settings, and examine the MBR (Master Boot Record) of the bootable
disk. The MBR is the information in the first sector (512 bytes) of any hard
disk or diskette that identifies how and where an operating system is located
so that it can be loaded into the RAM (booted).
The MBR is also sometimes called the "partition sector" or the "master
partition table" because it includes a table that locates each partition that the
hard disk has been formatted into. In addition to this table, the MBR also
includes a program that reads the boot sector record of the partition
containing the operating system to be booted into RAM. In turn, that record
contains a program that loads the rest of the operating system into RAM.

17[17]

6.4 Formatting
The process of getting a disk ready for use is called “Formatting”. In the process of
formatting, the sectors and tracks within the disk are checked and all bad sectors and
tracks are marked so that no information gets written on it.
Formatting is done by the operating system therefore different operating system have
different way of formatting disk. Formatting logically divides disk into:

System Area.
Data Area (where File/data is
stored).

Notes on Troubleshooting and beep codes chart can be found at:


http://covenant-itr.hypermart.net/troubleshooting.htm

17[17] Discuss the utility of Autoexec.bat file in connection with booting.

COPYRIGHT CORNELL INFOMATICS PVT LTD 124 PROG TECHNIQUE & PRACTICE
6.4 Summary
In this chapter we have seen in detail the process of POST (Power-On-Self-Test) or
Bootstrap Process and different steps of starting up of a system. We have discussed
how to make a disk bootable disk. Now we know that when can a disk be called as a
bootable disk.

COPYRIGHT CORNELL INFOMATICS PVT LTD 125 PROG TECHNIQUE & PRACTICE
6.6 Recapitulation
Evaluate:
Fill in the blanks:
1. The process of getting a _____________ready is called formatting.
2. POST stands for ______________________________________.
3. The _________________chip receives the "Power Good" signal:
4. The word ‘booting’ has been derived from the word ________________
5. The ____________________ is the only file that can be seen by user.

Multiple Choice Questions:


1 The process of starting the Computer is called as:
a) Formatting b) Running
c) Compiling d) Booting
2 Which of the following is not a file loaded during booting process.
a) Boot.sys b) Command.com
c) MSDOS.sys d) IO.sys

Short Answer Questions:


1. Describe the process of Booting.
2. Explain types of Booting.
3. Why do we need to format a disk?
4. Write a brief notes on:
a. Cold Booting
b. Warm Booting
5. Explain the function of MSDOS.SYS file.

Long Answer Questions:


1 Explain the process of booting in detail.
2 Explain the process of formatting a disk in detail.
3 Write the functions of IO.Sys, Command.com files.

COPYRIGHT CORNELL INFOMATICS PVT LTD 126 PROG TECHNIQUE & PRACTICE
Chapter 7: Functions of Operating System

7.0 Objective
At the end of this chapter you will be able to:
Describe different functions of operating system.
Know memory management function of O/S.
Know Input/Output management function of O/S.
Know file management function of O/S.
Know device management function of O/S.

7.1 Memory Management


Memory Management: It is the efficient use of the memory available
along with the coordination and control.

7.1.1 Contiguous Allocation


Memory management can also be considered as, to find out the free
memory after the OS occupied some memory and the allocate the free
memory to the program that is going to be executed. If all the free
memory is allocated it is called contiguous memory. As the program
finishes its execution, the memory is immediately reclaimed by OS
and is ready to allocate it to another program.
This type of memory allocation is in DOS, CPM, Microcomputers. This
does not require any special H/W.
The disadvantage is that the memory is wasted or not properly
utilised. Programs that require more memory than the free space
cannot be executed. Unnecessary part of the program which is not
required initially is also loaded. Part by part loading of program is not
possible in this type of allocation.

18[18]

7.1.2 Segmented Memory Management

18[18] If the memory management is done by the software itself it is called overlay management.

COPYRIGHT CORNELL INFOMATICS PVT LTD 127 PROG TECHNIQUE &


PRACTICE
Segmented Memory Management is also called as “Partitioned
Memory Management. In this the partitions can be made only when
the memory is in continuous form. There are 2 types of partitions:

Static
and
Dynamic.

Static Partitions
As the OS occupies some part of the memory, it maintains a table of
partitions called partitions table, where partitions are predefined. This
table consists of partition no., size and status, which will be either
“Free” or “Allocated” Status. When a program is to be loaded into the
memory, the OS scans the partition table for the appropriate part in
which the program can be loaded completely.

COPYRIGHT CORNELL INFOMATICS PVT LTD 128 PROG TECHNIQUE &


PRACTICE
Advantages:
More than I program can be loaded in the memory. i.e. memory
utilisation is more CPU utilisation & also I/O utilisation is more.
Disadvantages:
Partitions are fixed, that is once programs are loaded, the remaining
space of that part of table cannot be resized. So wastage of space is
more.
In effect, a computer must provide, besides the hardware and high
level language translators. Many other routine which enables a user to
effectively use the system. An operation system provides theses
routines. The user of a computer does not merely interact with the
physical hardware of the machine. He interacts with a machine +
compilers + an operating system. Thus a user of a modern computer
uses a virtual machine with features which include, besides those
provided by its processor, a number of functions provided by the
operating system.
An operating system is a suite of programs which takes control over
the operation of the computer to the extent of being able to allow a
number of programs to be run on the computer without human
intervention by an operator.
Dynamic Partitions
In this, the OS keeps a table indicating which parts of memory are
available and which are occupied. Initially, all memory, is available for
user programs, and is considered one large block of available memory
(as a whole). When a job arrives, and needs memory, the OS
allocates the memory according to the requirement of the job, keeping
the rest available to satisfy future requests.
For example: Assume we have 256K memory available and the OS
occupies 40 K of the total memory, leaving 216K free memory for user
programs as shown in the following figure 7.1:

COPYRIGHT CORNELL INFOMATICS PVT LTD 129 PROG TECHNIQUE &


PRACTICE
Figure 7.1: Dynamic Partition (Memory Management Function).

COPYRIGHT CORNELL INFOMATICS PVT LTD 130 PROG TECHNIQUE &


PRACTICE
Suppose a number of jobs (programs) given are to be allocated into
the memory the jobs may be given as follows:

Job Memory Time


1 60K 10
2 100K 5
3 30K 20
4 70K 8
5 50K 15

With the memory available, jobs 1, 2 & 3 can be immediately allocated


as in figure 7.1. We have 26K which cannot be allocated to job # 4 as
it requires 70K. Now, as time passes, Job #2 will be over first,
releasing its memory allocation (fig.c). As soon as the memory
available is greater than memory required by job #4 (fig.d). After some
time, job #1 will get over and the memory will be released by Job #1.
As this memory is sufficient for job #5, it is loaded (fig f). This leads to
a number of small memory location remaining unused and not being
able to allocate it to any job due to its restriction of size. Such
phenomenon is called Fragmentation.
Advantage:
Memory wastage is comparatively less. Number of jobs can be
allocated memory simultaneously. Memory utilisation much more
better than static partition.
Disadvantages:
Even though memory is available which is less than some K bytes of
actual program requirement, job cannot be loaded and it is loaded till
the whole requirement is satisfied. Another problem is fragmentation.
Even though a number of free fragments are present consecutively,
the memory can’t be used due to partitions.

7.1.3 Compaction
One solution to the problem of fragmentation is compaction. The goal
is to shuffle the memory contents to place all the memory together in
one large block. For e.g. the memory map can be compacted as
shown in figure 7.2.

COPYRIGHT CORNELL INFOMATICS PVT LTD 131 PROG TECHNIQUE &


PRACTICE
Figure 7.2: Memory map and Compaction.
Compaction is not possible every time. For all these programs to be
able to work with their new locations, all the internal addresses must
be relocated. If relocation is static i.e. done at load time then
compaction is not possible. If relocation is dynamic i.e. done at
execution time, then compaction is possible the base registers.

COPYRIGHT CORNELL INFOMATICS PVT LTD 132 PROG TECHNIQUE &


PRACTICE
7.1.4 Page Memory Management
Dynamic Partition suffers from fragmentation. This occurs when
available memory is not contiguous, but fragmented into many
scattered blocks. Since the memory allocated to the job is required to
be contiguous, this scattered non-contiguous memory cannot be used.
This problem has 2 general solutions. Compaction changes the
allocation of memory to make free space contiguous and hence
useful.
Paging permits memory to be non-contiguous, thus allowing the
program/job to be allocated physical memory whenever it is possible.
Physical memory is broken into fixed sized blocks called frames.
Logical memory is also broken into blocks of the same size called
pages.
There are 2 tables made by OS, the Page Map Table and Memory
Map Table. The Page Map Table consists of Job No., Block No., while

the Memory Map Table consists of Block No., Status. (see figure 7.3).

Figure 7.3: Page Memory Management.


Suppose a Memory Map Table (MMT) shows its table status as shown
in the figure 7.3. Then if job #4 is to be allocated, then the MMT is

COPYRIGHT CORNELL INFOMATICS PVT LTD 133 PROG TECHNIQUE &


PRACTICE
scanned form top to bottom for free blocks. As Job #4 requires 3
pages, the first 3 blocks from MMT are allocated to Job #4 changing
the status of blocks to “A” for allocated. Alongwith it, the block no.
allocated to the page no. is also written in the PMT.
Again in paged memory management, the job is required to be loaded
completely. Suppose free blocks are available and a job requires
blocks even then the job won’t be loaded. Special H/W is required for
this, which adds to the cost of the machine.

7.1.5 Demand Paged Memory Management


There is always demand for more memory whatsoever may be the
memory available. For this, a concept called virtual memory, is
considered “Virtual” means not physically present. Some portion of the
disk is treated, as virtual memory. This memory is also called “Swap
Area”. Once a memory is used as a memory, then it is used only as
memory i.e. it cannot be used to store files, etc.).
In DPMM, job are divided into pages and memory into page-sized
blocks. In DPMM, the job is no. of pages and the PMT is updated.
Then, the first page of a job is allocated and the status of this page in
PMT is changed to “Y”. Next, the first pages are loaded onto HDD i.e.
virtual memory. Again in HDD, a table is managed. As and when a
page is demanded, it is loaded in main memory. Then some block
from main memory is exchanged with the “needful” block of virtual
memory. When a situation such as referring to a page which is not
loaded, rises it is called page fault or page interrupt which triggers the
swapping of blocks from main memory to virtual memory. Which block
is to be removed is decided by algorithm: 1) FIFO and 2) LRU (Least
Recently Used).

7.1.6 Virtual Memory


Virtual Storage may be described as a hierarchy of two memory
systems—one of them is a low cost, large capacity, low speed system
(on-line disk storage) and the other is high cost, small capacity, high
speed system (main memory). The operating system manages the
two memory systems in such a way that a user feels that he has
access to a single, large, directly addressable, and fast, main memory.
A virtual memory system facilitates its users to use a large
addressable memory space without worrying about the size limitations
of the physical main memory. Moreover, in case of multiprogramming
or timesharing systems, it also permits the sharing of the memory
space among several users efficiently and economically.

COPYRIGHT CORNELL INFOMATICS PVT LTD 134 PROG TECHNIQUE &


PRACTICE
In order to implement a virtual memory system, the main memory is
divided into fixed size contiguous areas, called page grams. In
addition, all users programs, residing on the on-line disk storage, are
also divided into pieces of the same size, called either pages or
segments, Now, only those program pages or segments that are
actually required at a particular time in the processing, need be in the
primary or real storage. The remaining pages or segments may be
kept temporarily in online or virtual storage, from where they can be
rapidly retrieved as and when needed following program interruption
(see the figure 7.4). The operating system handles the swapping of
program pages or segments between the main memory and the on-
line disk storage. (refer to figure 7.4).

Figure 7.4: Demand Paged Memory Management.


Internet Resource: Issues in Paging and Virtual memory can be
found at
http://williamstallings.com/Extras/OS-Notes/h10.html

COPYRIGHT CORNELL INFOMATICS PVT LTD 135 PROG TECHNIQUE &


PRACTICE
7.2 I/O Management

7.2.1 Device Management


Some devices or processor require the device throughout the
execution of program. Such type of devices are called as “Dedicate
Devices”. In this case, these devices cannot be deallocated from the
job till it is over. Some devices allow sharing and these are called
“Shared Devices”. In this case, the OS responsible to transfer
whatever comes to virtual device to actual device.

7.2.2 I/O Traffic Controller


In case of number of processor, which require the devices, the OS has
to decide upon, which process is to be given the device, when and
how long. Device driver or device handler are required for these
devices which actually performs the I/O.
Device status is maintaining the status or keeping the track of status,
information or characteristics of the status. Every device has a logical
name associated with it. Size in terms of cylinders, no. of heads, no. of
sectors, density (tpi), no. of bytes per sector are called physical value
device.
If a number of process require printer, instead of sending it to actual
printer, the output is redirected to virtual printer which stores the
output of number of queued processes in the respective order in the
queue. Once the output files are ready, the outputs are again queued
to special program which prints whatever may be in the queue this
concept of redirection is known as spooling.

7.2.3 Processor Management


FIFO or FCFS (First Come First Served)
A process submitted to CPU at a instant is taken up by it. If at that
instant another process demand CPU then it is queued. A queue of
processes is prepared in a sequence and CPU time is allotted to them
in sequence when previous is ended. Thus at a time only one process
is running and other processes get held up or waiting. To hold the
process a swap area is used. The disadvantage is a process may be
held up for more time. (see figure 7.5).

COPYRIGHT CORNELL INFOMATICS PVT LTD 136 PROG TECHNIQUE &


PRACTICE
Figure 7.5: FIFO or FCFS.

COPYRIGHT CORNELL INFOMATICS PVT LTD 137 PROG TECHNIQUE &


PRACTICE
This method of scheduling is only suitable for a single user operating
system.
Round Robin Scheduling
Each process is assigned a time interval called its quantum, which it is
allowed to run. If the process is still running at the end of the quantum
the CPU is pre-empted and given to another process. If the process
has blocked or finished before the quantum has elapsed the CPU
switching is done. When quantum runs out on a process, it is put up
on the end of the list. (see figure 7.6).

Figure 7.6: Round Robin Scheduling.


If the quantum is short, too many processes switches and lowers the
CPU efficiency and too long may cause poor response. Thus
reasonable quantum is set.
Priority Scheduling
The Round Robin scheduling assumes all the processes are
important. Some processes are to be run on a priority thus each
process is assigned a priority depending upon the user and user
request and run able process with high priority is set to run. To
prevent high priority process to run indefinitely, the scheduler may
decrease the priority of current running process. If this action causes
its priority to drop below that of the next highest process, a process
switch occurs. Priorities can be assigned to process statically or
dynamically. (see figure 7.7).

Figure 7.7: Priority Scheduling.

COPYRIGHT CORNELL INFOMATICS PVT LTD 138 PROG TECHNIQUE &


PRACTICE
7.3 File Management
The data on a computer is stored in the form of files. The files are
named. The data is stored in the form of either sectors or blocks and
they are associated with the files. To access data file for creation,
modification, removal, rearranging for storage and retrieval, a method
is devoted in every operating system called as file system. The file
system contains directory structure and directory entries which stores
the detail information about the file. The MS-DOS uses the Tree Type
file system in which the files are logically arranged under root as main
directory and subdirectories created by user, under which user files
will be stored. The file system is constantly updated for its up-to-date
status in terms of space available, space utilised, the number of files
and the file entries. Some OS also keep track of the deleted files also.

COPYRIGHT CORNELL INFOMATICS PVT LTD 139 PROG TECHNIQUE &


PRACTICE
7.3.1 File Management by MS-DOS
The details about the file is stored in File Control Block [FCB] and set
of files is stored in File Allocation Table (FAT). File Control Block
stores the description of the file called as directory entry or FAT entry.

The description stored is; (see Figure 7.8).

Figure 7.8: File Management (MS-DOS).

7.3.2 File Management by UNIX


The UNIX file system is characterised by:

A hierarchical structure.
Consistent treatment of file data.
The ability to create and delete files.
Dynamic growth of files.
The protection of file data.
The treatment of peripheral devices (such as terminals and
tape units) as files.

A file system consists of sequence of logical blocks, each containing


512, 1024, 2048 or any convenient multiple of 512 bytes, depending
on the system implementation: (see Figure 7.9).

Figure 7.9: Logical block.


A file system has the following structure:

COPYRIGHT CORNELL INFOMATICS PVT LTD 140 PROG TECHNIQUE &


PRACTICE
The boot block occupies the beginning of a file system, typically
the first sector, and may contain the bootstrap code that is read
into the machine to boot, or initialise the operating system.
Although only one boot block is needed to boot the system, every
file system has a (possibly empty) boot block.
The super block describes the state of a file system, how large it
is, how many files it can store, where to find free space on the file
system, and other information.
The inode list is a list of inodes that follows the super block in the
file system. Administrators specify the size of the inode list when
configuring a file system. The kernel references inodes by index
into the inode list. One inode is the real inode of the file system. It
is the inode by which the directory structure of the file system is
accessible after execution of the mount system call.
The data blocks start at the end of the inode data block list and
contain file data and administrative data. An allocated data block
can belong to one and only one file in the file system.

COPYRIGHT CORNELL INFOMATICS PVT LTD 141 PROG TECHNIQUE &


PRACTICE
Similarly software interrupts are available which can be used by the
programmer.
Example:

OPERATION INTERRUPT
VECTOR
1.Making program memory 21H
resident
2. Returning to system prompt 31H

7.3.3 DMA (Direct Memory Access)


Many controller support DMA. After the controller has read the entire
block from the device into its buffer and verified the checksum. It
copies the first byte or word into main memory at a address specified
by the DMA memory address. Then it increment DMA address and
DMA count is decreased by number of bytes transferred. This repeats
till DMA count becomes zero.
The DMA is invented because controllers waste CPU time in reading
data byte by byte. To make CPU free from this low level work DMA
register with internal buffer is used. The buffer acts a storage space
during synchronisation of transfer of data i.e. device speed is less than
the transfer speed thus it require a space to store a data temporarily
till device become free.

7.3.4 Stored Programs / Resident Programs


Normally when a instruction is given to run any program, the program
contents are loaded in the memory. The operating system allocates
the memory for the program to run. As soon as the program is
finished, terminated by user the memory is washed out by OS and
made free to run another program. But there are some programs,
which are to be kept in the memory till the user request OS to release
it from memory. Such programs are called as Stored Programs or
Resident Programs.
For Example:
Some component of operating system like Command
Processor, Device drivers etc. e.g. COMMAND.COM,
HIMEM.SYS.
Network loadable modules e.g. MONITO.NLM.
Database software like ORACLE e.g. ORACLE7.NLM.

COPYRIGHT CORNELL INFOMATICS PVT LTD 142 PROG TECHNIQUE &


PRACTICE
These stored programs are some time run in the background process
or they are constantly running for the user services. But there are
some stored programs which terminates in the memory and they stay
resident in the memory so that whenever the user wants them to be
executed he can activate the execution of such programs. Such
programs are called as TSR (TERMINATE AND STAY RESIDENT)
e.g. SideKick.

COPYRIGHT CORNELL INFOMATICS PVT LTD 143 PROG TECHNIQUE &


PRACTICE
7.4 Summary
In this chapter we have seen different functions of an operating
system. We have seen Memory Management Function, I/O
Management Function, Device Management Function, Processor
Management and File Management Function. While discussing
memory management function, we discussed different types of
memory management like static and dynamic. While discussing
processor management, we discussed about different process
scheduling methods. We have discussed the concept of Direct
Memory Access (DMA). We also have discussed the concept of
Stored program or Memory resident programs.

COPYRIGHT CORNELL INFOMATICS PVT LTD 144 PROG TECHNIQUE &


PRACTICE
7.5 Recapitulation
Evaluate:
Fill in the blanks:
1. DMA stands for
_______________________________________.
2. The MS-DOS uses the ______________ Type file system
3. In Round Robin Scheduling Each, process is assigned a time
interval called its ____________ which it is allowed to run.
4. Dynamic Partition memory allocation scheme suffers
from_______________________.
5. The devices or processor which require the device throughout
the execution of program. are called as
___________________________.

Multiple Choice Questions:


1. Which of the following is not a Process-scheduling algorithm?
a) FIFO b) LIFO
c) SJF d) Priority
2. Which of the following is not a memory management
technique?
a) Paging b) Segmentation
c) Fragmentation d) Demand Paging
3. Which of the following is not a resident program?
a) HIMEM.SYS b) COMMAND.COM,
.c) IO.SYS d) MONITO.NLM

Short Answer Questions:


1. Describe virtual memory.
2. What do you mean by compaction?
3. What is the difference between static & dynamic memory
allocation.
4. Write a brief notes on:
a . DMA
b. FCFS Scheduling
5. Explain how file management is done in DOS & UNIX.

COPYRIGHT CORNELL INFOMATICS PVT LTD 145 PROG TECHNIQUE &


PRACTICE
6. What is fragmentation & why it occurs.

Long Answer Questions:


1. Explain the Memory Management Function of an Operating
System.
2. Explain the Device Management Function of an Operating
System.
3. Explain the I/O Management Function of an Operating
System.
4. Explain the Processor Management Function of an Operating
System.
5. Explain the File Management Function of an Operating
System.

COPYRIGHT CORNELL INFOMATICS PVT LTD 146 PROG TECHNIQUE &


PRACTICE
Chapter 8: Coding Techniques

8.0 Objective
This chapter will teach you
Relations and types of relations.
Representation of relations in Digraph, Hasse diagram and Matrix
forms
Boolean Arithmetic
Equivalence relations
Types of Functions.

8.1 Introduction
There are many different types of recording and transmission
channels and consequently there will be different mechanisms, which
may result in errors. Irrespective of the cause, all of these
mechanisms cause one of two effects. There are large isolated
corruptions of transmitted bit stream of data by noise. These are
called error bursts, where numerous bits are corrupted all together in
an area, which is otherwise error-free. Alternatively, there can be
random errors affecting single bits or symbols. Whatever the
mechanism, the result will be that the received data will not be exactly
the same as those sent. It is a tremendous advantage of digital
communication that the discrete data bits will be each either right or
wrong. A bit cannot be off-colour as it can only be interpreted as 0 or
1. Thus the subtle degradations of analog systems are absent from
digital transmission channels and will only be found in converters.
Equally if a binary digit is known to be wrong, it is only necessary to
invert its state and then it must be right and indistinguishable from its
original value. Thus in digital transmission, error correction itself is
trivial; the hard part is working out which bits need correcting.
Error correction works by adding some bits to the data, which are
calculated from the data. Below figure 8.1 shows that this creates an
entity called a codeword, which spans a greater length of time than 1
bit alone. The statistics of noise means that whilst one bit may be lost
in a codeword, the loss of the rest of the codeword because of noise is
highly improbable. Codewords are designed to be able to correct
totally a finite number of corrupted bits. The greater the timespan over
which the coding is performed, the greater will be the reliability
achieved. However engineers have to compromise, because an

COPYRIGHT CORNELL INFOMATICS PVT LTD 147 PROG TECHNIQUE &


PRACTICE
infinite coding delay in the recovery of an error-free signal is not
acceptable. As shown in the figure below, all error correction depends
upon adding bits to the original message, and this of course increases
the number of bits to be transmitted, although it does not increase the
information. Thus error correction is going to reduce storage capacity,
because space has to be found for all the extra redundant bits. Once
the error-correction system is used, the signal-to-noise ratio of the
channel can be reduced, because the raised BER (Bit Error Rate) of
the channel will be overcome by the error correction system.

Fig 8.1 Concepts of Codeword

COPYRIGHT CORNELL INFOMATICS PVT LTD 148 PROG TECHNIQUE &


PRACTICE
The basic stages of an error-correction system are shown in Fig. 8.2

Figure 8.2 Block diagram of an error-correction system


Description:
Here is how a typical error-correction system works.
The first stage of add redundancy might be called error avoidance.
The data then pass through the channel, which causes some
corruptions due to noise. On receipt of the data the occurrence of
errors is first detected. This stage is the most critical in the entire
system, since it controls the subsequent actions. Hence reliability of
detection stage should be very high. The errors if any, can then be
corrected, if possible. Then, the concealment algorithm is invoked to
conceal uncorrected error. The system then outputs practically an
error-free data.

The error-detection and error-correction processes are closely related.


The actual correction of error is simplified tremendously by the
adoption of binary as already indicated earlier. Parity is a fundamental
concept in error detection. This is an extra bit added to the message
which carries no information of its own, since it is calculated from
other bits. As such it is a redundant bit. The addition of parity bits to
message bits gives rise to the codeword for transmission. The
codeword has a special property. If any corruption occurs, the
received codeword will not exhibit the special property when checked
at the receiving end; indicating the error.
We consider various coding techniques for error-detection and
correction, in the following sections of this chapter.

8.2 Alpha-Numeric Coding


A great many machines being built today are designed to handle
business type problems. Such machines must handle alphabetic and
numeric characters. A code that will handle both alphabetic and

COPYRIGHT CORNELL INFOMATICS PVT LTD 149 PROG TECHNIQUE &


PRACTICE
numeric characters is called an alpha-numeric code. The IBM card,
which is used to feed information into a great many computers, uses a
12 bit Hollerith code. This code uses two '1' bits or holes in the card
for each alphabetic character and one '1' or hole for each numeric
digit. Although the Hollerith code is used on IBM cards, it is not used
internally on their large electronic equipment. The 12 bit code is
converted to a six bit code which is listed below. The A and B bit
positions serve to tell the computer whether the information is numeric
or alphabetic.
B A 8 4 2 1 B A 8 4 2 1 B A 8 4 2 1 B A 8 4 2 1
0 0 0 0 0 0 0 A 1 1 0 0 0 1 J 1 0 0 0 0 1 S 0 1 0 0 1 0
1 0 0 0 0 0 1 B 1 0 0 1 0 K 1 0 0 0 1 0 T 0 1 0 0 1 1
2 0 0 0 0 1 0 C 1 1 0 0 1 1 L 1 0 0 0 1 1 U 0 1 0 1 0 0
3 0 0 0 0. 1 1 D 1 1 0 1 0 0 M 1 0 0 1 0 0 V 0 1 0 1 0 1
4 0 0 0 1 0 0 E 1 1 0 1 0 1 N 1 0 0 1 0 1 W 0 1 0 1 1 0
5 0 0 0 1 0 1 F 1 1 0 1 1 0 O 1 0 0 1 1 0 X 0 1 0 1 1 1
6 0 0 0 1 1 0 G 1 1 0 1 1 1 P 1 0 0 1 1 1 Y 0 1 1 0 0 0
7 0 0 0 1 1 1 H 1 1 1 0 0 0 Q 1 0 1 0 0 0 Z 0 1 1 0 0 1
8 0 0 1 0 0 0 I 1 1 1 0 0 1 R 1 0 1 0 0 1
9 0 0 1 0 0 1

Table 8.1: Hollerith Alpha-Numeric code


There are, of course, many ways in which an alpha-numeric coding
may be constructed, but one important feature should remain
throughout all such codes. The alphabetic characters should be
assigned binary numbers in such an order that alphabetic sorting is
possible. It should be remembered that the arrangement in alphabetic
order is rather important in many business problems.

8.3 Error-detecting and error-correcting codes


If it is problem of data transmission in which error may be introduced
in the channel, one way of detecting the error is to transmit the data
twice and comparing the received data thus obtained. Another
possibility is to duplicate the channel and sending data over two
channels and comparing the received data. The same schemes may
be applied to local logic circuits also. But in most of the cases, it can
be detected by an easier logic circuit if a proper code is used for the
data. The principle of such coding is to introduce a common property
for all valid code words. In case there is an error, this property will be
lost in the received code word. So a simple test for this property at the
output will detect the error.

COPYRIGHT CORNELL INFOMATICS PVT LTD 150 PROG TECHNIQUE &


PRACTICE
8.4 Parity check code
An extra bit (known as parity bit) is introduced in this code to make the
total number of 1's in the transmitted code word odd or even. If the
code word without the parity bit is the ordered set an an-1 ... a1, then the
even parity bit Peven and odd parity bit Podd are given by
Peven = a1 aÅ2 aÅ3 aÅ ... Ån ...
(8.1)
Podd = aÅ1 1 aÅ2 aÅ3 anÅ ... Å
... (8.2)
where means modulo - 2 sum.Å
e.g. for the basic information 1001, the check bits are:
for odd parity Podd = 1 = 1Å 0 Å 0 Å 1 Å1

for even parity Peven 1 = 0Å 0 Å 0 Å= 1


The odd parity check code for B.C.D. is given in
Table 8.2
Table 8.2: Odd parity check code for BCD

Decimal digit Code Decimal digit Code


8 4 2 1 Podd 8 4 2 1 Podd
0 0 0 0 0 1 5 0 1 0 1 1
1 0 0 0 1 0 6 0 1 1 0 1
2 0 0 1 0 0 7 0 1 1 1 0
3 0 0 1 1 1 8 1 0 0 0 0
4 0 1 0 0 0 9 1 0 0 1 1

All odd number of errors are detected in the above code.

8.5 Hamming's Code: (Non-Systematic Type)


Of increasing interest is the so-called error correcting Hamming's
Code. To understand the principle of error detection and correction, it
is worthwhile to introduce the concept of 'Hamming distance'. The
Hamming distance between two codewords is the number of places in
which the two code words differ. If the minimum Hamming distance
between any two codewords in a code is d then for (d-1) or fewer
errors, a received codeword cannot be a valid code word and hence
error can be detected. If there are d errors, then one transmitted code
word may be received as a different valid code word and hence error
cannot be detected. Extending this idea, we find if the minimum
distance between any code word is d, then number of errors less than

COPYRIGHT CORNELL INFOMATICS PVT LTD 151 PROG TECHNIQUE &


PRACTICE
d/2 will transform a code word to an invalid code word nearer to the
transmitted code word than any other valid code word. So at the
receiver, the corrected code word may be taken as the one which is
nearest to the received code word. For example, if the minimum
Hamming distance in a code is 3, then a single error will lead to a
reception of a code word nearest to the transmitted code word. In the
single parity check code considered earlier, it may be seen that the
minimum Hamming distance is 2 and hence a single error can be
detected but cannot be corrected. Table 8.3 shows a 7-bit Hamming
Code for single error correction. The basic information is a binary
coded decimal digit. In this code, the minimum Hamming distance is 3.

Decimal 7 6 5 4 3 2 1 ¬
digit A B C X4 D X2 X1 Positions

0 0 0 0 1 0 1 1
1 0 0 0 1 1 0 0
2 0 0 1 0 0 1 0
3 0 0 1 0 1 0 1
4 0 1 0 0 0 0 1
5 0 1 0 0 1 1 0
6 0 1 1 1 0 0 0
7 0 1 1 1 1 1 1
8 1 0 0 0 0 0 0
9 1 0 0 0 1 1 1

Table 8.3: 7 bit Hamming code (non-systematic) for single error


correction
A B C D are the binary digits for the decimal digit with the weightages
of 8, 4, 2, 1 respectively. X1, X2 and X4 are check bits.
X1 = Å1 ÅD ÅC A

X2 = Å1 ÅD ÅB A

X4 = Å1 ÅC ÅB A
At the receiver, the check bits are calculated. If there is error some of
the checks will fail indicating an error. The position of the error also
can be found out. For example, if there is an error in 6th position, X2
check and X4 check will fail indicating an error in (2 + 4)th position.
The Hamming code discussed in this section belongs to a class called
a non-systematic code. The concept of a systematic code is as
follows

COPYRIGHT CORNELL INFOMATICS PVT LTD 152 PROG TECHNIQUE &


PRACTICE
8.5.1 Concept of a Systematic Code
The encoder of Fig. 8.1 accepts a k-bit message (m1, m2, …. , mk) and
develops a codeword.
¢(m1 ¢, m2¢, …. mk, C1 , C2, Cq)
where k + q = n
The additional (n-k) symbols, viz. C1 , C2 ,... Cq are the parity bits
developed from the message bits m1, m2, ... , mk by some logic laws
like exclusive-ORing. If the message symbols are retained as they are
while transforming.
i.e. ¢(m1¢, m2¢, mk = m1, m2, .... , mk
then we have a systematic code. Non-systematic codes are formed
otherwise.
For a binary code, there are 2k = M code-vectors, represented by
X1 n ×× = (m1 , m2 , ... , mk , C1 , C2 .... Cq)
…(8.3)
The rate of the code is defined as Rc = k/n£, thus 0 Rc 1£
… (8.4)
Thus, an encoder accepts k-bit long message sequence from the
source and transforms them uniquely, by introducing n-k = q parity bits
to n-bit long codewords. There are thus 2n possible words each, an n-
tuple, given by Eq. (8.3).
Out of these 2n words, there are only 2k distinct codewords
corresponding to 2k message sequences, each a k-tuple. The channel
corrupts a codeward with the result that the received word may be
written as
W=M+E
... (8.5)
where M is the transmitted codeword and E is a n-bit long error
sequence due to noisy-nature of the channel. The decoder, by
observing W, must decide which particular codeword was most likely
transmitted. We now consider an important class of systematic codes,
viz. linear block codes.

8.6 Linear Block Codes


Let an arbitrary code vector be,
X = (X1 , X2 ... Xn)

COPYRIGHT CORNELL INFOMATICS PVT LTD 153 PROG TECHNIQUE &


PRACTICE
A systematic block code consists of vectors whose first k elements
are identical to message bits, the remaining (n-k) elements are parity
check bits.
Code vector takes the\ form

Xn ×1 × = (m1 m2 ... mk C1 C2 ... Cq)

where n = q + k Þ q = n-k
In partitioned notation, code vector is
x = (M : C) ..
(8.6)
where M = k-bit message vector, and
C = q-bit parity check vector.
Given a message vector M, the corresponding code vector
X for a systematic (n, k) block code can be obtained by matrix
multiplication
X = MG
... (8.7)
Here Gk × n is generator matrix having general
structure
G = (Ik : P) ...
(8.8)
where Ik = (I)k × k , identity matrix of order k.

Ik × k reproduces message vector for first k elements of X.


Pk × q generates check vector, via.
C = MP ... (8.10)
using Ex-Oring
i.e. jth element of C is computed using jth column of P such that
Cj = m1 P1j Å m2 P2j mÅ ... Åk Pkj for all j from 1 to q
... (8.11)
As an illustration of linear block code we consider a (7, 4) systematic
Hamming code in Example

COPYRIGHT CORNELL INFOMATICS PVT LTD 154 PROG TECHNIQUE &


PRACTICE
8.6.1 Hamming Code
Hamming code is an (n, k 3 check bits³)_ linear block code with q
and
n = 2q - 1 , k = n-q ..
(8.12)
\ code rate Rc = k/n = 1 = q/2q - 1
... (8.13)
\ Rc 1 if q» >> 1.
dmin = 3
\ Hamming code can be used for single-error correction or double-
error detection.

COPYRIGHT CORNELL INFOMATICS PVT LTD 155 PROG TECHNIQUE &


PRACTICE
Example 8.1
Construct a (7,4) Systematic Hamming Code.
Solution:
This means n = 7 and k = 4
Number of check bits, q = n - k =\ 3
and number of message bits, m = n - q = 7 - 3 = 4
For the (7, 4) Hamming code, we have the following:
Gk × n = generator matrix = (Ik : P)
is a 4 × 7 matrix.
Ik = I4 = identity matrix of order 4.
Pk × q = parity matrix = P4 × 3 here

Let k = 4 3-bit) words withºrows of the P submatrix consist of all q-bit


( two or more 1's arranged in any order.
Now all words with q = 3 bits are 010 to 710 as shown in Table 8.4.
Table 8.4

Decimal Binary equivalent


number
0 0 0 0
1 0 0 1
2 0 1 0
3 0 1 1

4 1 0 0

5 1 0 1

6 1 1 0

7 1 1 1

Thus
step (1):

COPYRIGHT CORNELL INFOMATICS PVT LTD 156 PROG TECHNIQUE &


PRACTICE
COPYRIGHT CORNELL INFOMATICS PVT LTD 157 PROG TECHNIQUE &
PRACTICE
Step (2):

………..(i)

Step (3):
Generator matrix Gk×n = G4×7
G = (Ik : P)

Message bits are 4 in number in (7, 4) Hamming code.

\ 24 = 16 combinations of m4 m3 m2 m1 are possible.


As shown in Table 8.5; corresponding 4-bit binary equivalents of
decimal numbers 0 to 15 are

Decimal m4 m3 m2 m1 Decimal m4 m3 m2 m1
No No.
0 0 0 0 0 8 1 0 0 0
1 0 0 0 1 9 1 0 0 1
2 0 0 L 0 10 1 0 1 0
3 0 0 1 1 11 1 0 1 1
4 0 1 0 0 12 l 1 0 0
5 0 1 0 1 13 1 1 0 1
6 0 L 1 0 14 1 1 1 0
7 0 1 1 1 15 1 1 l 1

Table 8.5: Possible message bit combinations in (7, 4) block code


Step 5: We now construct check vector C, using martix product
C = MP
The check bits of product matrix are obtained by EX-ORing.

i.e. jth element of C is computed using jth column of P such that


Cj = m1 P1j mÅ2 P2j mÅ ... Åk Pkj for all j ranging from 1 to q.

COPYRIGHT CORNELL INFOMATICS PVT LTD 158 PROG TECHNIQUE &


PRACTICE
Thus in this case,
C1 = m1 p11 mÅ2 p21 mÅ3 p31 Å m4 p41

= (m1 (mÅ• 1) 2 (mÅ• 1) 3 Å• 1) (m4 • 0)


picking the values of Pij from Eq. (i)
Hence, C1 = m1 mÅ2 mÅ3 0.Å

Similarly, C2 = m1 p12 mÅ2 p22 mÅ3 p32 Å m4 p42

= (m1 (mÅ• 0) 2 • (mÅ1) 3 • (mÅ1) 4 • 1)

i.e. C2 Å= 0 m2 mÅ3 mÅ4

C3 = m1 p13 mÅ2 p23 mÅ3 p33 mÅ4 p43

= (m1 (mÅ• 1) 2 • (mÅ1) 3 (mÅ• 0) 4 • 1)

C\3 = m1 mÅ2 mÅ 0 Å4
Step 6: Hence, we get the encoder shown in Fig. 8.3 that
carries out the check-bit calculations for the given Hamming code.

Fig. 8.3(a): Encoder for (7, 4) Systematic Hamming Code


Description
Each block of message bits going to the TX is also loaded into a
message register. The cells of the message register are connected to
EX-OR gates whose outputs = check bits. The check bits are stored in
another register and shifted out to the TX after the message bits. An
input buffer holds the next block of message bits, while the check bits
are shifted out. The cycle then repeats with the next block of message
bits.

COPYRIGHT CORNELL INFOMATICS PVT LTD 159 PROG TECHNIQUE &


PRACTICE
Step of the given Hamming code; we use the × 7: To find all code-
vectors obtained by partitioning of matrices using M and × matrix C.
i.e. X = (M : C)
M = k-bit message vector, with k=4
Where
and C = q-bit parity check vector, with q=3
This implies that
X is an n = (4+3) = 7 bit code vector
The message block size k = 4 (here) and length of code vector n = 7.
Hence there are 2k = 24 = 16 possible message blocks e.g. the code
vector X10 for message block M = 1010 is given by X1×7 = M10 • G

Thus the elements of row vector X, viz


X = (x1 , x2 , x3 , x4 , x5 , x6 , x7)
are 4 vector M = 1010 and 4 × 7 matrix obtained by the matrix
multiplication of 1 × G; the addition being done by EX-ORing.
e.g. x1 0 = 1Å 0 Å 0 Å 0.0 = 1 Å 1.0 Å 0.0 Å= 1.1

Similarly, (say) x5 0 = 0, etc. ProceedingÅ 1 Å 0 Å 0.0 = 1 Å 1.1 Å


0.1 Å= 1.1 in this manner, we get the code vector X corresponding to
message block M = 1010
as X10 [M : C]º= (1, 0, 1, 0, 0, 1, 1)

Check bits for M = 1010 are C =\ 011 etc.


Step 8: Similarly for other 15 message blocks the codewords can be
found.
Table 8.6 shows the resulting 24 º= 16 code words and their weights (
number of 1s in code word) indicated by W(X).
Table 8.6: Code words for (7, 4) Hamming code

Decimal M C W(X)
No.
m4 m3 m2 m1 C3 C2 C1
0 0 0 0 0 0 0 0 0

COPYRIGHT CORNELL INFOMATICS PVT LTD 160 PROG TECHNIQUE &


PRACTICE
1 0 0 0 1 0 1 1 3
2 0 0 1 0 1 1 0 3
3 0 0 1 1 1 0 1 4
4 0 1 0 0 1 1 1 4
5 0 1 0 1 1 0 0 3
6 0 1 1 0 0 0 1 3
7 0 1 1 1 0 1 0 4
8 1 0 0 0 1 0 1 3
9 1 0 0 1 1 1 0 4
10 1 0 1 0 0 1 1 4
11 1 0 1 1 0 0 0 3
12 1 1 0 0 0 1 0 3
13 1 1 0 1 0 0 1 4
14 1 1 1 0 1 0 0 4
15 1 1 1 1 1 1 1 7

19[19]

8.7 Decoding Operation in Linear Block Codes

While generator matrix G = is used in encoding


operation, the parity check matrix H(n

is used in decoding operation.


Proof : Let X be a codeword that was transmitted over noisy channel
and let Y be the noise-corrupted vector that was received.
Then ÅY = X + E (Note: addition)
Where E = error vector
... (8.14)
The receiver does not know X and E; its function is to decode X from
Y; and the message block M from X (= MG).

Smallest non-zero weight = 3. This implies that the minimum Hamming distance is given
19[19] by dmin = 3.

COPYRIGHT CORNELL INFOMATICS PVT LTD 161 PROG TECHNIQUE &


PRACTICE
The receiver does the decoding operation by determining an (n—k)
vector S defined as
S = Y HT, called error syndrome of Y.
... (8.15)
S = (X + E) HT = XHT + EHT
But XHT = 0
S = EHT
... (8.16)
Syndrome of received vector Y is zero if Y is a valid code word.
If error occurs in transmission then syndrome S of received vector
i.e. [S = Y HT] is non-zero.
Also, S is related to the error vector E (S = EHT) and the decoder uses
S to detect and correct errors.

8.7.1 Use of Error Syndrome of Received Codeword to


Recognise Correct Transmitted Codeword
The previous sections explained how correctable single error patterns
can be decided at the receiving end from the received codewords with
the help of parity check matrix H in conjunction with the error
syndromes S. The following example illustrates the relationship
between syndrome vector and the rows (columns) of HT (H) matrix.
Example 8.2
A (7,4) Hamming code has generator matrix given by

A transmitted code vector


1011001
is received as
1001001
Find the error syndrome of received codevector and establish its
relationship with the parity check matrix.
Solution:
From data, transmitted codeword is

bit position 1 2 3 4 5 6 7

COPYRIGHT CORNELL INFOMATICS PVT LTD 162 PROG TECHNIQUE &


PRACTICE
X= 1 0 1 1 0 0 1

and received codeword is

bit position 1 2 3 4 5 6 7
Y= 1 0 0 1 0 0 1

Since X and Y do not match, it follows that when codeword X is


transmitted over the channel, noise has corrupted the signal to give
the received codeword Y; resulting in error transmission. The error
vector E is obtained from X and Y by the following EX-OR operation:
Y=XÅE

i e [ 1 0 0 1 0 0 1 ] º [ 1 0 1 1 0 0 1] Å [e1 e2 e3 e4 e5 e6 e7]
Hence we get the following relations to compute elements of E vector:

l = 1 Å e1 Þ e1 = 0
0 = 0 Å e2 Þ e2 = 0
0 = 1 Å e3 Þ e3 = 1
1 = 1 Å e4 Þ e4 = 0
0 = 0 Å e5 Þ e5 = 0
0 eÅ= 0 6 Þ e6 = 0
1 eÅ= 1 7 Þ e7 = 0

Thus the error-vector E corresponding to given transmitted and


received codevectors X and Y is obtained as
E = [0 0 1 0 0 0 0]
or equivalently with the third row of [HT] matrix. But it is proved above
that the error in transmission has occurred in third bit position. Hence
we may conclude that syndrome S for an error in the third bit
corresponds to the third row of [HT] matrix, or third column of [H]
matrix.
We can generalize the result of Example 8.2 as follows
A single error in the ith bit of transmitted codeword X would lead to an
S-vector which is identical with the ith row of [HT] matrix or with the ith
column of [H] matrix. Thus syndrome vectors follow directly from the
columns of parity check matrix.
From Example 8.2, it follows that single errors can be corrected at the
receiver by comparing
S = Y HT= E HT

COPYRIGHT CORNELL INFOMATICS PVT LTD 163 PROG TECHNIQUE &


PRACTICE
with the rows of [HT] matrix, correcting the i th received bit if S matches
with the i th row of HT. It is to be noted further that the number of
different syndromes generated
Note that in Example 8.2 X and Y differ in third bit position and the
error vector E has the entry 1 in its third bit position.
Corresponding to the given generator matrix G, the parity check matrix
is
Now the syndrome of received codevector is given by
S = EHT Å(Note : addition in product matrix).

Thus S=[101]
….(c)
It is to be noted that presence of non-zero elements in S indicates
errors.
It is further observed from Equations (a) and (c) that the syndrome
vector matches with the third column of parity check matrix [H]. The
number of possible n-bit error-vectors is given by 2n — k, where bits.
Thus for (7, 4) Hamming code, we generated = 2(7 -4) = 23 = 8.
For error-free transmission,
i.e. E = [ 0 0 0 0 0 0 0 ] implies S = [0 0 0]

COPYRIGHT CORNELL INFOMATICS PVT LTD 164 PROG TECHNIQUE &


PRACTICE
8.7.2 Table - look up Decoder for Block code
These observations lead us to develop the look-up table for the error-
syndromes corresponding to the (7, 4) Hamming code, as given in
Table 8.10. The above discussion leads to the block diagram of Table-
look up decoder given in Fig. 8.3(b).

Number S = Elements of row of HT E = Error syndromes


of row of for
HT ( 7, 4) Hamming code
el e2 e3 e4 e5 e6 e7
1 1 1 1 0 0 0 0 0 0
2 1 1 0 0 1 0 0 0 0 0
3 1 0 1 0 0 1 0 0 0 0
4 0 1 1 0 0 0 1 0 0 0
5 1 0 0 0 0 0 0 1 0 0
6 0 1 0 0 0 0 0 0 1 0
7 0 0 1 0 0 0 0 0 0 1

Table 8.7 : Look-up table for error syndromes In respect of (7, 4)


Hamming code

Fig. 8.3(b) Table look-up decoder


It is thus obvious that the syndrome depends entirely on the error
pattern and is given by the relation
S = EHT
….(8.17)
It does not depend upon the specific transmitted codevector.

COPYRIGHT CORNELL INFOMATICS PVT LTD 165 PROG TECHNIQUE &


PRACTICE
It is further to be noted that the error correction scheme discussed
above would work for single error correction, and would not work if
multiple errors occur.
To accommodate this look-up table, given in Table 8.7 the decoder
needs to store only (q + n) x 2q bits.
[in this case, q = 7 — 4 = 3, n = 7]
[in this case, q = 7 — 4 = 3, n = 7]
number of bits in look-up table
= (3 + 7) x 2 = 10 x 8 = 80 bits.

20[20]

But suppose a received word happens to have two errors, such that
E= (1 0 0 0 0 1 0)
The decoder then calculates S from
S = YHT = EHT (Note: modulo-2 addition)

From Table 8.7 corresponding to S = (1 1 1), the single- error pattern


Ê = (1 0 0 0 0 0 0) is obtained.
The decoder output is then Y + Ê which contains three errors, the two
transmission errors plus the erroneous correction added by the
decoder.

20[20]
If such multiple transmission errors per word are sufficiently infrequent, we need not be
concerned about the occasional extra errors committed by the decoder.
If multiple errors are frequent a more powerful code would be required, eg.
An extended Hamming code (8, 4) can be developed by appending a fourth check bit such
that all code-words have even parity. Then
(a) we can develop code-words (16 in number since m = 4)for this (8, 4) Hamming code, such
that dmin = 4.

(b) The corresponding equation for 4th check bit C4 can be obtained in terms of message bits
m1, m2, m3, m4.
(c) Then the decoding system of Fig. 8.3(b) of Table look-up decoder can be modified to
perform double-error detection as well as single- error correction

COPYRIGHT CORNELL INFOMATICS PVT LTD 166 PROG TECHNIQUE &


PRACTICE
8.8 Summary of Error. Detection and Error
Correction Capabilities of Linear Block Codes
We now summarise the following aspects regarding a linear block
code:
(i) Weight W (X) of a codeword X is defined as
W (X) = Number of l's in X
…(8.18)
(ii) The Hamming distance (d) between two codewords X1
and X2 is defined as the number of elements of these
codewords in which they differ.
(iii) The minimum (Hamming) distance (dmin) of a block
code is the smallest Hamming distance between any pair
of codewords in the code, i.e.
dmin = [W/(X)]min, X being a non-zero codeword
...(8. 19)
(iv) Number of errors that can be detected in each
codeword is given by
d£S min —1
...(8.20)
(v) Number of errors that can be corrected in each
codeword is given by

(vi) The code rate of a linear (n, k)block code is given by


. ...(8.21)
Rc = k/n

8.9 Cyclic Codes


It is a subclass of linear block codes with a cyclic structure.
Code vector of n-bits (in indexed form) is
X = (x n—1 x n—2 … x1 X0)
….(8.22)

COPYRIGHT CORNELL INFOMATICS PVT LTD 167 PROG TECHNIQUE &


PRACTICE
Fig 8.4 N-Bit Shift-Register for Cyclic Code
Let X be loaded into a shift register with (b) feedback connection from
first to last stage as shown in Fig. 8.4
Left shift by one position
Fig. 8.4 : n-bit shift-register for cyclic code
X´ = xn — 2 x n — 3 … x1 x0 xn — 1
…. (8.23)
One Þmore left shift by one position
X´ = xn — 3 x n — 4 … x1 x0 xn — 1 xn — 2 , etc.
Note that a binary linear code is a cyclic code, if it satisfies the
following properties:
(a) Linearity Property: Sum of two code words is also a code word.
(b) Cyclic Property: Any cyclic shift of a code word is also a code
word.
The cyclic property can be treated mathematically by associating a
code vector X with the polynomial
X(p) = x n—1 pn—1 + x n—2 pn—2+ ….. + x1 p + x0
... (8.24)
(p : arbitrary real variable). The powers of p denote the positions of
code word bits represented by corresponding coefficients of p.
Manipulation on X(p) are done using mod-2 arithmetic.
Note substraction operation - mod-2 addition)Þ 1 = 0 Å: 1

X(p) =ÞX(p) + Z(p) = 0 \ Z(p)


From Eq. (8.24) we get
p X(p)\ = xn — 1 pn + x n — 2 pn — 1 + … x1 p2 + x0p
Also, Eq. (2.23) implies that X´ (p) = xn—2 pn — 1 + …. + x1 p2 + x0p + xn
— 1.

Hence addition of these expressions gives


p X(p) + X´(p) = xn — 1 pn + 0 + .…. + 0 + 0 + x n—1
due to Ex - OR rules

COPYRIGHT CORNELL INFOMATICS PVT LTD 168 PROG TECHNIQUE &


PRACTICE
X'(p) = p X (p)+ X \n—l (pnÞ+ 1) first left Shift
...(8.25)
Iteration gives similar expression for multiple shifts.
Polynomial pn + 1 and its factors are important in cyclic codes.
For (n, k) cyclic code, generator polynomial is
G(p) = pq + gq—1 pq—1 +....g1 p + 1
where q = n — k ...
(8.26)
Coefficients gq—1, gq—2, … g1 are such that G(p) is a factor of pn + 1
Note : For (7, 4) Hamming code, n = 7, k = 4 Þ q = n- k = 3
\ pn + 1 = p7 + 1 = (p + 1) p3 + p2 + 1 p3 + p +1 which are (i.e.
polynomial that cannot be factored using only polynomials with
coefficients from binary field) • An irreducible polynomial of degree
m(<n) is said to be primitive if the smallest positive integer n for which
the polynomial divides (pn+ 1)is n = 2m - 1. Here only two polynomials
viz. p3+ p2 + 1 and p3 + p + 1 are primitives.
\ Either of them can be taken as generator polynomial.
(say) G(p) = p3 + p + 1
i.e. G(p) = 1 • p3 + 0 p2 + 1 p + l
Hence in coefficient form, we may write
\ G(p) = 1 0 1 1
Then X(p) = Qm(P) G(p) …..
(8.27)
Where Qm(p) = block of k message bits

Note: G(p) is a factor of pn X'(p) = p X(p) + xÞ+ 1 n—1 (pn+ 1) is


satisfied by G(p) and hence by X(p).
Note : Any factor of pn + 1 that has degree q = n — k may serve as a
generator polynomical for a cyclic code. but it does not necessarily
generate a good code.

8.10 Shift Register Encoder for Systematic Cyclic


Code
Cyclic codes may be systematic or non-systematic. This is decided by
the term QM(p) in Eq. (8.27).
In systematic (n, k) cyclic codes, the definitions of message- bit
polynomial M(p) and check-bit polynomial C(p) are as under

COPYRIGHT CORNELL INFOMATICS PVT LTD 169 PROG TECHNIQUE &


PRACTICE
M(p) = mk — 1 pk — 1 + ..... + m1p + m0
C(p) = Cq—1 pq-1+ ... c1p + C0 (... q = n — k)
Then code-word polynomial should
X(p) = pq M(p) + C(p)
... (8.28)
But X(p) = QM(p) G(p)
…(8.29)
p\q M(p) + C(p) = QM(p) G(p)
i.e. pq M(p) = QM(p) G(p) + C(p)
by the property of modulo-2 addition.
p\q M(p)/G(p) = Qm(p) + C(p)/G(p)
... (8.30)
i.e. C(p) = rem [pq M(p)/G(p)]
... (8.31)
Thus C(p) equals the remainder when Pq M(p) is divided by G(p).

COPYRIGHT CORNELL INFOMATICS PVT LTD 170 PROG TECHNIQUE &


PRACTICE
This gives rise to the shift-register encoder in Fig. 8.5 to generate a
systematic cyclic code.

Fig. 8.5 Shift Register Encoder for Generating Systematic


Cyclic Code
The encoding operation consists of two steps:
With the gate turned on and the switch (SW) m position 1, the
message bits (m0, m1, .... mk—1) are shifted into the register (with
m0 first) and simultaneously into the communication channel. As
soon as the k-message bits have been shifted into the register, the
register contains parity check bits (r0, r1 …. rq — 1 (Cº) 0, C1, …. Cq
— 1).

With the gate turned and the switch (SW) in position 2, the
contents of the shift register are shifted into the channel. Thus the
code-word X is generated and sent over the channel,
where X = (xn-1, xn-2, ….. x1 x0)
(mºk-1 mk-2 … m1 m0 : Cq-1 Cq-2 … C1 C0)
Thus the message has number of bits = k, and check vector contains
q bits.
Hence the shift register encoder generates the codeword X having a
total of k + q = n bits.
The hardware required to implement the encoding scheme consists of
an (n—k) = q bit shift register
a maximum of (n — k) = q modulo-2 adders.
an AND gate, and
a counter to keep track of the shirting operations.

COPYRIGHT CORNELL INFOMATICS PVT LTD 171 PROG TECHNIQUE &


PRACTICE
This encoder is much simpler than the encoder needed for
implementing an (n, k) linear block code in matrix form, where portions

of the G and H matrix have to be stored. 21[21]

8.10.1 Syndrome Calculation at Receiver


Given a received vector Y, the syndrome is determined from
S(p = rem [Y(p)/G(p)]
… (8.32)
(a) If Y(p) is a valid code polynomial, then
G(p) will be a factor of Y(p) and S(p) = rem [Y(p)/G(p)] = 0
detectedÞ 0 ¹(b) If S(p) error.
Example 8.3
Design the encoder for the (7, 4) cyclic code generated by G(p) = p3 +
p + (1 1 0º1. Verify its operation for the message vector M 0)
Solution:
The generator polynomial is
G(p) = 1 p3 + 0p2 + 1 p + 1
pº3 + g2 p2 + g1P + 1.
(Note: g0 = 1 always).
It therefore follows that g2 = 0, g1 = 1
Also, q — n — k = 7 — 4 = 3.
Hence the generalized block diagram of shift register encoder given in
Fig. 8.6. reduces to that shown in Fig. 8.6

21[21]
(i) The code vector in part(a) corresponding to message vector (1 0 1 0) is expressed in non
symmetric form, viz (1 0 0 1 1 1 0), since its first four elements do not match with 1 0 1 0.
(ii) The code vector in part (b) is expressed in symmetric form, viz.
(1 0 1 0 : 0 1 1), since its first four elements match with message vector 1 0 1 0.
(iii) However, if we write all the sixteen code vectors by using the two methods, it will be
observed that the code contains the same set of 16 code vectors.

COPYRIGHT CORNELL INFOMATICS PVT LTD 172 PROG TECHNIQUE &


PRACTICE
Fig 8.6 Cyclic code encoder pertaining to Example 8.3
The three flip-flops r2, r1, r0 (corresponding to q = 3) of the shift register
hold check bits C2, C1, C0. The register bit inputs before shifts, are
given by the equations:
r¢2 = r2, r¢1 = r1 and r¢0 = r0
… (i)
Register bit outputs after the shift are available from the circuit of Fig.
8.7 and are given as follows:
¢r2 = r1

¢r1 = r0 + rp = r0 + (m + r2) when feedback switch SW 1 is closed


….(ii)
where rp = register output at node P in Fig. 8.7 after closure of switch
SW 1
= m+ r2
and r¢0 = rp = m + r2
...(iii)

22[22]

Table 8.8: Shift register bit positions for message M = (1 1 0 0)

Input bit register bits before register bits after shift


of shift (acc. to Eq. (ii) and (iii))
message (acc. to Eq. (i)
m
r2 = r2¢ r1 = rI¢ r0 = r¢2 = r¢1 = m Å r¢0 = m
r0¢ r1 r2 Å r0 Å r2
- 0 0 0 0 0 0
1 0 0 1 0 1 Å 0 Å 0 1 0=1Å

22[22]
Additions in Eqs. (ii) and (iii) are modulo 2 additions. When the message (1100) is input
(MSB first), then the shift register bit positions will be indicated as shown in Table 2.8.

COPYRIGHT CORNELL INFOMATICS PVT LTD 173 PROG TECHNIQUE &


PRACTICE
=1
1 0 0 1 1 1 1 = 0Å 0 1 0=1Å
Å
0 0 0 1 0 0 1 = 0Å 1 0 1=1Å
Å
0 1 = 1Å 0 0 0=0Å
Å

At the end of passage of last bit (0) of the message (1 1 0 0) in the


shift ¢register, the shift register contents are r2 ¢= 0, r1 = ¢1, r0 = 0 i e.
The switch SW 1 is now opened and switch SW 2 closed to check bit
position A to transmit check bits C2, C1, C0 ¢as the bit stream r2¢, r1 ¢, r0
i.e.
Check-bit ¢ (rº (C2, C1, C0) ºvector is C 2¢, r1¢, r0º) (0, 1, 0)
The code vector is then given by
X = [M : C] = (1 1 0 0 : 0 1 0)
We thus require 7 shift pulses to output a 7-bit code vector to
transmitter corresponding to 4-bit message vector, as shown in Table
8.9
Table 8.9: Operation of (7, 4) cyclic code converter

Shift SW1 SW2 input bit shift-reg outputs bit


Clock position position m transmitted
¢r2 ¢r1 ¢r0
1 On A 1 0 L 1 l
2 On A 1 1 0 l 1
3 On A 0 0 0 l 0
4 On A 0 0 1 0 0
5 Off B – 0 1 0 0
6 Off B – 1 0 0 1
7 Off B – 0 0 0 0

... (8.34)

As an illustration, let the transmitted codeword in (7, 4) cyclic code be


X = (1 1 0 0 : 0 1 0)
X = (1 1 0 0 : 0 1 0)

COPYRIGHT CORNELL INFOMATICS PVT LTD 174 PROG TECHNIQUE &


PRACTICE
Cyclic Þshifts to left X' = (1 0 0 0 : 1 0 1)
X" = (0 0 0 1 : 0 1 1)
X'" = (0 0 1 0 : 1 1 0)
X'"' = (0 1 0 1 : 1 0 0)

The received code polynomial Y(p) is given by


E(p) where E(p) =ÅY(p) = X(p) error polynomial
But we know that X(p) = QM(p) G(p) ...
(8.35)

From Eqs. (8.34) and (8.36) it follows that

Hence syndrome polynomial S(p) depends on E(p), but not on X(p)


S(p) is a polynomial of degree n—k—1 or less.
\ Syndrome of Y(p) is the remainder resulting from
dividing the error pattern by the generator polynomial.
\ Syndrome contains information about error pattern that
can be used for error correction.
The syndrome calculation circuit for the cyclic code is given in Fig.
8.7. Structurally it is similar to the cyclic code encoder shown in Fig.
8.5.

COPYRIGHT CORNELL INFOMATICS PVT LTD 175 PROG TECHNIQUE &


PRACTICE
Fig. 8.7 Syndrome Calculation Circuit for (n, k) Cyclic Code
Steps in syndrome calculations from Fig. 8.7 are as follows :
Step 1 : The register is first initialized. Then, with gate II
turned ON and gate I turned off the received vector Y(p) is
entered into the shift register.
Step 2 : After the entire received vector is shifted into the
register, the contents of the register will be the syndrome. Now
gate II is turned off. gate I is turned ON and the syndrome
vector is shifted out of the register. The circuit is now ready for
processing the next received vector.

8.12 Error Detection


Cyclic codes are extremely well suited for error detection. Error
detection can be implemented by simply adding an additional flip-flop
to the syndrome calculator. If the syndrome is non- zero, the flip-flop
sets and an indication of error is provided. Thus, cyclic codes are
much easier to implement for error detection than non-cyclic, linear
block codes.

8.14.1 Error Correction


If we are interested in error correction, then the decoder has to
determine a correctable error pattern E(p) from the syndrome S(p) and
add E(p) to Y(p) to determine the transmitted code vector X(p).
i.e. Y(p) = X(p) Å E(p)

X(p) = Y(p) Å E(p)


... (8.38)
In principle, the decoding operation can be implemented using the
system shown in Fig. 8.8.
The steps in error-correction procedure are as follows
Step 1 : The received vector is shifted into the buffer register
and the syndrome register.
Step 2 : After the syndrome for the received vector is
calculated and placed in the syndrome register, the contents of
the syndrome register are read into the detector.

COPYRIGHT CORNELL INFOMATICS PVT LTD 176 PROG TECHNIQUE &


PRACTICE
Fig 8.8 Decoder for Cyclic Codes
Receive data is shifted in with switch Sin closed and switch Sout open:
while error detection is performed with switch Sout closed and Sin open.
The detector is a combinational logic designed to output a 1 if and
only if the syndrome in the syndrome register corresponds to a
correctable error pattern with an error at the highest order position pn-1.
That is, if the detector output is 1, then the received digit at the right-
most stage of the buffer registered assumed to be erroneous and
hence is corrected. If the detector output is 0, then the received digit at
the right-most stage of the buffer register is assumed to be correct.
Thus the detector output is the estimated error value for the digit
coming out of the buffer register.
Step 3 : The first received digit is shifted out of the buffer and
at the same time, the syndrome register is shifted right once. If
the first received digit is in error, the detector output will be 1
which is used for correcting the first received digit. The output
of the detector is also fed to the syndrome register to modify
the syndrome. This results in new syndrome corresponding to
the altered received vector shifted to the right by one place.
Step 4 : The new syndrome is now used to check whether or
not the second received digit, now at the right most stage of
the buffer register, is an erroneous digit. If so, it is corrected, a
new syndrome is calculated as in step 3 and the procedure is
repeated.
Step 5 : The decoder operates on the received vector digit-
by-digit until the entire received vector is shifted out of the
buffer.
At the end of the decoding operation, (i.e. after the received vector is
shifted out of buffer), errors will have been corrected if they
correspond to an error pattern built into the detector and syndrome
register will contain all zeros. Otherwise, it implies receipt of an
incorrectable error pattern.

COPYRIGHT CORNELL INFOMATICS PVT LTD 177 PROG TECHNIQUE &


PRACTICE
Self-Study:
Study on your own, the following:
Convolutional Codes and its diagrammatic representation
Sequential Decoding
Viterbi Algorithm
Reference:
Introduction to Digital Communication 2/e
Rodger E. Ziemer
Roger W. Peterson
Published August 2000 by Prentice Hall
ISBN: 0-13-896481-5

COPYRIGHT CORNELL INFOMATICS PVT LTD 178 PROG TECHNIQUE &


PRACTICE
8.15 Summary
Coding Techniques is about Error-detection and correction while
sending digital signals
There are large isolated corruptions of transmitted bit stream of
data by noise. These are called error bursts.
Parity is a fundamental concept in error detection. This is an extra
bit added to the message which carries no information of its own,
since it is calculated from other bits. As such it is a redundant bit.
Hamming's Code is a widely used error correction coding method.
Correctible single error patterns can be decided at the receiving
end from the received codewords. We use Error syndrome of
received codeword to recognise correct transmitted codeword
While deciding on a decoder, if multiple transmission errors per
word are infrequent, we need not be concerned about the
occasional extra errors committed by the decoder.
If multiple errors are frequent a more powerful code would be
required, such as an Extended Hamming Code.
Linear Block Codes are set of codes with the sum of two code
words is also a code word
Cyclic Codes are a set of codes in which any cyclic shift of a code
word is also a code word. Cyclic codes are extremely well suited
for error detection.

COPYRIGHT CORNELL INFOMATICS PVT LTD 179 PROG TECHNIQUE &


PRACTICE
8.16 Recapitulation
Fill In the Blanks
Large isolated corruptions of transmitted bit
stream of data by noise is called ___________
___________ is a fundamental concept in error
detection.
Humming’s code is a widely used
________________ method.
Cyclic codes are well suited for ________________.

Short Answer Type Questions


Why we use coding techniques?
What is parity bit?
Explain various sources of corruption of
transmitted bit stream.
What is error avoidance?

Long Answer Type Questions


Explain cyclic codes. How they are used for error
detection.
Explain error correction system with the help of
block diagram.
What are various coding techniques for error
detections and correction? Explain.
How error syndrome of received codeword is used
to recognized correct transmitted codeword?

COPYRIGHT CORNELL INFOMATICS PVT LTD 180 PROG TECHNIQUE &


PRACTICE
COPYRIGHT CORNELL INFOMATICS PVT LTD 181 PROG TECHNIQUE &
PRACTICE
Chapter 9: Concept of Variables

9.0 Objective
At the end of this chapter you will be able to:
Define a variable.
Define and describe the data type.
Know different data types.
Know about literals and types of literals.
Describe the scope of the variable.
Declare the variable names.
Know initialisation of variable.

9.1 Introduction
Many a time while writing program or at the time of coding, you require
some working space for storing intermediate values or derived values.
The memory which is reserved for storing such values need to be
identified with some common name. This value is always referred by
the name and such a name is called a variable. As the values of
contents of the memory keeps changing, as and when the user
manipulates the data, this is termed as variable.
When you declare a variable some space in the Random Access
Memory (RAM) is reserved, where the values are stored. RAM being
user memory contents of this is always available to the user.
An object stores its state in variables. A variable is an item of data
named by an identifier. You must explicitly provide a name and a type
for each variable you want to use in your program. The variable's
name must be a legal identifier - an unlimited series of unicode
characters that begins with a letter. You use the variable name to refer
to the data that the variable contains. The variable's type determines
what values it can hold and what operations can be performed on it.
To give a variable a type and a name, you write a variable declaration,
which generally looks like this:
type name
In addition to the name and type that you explicitly give a variable, a
Variable has scope. The section of code where the variable's simple
name can be used is the variable's scope.

COPYRIGHT CORNELL INFOMATICS PVT LTD 182 PROG TECHNIQUE &


PRACTICE
9.2 Data Types
Every variable must have a data type. A variable's data type
determines the values that the variable can contain and the operations
that can be performed on it.

Figure 9.1: Concept of a Variable.


Description
Suppose you want to declare a memory variable, the procedure is -
you write the statement in respected programming language say “int
rollnumber” the moment you write this statement immediately some
space is reserved from the memory depending on the data type that
much space is reserved from the memory. For e.g. in C programming
character 1byte integer 2 bytes and so on.

The MaxVariablesDemo program,


(http://java.sun.com/docs/books/tutorial/java/nutsandbolts/example-
1dot1/MaxVariablesDemo.java) shown below, declares eight variables
of different types within its method. The variable declarations are:

COPYRIGHT CORNELL INFOMATICS PVT LTD 183 PROG TECHNIQUE &


PRACTICE
(1)

(2)

COPYRIGHT CORNELL INFOMATICS PVT LTD 184 PROG TECHNIQUE &


PRACTICE
(3)
Figure 9.2: A sample program to demonstrate variable
declaration.
The following sections elaborate on the various aspects of variables,
MaxVariablesDemo program uses two items with which you might not
yet be familiar and are not covered in this section: several constants
named MAX_VALUE and an if-else statement. Each MAX_VALUE
constant is defined in one of the number classes provided by the Java
platform and is the largest value that can be assigned to a variable of
that numeric type.
For example, in the MaxVariablesDemo program, the declaration int
largest Integer declares that largest Integer has an integer data type
(int). Integers can contain only integral values (both positive and
negative). You can perform arithmetic operations, such as addition, on
integer variables.
The Java programming language has two categories of data types:
primitive and reference. A variable of primitive type contains a single
value of the appropriate size and format for its type: a number, a
character, or a boolean value. For example, an integer value is 32 bits
of data in a format known as two's complement, the value of a char is
16 bits of data formatted as a unicode character, and so on.

COPYRIGHT CORNELL INFOMATICS PVT LTD 185 PROG TECHNIQUE &


PRACTICE
Figure 9.3: Variable Declaration.
The following table lists, by keyword, all of the primitive data types
supported by Java, their sizes and formats, and a brief description of
each. The MaxVariablesDemo program declares one variable of each
primitive type. (refer to table 9.1)

Keyword Description Size/Format


(integers)
Byte Byte-length integer 8-bit two's
complement
Short Short integer 16-bit two's
complement
int Integer 32-bit two's
complement
Long Long integer 64-bit two's
complement
(real numbers)
Float Single-precision floating 32-bit IEEE 754
point
Double Double-precision floating 64-bit IEEE 754
point
(other types)
Char A single character 16-bit Unicode
character
boolean A boolean value (true or true or false
false)

Table 9.1: Primitive Data Types.


Purity Tip: In other languages, the format and size of primitive data
types may depend on the platform on which a program is running. In
contrast, the Java programming language specifies the size and
format of its primitive data types. Hence, you don't have to worry about
system-dependencies.

9.3 Literals

COPYRIGHT CORNELL INFOMATICS PVT LTD 186 PROG TECHNIQUE &


PRACTICE
Literals are constants, as against variables, the value of which
remains constant throughout the program or having some fixed value.
You can put a literal primitive value directly in your code. For example,
if you need to assign the value 4 to an integer variable you can write
this:
int anInt = 4;

COPYRIGHT CORNELL INFOMATICS PVT LTD 187 PROG TECHNIQUE &


PRACTICE
The digit 4 is a literal integer value.
Here are some examples of literal values of various primitive types:
(refer to table 9.2).

Literal Data
Type
178 int
8864L long
37.266 double
37.266D double
87.363F float
26.77e3 double
'c' char
true boolean
false boolean

Table 9.2: Examples of Literal Values and Their Data Types.


Generally speaking, a series of digits with no decimal point is typed as
an integer. You can specify a long integer by putting an 'L' or 'l' after
the number. 'L' is preferred as it cannot be confused with the digit '1'.
A series of digits with a decimal point is of type double. You can
specify a float by putting an 'f' or 'F' after the number. A literal
character value is any single unicode character between single quote
marks. The two boolean literals are simply true and false.
Arrays, classes, and interfaces are reference types. The value of a
reference type variable, in contrast to that of a primitive type, is a
reference to (an address of) the value or set of values represented by
the variable.
A reference is called a pointer, or a memory address in other
languages. The Java programming language does not support the
explicit use of addresses like other languages do. You use the
variable's name instead. (See figure 9.4).

COPYRIGHT CORNELL INFOMATICS PVT LTD 188 PROG TECHNIQUE &


PRACTICE
Figure 9.4: Reference variable.

9.4 Variable Names


A program refers to a variable's value by the variable's name. For
example, when it displays the value of the largestByte variable, the
MaxVariablesDemo program uses the name largestByte. A name,
such as largestByte, that's composed of a single identifier, is called a
simple name. Simple names are in contrast to qualified names, which
a class uses to refer to a member variable that's in another object or
class.
In the Java programming language, the following must hold true for a
simple name:
It must be a legal identifier. An identifier is an unlimited series of
unicode characters that begins with a letter.
It must not be a keyword, a boolean literal (true or false), or the
reserved word null.
It must be unique within its scope. A variable may have the same
name as a variable whose declaration appears in a different
scope. In some situations, a variable may share the same name
as another variable if it is declared within a nested block of code.
By Convention: Variable names begin with a lowercase letter, and
class names begin with an uppercase letter. If a variable name
consists of more than one word, the words are joined together, and
each word after the first begins with an uppercase letter, like this:
isVisible. The underscore character (_) is acceptable anywhere in a
name, but by convention is used only to separate words in constants
(because constants are all caps by convention and thus cannot be
case-delimited).

9.5 Scope

COPYRIGHT CORNELL INFOMATICS PVT LTD 189 PROG TECHNIQUE &


PRACTICE
A variable's scope is the region of a program within which the variable
can be referred to by its simple name. Secondarily, scope also
determines when the system creates and destroys memory for the
variable. Scope is distinct from visibility, which applies only to member
variables and determines whether the variable can be used from
outside of the class within which it is declared. Visibility is set with an
access modifier.
The location of the variable declaration within your program
establishes its scope and places it into one of these four categories:
Member variable.
Local variable.
Method parameter.

Exception-handler parameter.

Figure 9.5: Scope of variable.


A member variable is a member of a class or an object. It is declared
within a class but outside of any method or constructor. A member
variable's scope is the entire declaration of the class. However, the
declaration of a member needs to appear before it is used when the
use is in a member initialisation expression. See figure 9.5.

COPYRIGHT CORNELL INFOMATICS PVT LTD 190 PROG TECHNIQUE &


PRACTICE
You declare local variables within a block of code. In general, the
scope of a local variable extends from its declaration to the end of the
code block in which it was declared. In MaxVariablesDemo all of the
variables declared within the main method are local variables. The
scope of each variable in that program extends from the declaration of
the variable to the end of the main method-indicated by the first right
curly bracket } in the program code.
Parameters are formal arguments to methods or constructors and are
used to pass values into methods and constructors. The scope of a
parameter is the entire method or constructor for which it is a
parameter.
Exception-handler parameters are similar to parameters but are
arguments to an exception handler rather than to a method or a
constructor. The scope of an exception-handler parameter is the code
block between { and } that follow a catch statement. Handling Errors
with Exceptions talks about using exceptions to handle errors and
shows you how to write an exception handler that has a parameter.
Consider the following code sample:
if (...) {
int i = 17;
...
}
System.out.println("The value of i = " + i); // error
The final line won't compile because the local variable i is out of
scope. The scope of i is the block of code between the { and }. The i
variable does not exist anymore after the closing }. Either the variable
declaration needs to be moved outside of the if statement block, or the
println method call needs to be moved into the if statement block.

9.6 Variable Initialisation


Local variables and member variables can be initialised with an
assignment statement when they are declared. The data type of the
variable must match the data type of the value assigned to it. The
MaxVariablesDemo program provides initial values for all its local
variables when they are declared. The local variable declarations from
that program follow, with the initialisation code set in red:
// integers
byte largestByte = Byte.MAX_VALUE;
short largestShort = Short.MAX_VALUE;
int largestInteger = Integer.MAX_VALUE;

COPYRIGHT CORNELL INFOMATICS PVT LTD 191 PROG TECHNIQUE &


PRACTICE
long largestLong = Long.MAX_VALUE;
// real numbers
float largestFloat = Float.MAX_VALUE;
double largestDouble = Double.MAX_VALUE;
// other primitive types
char aChar = 'S';
boolean aBoolean = true;
Parameters and exception-handler parameters cannot be initialised in
this way.
The value for a parameter is set by the caller.

9.7 Final Variables


You can declare a variable in any scope to be final. The value of a
final variable cannot change after it has been initialised. Such
variables are similar to constants in other programming languages.
To declare a final variable, use the final keyword in the variable
declaration before the type:
final int aFinalVar = 0;
The previous statement declares a final variable and initialises it, all at
once. Subsequent attempts to assign a value to aFinalVar result in a
compiler error. You may, if necessary, defer initialisation of a final
local variable. Simply declare the local variable and initialise it later,
like this:
final int blankfinal;
...
blankfinal = 0;
A final local variable that has been declared but not yet initialised is
called a blank final. Again, once a final local variable has been
initialised, it cannot be set, and any later attempts to assign a value to
blankfinal result in a compile-time error.
Summary of Variables
When you declare a variable, you explicitly set the variable's name
and data type. The Java programming language has two categories of
data types: primitive and reference. A variable of primitive type
contains a value. This table shows all of the primitive data types along
with their sizes and formats: (refer to table 9.3)

Keyword Description Size/Format

COPYRIGHT CORNELL INFOMATICS PVT LTD 192 PROG TECHNIQUE &


PRACTICE
(integers)
byte Byte-length integer 8-bit two's
complement
short Short integer 16-bit two's
complement
int Integer 32-bit two's
complement
long Long integer 64-bit two's
complement
(real numbers)
float Single-precision floating 32-bit IEEE 754
point
double Double-precision floating 64-bit IEEE 754
point
(other types)
char A single character 16-bit Unicode
character
boolean A boolean value (true or true or false
false)

Table 9.3: Primitive Data Types and Size / format.


The location of a variable declaration implicitly sets the variable's
scope, which determines what section of code may refer to the
variable by its simple name. There are four categories of scope:
member variable scope, local variable scope, parameter scope, and
exception-handler parameter scope.
You can provide an initial value for a variable within its declaration by
using the assignment operator (=).
You can declare a variable as final. The value of a final variable
cannot change after it's been initialised.

COPYRIGHT CORNELL INFOMATICS PVT LTD 193 PROG TECHNIQUE &


PRACTICE
9.8 Summary
In this chapter we had discussed about the variable, the naming
conventions, different types of variable. We had also discussed about
scope of variable and the size (in bytes) occupied by different types of
variables. For understanding we used the latest programming
language i.e. Java, which includes almost all the types of variables.
We also have seen the process of initialisation of a variable.

COPYRIGHT CORNELL INFOMATICS PVT LTD 194 PROG TECHNIQUE &


PRACTICE
9.9 Recapitulation
1. Which of the following are valid variable
names?
a. int
b. anInt
c. i
d. i1
e. 1
f. thing1
g. 1thing
h. ONE-HUNDRED
i. ONE_HUNDRED
j. something2do
2. Answer the following questions about the BasicsDemo
program.
(http://java.sun.com/docs/books/tutorial/java/nutsandbolts/exa
mple/BasicsDemo.java)
a. What is the name of each variable declared in the
program? Remember that method parameters are also
variables.
b. What is the data type of each variable?
c. What is the scope of each variable?

Short Answer Type Questions


1. Explain scope of variable.
2. Explain different types of variable. How they are declared and
initialized?
3. Explain various data types.
4. What are final variables? How they differ from other variables.

Long Answer Type Questions


1. What is the name of each variable declared in the program?
Remember that method parameters are also variables.
2. What are various rules to name a variable?

COPYRIGHT CORNELL INFOMATICS PVT LTD 195 PROG TECHNIQUE &


PRACTICE
3. How constant and variables are important in developing a
program?
4. What is initialization? Why it is important?

COPYRIGHT CORNELL INFOMATICS PVT LTD 196 PROG TECHNIQUE &


PRACTICE
Chapter 10: Files

10.0 Objective
At the end of this chapter you will be able to:
Know the concept of file.
Understand the file organisation methods.
Know different file organisations.
Know different accessing modes.
Understand different file handling functions.
Know different instructions and addressing techniques.

10.1 Introduction
The file system is the most visible part of an Operating System.
Logically related data items on the secondary storage are usually
organised into named collection called files. A file, for example, may
contain a report, an executable program, or a set of commands to the
operating system. In this chapter, we consider the various way to map
files onto devices.
In addition to simple model of a file as an array of bytes, some
commercial operating system allow file typing and file structuring to be
superimposed upon the basic view. File typing refers to the ability of
the operating system to distinguish the different types of files, such as
text file and binary files. Information in a file is defined by its creator.
Many different types of information may be stored in a file: source
program, object program, numeric data, text, payroll records, graphic
images, sound recordings, and so on. A file has certain defined
structure according to its type. A simple extreme is to simply encode
the file type as a part of its name; the extension field is commonly
used for this purpose. Example of file types encoded as an extension
are: .PAS, .OBJ, .TXT and .EXE for a Pascal source and object
(compiled but not linked), a text file and an executable process image,
respectively. Another approach is to encode the file type within the
body of the file itself. In any case, the purpose of file typing is to
prevent meaningless operation on files, such as execution of a text file
or editing of a process image.
To keep track of files, the file system normally provides directories,
which in many systems are themselves files. In principle, an entry of a
directory defines a file. A file is usually defined by its name, its

COPYRIGHT CORNELL INFOMATICS PVT LTD 197 PROG TECHNIQUE &


PRACTICE
attributes, and an access pointer. A Typical directory contains a
number of entries, one per file. Each entry may contain the information
about each file as shown in figure 10.1.

Figure 10.1: A Directory view

10.2 File Organisation Methods

10.2.1 Serial Organisation


Serial organisation may be implemented on magnetic tape, magnetic
disks it may be suitable for 1) transaction file 2) print files 3) dump files
4) archival files 5) temporary working file 6) relatively small files.
There is logically no relationship between the keys of the adjacent
records and no way of knowing the whereabouts of particular records,
therefore file access to select a particular record is by serial search.
Average access time is one half of the time it would take to search a
whole file.

10.2.2 Sequential Organisation


Sequential files must be structured and stored in a certain sequence
of a particular key item or group of items. It must be possible to
access records in a certain sequence of a particular key item or group
of items. It must be possible to access records directly by obtaining
their location from keys which identify them.
ADVANTAGES:
Binary search is possible on the direct access storage devices.
Fast access if retrieval is required in the same sequence.
Security because updating by copy means previous copy of file is
available.

COPYRIGHT CORNELL INFOMATICS PVT LTD 198 PROG TECHNIQUE &


PRACTICE
All record types supported.
Natural method of organisation.
Minimum storage space is required.
DISADVANTAGES:
Slow searching for a particular record on an average half of the time it
would take to read the whole file.
Updating by copying to cater for insertions means all the records in
the file to copies even if only a small percentage updated.
Only on e key per record may lead to multiple files containing the
same data.

10.2.3 Direct Access File Organisation


There are many application for which the user demands immediate
access to the records for retrieving the information about the record
for updating the record. Direct access to the stored record means that
the user can get to record within a few seconds without having to
institute a search through a file inspecting and rejecting records until a
key match is found. There are two commonly used methods of direct
access file organisation.

10.2.4 Random File Organisation


In direct access file organisation methods, the major difficulty is in
determining the storage location where a record is stored. Thus, some
relationship must be established between the record key and storage
location. This will determine where the individual record is initially
stored and subsequently accessed. It would be efficient for direct
access if the record key would be the same as the identification
numbered on some other criteria. An alternative is to use the record
key to determine the storage location. This requires the finding of a
formula which will map the record keys into a set of disk storage
location identifiers. This task would have been simple if the record
keys ran sequentially with no gaps but this is rare case. Hence, an
arithmetic procedure to transform the record key into a storage
address is required. This is known as randomising or hashing.
A major difficulty with a randomising procedure is that some
addresses will never be generated while two or more keys may
produce identical disk addresses or synonyms. In such an event one
of the records is stored at the generated location and a mechanism is
provided to store the synonyms is an overflow location. Subsequently

COPYRIGHT CORNELL INFOMATICS PVT LTD 199 PROG TECHNIQUE &


PRACTICE
when a record is to be retrieved there must be a method for finding it
in the overflow location.
The advantages of the hashed file organisation arise primarily in
situations where the records need to be located quickly such as an on
line query and on-line updating.
ADVANTAGES:
Any record retrieved by a single direct access.
Individual records may be updated.
DISADVANTAGES:
Hardware may limit record length by physical address.
Overflow problem.
Inefficient use of storage space.

10.2.5 Indexed Organisation


In indexed sequential file organisation determining the storage
location is a separate operation from accessing the record. An index
contains a list of record keys and the physical address of the record
associated with each keys. To find a particular record the index in
searched. This can be done by a sequential search, binary search or
multiple indexes.
If the index is in record key sequence a binary search is an efficient
procedure for locating a key.
Accessing records through an index may be especially efficient. If the
index can be kept in the primary memory during processing. If the file
is very large the index has many items and finding a particular record
even using a binary search may become inefficient. This problem may
be eliminated by the use of the indexes. The range index contains the
address of each index on the secondary storage and the highest key
value in that index. The range index which is small and fit in the
primary memory is searched for the proper indexes. Which is then
read into primary memory and search for a particular key. A Common
indexed organisation is the indexed sequential organisation (ISAM).
With this method the records are stored on the disk sequentially by
record key so that sequential processing may be performed, but
indexes are also maintained to allow direct retrieval based on key
value.
Advantages:
Less handling of inactive records.
Reduced access time for any record required in random manner.

COPYRIGHT CORNELL INFOMATICS PVT LTD 200 PROG TECHNIQUE &


PRACTICE
Disadvantages:
Updating by overlay hence no automatic security.
Use of overflow area necessitates periodic reorganisation.
Care must be taken in placing if indices to prevent excessive seek
time.

10.2.6 Database
A database is a general collection of data shared by a variety of users.
In particular it has the features:
Items of data occur only once (i.e. redundant and replication of data
are eliminated).The data is independent of any one program.
The data is usable by many users.
The use of database is standardised.

COPYRIGHT CORNELL INFOMATICS PVT LTD 201 PROG TECHNIQUE &


PRACTICE
10.3 Accessing Techniques
There are several ways to access the information stored in the files. In
conventional file systems and data management systems many
additional record structures are supported. These are often called as
Access Methods, such as:
Sequential Access
Direct Access
Indexed Access
Indexed Sequential Access
Some systems provide only one method for accessing files. On other
systems, many different access methods are supported, the major
design problem is to choose the right one for a particular application.

10.3.1 Sequential Access


Sequential Access is the most common mode of access of files. In this
method, on each request the user wishes to have the “next” record -
the same as reading cards from a card reader. Information in the file
as processed one record after the other in a sequential manner.
Information are recorded and obtained by write and read operations. A
read operation reads the next specified portion of the file and
automatically advances the file pointer at its next location. Similarly, a
write with sequential access appends to the end of the newly written
material. Such a file can be rewind to the beginning, and on some
system, a program may be able to skip forward or backward by some
specified records. Sequential access is mainly used for large files
stored on detachable media such as paper tape, punched card,
printed forms, and magnetic tape. It is the cheapest and slowest
method of storage.

10.3.2 Direct Access


Operations with direct access consist of locations which can be
accessed in arbitrary order of indexing, which is based on a disk
model of a file. In this method the file is viewed as a numbered
sequence of blocks or records.
The read and write file operations must be modified to include the
block number as a parameter. Normally user provide relative block
number to the operating system. A relative block number is an index
relative to the beginning of the file.

COPYRIGHT CORNELL INFOMATICS PVT LTD 202 PROG TECHNIQUE &


PRACTICE
10.3.3 Indexed Access
Indexed access method involves the creation of an index for the file.
The index like an index in the back of a book, contains pointers to the
various blocks. To find an entry in the file, we first search the index
and then use the pointer to access the file directly and to find the
desired entry.

10.3.4 Indexed Sequential Access


It allows both sequential and random accessing. Random processing
is accomplished by specifying the key-field values for desired record.
This records is found via indexes.
Indexed sequential files are composed of three areas. The prime area,
the overflow area, and the indexes. The prime area contains records
of the file. When the file is created or reorganised all records reside in
the prime area. Records are placed and in the overflow area when
additions to the file cannot be fitted into the prime area. The indexes
are used to locate a particular record for random processing.
If the file is long, then it may occupy many cylinders on the disk. The
index file itself may become too large to be kept in memory. To
increase the efficiency create an index for the index file. The primary
index file would contain pointers to secondary index files, which would
point to the actual data items.
For example, indexed sequential access method (ISAM) uses a small
master index which points to parts of a cylinder index. The cylinder
index blocks points to the track index and track index blocks points to
the actual file blocks. The file is kept sorted on a defined key. To find a
particular item, we first make a binary search of the master index,
which provides a block number of the track index. This block is read in
and again a binary search is used to find the block containing the
desired record. Finally, this block is searched sequentially. In this way,
any record can be located from its key by three direct access reads.

10.4 File Handling Functions


There are five basic file operations provided by the operating system.
System calls are provided to create, write, read, reset and delete files.
Let us look how the operating system must do for each of the five
basic file operations in more details.

10.4.1 Creating a file

COPYRIGHT CORNELL INFOMATICS PVT LTD 203 PROG TECHNIQUE &


PRACTICE
To create a file two steps are necessary. In the first step system
searches the directory for the file name. The next step is to make
entry for the new file in the directory. The directory entry records the
name of the file and location in the file system in addition to other
relevant information.

10.4.2 Writing a File


To write into a file, a system call is made specifying both the name of
the file and the information to be written to the file. Given the name of
the file, the system searches the directory to find the location of the
file. The directory entry will store a pointer to the current block of the
file. This pointer helps for computing the address of the next block and
write the information. The write pointer must be updated. In this way,
successive writes can be used to write a sequence of blocks to the
file.

10.4.3 Reading a file


To perform this operation we use a system call that specifies the
name of the file where the next block of the file should be put. Again,
the directory is searched for the associated directory entry, and the
directory will need a pointer to the next block to be read. After reading
a block the pointer is updated.

10.4.4 Reseting a file


Resetting a file need not involve any actual I/O. Rather the directory is
searched for the appropriate entry, and the current file position is reset
to the starting of the file.

10.4.5 Deleting a file


To delete a file, system searches the directory for the file to be
deleted. After finding the associated directory entry, we releases all
file space (so it can be reused by other files) and invalidate the
directory entry.
As we have seen all the above file operations mentioned searching
the directory for the entry associated with the named file. The directory
entry contains all the required information needed to operate on the
file. The operating system keeps a small table containing information
about all open file (used actively) to avoid constant searching. When a
file operation is requested, and index into this table is used, so no
searching is required. When file is no longer actively used, it is closed

COPYRIGHT CORNELL INFOMATICS PVT LTD 204 PROG TECHNIQUE &


PRACTICE
and is removed from the table of program that opened the file
terminates. Most systems, before using any file, it is required that a file
be opened explicitly by the programmer with a small system call
(open).

10.5 Instruction and Addressing techniques


The operand address often needs to be converted into an appropriate
form by the hardware. The final form as determined by hardware is
called as absolute address.
DIRECT ADDRESSING, is used if the number given in the operand
part of an instruction is the actual address of the operand (data) to be
used.
INDIRECT ADDRESSING, when indirect addressing is used the
address given in the address part of the instruction is NOT the
address of the required operand. Instead the address part is the
address of the location which contains the required address.
INDEX ADDRESSING, in this method the required address is
obtained by adding the content of the address part of the instruction to
a number stored in special register called index register or modifier
register.
IMMEDIATE ADDRESSING, in this form of addressing the data to be
placed into the accumulator is provided with the instruction so it may
be placed into the accumulator immediately (i.e. without accessing
memory).
Addressing Techniques:
REGISTER ADDRESSING: This mode specifies the source
operand, destination operand or both to be an register.
Example: MOV DX, CX
IMMEDIATE ADDRESSING: In immediate mode 8 or 16 bit data
can be specified as part of the instruction.
Example: MOV DX, 0502H
DIRECT ADDRESSING: In this mode the 16 bit effective address
(EA) is taken directly from the instruction. This Effective Address is
the memory location from the current value where the data is
stored.
Example: MOVE CX, START
REGISTER INDIRECT ADDRESSING: In this mode, the effective
address is specified in either a pointer register or an index register.
Example: MOVE DI, BX

COPYRIGHT CORNELL INFOMATICS PVT LTD 205 PROG TECHNIQUE &


PRACTICE
Using this mode, one instruction can operate on many different
memory locations if the value in the base or index register is updated.
BASE ADDRESSING MODE: In this mode effective address is
obtained by adding value to the content of base register.
Example: MOV AL, [BX+START]
INDEX ADDRESSING: Here the effective address is calculated
by, adding the address and the content of index registers.
Effective address = Reference Address + Modifier.
Modifier value will be taken from index register.
Example: MOV BH, START [SI]
BASED INDEXED ADDRESSING: The effective address is
computed by adding a base register, an index register and a 16
bits address.
Example: MOVE ALPHA[SI] [BX],CL
STRING ADDRESSING: This mode uses index registers. The
string instructions automatically assume to point to the first byte
or word of the source operand and to point to the first byte or
word of the destination operand.
Example: MOVE BYTE, 0430H
RELATIVE ADDRESSING: Instructions using this mode specify
the operand as a signed address relative to program counter.
Example: JNC START
This instruction means that if carry = 0 the PC is loaded with
current PC contents plus the address value of the START,
otherwise next instruction is executed.
IMPLIED ADDRESSING: Instruction using this mode have no
operands.
Example: CLC, which clears the carry flag to zero.

COPYRIGHT CORNELL INFOMATICS PVT LTD 206 PROG TECHNIQUE &


PRACTICE
10.6 Summary
In this chapter we discussed the basic concept of a file, how
information is stored on to a file, how files are identified, or how they
are organised and different file organisations. We have seen different
accessing modes and basic file handling operations or functions.
Towards the end we discussed about the different method of
instruction sets and addressing techniques.

COPYRIGHT CORNELL INFOMATICS PVT LTD 207 PROG TECHNIQUE &


PRACTICE
10.7 Recapitulation
Fill in the Blanks
1. The file system is most visible part of ___________________.
2. _________________search is possible in sequential
organization
3. To delete a file, system searches __________________for the
file to be deleted.
4. ___________________, is used if the number given in the
operand part of an instruction is the actual address of the
operand (data) to be used.

Short Answer Type Questions


1. Explain the concept of a file? Describe file Organisation
methods
2. Distinguish between:
a. Indexed and sequential file
b. Sequential access and random access.
c. Direct and Indirect Addressing.
3. Explain different file accessing modes.
4. Describe the different types of Instruction set.
5. Write short notes on: Different Files operations.

Long Answer Type Questions


1. What are various operations that can be performed on a
file?
2. Explain different file organization methods.
3. Explain various ways to access the information stored in a
file.
4. Write note on instruction and addressing techniques.

COPYRIGHT CORNELL INFOMATICS PVT LTD 208 PROG TECHNIQUE &


PRACTICE
Glossar

@ In an internet address the sign "@," typed by


hitting "shift 2" on your keyboard, means "located
at." It is used for most email address and the major
online providers, as @aol.

A Debug Assertion A debug assertion is a relation between the values


of program variables. An assertion can be
associated with a program statement. Use of
debug assertions eliminates the need to produce
voluminous information for debugging purposes.

A Software Tool A software tool is a system program which,


interfaces a program with the entity generating its
input data, or interfaces the results of a program
with the entity consuming them.

A Test Data Generator A test data generator determines the conditions


which must be satisfied by the program's inputs for
control to flow along a specific execution path. A
test data is a set of input values which satisfy these
conditions.

AAA Server A server that provides authentication,


authorization, and accounting security services.
Standards for such servers include RADIUS and
TACACS+.

Access Profile The information maintained by an AAA server for


each user. It includes information needed for
authentication and accounting. It also specifies the
user's access privileges for authorization by the
AAA server.

COPYRIGHT CORNELL INFOMATICS PVT LTD 209 PROG TECHNIQUE & PRACTICE
Active Server Page (Asp) An HTML page that includes one or more scripts
(small embedded programs) that are processed on
a Microsoft Web server before the page is sent to
the user. An ASP is somewhat similar to a server-
side include or a common gateway interface (CGI)
application in that all involve programs that run on
the server, usually tailoring a page for the user.
Typically, the script in the Web page at the server
uses input received as the result of the user's
request for the page to access data from a
database and then builds or customizes the page
on the fly before sending it to the requestor. ASP
is a feature of the Microsoft Internet Information
Server (IIS), but, since the server-side script is just
building a regular HTML page, it can be delivered
to almost any browser. You can create an ASP file
by including a script written in VBScript or JScript
in an HTML file and then renaming it with the
".asp" file suffix. Microsoft recommends the use of
the server-side ASP rather than a client-side script,
where there is actually a choice, because the
server-side script will result in an easily displayable
HTML page. Client-side scripts (for example, with
JavaScript) may not work as intended on older
browsers.

Active-Matrix Display A type of video display (originally for notebooks or


laptops) where each picture element (pixel) is
represented by a single transistor. In contrast, a
passive-matrix display uses a series of criss-
crossed wires with an LCD element at each
intersection, and each LCD element represents a
pixel. Active-matix displays produce the sharper
image and are more expensive to produce.

Activex ActiveX is a model for writing programs. ActiveX


technology is used to make interactive web pages
that look and behave like computer programs,
rather than static pages. With ActiveX, users can
ask or answer questions, use push buttons, and
interact in other ways with the web page.

COPYRIGHT CORNELL INFOMATICS PVT LTD 210 PROG TECHNIQUE & PRACTICE
Adc Automatic Data Capture. The general capability of
gathering status, location, and identifying
information without human intervention. ADC
reduces the need for manually keying in data and
the risk of inaccuracies. Technologies used in ADC
include bar coding, magnetic stripes, smart cards,
machine vision, biometric identification, voice
recognition, optical character recognition, and
Radio Frequency Identification.

Address A unique identifier for a computer or site online,


usually a URL for a web site or marked with an @
for an email address. Literally, it is how your
computer finds a location on the information
highway.

Adobe Acrobat A popular software program for the conversion of


documents into the portable document file (PDF)
format. Through Acrobat or another PDF, users
can read electronic versions of printed documents
that maintain the attributes (bold and italic type and
other formatting choices) assigned to a printed
original

Adsl Asymmetric Digital Subscriber Line. A technology


for providing high transmissions speeds for video
and voice to homes over ordinary copper
telephone wire. It will be most cost- effective in
areas with low market penetration of "cable" TV. In
areas with higher penetration coax is expected to
be more cost-effective.

Algorithm An algorithm may be defined as a finite sequence


of instructions to solve a problem.

Analog A device which uses a system of unlimited


variables to measure or represent the flow of data.
In contrast, digital devices are limited to a
predetermined numbering system (binary) to
represent data flow. If you have five dots on a
piece of paper, digital data can be represented by
each of the dots. Draw a line to connect all the dots
and analog data can be represented by any point

COPYRIGHT CORNELL INFOMATICS PVT LTD 211 PROG TECHNIQUE & PRACTICE
along the line.

Anchor A word, phrase or graphic image, in hypertext, it is


the object that is highlighted, underlined or
"clickable" which links to another site.

Applet An application written in Java and inserted in an


HTML program.

Appraisal This is a process by which performances within the


company are evaluated as per predefined targets
and Key Deliverables.

Ascii Codes Stands for American Standard Code for


Information Interchange. This is used extensively
in small or personal computers and also for
computer-to-computer communication. It is a 7 bit
code which can code upto 128 characters including
alphabets, digits, symbols and control characters.

ASCII File A text file containing ASCII characters only. The


lowest common denominator for exchanging text
among programs. Almost any word processor or
desktop publishing program can read or write
ASCII files. Also known as text-only files.

Assembly Language This language stands in between machine and


high-level language incorporating the features of
both.

Audit Trail Information on the significant steps in the progress


of a transaction which allows an auditor to
determine that there are no errors in the reporting
of the transaction. In electronic commerce a good
audit trail can help resolve programming errors and
discrepancies in the how a transaction is recorded
by the parties to the transaction.

Avatar A digital representation of a user in a virtual reality


site.

Backbone The connections between primary computers in a


network. The backbone of the internet is a

COPYRIGHT CORNELL INFOMATICS PVT LTD 212 PROG TECHNIQUE & PRACTICE
combination of commercial telephone lines and
cellular and satellite transmissions.

Bandwidth Measured in bps (bits per second), this determines


the amount of information that can flow at one time
through a communications channel.

Banner A graphic element, usually horizontal, on a Web


page, used to title the page, head a new section,
present a company's or advertiser's message, or
provide a link to another page.

Bar Code A binary coding system using a numerical series


and bars of varying thicknesses or positions that
can be read by optical character recognition (OCR)
equipment. Bar codes are used in printing as
tracking devices for jobs and sections of jobs in
production basic input/output system (BIOS). The
code that controls basic hardware interactions,
such as the keyboard and hard drive, on a
computer system.

Baud A baud, or baud rate, is sometimes used as an


indication of the number of bits a modem can send
or receive per second, but actually it is a
measurement of the number of times a carrier
signal can change per second.

Bbs Bulletin Board System Software that enables users to log into email,
usenet and chat groups via modem.

Berners-Lee, Tim The original designer of world wide web software


at CERN, in Geneva, Switzerland, in 1990, Tim
Berners-Lee put his creation on the internet the
following year. While others reap millions from the
web, he receives only accolades. "If I tried to cash
in, there might not be a web as we know it." He is
now at MIT guiding the World Wide Web
Consortium, which includes over 120 companies.

Beta This term has migrated from computer and


software development, and it is usually used as
"beta site." It means test site or test version. Beta

COPYRIGHT CORNELL INFOMATICS PVT LTD 213 PROG TECHNIQUE & PRACTICE
is not the finally version of a product or web site,
but it's close enough to show in public and work
the bugs out.

Binary A numbering system with Base 2 (The distinct


symbols used are 0 and 1).

Binary Number System In our everyday lives we use a decimal numbering


system containing 10 digits, 0 through 9.
Computers use a binary numbering system which
contains only 2 numbers, 0 and 1, called binary
digits or bits.

Bits Stands for Binary digIT (BIT) smallest unit of


representation. The 0's and 1's that make up the
lowest common denominators of digital
communications. They are the basis – or atoms --
of all computer-driven functions and
communications. One bit is the smallest possible
unit of computer information.

Blind Certificate A digital certificate which does not contain the


name or other identifying information about the
user to whom it is issued. Such a certificate can be
used to verify some limited information about the
user or to associate a user with a series of
communications or transactions without revealing
the identity of the user. Applications include
revocable cash transactions and ongoing
anonymous communications over the network.

Bookmark Hyperlinks in web browsers that enable you to go


directly to your favorite sites without having to
remember long, clumsy URL's.

Bootable Disk A floppy disk that contains the necessary system


files that will complete the computers boot up
sequence and load a basic Operating System

Booting The process and functions that a computer goes


through when it first starts up, ending in the proper
loading of the Operating System and preparing it to
receive commands

COPYRIGHT CORNELL INFOMATICS PVT LTD 214 PROG TECHNIQUE & PRACTICE
Bot Bot is short for "robot." It is a program on an IRC --
or undernet -- system which acts as a real person
by accepting certain commands and responding.

Bounce This is what happens when email returns as


undeliverable. Did you get that address right?

Bps Bits Per Second Online bandwidth is measured in bps's. To give


you an idea of what that means, if you downloaded
the text of the English Oxford Dictionary, estimated
to contain 41.5 million words, here's what it would
take at different bps speeds: 9600 bps - Over 9
hours, 14,400 bps - Over 6 hours, 56,000 bps - An
hour and a half, T1 Line - 3.5 minutes, T3 Line -
Less than a second

Broadband Web A vision of the future World Wide Web with high
speed broadband connections to the home and
desktop. The Broadband Web is expected to pose
a significant threat to CD-ROM use and to favor
high quality small independent multimedia
developers who can afford to offer their products
on the Web but who cannot afford to mass market
a CD-ROM.

Browser They are programs -- like Netscape -- which


navigate the internet, display web pages and other
formats, hyperlink between servers and sometimes
perform email and file transfer tasks. A browser is
a program that provides a way to look at, read, and
even hear all the information on the World Wide
Web. The word "browser" seems to have
originated prior to the Web as a generic term for
user interfaces that let you browse text files online.
By the time the first Web browser with a graphical
user interface was invented (it was called Mosaic),
the term seemed to apply to Web content, too.
Technically, a Web browser is a client program that
uses the Hypertext Transfer Protocol (HTTP) to
make requests of Web server s throughout the
Internet on behalf of the browser user. Currently,
the most popular browser is Netscape Navigator.

COPYRIGHT CORNELL INFOMATICS PVT LTD 215 PROG TECHNIQUE & PRACTICE
Microsoft's Internet Explorer is gaining usage as
Windows 95 installations grow.

Bytes Combination of Bits are called Bytes (usually 8-bits


in ASCII). A binary "word" or unit of meaning
usually consisting of eight bits.

Cache Whenever you visit a web page, it downloads text


and graphics information to your computer in a
storage file called a cache, that why the second
time you view a page you see it faster. (Clear your
cache once in a while, if you don't your online
communications may get very slo-o-o-ow.)

Call Detail Reporting 1)The logging and reporting of details about each
connection by users to a LAN through a network
access server . 2) The logging and reporting by a
PBX of voice or data calls made from the PBX to
the Public Switched Telephone Network or vice-
versa.

Caps Lock Key A key on the left side of your keyboard. When
pressed it changes all typed letters to capitals until
it is pressed again. It only affects letters; not
punctuation, symbols or numbers.

CD-ROM (Compact Disk— An optical data storage device that consists of a


Read-Only Memory) platter in which data is etched as a series of pits
and lands (the space between the pits) in a
continuous spiral. Derived from the compact audio
disk (CD), a typical CD-ROM holds 650 MB of
digitally encoded computer data, which the user
can retrieve (but not alter) using a laser-based
reader.

Cd-Rom Drive Reads compact disks in the form of audio or CD-


ROM. A CD-ROM holds data (perhaps audio as
well). Newer CD-ROM drives will read CD-R
(Writable CDs) and CD-RW (ReWritable CDs). The
speed of a CD-ROM drive is not usually very
important except when installing programs, running
games that require use of the CD-ROM drive, or
"burning" CDs with a CD-ROM Burner - a CD-ROM

COPYRIGHT CORNELL INFOMATICS PVT LTD 216 PROG TECHNIQUE & PRACTICE
drive that is able to write to special CDs called CD-
Rs.

Certification Path The hierarchy of certificate authorities that vouch


for a digital certificate issued to a user. The path
runs from the issuing certificate authority to the
root certificate authority.

Certified Delivery Server A server which uses public key cryptography to


provide a destination non-repudiation service,
similar to certified mail. The server establishes that
a message was received or that a good faith effort
was made to deliver it.

Cgi Common Gateway A specification for transferring information between


Interface a World Wide Web server and a CGI program. A
CGI program is any program designed to accept
and return data that conforms to the CGI
specification. The program could be written in any
programming language, including C, Perl, Java, or
Visual Basic.

Change Barriers Any resistance that may occur in response to a


change.

Channel Definition Format A specification developed by Microsoft and


PointCast that defines when and how Web browser
users receive information broadcast over the
Internet using server push technology.

Channels An Internet technology based upon server push


which broadcasts information to Web browsers so
that users can view the information passively, as
with television, rather than interactively as in
traditional Web use.

Chat Room A place on the Internet where people go to "chat"


with other people in the room. Actually there are
thousands of these Chat Rooms. The rooms are
usually organized by topic. When you're in a Chat
Room you can view all of the conversations taking

COPYRIGHT CORNELL INFOMATICS PVT LTD 217 PROG TECHNIQUE & PRACTICE
place at once on your screen. You can also get
into a private chat room where only you and one or
two others may talk. This can be an inexpensive
way to keep up with friends and relatives who are
online.

Click Through The process of a visitor clicking on a Web


advertisement and going to the advertiser's Web
site. Also called ad clicks or requests. The click
rate measures the amount of times an ad is clicked
versus the amount of times it's viewed.

Client Here's a word you're familiar with, but online it


means something slightly different, as in
client/server relationship. The client is the
requester of information from a main server
terminal, and it can refer to you, your computer or
the browser you are using.

Clock Speed The clock speed is the frequency which determines


how fast devices that are connected to the system
bus operate. The speed is measured in millions of
cycles per second (MHz or megahertz) and is
generated by a quartz crystal on the motherboard
which acts as a kind of metronome. Devices that
are synchronized with the clock may run faster or
slower but their speed is determined by multiplying
or dividing a factor by the clock speed.

Code A cipher. A mathematical function for encryption


and decryption.

Commoditization An increase in the number, availability, and


similarity of products in a given category which
tends to drive down the price of the products.
Some people believe the rapid and easy access to
information about products on the Internet will
make markets more efficient, facilitate
comparisons, increase competition, eliminate
inconsequential differences between products, and
drive toward commoditization and lower prices.
Others believe that low marketing and distribution
costs will enable companies to differentiate their

COPYRIGHT CORNELL INFOMATICS PVT LTD 218 PROG TECHNIQUE & PRACTICE
products and establish a wide variety of niche
markets.

Communications Port Serial ports used to connect modems, serial


printers and other peripherals to your computer.
Each port is assigned its own individual number, IO
address, and Interrupt Request Line. COM1 and
COM2 are usually the physical serial ports you can
see on the back of your computer (9-pin and 25-pin
DB connectors). COM3 and COM4 are usually
virtual communications ports for internal devices
connected via the expansion slots inside your
computer.

Community In the context of the Internet and electronic


commerce, people who participate in a online
discussion group or bulletin board, or who return
frequently to a Web site because of a common
interest in a given subject. One business strategy
developing on the Internet is to create a community
and then sell access to the group for marketing
purposes.

Compensation This is the dues or the salaries and wages payable


to an employee of the company. It will also include
all the perks and allowances available to the
employee.

Compiler Stores the high level language program, scan it


and translate the whole program into an equivalent
machine language program.

Computer Hardware Devices capable of accepting and storing computer


data, executing a systematic sequence of
operations on computer data, or producing control
outputs. Such devices can perform substantial
interpretation, computation, communication,
control, or other logical functions.

COPYRIGHT CORNELL INFOMATICS PVT LTD 219 PROG TECHNIQUE & PRACTICE
Controlling Evaluating performance and Controlling resources.

Cookie A capability of some Web browsers which allows


Web servers to store information about user visits
to the Web site on the hard disk in the user's PC or
workstation. Because it can be used to identify
repeat visitors the cookie allows on the fly
customization of a Web site to feature items the
user showed an interest in during previous visits.
The cookie also allows a Web server to track the
sequence of a session on a Web site, including
how long a user spent on each Web page. While a
boon to marketing on the Web the cookie raises
some privacy issues because it removes some of
the traditional anonymity associated with viewing
Web sites and uses a small portion of the user's
hard disk. A file written to your hard drive that Web
sites use to track visitors. When you visit a Web
site, a file (cookie) may be added to your hard
drive or updated to include information such as the
time and date, which pages you visited, any
passwords you might need for the site, and any
other information you might have contributed at
their request.

Counter A number on many web pages that will count the


number of hits or count the number of times the
page has been accessed. Basically, it counts the
number of people that have visited that page.

Cross-Functional Team Group of expert representatives from all relevant


business units to guide the Plan Phase. Cross-
functional teams typically include: HSE, MIS,
Manufacturing and Operations, Marketing,
Research and Development, Finance, Purchasing,
Public Affairs and Investor Relations, and Legal.

Cryptography API An application program interface that makes it


easy for applications to use cryptography software
developed by others. It facilitates application
development, supports updating of the application
code and the cryptography code independent of

COPYRIGHT CORNELL INFOMATICS PVT LTD 220 PROG TECHNIQUE & PRACTICE
one another, and allows the use of different
cryptography code for domestic sales (in the USA)
and for export. See export laws.

Customer Any part of the Vanderbilt Community who is


requesting work or who will be impacted by work
performed, excluding MIS and VIA.

Cybermediary An individual or organization that collects a fee for


facilitating transactions over the Internet without
taking ownership of the products or services sold.
Also see Internet Transaction Broker. Examples
include Web sites that provide many of the
services of traditional real estate brokers and
insurance agents but at much lower costs.

Cyberspace The term was coined by William Gibson in his


novel, Neuromancer, to describe all the computer-
accessible sites in the world long before the world
wide web was created. Now fact has caught up
with fiction, and the word has caught on, too.

Cyberwallet A technology for enabling secure transactions over


networks developed by V-ONE Corporation and
designed to run in conjunction with World Wide
Web browsers. It will hold information on up to 16
credit cards or bank accounts. It is especially
designed to prevent merchant fraud and is based
on Secure Transaction Channel technology (see
STC). CyberWallet has been licensed to Checkfree
and Spyglass as part of the Electronic Business
Co-op (EBC).

Data Recorded information, regardless of medium or


characteristics, of any nature, including
administrative, managerial, financial, and technical.

Data Architecture The overall software configuration and data linkage


supporting a particular MIS application.

COPYRIGHT CORNELL INFOMATICS PVT LTD 221 PROG TECHNIQUE & PRACTICE
Data Protection The prevention of the passing of an individual's
personal information from one computer system
where the information legitimately resides to other
computer systems without the consent of the
individual. In the United Kingdom the Data
Protection Act of 1984 requires the registration of
every data user who processes personal
information.

Database A collection of related data stored in one or more


computerized files in a manner that can be
accessed by users or computer programs via a
database management system.

Database Management An integrated set of computer programs that


System provide the capabilities needed to establish,
modify, make available, and maintain the integrity
of a database.

Dba - Database All issues and changes related to the database


Administrator should involve the DBA.

Debug Monitors Debug monitors help in obtaining information for


localization of errors.A debug monitor is a software
which provided debugging support for a program.
The debug monitor executes the program being
debugged under its own control.

Decimal A numbering system with Base 10 (Symbols used


are 0 through 9).

Decision Making Choosing appropriately from a set of options or


choices.

Decision Table Decision tables are used in decision making during


complex circumstances where several criteria
(conditions) determine an action.

Decision Tree A decision tree is a diagram that presents


conditions and actions sequentially and thus,
shows which conditions to considered first, which
second and so on. It resembles the branches of a
tree and hence the name.

COPYRIGHT CORNELL INFOMATICS PVT LTD 222 PROG TECHNIQUE & PRACTICE
Design Overview The Design Overview is the high-level design
document that is used to outline the overall system
process flow, business process flow, and any
impacted objects requiring more detailed designs.
The Design Overview also identifies the Design
Team Members.

Design Package The collected set of documentation, which fully


describes the intended solution to the customer's
need. The Design Package includes the Design
Overview and all the associated Detail Design
documents.

Design Team A subset of members from the original Project


Team (including both MIS and customer
resources) in addition to any other resources
needed for the design process. The Design Teams
will be responsible for creating all of the Detailed
Design Documents, using the information gathered
in the Design Overview.

Desktop (1) Any computer or peripheral small enough to fit


on top of a desk, as opposed to a mainframe
computer. (2) The Macintosh (and now Windows)
graphical user interface where screen elements
are cast as icons or other representations that are
meant to be analogous to a literal desktop.
Examples of these elements include representing
computer files as manila folders, and file delete
functions as trash cans or recycling bins.

Detailed Design The Design Teams will create these documents.


Documents These documents will provide the details to be
used in the Development phase.

Developer An organization that develops products ("develops"


may include new development, modification, reuse,
reengineering, maintenance, or any other activity
that results in products) for itself or another
organization.

Diffie-Hellman A public key algorithm which can be used for


deriving and distributing private keys over insecure

COPYRIGHT CORNELL INFOMATICS PVT LTD 223 PROG TECHNIQUE & PRACTICE
networks. Diffie-Hellman itself cannot be used to
encrypt or decrypt messages. The patent on the
algorithm expired on April 29, 1997.

Directing Directing employees , Motivating and managing


employees

Disk Drive The mechanism that rotates the magnetic disk and
positions the read/write head(s) at the desired
location.

Disk Track One of several concentric circular recording bands


where data is stored on a magnetic disk. Each
track may consist of several sectors with a fixed
memory capacity.

Disk, Floppy A thin, flexible, removable magnetic disk used to


store computer data. An example is a high-density
31/2-in. computer disk.

Disk, Hard A platter-like magnetic storage device permanently


encased in a computer system.

DNS SERVER Domain An Internet service that translates domain names


Name System (Or Service) into IP addresses. Because domain names are
alphabetic, they're easier to remember. The
Internet however, is really based on IP addresses.
Every time you use a domain name, therefore, a
DNS service must translate the name into the
corresponding IP address. For example, the
domain name www.example.com might translate to
198.105.232.4. The DNS system is, in fact, its own
network. If one DNS server doesn't know how to
translate a particular domain name, it asks another
one, and so on, until the correct IP address is
returned.

Domain A domain is the main subdivision of internet


addresses, the last three letters after the final dot,
and it tells you what kind of organization you are
dealing with. Some standard domains are: The part
of the external world, including users and inmates
of the system that effects and is affected by the

COPYRIGHT CORNELL INFOMATICS PVT LTD 224 PROG TECHNIQUE & PRACTICE
system.

Domain - Meaning .com – commercial, .edu – educational, .gov –


governmental, .mil – military,.org - non-profit
organization, .net - network

Domain Names A domain name is the complete description of an


internet or web site - its full address -- all the
letters, dots and marks that identify its location. e-
land's domain name is http://www.e-land.com and
IBM's is http://www.ibm.com, which make both
fairly easy to remember. That's why good domain
names, like 800 numbers, are getting scarce After
all, you don't want your customers to have to type
"xcp32qrt.com" if your company name is "Tasty
Food."

Download The transfer of information from the Internet to your


computer. Every time you instruct your computer
system to retrieve your mail, you are downloading
your mail to your computer. You may also
download programs to your computer. However,
be careful about downloading files or programs
from a site in which you are not familiar. You could
download a virus and never know it until it's too
late.

Dpi Dots per Inch is a measurement used both on


monitors and printers. The measurements are
done different ways though. The higher numbers
on printers generally represent more detailed print
quality (i.e. 1440x1440 would be very high
resolution printing). The lower numbers on
monitors represent clearer picture quality (i.e. .22
dpi would be a very high quality monitor).

Drill Down A term used to express what a surfer does as he or


she goes further into a web site -- deeper into the
back pages, deeper into data. Make certain that
when someone takes the time to "drill down" into
your site that they come back with information

COPYRIGHT CORNELL INFOMATICS PVT LTD 225 PROG TECHNIQUE & PRACTICE
worth digging for.

Dvd A technology that uses five inch discs similar to


CD-ROMs but which can hold much more data. A
DVD disc can deliver multi-channel sound and TV
images three times sharper than videotape. DVD
players, expected to debut in late 1996, will be
interoperable with televisions, stereos, personal
computers and some video games. Unlike CDs,
DVDs can hold data on both sides and can provide
either one or two layers of data on each side. A
single-sided single layer DVD holds 4.7 gigabytes
of data while a double-sided double-layer DVD
holds 17 gigabytes.

Dvd-Rom Drive Similar to a CD-ROM drive, a DVD Drive reads


CDs, CD-ROMs, and the newer DVDs. The
acronym DVD originally had no meaning, but has
since been referred to as Digital Video Disk and
Digital Versatile Disk. DVD's advantage over CDs
is that it holds many times the capacity of a single
CD. DVDs can also hold full-length movies and can
be used double-sided for extra storage. Currently
very few software titles are available only on DVD-
ROM, but are also available on CD-ROM, usually
requiring multiple CDs. DVD videos are only
available on DVD though. DVD also requires and
MPEG decoder card to view the Videos. Software
DVD decoding can be done on very fast machines,
but hardware decoding (simply meaning a piece of
hardware is added to the computer along with the
drive - a decoder card) will work much better.

Ebcdic Codes Extended Binary Code for Decimal Interchange


code. This is a 8 bit code which can code up to 256
characters.

Economic Profit Return on investment in excess of the average


cost of capital in the overall market. Alternatively,
profits excluding profits from the increase in value
of inventory which the company holds.

COPYRIGHT CORNELL INFOMATICS PVT LTD 226 PROG TECHNIQUE & PRACTICE
Eeprom Electronically Erasable Programmable Read Only
Memory. A type of ROM chip that can be
electronically erased and reprogrammed in circuit
using software. The introduction of EEPROM
allowed expansion devices to be configured using
software instead of jumpers and DIP switches.

Eft-Pos (Electronic Funds Transfer at the Point-of-Sale)


The automatic transfer of funds, using a debit card
at a retail point of sale, from a consumer's demand
deposit account to the retailer's account. EFT-POS
transactions pass through the retailer's back office
computer and, if the retailer is part of a chain, may
also pass through the data center of the retailer on
its way to the EFT processor.

Electronic Rights Copyrights extended to electronic media.

Email (Electronic Mail) Any communications system that enables you to


send messages –electronic letters -- from one
computer to another, or a group of others, in many
different locations online. It's value in business
communications can not be stressed too much.
Rather than calling twenty people, you can send
one message. Rather than play phone tag -- for
days, and running up long-distance bills -- you can
"hang" a message and wait for the response.
Businesses with efficient email systems in place
waste less time and money. Get it.

End User Readiness The purpose of End User readiness testing is to


Testing ensure that all of the users of the new system will
be ready to perform their job functions when the
system goes live, which includes end user training.

End-User Anyone who will use the system or functionality


once it is in production.

Eniac The Electronic Numerical Integrator and Computer


(ENIAC) was the First High-Speed, General-
Purpose Computer developed in 1946

COPYRIGHT CORNELL INFOMATICS PVT LTD 227 PROG TECHNIQUE & PRACTICE
Enterprise Resource An industry term for the broad set of activities
Planning (Erp) supported by application software that helps a
manufacturer or other business manage the
important parts of its business, including product
planning, parts purchasing, maintaining
inventories, interacting with suppliers, providing
customer service, and tracking orders.

Environment Technical term for the section of the database.


Example environments may include, but are not
limited to, Production, Testing, Training,
Development, etc.

Eprom Erasable Programmable Read Only Memory. A


type of PROM chip that can be removed from the
circuit and erased using ultraviolet light. The chip
can then be re-programmed using an EPROM
burner.

External Data The representation of data in a system, which is


Representation understood by people, is called as external data
representation.

Extranet A Web site that links businesses to customers,


suppliers, etc. for electronic commerce. These
sites usually provide more customer specific
information than a public sites and may have
security devices such as passwords for a user to
gain access to more sensitive information.

Faq Frequently Asked Originally used by software developers as a user-


Questions friendly way to answer common questions about
software installation and operation, FAQs can now
be found on many web sites and newsgroups
functioning in much the same way.

File Transfer Protocol The tool used to retrieve information in the form of
(FTP) electronic files from any number of computer
systems linked via the TCP/IP protocol. Users in
effect transfer copies of information found on
remote computers either directly to their own
computers or to a service provider’s network and

COPYRIGHT CORNELL INFOMATICS PVT LTD 228 PROG TECHNIQUE & PRACTICE
then to their own computers.

Firewall A security barrier placed between an organization's


internal computer network -- either its IS system or
intranet – and the internet. It keeps your
information in, and unwanted people out. It
consists of one or more routers which accept,
reject or edit transmitted information and requests.
Tip: Get a good one. You don't want anyone else
messing around in your business.

Flash A technology developed by Macromedia, Inc. that


enables Web pages to include multimedia objects.

Flowcharting Flowcharting is an important method of


representing computer programming steps in a
graphical manner. A flowchart as the pictorial
representation of logical steps indicated with the
purpose of guiding the programmer to prepare the
program for a particular task.

Formal Organization This is a system that is described and directed by


charts, policies and procedures; this is the ‘legal’
structural system, which defines levels of authority
and responsibility.

Forms The pages in most browsers that accept


information in text-entry fields. They can be
customized to receive company sales data and
orders, expense reports or other information. They
can also be used to communicate, as on our email
page.

Freeware Shareware, or software, that can be downloaded


off the internet -- for free.

Ftp File Transfer Protocol One of the original protocols on the internet, ftp is a
complex set of computer commands that enable
information files to pass from one computer to
another online. Fortunately, the commands are
embedded in most browser programs and all you

COPYRIGHT CORNELL INFOMATICS PVT LTD 229 PROG TECHNIQUE & PRACTICE
have to do is click.

Functional Decomposition Functional decomposition or levelling because the


Diagram system is divided into tasks that each perform a
particular function.

Gif Graphics Interchange Format. A data compression


format used to compress and transfer graphic
images into digital information that can be
displayed on the computer screen. Because of
their smaller size, this format is used widely on the
Internet for the transfer of graphic files. The files
have a .GIF extension.

Gif Graphics Interchange GIF (pronounced "gift") is a graphics format that


Format can be displayed on almost all web browsers. Most
of the "pictures" you see online are GIF files. They
display in 256 colors and have built-in
compression.

Gigabyte One billion bits. A gigabyte is 1,073,741,824 bytes


(typically rounded off to a billion bytes). Often used
to describe the capacity of storage devices such as
hard drives. 1024 Mb = 1 GB.

Gigabyte (GB) One thousand megabytes or one billion bytes.

Globalisation A set of processes leading to the integration of


economic, cultural, political, and social systems
across geographical boundaries.

Gopher Gopher is a program originally developed as the


University of Minnesota -- thus the name -- which
displays the data on internet servers as online
"trees" for easier access. Most web browsers can
access gopher sites.

Gui Graphical User Interface. An operating system


(such as Windows) with an interface or working
environment that uses graphics and icons on the
screen for running programs or entering
information.

COPYRIGHT CORNELL INFOMATICS PVT LTD 230 PROG TECHNIQUE & PRACTICE
Hardware Articles made of material, such as aircraft, ships,
tools, computers, vehicles, fittings, and their
components (mechanical, electrical, electronic,
hydraulic, pneumatic). Computer software and
technical documentation are excluded.

Header Control information inserted in front of data when


the data is encapsulated for network transmission.
See IP Authentication Header and Encapsulating
Security Payload.

Hexadecimal A numbering system with Base 16 (Symbols used


are 0 through 9 and A to F).

Hierarchical Input Process This methods used for developing software


Output (Hipo) Chart (developed by IBM). HIPO diagrams are graphical
rather than prose or narrative description of
system.

High-Level Language Contrary to the machine language and assembly


language programs, high level programs resemble
very much in structure to English language. Since
the programs written in high level languages are in
human readable form they require to be translated
into machine codes so that computer can
recognize them.

History List Most browsers have a pull-down menu which


displays the sites you've recently visited. so you
can return to site instantly or view your latest
surfing session. The same mechanism makes it
possible for servers to track where you were before
visiting a particular site -- better viewing habit
information than television networks ever dreamed
of providing.

Hit A hit is generated when a request is made to a


web server. While it is true that there is no
accurate formula for determining the number of
visitors to a page or site based on the number of
hits -- one visitor could go back and forth twenty
times or twenty people could visit a single time
each – a hit at least indicates somebody was there,

COPYRIGHT CORNELL INFOMATICS PVT LTD 231 PROG TECHNIQUE & PRACTICE
which makes it far more valuable than the tracking
devices in any other media.

Home Page The first hypertext document -- or top page -- of a


web site. Typically, it welcomes you and introduces
the purpose of the site, or the organization
sponsoring it, and then provides links to the lower-
level pages of the site. In business terms, it's the
grabber. If your home page downloads too slowly,
or it's unclear or uninteresting, you will probably
lose a customer. Remember, your home page is
your store front and cybertraffic is moving by at the
speed of light. Make it inviting. Make it work.

Host The computer on which a web site is physically


located

Hot Java A World Wide Web browser capable of interpreting


interactive applications, or "applets" programmed
in Java.

Hotlists These can be pull-down or pop-up menus on


browsers that contain new or popular sites. Major
browser and search engine home pages also
contain updated hotlists, and there are entire sites
-- such as Cool Site O' the Day -- which are
nothing but. Of course, for businesspeople the best
hotlist anywhere is the elist.

Html Hypertext Markup HTML is the program language that defines and
Language determines the look of a web page. It is a fairly
simple language and there are hundreds of sites
online and books which tell you how to write and
use it, but unless your business is web page
design, you're better off hiring a webmaster or
online design shop to handle the task.

Http Hypertext Transport This is the programming protocol that defines how-
Protocol - or commands -- a webserver to respond to a
request for data, whether text, graphics or
multimedia.Without it no information would pass

COPYRIGHT CORNELL INFOMATICS PVT LTD 232 PROG TECHNIQUE & PRACTICE
along the web from a server to your computer.

Hub A local area network device that provides


centralized relaying between connected devices.
Unmanaged hubs broadcast incoming traffic to all
hub locations, which only pick up the transmission
if it is addressed to that specific site. Managed
hubs route traffic from the originating machine
directly to the destination, thereby significantly
reducing LAN traffic. Most prepress shops have, or
should have, migrated to managed hubs by now.

Hypercard This UIMS from Apple incorporates object oriented


approach. A card has an associated screen layout
containing buttons and fields. A button can be
selected by clicking the mouse on it. A field
contains editable text. Each card has a specific
background. A hypercard program is thus a
hierarchy of cards called a stack. UI behaviour is
specified by associating an action, in the form of a
HyperTalk script, with each button, field and card.

Hyperlink This is the clickable link in text or graphics on a


web page that takes you to another place on the
same page, another page or a whole other site. It
is the single most powerful and important function
of online communications. Hyperlinks are
revolutionizing the way the world gets its
information. Hyperlinks make New York, London,
Tokyo, Sydney or Los Angeles only one click and
seconds away all for exactly the same price.

Hypermedia Media (such as pictures, videos, and audio), on a


web page that links the user to another web page
by clicking on the media.

Hypertext Text on a web page that links the user to another


web page. The hypertext, or links will usually be a
different color than the other text on the page and
is usually underlined. Hypertext visualizes a
document to consist of a hierarchical arrangement
of information units, and provides a variety of

COPYRIGHT CORNELL INFOMATICS PVT LTD 233 PROG TECHNIQUE & PRACTICE
means to locate the required information.

Hypertext Markup The hypertext document format used on the


Language (HTML) Internet’s World Wide Web.

Hypertext Transfer Protocol The Internet standard supporting the exchange of


(HTTP) information on the World Wide Web.

Implementation Plan Comprehensive outline of the most appropriate


options for implementing initiatives identified and
ranked as per priority.

Information A collection of facts or data ; Knowledge derived


from study, experience, or instruction; Processed,
stored, or transmitted data.

Information Model A high-level roadmap containing software,


hardware, and other information technology
requirements for MIS.

Inline Image On a Web page, an image that appears in the


midst of text.

Integrated Services Digital A communication network intended to carry


Network (ISDN) digitized voice and data multiplexed onto the public
network. ISDN uses a group of channels to provide
for the simultaneous digital transmission of voice,
text, images, and multimedia traffic. It is available
in three categories: Basic Rate ISDN (BRI),
Primary Rate ISDN (PRI), and Broadband ISDN
(B-ISDN). Basic Rate ISDN is a baseband network
bundle of two 64-Kbps B (bearer) channels for the
transfer of voice, graphics, and data, plus one 16-
Kbps D (delta) channel that carries data and call
setup information

Integrator Individual or group that ensures that the MIS


systems and processes that are developed and
implemented fit into overall business functions.

COPYRIGHT CORNELL INFOMATICS PVT LTD 234 PROG TECHNIQUE & PRACTICE
Interactive Multimedia An application involving substantial user input or
control and presenting at least two of the following:
text, graphics, sound, image, video, and animation.
Applications can be in the areas of education,
entertainment, information and publishing, and
transactions.

Intercast A technology and open standard developed by


Intel for transmitting World Wide Web pages at
approximately 100Kbps in the vertical blanking
interval of a standard television signal. While not
supporting two way communication, Intercast will
allow broadcasters and advertisers to provide text,
graphics, and still images to home PC's. The
technology requires a television receiver and a
chip that converts the signal from analog to digital.
Backed by PC manufacturers, broadcasters, online
service providers and software developers.

Internal Data Data representation, directly usable by the


Representation machine is called as internal data representation.

Internal Rate Of Return The rate of discount that makes the net present
value (NPV) equal to zero.

Internet The internet is the world's largest computer


network. It consists of millions of commercial,
educational, government and personal computers
linked by telephone, cable television and fiber optic
lines and microwave and satellite signals.
Amazingly, it is an international cooperative effort
between connected institutions and individuals and
is not owned, operated or governed by any single
organization. And, if you want to do business on it,
part of your job is making certain the internet stays
free.

Internet Explorer Microsoft's Web browser.

Internet Key Management A part of the IETF standard for IPSec which
Protocol (Ikmp) combines the Oakley protocol for key exchange
with the ISAKMP protocol for key management.

COPYRIGHT CORNELL INFOMATICS PVT LTD 235 PROG TECHNIQUE & PRACTICE
Internotes A software product from Lotus Development
Corporation which allows users to turn information
into a database that can be accessed through the
World Wide Web.

Interpreter Takes one statement of a high level language at a


time and translate it into a machine instruction
which is immediately executed.

Intranet Internets are private networks, usually maintained


by corporations for internal communications, which
use internet -- usually web -- protocols, software
and servers. They are relatively cheap, fast, and
reliable networking and information warehouse
systems that link offices around the world. They
make it is easy for corporate users to communicate
with one another, and to access the information
resources of the internet. Business Week ran a
cover article on them and an Editor's Letter in
Forbes ASAP proclaimed: "Intranets Are Real."
Intranets can make more money – and make it
faster -- for most corporations than online sales.

Irc Internet Relay Chat A facility that allows people -- from many different
places in the world at one time -- to chat in real
time. The chats, or forums, are typed remarks, and
they can be either public or private. This,
understandably, is a wildly popular consumer area
of the internet. A sort of "ham radio" for the '90s, it
offers intimacy combined with autonomy. Many
celebrities are also talking to the public at pre-
announced times, so IRC has commercial publicity
uses, too. Business meetings can be conducted in
the same way.

Isdn Integrated Digital ISDN lines are high-speed dial-up connections to


Services Network the internet. That's good. What's bad is that their
cost and availability is determined by local
telephone companies, which means in some
places they are available, in other places not; and
sometimes they're cheap, and at other times wildly
expensive. It is a lot of commotion for a connection

COPYRIGHT CORNELL INFOMATICS PVT LTD 236 PROG TECHNIQUE & PRACTICE
roughly four times faster -- 128,000 bits per second
-- than a normal phone line.

Isp An Internet Service Provider allows your computer


access to their computers and Internet access for a
fee. Most ISPs provide access to the Internet and
the World Wide Web with one or more email
addresses. You can also get Internet access
through Online Service Providers such as
CompuServe and America Online. They offer other
features such as chat rooms, forums, and
searchable databases, but are usually more
expensive.

Isp Internet Service A business that provides access to the internet. Its
Provider services are available to either individuals or
companies, and include a dial-in interface with the
internet, software supply and often web site and
intranet design. There are currently over 3,000
ISPs in the U.S. alone. It's a growth business, and
as a result pricing is highly competitive, so shop
around.

Java A programming language developed by Sun


Microsystems to support widespread software
distribution, particularly over the Web. It is a
slimmed down and more secure version of the C++
programming language. Originally developed for
use with set-top boxes, Java runs on Web servers
and downloads small application programs, called
applets, to Web browsers on an as needed basis.
Because of strict built-in controls over software
distribution the Java design protects against the
delivery of incompatible software or viruses.

Javabeans A software component model associated with the


Java programming language. A JavaBean
component is an object which can be used
repeatedly by visually manipulating it into larger
solutions. JavaBeans can range from low-level
components, such as a scroll bar, to complete

COPYRIGHT CORNELL INFOMATICS PVT LTD 237 PROG TECHNIQUE & PRACTICE
products like Corel's Office for Java.

Javascript A cross-platform, Web-based scripting language


that will allow a lay person to author HTML pages
that use Java applets, objects, and classes without
having to know how to program in Java. It can also
be used to build stand-alone applications that can
run on either clients or servers. JavaScript is being
developed by Netscape and Sun Microsystems
and is supported by approximately twenty-five
other companies in competition with Microsoft's
OLE and OCX's optimized for the Internet. See
Java, applet, OLE, OCX and Blackbird.

Joystick Used mostly for computer flight simulators and


action games, a joystick is an input device that
transfers movements you make with the device
into movements on your computer screen. It is
used to simulate arcade-style play for computer
games.

Jpeg Joint Photographic JPEG (pronounced "jay peg") is a graphics format


Experts Group newer than GIF which displays photographs and
graphic images with millions of colors, it also
compresses well and is easy to download.
Unfortunately, not many browsers currently support
it, so don't use it for your logo.

Keyboard A keyboard is the most commonly used input


device, which helps us in simply keying in required
information in a computer. The most important
input device. Keyboards are used to type
commands, data, and other information into your
computers memory for processing

Keyword A word -- or often phrase -- used to focus an online


search.

Kilobyte A measurement unit used to describe the size of


computer files. A kilobyte is equivalent to 1024
bytes or characters of information.

COPYRIGHT CORNELL INFOMATICS PVT LTD 238 PROG TECHNIQUE & PRACTICE
Led Light emitting diodes.

Lexical Analyzer (Or It reads successive lines of a program and breaks


Scanner) them into individual lexical items, namely identifier,
operator, delimiter etc. and attaches a type tag to
each of these. Besides this it constructs a symbol
table for each identifier and finds the internal
representation of each constant. The symbol table
is used later to allocate memory to each variable.

Link A link will transport you from one Internet site to


another with just a click of your mouse. Links can
be text or graphic and are recognizable once you
know what to look for. Text links usually will be
underlined and often a different colour than the
rest of the text on your screen. A graphic link
usually has a frame around it.

Listserver A program that automatically sends email to a list


of subscribers. It is the mechanism that is used to
keep newsgroups informed.

Location An Internet address. While you are in your browser


you will see a section at the top of the page that is
titled "location". If you type in the address of
someone's web page and hit enter, your browser
will take you to that page. However the address
you type in the location bar must be an exact
match.

Lpt Port A parallel communications port often used by a


printer. On the back of your computer you will see
a DB-25 female port. It's a D-shaped port with 25
holes arranged in two lines.

Lsb (Least Significant Bit) Rightmost bit in a number.

MIS Management Information System (MIS) is the


process of collecting, compiling, analysing and
reporting information that is relevant to the
business situations that the organization faces.

Machine Languages The Machine languages uses the strings of 0's and

COPYRIGHT CORNELL INFOMATICS PVT LTD 239 PROG TECHNIQUE & PRACTICE
1's (binary digits) which is not understood very
easily by us.

Mailing List Online a mailing list is an automatically distributed


email message on a particular topics going to
certain individuals. You can subscribe or
unsubscribe to a mailing list by sending a message
via email. There are many good professional
mailing lists, and you should find the ones that
concern your business.

Main Frames Mainframe computers are generally 32-bit


machines or on the higher side. These are suited
to big organizations, to manage high volume
applications.

Maintenance Maintenance Software will undoubtedly undergo


change after it is delivered to the customer.

Marketing nformation A marketing information system is a continuing and


System interacting structure of people, equipment, and
procedures to gather, sort, analyse, evaluate, and
distribute pertinent, timely, and accurate
information for use by marketing decision makers
to improve their marketing planning,
implementation, and control.

Mass Individualization The customizing of products for individual


consumers on a large scale and at a low cost. It
requires the consumer to participate in the
individualization.

Menulay Menulay is an early UIMS using the screen layout


as the basis for the dialog model.

Metcalfe's Law The total value of a network to its users grows as


the square of the total number of users. The law
was developed by Bob Metcalfe originally to
convince people of the value of Ethernet and has
also been referred to by George Gilder as the law
of the telecosm. An important consequence of the
law is that the ratio of value to cost for adding one
more network user grows disproportionately

COPYRIGHT CORNELL INFOMATICS PVT LTD 240 PROG TECHNIQUE & PRACTICE
(increasing returns) as the network gets bigger.

Migration The process of moving development work from


one environment to another.

Ml Short for eXtensible Markup Language, a new


specification being developed by the W3C (World
Wide Web Consortium). XML is designed
especially for Web documents, basically it is a lite
version of SGML. It gives designers the ability to
create their own customized tags to provide
functionality not available with HTML. For example,
XML supports links that point to multiple
documents, as opposed to HTML links, which can
reference just one destination each. Whether XML
eventually replaces HTML as the standard Web
formatting specification depends a lot on whether it
is supported by future Web browsers. Right now
the only major browser vendor to endorse XML is
Microsoft, which has stated that XML will be
supported in a future version of Internet Explorer.

Modem A contraction for "modulation/demodulation," it is


the device that converts a digital bit stream into an
analog signal (and back again) so computers can
communicate across phone lines.

Modem A communications device that converts digital


(Modulator/Demodulator) information into -analog signals suitable for transfer
over (analog) telephone lines. It also converts the
analog signal from phone lines into digital
information.

Module A self-contained part of a hardware item designed


as a single replaceable unit, with a specific integral
electronic function. It should require no installation
other than mechanical mounting and completion of
electrical connectors

Monitors The monitor is an output device like a TV screen

COPYRIGHT CORNELL INFOMATICS PVT LTD 241 PROG TECHNIQUE & PRACTICE
on which the output from the computer is
displayed. This helps the user to interface with the
computer.

Moore's Law Formulated by Gordon Moore, a founding spirit of


Intel, this "law" says the number of transistors that
can be squeezed onto a silicon chip will double
every 18 months. Since the early '70s, Moore's
Law has been incredibly accurate. Computer
power has risen, while size and costs have fallen.
This simple equation is the number one driver
behind the information revolution.

Mosaic Developed by NCSA, the National Center for


Supercomputing Applications at the University of
Illinois in Urbana, this is the breakthrough browser
that revolutionized the internet. It brought
clickability and graphics to a hard-to-navigate, text-
heavy information system and made the web --
and its vast commercial possibilities – a reality.

Motherboard The motherboard is the main circuit board of the


computer and it controls all the functions and
operations of the computer. The printed circuit
board in a computer that contains the CPU,
Chipset, expansion slots, memory and device
controllers. Sometimes called the System Board,
Main Board, Planar Board or Logic Board

Mouse A small, hand-held device used to position the


cursor on the computer screen. When the mouse is
rolled across its pad or another flat surface, the
cursor moves a corresponding distance across the
display monitor.

Mp3 MP3 is a codec that compresses standard audio


tracks into much smaller sizes without significantly
compromising sound quality.

Mpeg The file format that is used to compress and


transmit movies or video clips online.

Msb (Most Significant Bit) Leftmost bit in a binary number.

COPYRIGHT CORNELL INFOMATICS PVT LTD 242 PROG TECHNIQUE & PRACTICE
Multimeter A Voltmeter or Ammeter that has a switch setting
allowing it to measure voltage (ac or dc),
resistance in ohms or continuity of a circuit

Multitasking The ability of a computer to run more than one


application at a time.

Net Present Value The present value of future cash returns of a


project.

Netcasting The broadcasting of information over the Internet


using server push technology. Generally limited to
webcasting.

Netiquette A term that is used to describe the do's and don'ts


of online behavior. There are books out about it.
Read them if you want, or for a detailed online
explanation go to The Net: User Guidelines and
Netiquette. But it all comes down to good business
-- and social -- practice. Be polite, be aware of the
folks you are talking to, talk nicely and not too
much. 'Nuff said.

Netscape Sure Netscape is the most popular web browser in


the universe. But more important, from the moment
its stock was offered on the floor of the New York
Stock Exchange on August 9th, 1995, the
company was instantly valued at over $2 million,
and the internet was in business. Big business.

Network A computer system that allows several users at


remote terminals to exchange data electronically
through a common central computer or with a
modem over conventional telephone lines. See
also: local-area network.

Newsgroup Newsgroups, also called usenets, consist of


messages posted on electronic bulletin boards.
Each board has a theme, and there are tens of
thousands of newsgroups concerning every
imaginable topic. Many of them cover professional
subjects and societies and are rich sources of
business information; others are junk and contain

COPYRIGHT CORNELL INFOMATICS PVT LTD 243 PROG TECHNIQUE & PRACTICE
little but mindless drivel.

Nic Network Interface Card. An expansion card that fits


into a computer and connects via the network
cable to the NICs installed in other computers on
the network. It works with the network operating
system to send and receive information over the
network.

Numeric Keypad A set of keys to the right of the main part of the
keyboard, used for numeric data entry.

Octal A numbering system with Base 8 (Symbols are 0


through 7).

ODBC Open Database An interface that makes it possible to access


Connectivity different database systems with a common
language. ODBC is based on CLI (Call Level
Interface); there are ODBC drivers and
development tools for Windows, Macintosh, UNIX,
and OS/2.

Offline Not where you want to be if you want to be in


business in the 21st century. If a printer or other
peripheral is not ready to receive data from the
computer, it is considered to by Offline. In
communications, Offline means that you are no
longer connected to a remote computer.

OLE Object Embedding A set of protocols which allow programs operating


And Linking in Microsoft Windows to cooperate with each other.
An integral part of Microsoft Windows, OLE allows
developers to use objects created in one
application (such as charts created in Excel) in a
document in another application (such as Word or
PowerPoint).

On Line Help On line help is very important to promote and


sustain interest in the use of an application. It
minimizes the effort of initial learning of commands
and avoids the distraction of having to consult a

COPYRIGHT CORNELL INFOMATICS PVT LTD 244 PROG TECHNIQUE & PRACTICE
printed document to resolve every doubt.

On-Board Actually located on a circuit board. Often refers to


components or devices that are usually connected
to the computer through expansion slots or ports,
that are integrated onto the motherboard such as
video adapters, sound cards or network cards. A
motherboard that has integrated video can be said
to have Video On-board.

Online A printer or other peripheral that is connected to a


computer and ready to receive data is considered
to be Online. In communications, it means that you
are currently connected to a remote computer
through a network line or modem.

Open EDI A model for EDI in which trading partners'


applications exchange information with no prior
human agreement required. It requires the use of
an existing "scenario" developed by a user
community. Open EDI will lower the barriers to
establishing EDI relationships with new partners
and facilitate the relationships between existing
partners. The model is being developed by the
international standardization committee ISO/IEC
JTC1 SC30. CD 14662 is the draft standard.

Operating System The master program that a computer needs to start


up and perform basic tasks. It allows the computer
to control itself and perform other functions, such
as managing memory allocation for application
software and data files.

Operational Management This level of management translates the


Layer organisation vision into smaller tasks and activities
that have to be performed by the all the members
of the organization.

Operational Readiness Operational readiness testing ensures that the


Testing procedures and personnel required to implement
the new system are in place.

COPYRIGHT CORNELL INFOMATICS PVT LTD 245 PROG TECHNIQUE & PRACTICE
Optical Character A technique in which any printed, typed, or
Recognition (OCR) handwritten copy or graphic images are scanned
by an electronic reader that converts the
information into a form that can be read,
interpreted, and displayed by computers.

Oracle A relational database management system for


many computer platforms from Oracle Corporation,
Redwood Shores, California.

Organisations An organization is a group of people intentionally


organized to accomplish an overall, common goal
or set of goals.

Organising Organising is Developing the structure of the


organization to meet these goals and acquiring
Human Resources to meet them.

Parallel Port An input/output port on your computer that


transfers data eight bits at a time. It's a female DB-
25 port that is usually used to connect a printer.
Also known as an LPT port.

Passive-Matrix Display A type of video display (originally for notebook and


laptop computers) that uses a series of criss-
crossed wires with an LCD element at each
intersection to produce a picture. Each element
represents a pixel and can either allow light to pass
or not. In contrast, an active-matrix display has a
single transistor to represent each picture element
(pixel). Passive-matrix displays are cheaper to
produce but can't produce as sharp a picture as an
active-matrix display.

Path Name The filing system on a computer is a hierarchical


system. The Path Name for a certain file indicates
to the computer, or the user, the drive and list of
directories (folders) that must be followed to find
that file. This is the path needed to access, retrieve
or save the file.

Pay-Per-Click The ability to pay, typically in very small amounts


or micro-payments for information or entertainment

COPYRIGHT CORNELL INFOMATICS PVT LTD 246 PROG TECHNIQUE & PRACTICE
received over the Internet or the Web. The term
implies that each payment is automatic and that
simply requesting the information provides
agreement to pay for it.

Pdf Portable Document PDF is a file type created by Adobe Systems, Inc.
Format that allows fully formatted, high-resolution,
PostScript documents to be easily transmitted
across the Internet and viewed on any computer
that has Adobe Acrobat Reader software (a
proprietary viewer is available for free at the Adobe
site). Corporations that have invested in brand
name identification use PDF to display the original
look of their logos and advertising. Publishers can
create a high-quality brochure and then "publish" it
as is, without converting it to HTML. Anyone
interested in presenting documents with the
highest possible resolution or a complex layout
might choose to use PDF. PDF files can be
distributed via e-mail, web pages, CD-ROMs,
online services and LANs. They can also contain
hyperlinks, QuickTime® movies, and sound clips.

Performance Testing The focus of performance testing is monitoring the


system under peak workload conditions.

Peripheral Any device or piece of equipment that is attached


to and used by a computer, such as a monitor,
tape drive, printer, modem, speakers, etc..

Perl Practical Extraction A popular scripting language for writing CGI


And Reporting Language applications because it facilitates data and text
manipulation.

Planning This is the process of establishing goals and


developing strategies to achieve these goals

Platform The platform defines a standard around which a


system can be developed. Once the platform has
been defined, software developers can produce
appropriate software and managers can purchase
appropriate hardware and applications. The term is
often used as a synonym of operating system. The

COPYRIGHT CORNELL INFOMATICS PVT LTD 247 PROG TECHNIQUE & PRACTICE
term cross-platform refers to applications, formats,
or devices that work on different platforms. For
example, a cross-platform programming
environment enables a program mer to develop
programs for many platforms.

Plug And Play Plug and Play is a technology that can reduce
conflicts between computer devices by
automatically configuring them at startup.
However, for it to work properly your BIOS and
your Operating System both must support PnP,
and the device being configured must be a Plug
and Play device. The technology actually works
pretty good but there can be problems when you
mix legacy devices with PnP.

Pop3 Post Office Protocol A protocol used to retrieve e-mail from a mail
server. Most e-mail applications (sometimes called
an e-mail client) use the POP protocol, although
some can use the newer IMAP (Internet Message
Access Protocol). There are two versions of POP.
The first, called POP2, became a standard in the
mid-80's and requires SMTP to send messages.
The newer version, POP3, can be used with or
without SMTP.

Port A port is a socket or plug-in on your computer that


allows you to attach an external device by
connecting its cable.

Portable Document Format A computer file format that preserves a printed or


(PDF) electronic document’s original layout, type fonts,
and graphics as one unit for electronic transfer and
viewing. The recipient uses compatible “reader”
software to access and even print the PDF file.

Power Supply Generally this comes with the case. It can have an
AT or ATX power connector and it is measured in
its rated output. It converts power from your
outlets into a steady stream of power the computer
can use. A 235 or 250 Watt power supply is
generally sufficient for home users, but power
users may need a 300 or 400 Watt power supply if

COPYRIGHT CORNELL INFOMATICS PVT LTD 248 PROG TECHNIQUE & PRACTICE
they have a lot of hard drives or other components.

PPP Point To Point The language that enables a computer to use


Protocol telephone lines and a modem to connect to the
internet. Gradually replacing SLIP as the preferred
means of connection.

Printer A printer outputs data that is seen on the computer


screen. Most printers are used through a parallel
port, but some newer ones use USB connections.
USB is somewhat faster, but there's not much of a
difference for printers. Networked computers
usually print to a printer through the network card.
The most crucial printer measurement is its dots
per inch rating.

Process Chart Process hierarchy chart shows hierarchy or levels


of process in the system. Any activity that
generates, modifies or uses information should be
included in process chart.

Production Verification The purpose of production verification testing is to


Testing simulate the production cutover as closely as
possible.

Program A systematic series of software instructions


designed to direct a computer to perform a specific
task.

Program Generators A program generator generates a program which


performs a set of functions described in its
specification.

Program Instrumentation Program instrumentation implies insertion of


statements in a program. The instrumentated
program is translated using a standard translator.

Program Preprocessing Program preprocessing techniques are used to


support static analysis of programs. Tools
generating cross reference listings and lists of
unreferenced symbols; test data generators, and

COPYRIGHT CORNELL INFOMATICS PVT LTD 249 PROG TECHNIQUE & PRACTICE
documentation aids use this techniques.

Program Structure Charts A structured system is one that is developed from


the top down and modular, that is, broken down
into manageable components. Structure charts
show the relation or processing modules in
computer software.

Programming A programming environment supports program


Environments coding by incorporating awareness of the
programming language syntax and semantics in
the language editor.

Project The basic unit of work from the customer's


perspective. A project can be as small as a
cosmetic report change or as large as a multi-
month implementation. A project may remain a
single unit with a single tracking number or it may
be split up into multiple projects, each with a
tracking number and each standing complete on its
own.

Project Team All persons involved in the project at any stage.


Most Project teams will have the following types of
members: Practice Manager, Program Manager,
Customer, Technical Lead, Functional Lead and
Technical Resources.

Project Timeline The Project Timeline maps out the time frame for
each phase of a project. The dates should
correspond with those outlined in the Project Work
Plan.

Project Work Plan The Project Work Plan consists of the detailed
tasks that need to be completed, who is assigned
to those tasks and target dates for these tasks.

Project Workbook The Project Workbook is to be used as a


documentation and communication tool for both
MIS and the customer, which gives an in-depth
analysis of the requested project. It also clarifies
MIS and Customer roles and responsibilities,

COPYRIGHT CORNELL INFOMATICS PVT LTD 250 PROG TECHNIQUE & PRACTICE
provides a preliminary project plan and timeline,
determines estimates of project resources, and
defines the project scope.

Protocol A set of rules that lets computers agree how to


communicate over the Internet. A Protocol is a set
of rules or configurations defined between two
computers or devices so they can communicate.
Some of the operations defined are error detection
and correction, data format and readiness to
receive or send. There are different protocols but
two communicating devices must follow the same
protocol in order to understand each other.

Prototypes Smaller versions of the system that can be


validated quickly by the user without construction
of an entire system.

Public Switched Telephone The nationwide and worldwide telephone systems


Network accessible on-demand from telephones and
modems. It includes individual dialup subscriber
lines as well as high capacity circuits that are
shared by multiple users on a first come first
served basis. It does not include dedicated local
and long distance lines (e.g. dedicated T-1)
provided by telephone companies to large
organizations, to Internet Service Providers, and
Network Service Providers. Sometimes PSTN is
used to mean only those facilities accessible by
analog dial and to exclude ISDN.

Query A request for information, usually to a search


engine.

Random Access A system of data file management in which a


record is accessible independent of its file location
or the location of the previous record accessed. In
other words, records need not be accessed
sequentially.

Random-Access Memory Solid-state computer memory that is essentially the


(RAM) “working” memory a computer uses to store
temporary information. RAM can be read from and

COPYRIGHT CORNELL INFOMATICS PVT LTD 251 PROG TECHNIQUE & PRACTICE
written to, as the name indicates, in a random
sequence, and it is used to store data from open
applications as well as the operating system itself.
See also: read-only memory.

Read Only Memory (ROM) Nonerasable , permanently programmed computer


memory. It can be accessed and “read” by the user
but it cannot be edited. See also: random-access
memory.

Realaudio A software product from Progressive Networks Inc.


which enables the creation of audio files on Web
servers and delivery over the Internet to Web
browsers.

Recruitment The system or process of selecting and appointing


personnel in the company.

Registration Service A generally free service on the Internet which


requires registration by the user, sometimes
including detailed user information, in return for
access to the service.

Remote Access The ability of individual PC's or branch office LANs


to establish data communications with their
organization's backbone network, usually over
dialup links. Remote access is most important for
supporting mobile laptop users and enabling
telecommuting. Organizations may lower their
remote access administrative burden and
telecommunication costs by contracting with an
Internet Service Provider to receive dial-up calls at
local POPs and route the calls over the network to
the enterprise network. See Remote Access
Server and Remote Access Concentrator.

Remote Access A large remote access server often used by an


Concentrator Internet Service Provider.

Remote Access Server A system which receives data calls, generally over
telephone company dialup lines, and connects
them to an enterprise backbone network.

COPYRIGHT CORNELL INFOMATICS PVT LTD 252 PROG TECHNIQUE & PRACTICE
Requirements A document to capture the high-level business
Documentation Template needs for the project. The document should be
used as a tool to assist the customer in capturing
the high-level business needs for the project.

Resolution The image on your computer's monitor is made up


of tiny dots called pixels (picture elements). The
total number of pixels used to draw the image on
the screen determines the Resolution and is
defined by the number of pixels across and the
number of pixels down. i.e. 640x480. (1) The
density of dots or pixels on a page or display
usually measured in dots per inch. The higher the
resolution, the smoother the appearance of text or
graphics. (2) The precision with which an optical,
photographic, or photomechanical system can
render visual image detail. Resolution is a measure
of image sharpness or the performance of an
optical system. It is expressed in lines per inch or
millimeter.

Rich Text Format A standard developed by Microsoft Corporation for


specifying format ting of document s. RTF files are
actually ASCII files with special commands to
indicate format ting information , such as fonts and
margins. Other document format ting languages
include the Hypertext Markup Language (HTML),
which is used to define document s on the World
Wide Web, and the Standard Generalized Markup
Language (SGML), which is a more robust version
of HTML routers. Devices that connect separate
networks that use the same physical network
standard.

Robust This is a term that refers to software or hardware's


ability to hold up, to do what Timex promises,
"Take a Licking and Keep on Ticking."
Unfortunately, much of the computerware in use --
on and offline -- crashes, easily and unexpectedly.
It's not robust.

Router The hardware -- or software – that handles

COPYRIGHT CORNELL INFOMATICS PVT LTD 253 PROG TECHNIQUE & PRACTICE
connections between networks online. In other
words, it tells your computer where to go.

RTF Microsoft's Rich Text Format, which is normally


used as a well-understood cross-platform word
processing document format, but which can store
pictures as well as text. As image storage formats
go, though, this one is as inefficient as Postscript.

Scanner This device allows you to read images and text into
your computer. Scanners use a variety of
connection formats including Parallel Port, USB,
and SCSI. USB is simple, SCSI is fast, and
Parallel Port is extremely slow

Screen Shots Graphic representations of screens the user would


see on the finished system. They are built with
limited functionality behind the screens and are
intended to show high-level functionality with a
detailed user interface.

Security Gateway A system which acts as the communications


gateway between external untrusted systems and
trusted hosts on their own subnetwork. It provides
security services for the trusted hosts when they
communicate with external untrusted systems.
When a security gateway is providing services on
behalf of one or more hosts on a trusted subnet,
the security gateway establishes the Security
Association on behalf of its trusted host and
provides security services between the security
gateway and the external systems. In this case, the
gateway uses the IP Authentication Header, while
all of the systems behind the gateway on the
trusted subnet may take advantage of IP
Authentication Header services without having to
implement them.

Senior Specialist The Senior Specialist will partner with Project


Managers to provide technical guidance and
assistance on implementation projects. They will
analyze, design, test, and implement
enhancements and provide database

COPYRIGHT CORNELL INFOMATICS PVT LTD 254 PROG TECHNIQUE & PRACTICE
administration functions for project implementation
teams, maintenance and enhancement teams. The
Senior Specialist will also assist with training and
documentation for assigned projects.

Serf Acronym for System Enhancement Request Form.


See definition below.

Serial Port A computer input/output port that transmits data


sequentially, one bit at a time. The serial ports on
the back of your computer are the DB-9 and DB-25
Male connections. (DB connectors are the 'D-
shaped' ports).

Server Servers are the backbone of the internet, the


computers that are linked by communication lines
and "serve up" information in the form of text,
graphics and multimedia to online computers that
request data -- that's you. (When a server "goes
down" it loses its online link and the information it
holds can not be accessed.)

Server A device on a computer network that allows


networked users (clients) access to a specific
service on the network. An example is a file server,
which allows the users to share data files and
application software.

Server Push The continuous sending of new text, images, and


other information from a Web server to a Web
browser. Server push uses MIME's ability to send
multiple documents within a single message to
compose never ending message customized to an
individual user's workstation. Implementations of
server push, such as that from PointCast, are
generally referred to as Webcasting or netcasting.

Set Secure Electronic A standard established by MasterCard and Visa for


Transaction the secure use of credit, debit, and corporate
purchasing cards over the Internet. Co-developers
and supporters are Microsoft, CyberCash, GTE,
IBM, and Netscape. Other supporters include RSA
Data Security, Terisa Systems, and VeriSign. SET

COPYRIGHT CORNELL INFOMATICS PVT LTD 255 PROG TECHNIQUE & PRACTICE
represents an evolution, merging, and replacement
of S-HTTP and SSL.

Shareware Software programs that are openly available, and


usually they can be downloaded online. They are
often free, though not always.

Site A place on the Internet. Every web page has a


location where it resides which is called it's site.
And, every site has an address usually beginning
with "http://."

Smtp Simple Mail Transfer A protocol for sending e-mail messages between
Protocol servers. Most e-mail systems that send mail over
the Internet use SMTP to send messages from one
server to another; the messages can then be
retrieved with an e-mail client using either POP or
IMAP. In addition, SMTP is generally used to send
messages from a mail client to a mail server. This
is why you need to specify both the POP or IMAP
server and the SMTP server when you configure
your e-mail application.

Snail Mail A term for traditional land and air mail services,
which take days to deliver a message, versus
seconds for delivery of email.

Software Computer programs and computer databases.


Note: Although some definitions of software
include documentation, it is now limited to the
definition of computer programs and computer
databases.

Software Development A set of activities that results in software products.


Software development may include new
development, modification, reuse, re-engineering,
maintenance, or any other activities that result in
software products.

Source Code Commercially or in-house developed proprietary


algorithms, macros, etc. that define how the

COPYRIGHT CORNELL INFOMATICS PVT LTD 256 PROG TECHNIQUE & PRACTICE
software program works, completes its
computations, etc.

Spam The use of mailing lists to blanket usenets or


private email boxes with indiscriminate advertising
messages. Very bad netiquette. Even worse, it's
bad business. The future of marketing online is
about customizing products and information for
individual users. Anyone who tries to use old mass
market techniques in the new media environment
is bound to fail.

Spider A term used to describe search engines such as


Yahoo and Alta Vista, because of the way they
cruise all over the world wide web to find
information. It is a software program which combs
the web for new sites and updated information on
old ones, like a spider looking for a fly

Splash Page Splash pages are replacing many home pages --


particularly on sites more involved with news and
publishing – as gateways into web content. They
start with a bigger "splash," more graphics and
timely information., and change often -- like the
cover of a magazine.

Staffing Identify right people for each job and Identify and
implement training programs appropriately

Strategic Business Plan A strategic roadmap that competitively


differentiates a company's products and services,
target markets, customers, the competition and the
resources needed to deliver them successfully to
customers.

Strategic Thinking Layer This is the top most management hierarchy and it
looks at strategic and long term decisions of the
company.

Structure Chart A structure chart is a design tool that visually


displays the relationship interact and also
graphically depicts the data that are communicated
between various modules.

COPYRIGHT CORNELL INFOMATICS PVT LTD 257 PROG TECHNIQUE & PRACTICE
Structured English Structured English is a tool to deal with the
ambiguity of language. It is quite close to the
natural English language with some standard
conventions to eliminate vague expressions and
enhance the clarity of documentation.

Subscription Service An online service, Web site, or other source of


information and services which offers ongoing
unrestricted access and use for a period of time for
a fixed fee without regard to which particular
information or services are utilized.

Surfing This term originated in the mid-'80s when remote


controls began being used for television viewing. In
a way, that was the start of interactivity and the
beginning of the end for mass media. No more
passive viewing, the couch potatoes took control
of the medium. Then it was "channel surfing;" now
it refers to the practice of hyperlinking from web
site to site with no real goal -- just for the
interactive, informational fun of it.

Sustainability "Sustainable means using methods, systems and


materials that won't deplete resources or harm
natural cycles" (Rosenbaum, 1993).

Sysop The person responsible for the day-to-day


operations of a computer system or network. In
large corporations, this person can be the head of
the IS (Information Systems) Department.

System A system can be simply described as a set of


elements joined together for a common objective.
The combination or configuration of software and
hardware components, consoles, peripherals, and
connections necessary to perform specific
processing operations electronically.

System The combination or configuration of software and


hardware components, consoles, peripherals, and
connections necessary to perform specific
processing operations electronically.

COPYRIGHT CORNELL INFOMATICS PVT LTD 258 PROG TECHNIQUE & PRACTICE
System Architecture The particular configuration in which computer
hardware is connected to various other
components so that it fulfills its primary purpose.
The overall hardware/software configuration and
database design supporting a particular HSE-MIS
application, including internet, intranet and extranet
network linkages.

System Development Life Series of steps required to conceptualise, design,


Cycle and implement a project such as: Analysis, Design,
Building, Implementation, Operation and
Maintenance.

System Enhancement A request for a minor modification to a current


Request system.

System Enhancement This form should be used by the Customer to


Request Form (Serf) request any new work. This form provides a
summary of the work requested.

System Flow Chart It is a diagrammatic representation of information


expressed in time sequence.

System Test System testing will test that all of the components
of the software are functioning correctly.

T1 :and in the future: T3. A high-speed fiber optic


cable connection to the internet that provides data
transmission at a rate of 1.5 Mbps, or roughly 500
times faster than what you're using now.

Tactical Management This is the lowest layer in the management


Layer hierarchy and is concerned with more day to day
issues to execute the plan .

Tag A command in HTML, enclosed within the lesser


than and greater than signs (<...>) which marks
specified text as a heading, paragraph, list, etc.
and for including images, forms which accept user
input, and hypertext links within a document.
Usually a start tag and end tag are paired around
the content they refer to and form a "container".
See element.

COPYRIGHT CORNELL INFOMATICS PVT LTD 259 PROG TECHNIQUE & PRACTICE
Task Analysis In order to solve a problem using computer, it is
necessary to evolve a detailed and precise step-
by-step method of analysis of the Task.

Tcp/Ip Transmission Control Protocol/Internet Protocol:


the standards for all communications on the
internet.

Technical Infrastructure All of the supporting hardware and software


components required by a system to execute.
Includes the servers, network printers, operating
system, databases, user security, and network
connectivity.

Technology The application of science, especially to industrial


or commercial objectives. The scientific method
and material used to achieve a commercial or
industrial objective.

Test Scripts Specific application simulations to beta test a new


or modified software application.

Test Scripts & Conditions A scripted list of steps used to test the different
features of a product with appropriate expected
results. Test Scripts should reflect standard
business processes and outcomes as well as
anticipated exceptions to those processes.

Testing Scenarios Different application circumstances and conditions


that validate the software's capabilities to meet the
functional requirements.

Testing Teams Various Members of the Project Team to work on


different areas of the testing phase. System
Testing, User Acceptance Testing, Performance
Testing,Production Verification Testing

The Testing Process The testing process focuses on the logical internals
of the software, assuring that all statements have
been tested, and on the functional externals, i.e.,
conducting tests to uncover errors and ensure that
defined input will produce the actual results that
agree with required results.

COPYRIGHT CORNELL INFOMATICS PVT LTD 260 PROG TECHNIQUE & PRACTICE
Throughput The amount of data transmitted through internet
connectors in response to a given request.

Tiered Service A combination of offerings which are priced at


various levels. For example categories of
information on a Web site may range from free to
expensive depending on their value, timeliness,
uniqueness, or other market factors. See
subscription service and registration service.

Top-Down Programming Well-designed program modules should also be


Approach coded in a hierarchical order, with main modules
written first followed by secondary modules that
include the detailed code. The coding of modules
in a hierarchical manner is called "Top-Down
Programming approach".

Touch Screens A touch interface allows users to navigate a


computer system by touching icons or links on the
screen. With this even someone with no computer
experience at all can easily use and interact with a
touch screen enhanced system.

Transistor An electronic device that can regulate electricity


and act as an on/off switch. In a computer, this
on/off ability is used to represent binary digits
(bits). A CPU contains millions of transistors.

Translator A program written in High level Language is


converted to a machine language program by a
translator program.

Transmission Control The system that monitors and performs data


Protocol/Internet Protocol transfer over the Internet. TCP sends data and IP
(Tcp/Ip) receives it. On individual computers TCP/IP is the
software component that enables users to access
the graphical aspect of the World Wide Web and
utilize other features of a SLIP or PPP account.

Uniform Resource Locator The World Wide Web address of a company,


(URL) service, or other information resource.

COPYRIGHT CORNELL INFOMATICS PVT LTD 261 PROG TECHNIQUE & PRACTICE
Unit Testing Unit Testing is performed by developers and peer
developers who verify that the module performs as
expected and meets the design goals defined in
the package. Unit Testing is not bound to just a
single object, but can encompass a set of
interrelated objects.

Univac UNIVersal Automatic Computer) is a


programmable computer considered to be the first
commercially marketed computer

Unix A computer operating system designed for use by


many people at the same time. Currently, it is the
most widely-used operating system for internet
servers. The computer environment in which the
Internet has been and continues to be developed.
It is used to run powerful workstations and
networks where multitasking and multiuser access
is essential. UNIX is also the parent operating
system of DOS, which, in turn, spawned the
Windows operating systems prevalent on PCs
today.

Upload The process of transferring information from your


computer to another computer through the Internet.
Every time you send e-mail to someone you are
uploading it.

Ups This stands for Uninterruptable Power Supply, and


it is a device that provides continuous, reliable
power to your computer. It is a device that plugs
into your outlets and you then plug your computer,
monitor, and other components into. It uses a
battery to make sure that the computer will stay on
even if there is a power outage. These are
generally used only for critical machines and
servers, but they can also be useful at home if you
have blackouts/brownouts or voltage irregularities.

Url Uniform Resource This is the unique identifier, or address, of a web


Location page on the internet. URL can be pronounced
"you-are-ell" or "earl." It is how web pages, ftp's,
gophers, newsgroups and even some email boxes

COPYRIGHT CORNELL INFOMATICS PVT LTD 262 PROG TECHNIQUE & PRACTICE
are located. Most URLs begin: http:// - Web sites,
gopher:/ - Gopher sites, ftp:/ - Usenet and archie
sites

Usb USB (Universal Serial Bus) is a "plug and play"


interface between a computer and add-on devices
(such as audio players, joysticks, keyboards,
telephones, scanners, and printers). The USB
peripheral bus standard was developed by
Compaq, IBM, DEC, Intel, Microsoft, NEC, and
Northern Telecom and the technology is available
without charge for all computer and device
vendors.

Usenet Usenets, also called newsgroups, consist of


messages posted on electronic bulletin boards.
Each board has a theme, and there are tens of
thousands of usenets concerning every imaginable
topic. Many of them cover professional subjects
and societies and are rich sources of business
information; others are junk and contain little but
mindless drivel.

User Acceptance Testing User Acceptance testing involves having the end
users test how the software performs in their every
day business processes.

User Interface The UIMS accepts specification of the presentation


Management Systems and dialog semantics to produce the presentation
and dialog managers of the UI respectively.

Virtual POP A point of presence that supports an Internet


Service Provider's customers but is actually
provided by a Network Service Provider. The ISP
contracts with the NSP to provide the POP.

Virus These are programs that can be downloaded onto


your computer or network from the internet. Some
are harmless, others are programmed to destroy
your system, trash your files and disable your
software. No kidding. So be careful. Use anti-virus
programs. They take a few extra minutes every
day to use, but the protection is worth it. A

COPYRIGHT CORNELL INFOMATICS PVT LTD 263 PROG TECHNIQUE & PRACTICE
destructive program specifically written to destroy
data or halt operation on computer systems. A true
virus usually has a 'host' file. In other words, it can
attach itself to a file already on your system. It has
the ability to clone itself. It can reproduce itself and
infect other files or drives and computer systems.
Viruses can also hide themselves from detection in
several different ways.

Visit The act of accessing and viewing a World Wide


Web site.

Visual Table Of Content This shows the relation between each of module
(VTOC) making up a package. It consists of hierarchy chart
that identifies the modules in a system by number
and in relation to each other and gives brief
description of each module.

Vlsi Very Large Scale Integrated Circuits are the


hallmark of modern day computers which enable
them to carry out millions of transactions per
second. These empower the computer with very
high processing capabilities.

Vrml Virtual Reality This is an online programming language for


Modeling Language creating three-dimensional programs. Looks pretty,
but at current bandwidths it's pre-e-e-etty slow..

Warm Boot Resetting or restarting a computer that is already


on without turning off the power. It restarts the
computer without going through the entire POST.
This is accomplished by pushing CTRL+ALT+DEL,
using restart on the shut down menu, or pushing
the restart button on the front of the computer.

Watts A measurment of the electrical power in a circuit.


Today's computers will usually have a power
supply that puts out 250 - 350 Watts

Web As defined by John Hagel III of McKinsey &


Company, a set of companies which collaborate
around a particular technology, such as the
Microsoft/Intel PC web, and the Web surrounding

COPYRIGHT CORNELL INFOMATICS PVT LTD 264 PROG TECHNIQUE & PRACTICE
Netscape Internet software. Webs require a
technological standard and increasing returns to
scale but work without formal alliances. They
spread risk, reduce complexity, and enhance an
industry's overall ability to innovate.

Web Site A collection of linked world wide web pages,


usually housed on the same server and entered
through a home page. Individuals can have single-
page sites, and some corporations have sites
numbering into the tens of thousands of pages.

Webcasting The broadcasting of information over the Internet


using server push technology. The most common
form of netcasting.

Webmaster The individual assigned to administering a


corporation or organization's web site. This person
lays out the information trees, designs the look,
codes HTML pages, handles editing and additions
and checks that links are intact. In addition, he or
she monitors, routes and sometimes responds to
email generated by the site.

Wide-Area Network (WAN) Two or more related LANs that are linked across a
great distance, such as one state to another.

World Wide Web WWW Or The web is a client/server information system that
Web supports the retrieval of data in the form of text,
graphics and multimedia in a uniform HTML
format. Allowing hypertext links and interactivity on
an unprecedented level, its introduction
transformed a sleepy, academic communications
system into a powerful marketing tool linking
businesses and customers around the world.

WORM (Write-Once, Read- An optical digital storage medium useful for


Many) archiving purposes. It receives and stores
information permanently on the disk. While, it
cannot be erased or altered it can be “read back”
many times.

Wysiwyg An acronym for What You See Is What You Get,

COPYRIGHT CORNELL INFOMATICS PVT LTD 265 PROG TECHNIQUE & PRACTICE
which originated with computer programmers. It is
pronounced "whiz-ee-wig."

WYSIWYG (What-You- Computer screen displays that approximate the


See-Is-What-You-Get) true size and true shape of typographic characters,
rules, tints, and graphics.

Wysiwyp Short for What You See Is What You Print, and
pronounced wizzy-whip, refers to the ability of a
computer system to print colors exactly as they
appear on a monitor. WYSIWYP printing requires a
special program, called a color management
system (CMS) to calibrate the monitor and printer.

XML Extensible Markup A new specification being developed by the W3C.


Language XML is a pared-down version of SGML, designed
especially for Web documents. It enables
designers to create their own customized tags to
provide functionality not available with HTML. For
example, XML supports links that point to multiple
documents, as opposed to HTML links, which can
reference just one destination each.

Xt Stands for Extended Technology. The IBM PC/XT,


released around 1983, was the first IBM PC with a
hard drive.

COPYRIGHT CORNELL INFOMATICS PVT LTD 266 PROG TECHNIQUE & PRACTICE

You might also like