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

Fundamental of computer Science (FCS)

Dec 21, 2015

Download

Documents

Abdulhaq Sadiqi

Its a BIT subject of 1st Semester.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmrtyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjkl

    Fundamental of Computer Science

    B.Sc- IT AMITY eLEARNING

    Amity University

  • 2

    1.1 WHAT IS A COMPUTER?

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

    calculations faster. But as you will see later it does much more than that. It can be compared to a

    magic box, which serves different purpose to different people. For a common man computer is

    simply a calculator, which works automatic and quite fast. For a person who knows much about

    it, computer is a machine capable of solving problems and manipulating data. It accepts data,

    processes the data by doing some mathematical and logical operations and gives us the desired

    output.

    Therefore, we may define computer as a device that transforms data. Data can be anything like

    marks obtained by you in various subjects. It can also be name, age, sex, weight, height, etc. of

    all the students in your class or income, savings, investments, etc., of a country. Computer can be

    defined in terms of its functions. It can

    i) accept data

    ii) store data,

    iii) process data as desired,

    iv) retrieve the stored data as and when required

    v) print the result in desired format. You will know more about these functions as you go

    through the later lessons.

    Fig. 1.1 below depicts a personal computer.

  • 3

    1.4 CHARACTERISTICS OF COMPUTER

    Let us identify the major characteristics of computer. These can be discussed under the headings

    of speed, accuracy, diligence, versatility and memory.

    1.4.1 Speed

    As you know computer can work very fast. It takes only few seconds for calculations that we take

    hours to complete. Suppose you are asked to calculate the average monthly income of one

    thousand persons in your neighborhood. For this you have to add income from all sources for all

    persons on a day to day basis and find out the average for each one of them. How long will it take

    for you to do this? One day, two days or one week? Do you know your small computer can finish

    this work in few seconds? The weather forecasting that you see every day on TV is the results of

    compilation and analysis of huge amount of data on temperature, humidity, pressure, etc. of

    various places on computers. It takes few minutes for the computer to process this huge amount of

    data and give the result.

    You will be surprised to know that computer can perform millions (1,000,000) of instructions

    and even more per second. Therefore, we determine the speed of computer in terms of

    microsecond (10-6

    part of a second) or nano-second (10-9

    part of a second). From this you can

    imagine how fast your computer performs work.

    1.4.2 Accuracy

    Suppose some one calculates faster but commits a lot of errors in computing. Such result is

    useless. There is another aspect. Suppose you want to divide 15 by 7. You may work out up to 2

    decimal places and say the dividend is 2.14. I may calculate up to 4 decimal places and say that

    the result is 2.1428. Some one else may go up to 9 decimal places and say the result is

    2.142857143. Hence, in addition to speed, the computer should have accuracy or correctness in

    computing.

    The degree of accuracy of computer is very high and every calculation is performed with the

    same accuracy. The accuracy level is determined on the basis of design of computer. The errors

    in computer are due to human and inaccurate data.

  • 4

    1.4.3 Diligence

    A computer is free from tiredness, lack of concentration, fatigue, etc. It can work for hours

    without creating any error. If millions of calculations are to be performed, a computer will

    perform every calculation with the same accuracy. Due to this capability it overpowers human

    being in routine type of work.

    1.4.4 Versatility

    It means the capacity to perform completely different type of work. You may use your computer

    to prepare payroll slips. Next moment you may use it for inventory management or to prepare

    electric bills.

    1.4.5 Power of Remembering

    Computer has the power of storing any amount of information or data. Any information can be

    stored and recalled as long as you require it, for any numbers of years. It depends entirely upon

    you how much data you want to store in a computer and when to lose or retrieve these data.

    1,4.6 No IQ

    Computer is a dumb machine and it cannot do any work without instruction from the user. It

    performs the instructions at tremendous speed and with accuracy. It is you to decide what you

    want to do and in what sequence. So a computer cannot take its own decision as you can.

    1.4. 7 No Feeling

    It does not have feelings or emotion, taste, knowledge and experience. Thus it does not get tired

    even after long hours of work. It does not distinguish between users.

    1.4.8 Storage

    The Computer has an in-built memory where it can store a large amount of data. You can also

    store data in secondary storage devices such as floppies, which can be kept outside your

    computer and can be carried to other computers.

  • 5

    1.5 HISTORY OF COMPUTER

    History of computer could be traced back to the effort of man to count large numbers. This

    process of counting of large numbers generated various systems of numeration like Babylonian

    system of numeration, Greek system of numeration, Roman system of numeration and Indian

    system of numeration. Out of these the Indian system of numeration has been accepted

    universally. It is the basis of modern decimal system of numeration (0, 1, 2, 3, 4, 5, 6, 7, 8, 9).

    Later you will know how the computer solves all calculations based on decimal system. But you

    will be surprised to know that the computer does not understand the decimal system and uses

    binary system of numeration for processing.

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

    1.5 .1 Calculating Machines

    It took over generations for early man to build mechanical devices for counting large numbers.

    The first calculating device called ABACUS was developed by the Egyptian and Chinese people.

    The word ABACUS means calculating board. It consisted of sticks in horizontal positions on

    which were inserted sets of pebbles.It has a number of horizontal bars each having ten beads.

    Horizontal bars represent units, tens, hundreds, etc.

    1.5.2 Napiers bones

    English mathematician John Napier built a mechanical device for the purpose of multiplication

    in 1617 A D. The device was known as Napiers bones.

    1.5.3 Slide Rule

    English mathematician Edmund Gunter developed the slide rule. This machine could perform

    operations like addition, subtraction, multiplication, and division. It was widely used in Europe

    in 16th

    century.

    1.5.4 Pascal's Adding and Subtractory Machine

    You might have heard the name of Blaise Pascal. He developed a machine at the age of 19 that

    could add and subtract. The machine consisted of wheels, gears and cylinders.

  • 6

    1.5.5 Leibnizs Multiplication and Dividing Machine

    The German philosopher and mathematician Gottfried Leibniz built around 1673 a mechanical

    device that could both multiply and divide.

    1.5.6 Babbages Analytical Engine

    It was in the year 1823 that a famous English man Charles Babbage built a mechanical machine

    to do complex mathematical calculations. It was called difference engine. Later he developed a

    general-purpose calculating machine called analytical engine. You should know that Charles

    Babbage is called the father of computer.

    1.5.7 Mechanical and Electrical Calculator

    In the beginning of 19th

    century the mechanical calculator was developed to perform all sorts of

    mathematical calculations. Up to the 1960s it was widely used. Later the rotating part of

    mechanical calculator was replaced by electric motor. So it was called the electrical calculator.

    1.5.8 Modern Electronic Calculator

    The electronic calculator used in 1960 s was run with electron tubes, which was quite bulky.

    Later it was replaced with transistors and as a result the size of calculators became too small.

    The modern electronic calculator can compute all kinds of mathematical computations and

    mathematical functions. It can also be used to store some data permanently. Some calculators

    have in-built programs to perform some complicated calculations.

    Fig.: Vacuum tube, transistor, IC

  • 7

    1.6 COMPUTER GENERATIONS

    You know that the evolution of computer started from 16th century and resulted in the form that

    we see today. The present day computer, however, has also undergone rapid change during the

    last fifty years. This period, during which the evolution of computer took place, can be divided

    into five distinct phases known as Generations of Computers. Each phase is distinguished from

    others on the basis of the type of switching circuits used.

    1.6.1 First Generation Computers

    First generation computers used Thermion valves. These computers were large in size and

    writing programs on them was difficult. Some of the computers of this generation were:

    ENIAC: It was the first electronic computer built in 1946 at University of Pennsylvania, USA by

    John Eckert and John Mauchy. It was named Electronic Numerical Integrator and Calculator

    (ENIAC). The ENIAC was 30 50 feet long, weighed 30 tons, contained 18,000 vacuum tubes,

    70,000 registers, 10,000 capacitors and required 150,000 watts of electricity. Today your favorite

    computer is many times as powerful as ENIAC, still size is very small.

    EDVAC: It stands for Electronic Discrete Variable Automatic Computer and was developed in

    1950. The concept of storing data and instructions inside the computer was introduced here. This

    allowed much faster operation since the computer had rapid access to both data and instructions.

    The other advantages of storing instruction was that computer could do logical decision

    internally.

    Other Important Computers of First Generation

    EDSAC: It stands for Electronic Delay Storage Automatic Computer and was developed by

    M.V. Wilkes at Cambridge University in 1949.

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

  • 8

    Fig. 1.4: Univac Computer

    Limitations of First Generation Computer

    Followings are the major drawbacks of First generation computers.

    1. The operating speed was quite slow.

    2. Power consumption was very high.

    3. It required large space for installation.

    4. The programming capability was quite low.

    1.6.2 Second Generation Computers

    Around 1955 a device called Transistor replaced the bulky electric tubes in the first generation

    computer. Transistors are smaller than electric tubes and have higher operating speed. They have

    no filament and require no heating. Manufacturing cost was also very low. Thus the size of the

    computer got reduced considerably.

    It is in the second generation that the concept of Central Processing Unit (CPU), memory,

    programming language and input and output units were developed. The programming languages

    such as COBOL, FORTRAN were developed during this period. Some of the computers of the

    Second Generation were

    1. IBM 1620: Its size was smaller as compared to First Generation computers and mostly used

    for scientific purpose.

    2. IBM 1401: Its size was small to medium and used for business applications.

    3. CDC 3600: Its size was large and is used for scientific purposes.

  • 9

    1.6.3 Third Generation Computers

    The third generation computers were introduced in 1964. They used Integrated Circuits (ICs).

    These ICs are popularly known as Chips. A single IC has many transistors, registers and

    capacitors built on a single thin slice of silicon. So it is quite obvious that the size of the

    computer got further reduced. Some of the computers developed during this period were IBM-

    360, ICL-1900, IBM-370, and VAX-750. Higher level language such as BASIC (Beginners All

    purpose Symbolic Instruction Code) was developed during this period.

    Computers of this generations were small in size, low cost, large memory and processing speed

    is very high.

    1.6.4 Fourth Generation Computers

    The present day computers that you see today are the fourth generation computers that started

    around 1975. It uses large scale Integrated Circuits (LSIC) built on a single silicon chip called

    microprocessors. Due to the development of microprocessor it is possible to place computers

    central processing unit (CPU) on single chip. These computers are called microcomputers. Later

    very large scale Integrated Circuits (VLSIC) replaced LSICs.

    Thus the computer which was occupying a very large room in earlier days can now be placed on

    a table. The personal computer (PC) that you see in your school is a Fourth Generation

    Computer.

    1.6.5 Fifth Generation Computer

    The computers of 1990s are said to be Fifth Generation computers. The speed is extremely high

    in fifth generation computer. Apart from this it can perform parallel processing. The concept of

    Artificial intelligence has been introduced to allow the computer to take its own decision. It is

    still in a developmental stage.

    2.3 BASIC COMPUTER OPERATIONS

    A computer as shown in Fig. 2.1 performs basically five major operations or functions

    irrespective of their size and make. These are

    1) . Input Function : This is the process of entering data and programs in to the computer

    system.

  • 10

    2) Storing data : The process of saving data and instructions permanently is known as storage.

    3) Processing :The task of performing operations like arithmetic and logical operations is called

    processing it can process data as required by the user,

    4) Outputting :This is the process of producing results from the data for getting useful

    information.

    5) Controlling: it controls all operations inside a computer.

    2.4 FUNCTIONAL UNITS

    In order to carry out the operations mentioned above the computer allocates the task between its

    various functional units. The computer system is divided into three separate units for its

    operation.

    1. Input Unit :It includes the input interface and input devices. You should know that computer

    is an electronic machine like any other machine which takes as inputs raw data and performs

    some processing giving out processed data. Therefore, the input unit takes data from us to the

    computer in an organized manner for processing. all input devices must provide a computer with

    data that are transformed into the binary codes that the primary memory of a computer is

    designed a accept. Units called input interfaces accomplish this transformation.Input interfaces

    are designed to match the unique physical or electrical characteristics of input device to the

    requirements of the computer system. In short, the following functions are performed by an input

    unit:

    1. It accept (or reads) the list of instructions and data from the

    outside world.

    2. It converts these instructions and data in computer

    acceptable form.

    3. It supplies the converted instructions and data to the

    computer system for further processing.

    D. Output Unit

    The job of an output unit is just the reverse of that of an input unit. It supplies information and

    results of computation to the outside world. Thus it links the compute with the external

    environment. As computers work with binary code, the results produced are also in the binary

  • 11

    form. Hence, before supplying the result to the outside world, it must be converted to human

    acceptable (readable0 form. This task is accomplished by units called output interfaces are

    designed to match the unique physical or electrical characteristics of output devices (terminals,

    printers, etc.) to the requirements of the external environment. In short, the following functions

    are performed by an output unit :

    1. It accepts the results produced by the computer, which are in code from and hence cannot be

    easily understood by us.

    2. It converts these coded results to human acceptable (readable) form.

    3. It supplies the converted results to the outside world.

    2. Storage Unit : Data has to be fed into the system before the actual processing starts. It is

    because the processing speed of Central Processing Unit (CPU) is so fast that the data has to be

    provided to CPU with the same speed. Therefore the data is first stored in the storage unit for

    faster access and processing. This storage unit or the primary storage of the computer system is

    designed to do the above functionality. It provides space for storing data and instructions.

    The storage unit performs the following major functions:

    All data and instructions are stored here before and after processing.

    Intermediate results of processing are also stored here.

    2.4.3 Central Processing Unit (CPU)

    The ALU and the CU of a computer system are jointly known as the central processing unit. You

    may call CPU as the brain of any computer system. It is just like brain that takes all major

    decisions, makes all sorts of calculations and directs different parts of the computer functions by

    activating and controlling the operations.The Central Processing Unit (CPU) takes data and

    instructions from the storage unit and makes all sorts of calculations based on the instructions

    given and the type of data provided. It is then sent back to the storage unit. It consists of

    Arithmetic Logical Unit (ALU) and Control Unit (CU)

  • 12

    4.12 Arithmetic Logical Unit (ALU)

    After you enter data through the input device it is stored in the primary storage unit. The actual

    processing of the data and instruction are performed by Arithmetic Logical Unit. The major

    operations performed by the ALU are addition, subtraction, multiplication, division, logic and

    comparison. Data is transferred to ALU from storage unit when required. After processing the

    output is returned back to storage unit for further processing or getting stored.

    Arithmetic Logic Unit (ALU)

    does all of the mathematics in a computer

    does all of the logic comparisons of values

    some common logic comparison symbols

    = equal to

    < less than

    > greater than

    = greater than or equal to

    not equal

    2.4.2 Control Unit (CU)

    The next component of computer is the Control Unit, which acts like the supervisor seeing that

    things are done in proper fashion. The control unit determines the sequence in which computer

    programs and instructions are executed. Things like processing of programs stored in the main

    memory, interpretation of the instructions and issuing of signals for other units of the computer

    to execute them. It also acts as a switch board operator when several users access the computer

    simultaneously. Thereby it coordinates the activities of computers peripheral equipment as they

  • 13

    perform the input and output. Therefore it is the manager of all operations mentioned in the

    previous section..

    The Control Unit

    directs the flow of information into the CPU and/or memory or storage

    controls which instructions the CPU will do next

    Personal Computer Configuration

    Now let us identify the physical components that make the computer work. These are

    1. Central Processing Unit (CPU)

    2. Computer Memory (RAM and ROM)

    3. Data bus

    4. Ports

    5. Motherboard

    6. Hard disk

    7. Output Devices

    8. Input Devices

    All these components are inter-connected for the personal computer to work.

    PROBLEM SOLVING USING COMPUTERS

    Computers are used to solve all the problems of todays world. It is possible by using various

    tools like

    a. Algorithms b. Flowcharts c. Pseudocodes

    Algorithm

    An informal definition of an algorithm as "a set of instructions for solving a problem" and we

    illustrated this definition with a recipe, directions to a friend's house, and instructions for

    changing the oil in a car engine. You also created your own algorithm for putting letters and

    numbers in order. While these simple algorithms are fine for us, they are much too ambiguous

  • 14

    for a computer. In order for an algorithm to be applicable to a computer, it must have certain

    characteristics. We will specify these characteristics in our formal definition of an algorithm.

    An algorithm is a well-ordered collection of unambiguous and effectively

    computable operations that when executed produces a result and halts in a finite

    amount of time [Schneider and Gersting 1995].

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

    1. Algorithms are well-ordered. 2. Algorithms have unambiguous operations. 3. Algorithms have effectively computable operations. 4. Algorithms produce a result. 5. Algorithms halt in a finite amount of time.

    These characteristics need a little more explanation, so we will look at each one in detail.

    Algorithms are well-ordered

    Since an algorithm is a collection of operations or instructions, we must know the correct

    order in which to execute the instructions. If the order is unclear, we may perform the wrong

    instruction or we may be uncertain which instruction should be performed next. This

    characteristic is especially important for computers. A computer can only execute an

    algorithm if it knows the exact order of steps to perform.

    Algorithms have unambiguous operations

    Each operation in an algorithm must be sufficiently clear so that it does not need to be

    simplified. Given a list of numbers, you can easily order them from largest to smallest with

    the simple instruction "Sort these numbers." A computer, however, needs more detail to sort

    numbers. It must be told to search for the smallest number, how to find the smallest number,

    how to compare numbers together, etc. The operation "Sort these numbers" is ambiguous to a

    computer because the computer has no basic operations for sorting. Basic operations used for

    writing algorithms are known as primitive operations or primitives. When an algorithm is

    written in computer primitives, then the algorithm is unambiguous and the computer can

    execute it.

  • 15

    Algorithms have effectively computable operations

    Each operation in an algorithm must be doable, that is, the operation must be something that

    is possible to do. Suppose you were given an algorithm for planting a garden where the first

    step instructed you to remove all large stones from the soil. This instruction may not be

    doable if there is a four ton rock buried just below ground level. For computers, many

    mathematical operations such as division by zero or finding the square root of a negative

    number are also impossible. These operations are not effectively computable so they cannot

    be used in writing algorithms.

    Algorithms produce a result

    In our simple definition of an algorithm, we stated that an algorithm is a set of instructions for

    solving a problem. Unless an algorithm produces some result, we can never be certain

    whether our solution is correct. Have you ever given a command to a computer and

    discovered that nothing changed? What was your response? You probably thought that the

    computer was malfunctioning because your command did not produce any type of result.

    Without some visible change, you have no way of determining the effect of your command.

    The same is true with algorithms. Only algorithms which produce results can be verified as

    either right or wrong.

    Algorithms halt in a finite amount of time

    Algorithms should be composed of a finite number of operations and they should complete

    their execution in a finite amount of time. Suppose we wanted to write an algorithm to print

    all the integers greater than 1. Our steps might look something like this:

    1. Print the number 2. 2. Print the number 3. 3. Print the number

    While our algorithm seems to be pretty clear, we have two problems. First, the algorithm must have

    an infinite number of steps because there are an infinite number of integers greater than one. Second,

    the algorithm will run forever trying to count to infinity. These problems violate our definition that an

    algorithm must halt in a finite amount of time. Every algorithm must reach some operation that tells it

    to stop.

  • 16

    When writing algorithms, we have several choices of how we will specify the operations in

    our algorithm. One option is to write the algorithm using plain English. An example of this

    approach is the directions to John's house given in the introduction lesson. Although plain

    English may seem like a good way to write an algorithm, it has some problems that make it a

    poor choice. First, plain English is too wordy. When we write in plain English, we must

    include many words that contribute to correct grammar or style but do nothing to help

    communicate the algorithm. Second, plain English is too ambiguous. Often an English

    sentence can be interpreted in many different ways. Remember that our definition of an

    algorithm requires that each operation be unambiguous.

    Another option for writing algorithms is using programming languages. These languages are

    collections of primitives (basic operations) that a computer understands. While programming

    languages avoid the problems of being wordy and ambiguous, they have some other

    disadvantages that make them undesirable for writing algorithms. Consider the following

    lines of code from the programming language C++.

    a = 1;

    b = 0;

    while (a

  • 17

    lesson. Each operation in the algorithm is written on a separate line so they are easily

    distinguished from each other. We can easily see the advantage of this organization by

    comparing the structured English algorithm with the plain English algorithm.

    How to change your motor oil Plain English Structured English

    First, place the oil pan underneath the oil plug of your car.

    Next, unscrew the oil plug and drain the oil. Now, replace

    the oil plug. Once the old oil is drained, remove the oil cap

    from the engine and pour in 4 quarts of oil. Finally, replace

    the oil cap on the engine.

    1. Place the oil pan underneath the oil plug of your car.

    2. Unscrew the oil plug. 3. Drain oil. 4. Replace the oil plug. 5. Remove the oil cap from the engine. 6. Pour in 4 quarts of oil. 7. Replace the oil cap.

    FLOWCHARTING

    INTRODUCTION

    The flowchart is a means of visually presenting the flow of data through an information

    processing systems, the operations performed within the system and the sequence in which

    they are performed. In this lesson, we shall concern ourselves with the program flowchart,

    which describes what operations (and in what sequence) are required to solve a given

    problem. The program flowchart can be likened to the blueprint of a building. As we know a

    designer draws a blueprint before starting construction on a building. Similarly, a

    programmer prefers to draw a flowchart prior to writing a computer program. As in the case

    of the drawing of a blueprint, the flowchart is drawn according to defined rules and using

    standard flowchart symbols prescribed by the American National Standard Institute, Inc.

    OBJECTIVES

    At the end of this lesson, you will be able to understand:

    the meaning of flowchart

    the basic parts of the flowchart such as flowchart symbols and the flow lines connecting these

    symbols.

    the advantages and limitations of flowchart

  • 18

    MEANING OF A FLOWCHART

    A flowchart is a diagrammatic representation that illustrates the sequence of operations to be

    performed to get the solution of a problem. Flowcharts are generally drawn in the early stages

    of formulating computer solutions. Flowcharts facilitate communication between

    programmers and business people. These flowcharts play a vital role in the programming of a

    problem and are quite helpful in understanding the logic of complicated and lengthy

    problems. Once the flowchart is drawn, it becomes easy to write the program in any high

    level language. Often we see how flowcharts are helpful in explaining the program to others.

    Hence, it is correct to say that a flowchart is a must for the better documentation of a complex

    program.

    25.4 GUIDELINES FOR DRAWING A FLOWCHART

    Flowcharts are usually drawn using some standard symbols; however, some special symbols

    can also be developed when required. Some standard symbols, which are frequently required

    for flowcharting many computer programs are shown in Fig. 25.1

    Start or end of the program

    Computational steps or processing function of a

    Program

    Input or output operation

    Decision making and branching

    Connector or joining of two parts of program

  • 19

    Magnetic Tape

    Magnetic Disk

    Off-page connector

    Flow line

    Annotation

    Display

    Fig. 25.1 Flowchart Symbols

    The following are some guidelines in flowcharting:

    a. In drawing a proper flowchart, all necessary requirements should be listed out in logical order.

    b. The flowchart should be clear, neat and easy to follow. There should not be any room for ambiguity in understanding the flowchart.

    c. The usual direction of the flow of a procedure or system is from left to right or top to bottom.

    d. Only one flow line should come out from a process symbol.

    or

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

  • 20

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

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

    h. If the flowchart becomes complex, it is better to use connector symbols to reduce the number of flow lines. Avoid the intersection of flow lines if you want to make it more

    effective and better way of communication.

    i. Ensure that the flowchart has a logical start and finish. j. It is useful to test the validity of the flowchart by passing through it with a simple test data.

    25.5 ADVANTAGES OF USING FLOWCHARTS

    The benefits of flowcharts are as follows:

    1. Communication: Flowcharts are better way of communicating the logic of a system to all

    concerned.

    2. Effective analysis: With the help of flowchart, problem can be analysed in more effective

    way.

    3. Proper documentation: Program flowcharts serve as a good program documentation,

    which is needed for various purposes.

    4. Efficient Coding: The flowcharts act as a guide or blueprint during the systems analysis

    and program development phase.

    5. Proper Debugging: The flowchart helps in debugging process.

    6. Efficient Program Maintenance: The maintenance of operating program becomes easy

    with the help of flowchart. It helps the programmer to put efforts more efficiently on that

    part

  • 21

    25.6 LIMITATIONS OF USING FLOWCHARTS

    1. Complex logic: Sometimes, the program logic is quite complicated. In that case, flowchart becomes complex and clumsy.

    2. Alterations and Modifications: If alterations are required the flowchart may require re-drawing completely.

    3. Reproduction: As the flowchart symbols cannot be typed, reproduction of flowchart becomes a problem.

    4. The essentials of what is done can easily be lost in the technical details of how it is done.

    IN-TEXT QUESTIONS

    1. Fill in the blank.

    i. A program flowchart indicates the_________ to be per formed and the __________ in which they occur.

    ii. A program flowchart is generally read from _____________ to ________________ iii. Flowcharting symbols are connected together by means of ___________________ iv. A decision symbol may be used in determining the ____________ or ___________ of two data

    items.

    v. __________ are used to join remote portions of a flowchart vi. ____________ connectors are used when a flowchart ends on one page and begins again on other

    page

    vii. A ________ symbol in used at the beginning and end of a flowchart. viii. The flowchart is one of the best ways of ________ a program..

    ix. To construct a flowchart, one must adhere to prescribed symbols provided by the __________ . x. The programmed uses a ____________ to aid him in drawing flowchart symbols.

    FEW EXAMPLES ON FLOWCHARTING

    Now we shall present few examples on flowcharting for proper understanding of this

    technique. This will help in student in program development process at a later stage.

    Example 1

    Draw a flowchart to find the sum of first 50 natural numbers.

    .

  • 22

    Fig. Sum of first 50 natural numbers

    Fig Flowchart for computing the sum of first 50 natural numbers.

    Example 2

    Draw a flowchart to find the largest of three numbers A,B, and C.

    Answer: The required flowchart is shown in Fig 25.3

  • 23

    Fig Flowchart for finding out the largest of three numbers

    Example 3

    Draw a flowchart for computing factorial N (N!)

    Where N! = 1 2 3 N .

    The required flowchart has been shown in fig 25.4

    Answer:

  • 24

    Fig Flowchart for computing factorial N

    Pseudocodes

    Pseudocode is a compact and informal high-level description of a computer programming

    algorithm that uses the structural conventions of some programming language, but is intended

    for human reading rather than machine reading. Pseudo-code typically omits details that are

    not essential for human understanding of the algorithm, such as variable declarations, system-

    specific code and subroutines. The programming language is augmented with natural

    language descriptions of the details, where convenient, or with compact mathematical

    notation.

    The purpose of using pseudocode is that it is easier for humans to understand than

    conventional programming language code, and that it is a compact and environment-

    independent description of the key principles of an algorithm. It is commonly used in

  • 25

    textbooks and scientific publications that are documenting various algorithms, and also in

    planning of computer program development, for sketching out the structure of the program

    before the actual coding takes place.

    No standard for pseudocode syntax exists, as a program in pseudocode is not an executable

    program. Pseudo code resembles, but should not be confused with, skeleton programs

    including dummy code, which can be compiled without errors. Flowcharts can be thought of

    as a graphical alternative to pseudocode.

    As the name suggests, pseudocode generally does not actually obey the syntax rules of any

    particular language; there is no systematic standard form, although any particular writer will

    generally borrow style and syntax for example control structures from some conventional

    programming language. Popular syntax sources include Pascal, BASIC, C, C++, Java, Lisp,

    and ALGOL. Variable declarations are typically omitted. Function calls and blocks of code,

    for example code contained within a loop, is often replaced by a one-line natural language

    sentence.

    Depending on the writer, pseudocode may therefore vary widely in style, from a near-exact

    imitation of a real programming language at one extreme, to a description approaching

    formatted prose at the other.

    Example:

    =

    if

    do stuff

    else

    do other stuff

    while

    do stuff

    for from to by

    do stuff with variable

    function ()

    do stuff with arguments

    return something

    () // Function call

  • 26

    Here are a few general guidelines for checking your pseudocode:

    1. Mimic good code and good English. Using aspects of both systems means adhering to the

    style rules of both to some degree. It is still important that variable names be mnemonic,

    comments be included where useful, and English phrases be comprehensible (full sentences are

    usually not necessary).

    2. Ignore unnecessary details. If you are worrying about the placement of commas, you are using

    too much detail. It is a good idea to use some convention to group statements (begin/end,

    brackets, or whatever else is clear), but you shouldn't obsess about syntax.

    3. In many cases, the type of a variable is clear from context; unless it is critical that it is

    specified to be an integer or real, it is often unnecessary to make it explicit.

    4. Take advantage of programming shorthands. Using if-then-else or looping structures is more

    concise than writing out the equivalent in English; general constructs that are not peculiar to a

    small number of languages are good candidates for use in pseudocode. Using parameters in

    specifying procedures is concise, clear, and accurate, and hence should not be omitted from

    pseudocode.

    5. Consider the context. If you are writing an algorithm for quicksort, the statement use quicksort

    to sort the values is hiding too much detail; if we have already studied quicksort in class and later

    use it as a subroutine in another algorithm, the statement would be appropriate to use.

    6. Don't lose sight of the underlying model. It should be possible to see through" your

    pseudocode to the model below; if not (that is, you are not able to analyze the algorithm easily),

    it is written at too high a level.

    7. Check for balance. If the pseudocode is hard for a person to read or di_cult to translate into

    working code (or worse yet, both!), then something is wrong with the level of detail you have

    chosen to use.

  • 27

    Introduction to Computer and Communication

    4.1 INTRODUCTION

    Today computer is available in many offices and homes and therefore there is a need to share

    data and programs among various computers with the advancement of data communication

    facilities. The communication between computers has increased and it thus it has extended the

    power of computer beyond the computer room. Now a user sitting at one place can communicate

    computers of any remote sites through communication channel. The aim of this chapter is to

    introduce you the various aspects of computer network.

    4.2 OBJECTIVES

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

    explain the concept of data communication

    understand the use of computer network

    identify different components of computer network

    identify different types of network

    explain communication protocols

    understand what is internet and email and its uses in modern communication

    appreciate the use of satellite communication.

    4.3 DATA COMMUNICATION

    We all are acquainted with some sorts of communication in our day to day life. For

    communication of information and messages we use telephone and postal communication

    systems. Similarly data and information from one computer system can be transmitted to other

    systems across geographical areas. Thus data transmission is the movement of information using

    some standard methods. These methods include electrical signals carried along a conductor,

    optical signals along an optical fibers and electromagnetic areas.

    Suppose a manager has to write several letters to various clients. First he has to use his PC and

    Word Processing package to prepare his letter. If the PC is connected to all the client's PCs

    through networking, he can send the letters to all the clients within minutes. Thus irrespective of

  • 28

    geographical areas, if PCs are connected through communication channel, the data and

    information, computer files and any other program can be transmitted to other computer systems

    within seconds. The modern form of communication like e-mail and Internet is possible only

    because of computer networking.

    Basic Elements of a Communication System

    The following are the basic requirements for working of a communication system.

    1. A sender (source) which creates the message to be transmitted.

    2. A medium that carries the message.

    3. A receiver (sink) which receives the message.

    In data communication four basic terms are frequently used. They are

    Data: A collection of facts in raw forms that become information after processing.

    Signals: Electric or electromagnetic encoding of data.

    Signaling: Propagation of signals across a communication medium.

    Transmission: Communication of data achieved by the processing of signals.

    4.3.1 Communication Protocols

    You may be wondering how do the computers send and receive data across communication

    links. The answer is data communication software. It is this software that enables us to

    communicate with other systems. The data communication software instructs computer systems

    and devices as to how exactly data is to be transferred from one place to another. The procedure

    of data transformation in the form of software is commonly called protocol.

    The data transmission software or protocols perform the following functions for the efficient and

    error free transmission of data.

    Data sequencing: A long message to be transmitted is broken into smaller packets of fixed size

    for error free data transmission.

    Data Routing: It is the process of finding the most efficient route between source and

    destination before sending the data.

    Flow control: All machines are not equally efficient in terms of speed. Hence the flow control

    regulates the process of sending data between fast sender and slow receiver.

  • 29

    Error Control: Error detecting and recovering is the one of the main function of communication

    software. It ensures that data are transmitted without any error.

    4.3.2 Data Transmission Modes

    There are three ways for transmitting data from one point to another

    1. Simplex: In simplex mode the communication can take place in one direction. The receiver

    receives the signal from the transmitting device. In this mode the flow of information is Uni.-

    directional. Hence it is rarely used for data communication.

    2. Half-duplex: In half-duplex mode the communication channel is used in both directions, but

    only in one direction at a time. Thus a half-duplex line can alternately send and receive data.

    3. Full-duplex: In full duplex the communication channel is used in both directions at the same

    time. Use of full-duplex line improves the efficiency as the line turn-around time required in

    half-duplex arrangement is eliminated. Example of this mode of transmission is the telephone

    line.

    A B

    Simplex A to B only

    A B

    Half-Duplex A to B or B to A

    A B

    Full-Duplex A to B and B to A

    Fig. 4.1

    4.3.3 Digital and Analog Transmission

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

  • 30

    digital and analog form. So one should know the fundamental difference between analog and

    digital signals. In analog signal the transmission power varies over a continuous range with

    respect to sound, light and radio waves. On the other hand a digital signal may assume only

    discrete set of values within a given range. Examples are computer and computer related

    equipment. Analog signal is measured in Volts and its frequency in Hertz (Hz). A digital signal is

    a sequence of voltage represented in binary form. When digital data are to be sent over an analog

    form the digital signal must be converted to analog form. So the technique by which a digital

    signal is converted to analog form is known as modulation. And the reverse process, that is the

    conversion of analog signal to its digital form, is known as demodulation. The device, which

    converts digital signal into analog, and the reverse, is known as modem.

    Time

    Analog Signal

    MODEMS :They translate data from digital to analog form at the sending end of the communications path and

    from analog to digital at the receiving end .Put simply, the object of a modem is to change the characteristics of a

    simple sine wave, referred to as a carrier signal. We know this carrier signal has several properties that can be

    altered to represent data. It has amplitude (height); it has frequency (a unit of time); and it has phase (a relative

    starting point). Modems are capable of altering one or more of these characteristics to represent data. The job a

    modem performs can be divided into two discrete parts or phases at each end of the communications link.

    At the sending end, it converts digital bit streams (strings of 0s and 1s) into analog sine waves. This is

    the encoding process. Another component within the modem then changes (modulates) the analog signal

    so the data may be transmitted simultaneously with other data and voice traffic that has also been modulated.

    This process is basically reversed at the receiving end. There, the analog signal is brought back to its basic level

    (demodulated), and the analog sine waves are reconverted (decoded) back into their corresponding bit

    streams

  • 31

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

    4.3.4 Asynchronous and Synchronous Transmission

    Data transmission through a medium can be either asynchronous or synchronous. In

    asynchronous transmission data is transmitted character by character as you go on typing on a

    keyboard. Hence there is irregular gaps between characters. However, it is cheaper to implement,

    as you do not have to save the data before sending. On the other hand, in the synchronous mode,

    the saved data is transmitted block by block. Each block can contain many characters.

    Synchronous transmission is well suited for remote communication between a computer and

    related devices like card reader and printers.

    Following are the major communication devices used to day.

    Wire Pairs: Wire pairs are commonly used in local telephone communication and for short

    distance digital data communication. They are usually made up of copper and the pair of

    wires is twisted together. Data transmission speed is normally 9600 bits per second in a

    distance of 100 meter.

  • 32

    Some features are:

    consist of two insulated copper wires arranged in a regular spiral pattern to minimize the

    electromagnetic interference between adjacent pairs

    low frequency transmission medium

    low cost, small size, and ease of installation

    limited distance, usually less than 100 meters

    the most popular and is generally the best option for school networks

    Categories of UTP Cable

    Category 1 Voice Only (Telephone Wire)

    Category 2 Data to 4 Mbps (LocalTalk)

    Category 3 Data to 10 Mbps (Ethernet)

    Category 4 Data to 20 Mbps (16 Mbps Token Ring)

    Category 5 Data to 100 Mbps (Fast Ethernet)

    The standard connector for UTP cable is an RJ-45 connector, which looks like a large

    telephone modular connector

    Wireless

    use high frequency radio signals or infrared light beams to communicate between the

    workstations and the server

    need transciever/antenna to send and receive data

    widely used for connecting laptop computers to the LAN

    expensive

    poor security

    slower than LANs using cabling

    susceptible to electrical interference from lights and radios

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

  • 33

    transfer data at higher rate. They consist of a central copper wire surrounded by an insulation

    over which copper mesh is placed. They are used for long distance telephone lines and local

    area network for their noise immunity and faster data transfer.

    Coaxial (Coax) Cable

    Some features are:

    like the wire used to connect a TV or VCR

    has an inner conductor surrounded by a braided mesh

    both conductors share a common center axial, hence the term "co-axial"

    bandwidth of up to 400 Mhz

    highly resistant to signal interference

    used for long distance (300-600 meters)

    quite bulky and sometimes difficult to install

    the most common type of connector used with coaxial cables is the BNC (Bayone-Neill-

    Concelman) connector

    has two types of coaxial cable:

    Thin coaxial cable o refers to as thinnet

    o 10Base2 is the IEEE standard for Ethernet running on thin coaxial cable

    o the 2 refers to the approximate maximum segment length being 200 meters

    o is popular in school networks, especially linear bus networks

    Thick coaxial cable

    refers to as thicknet

    10Base5 is the IEEE standard for Ethernet running on thick coaxial cable

    the 5 refers to the approximate maximum segment length being 500 meters

    has an extra protective plastic cover that helps keep moisture away from the

    center

    conductor

    difficult to bend and install

  • 34

    used for long distance linear bus networks

    Fiber Optic

    Fiber Optic Cable

    Fiber optic cabling consists of a center glass core surrounded by several layers of protective

    materials (See fig. 5). It transmits light rather than electronic signals eliminating the problem of

    electrical interference. This makes it ideal for certain environments that contain a large amount

    of electrical interference. It has also made it the standard for connecting networks between

    buildings, due to its immunity to the effects of moisture and lighting.

    Fiber optic cable has the ability to transmit signals over much longer distances than coaxial and

    twisted pair. It also has the capability to carry information at vastly greater speeds. This capacity

    broadens communication possibilities to include services such as video conferencing and

    interactive services. The cost of fiber optic cabling is comparable to copper cabling; however, it

    is more difficult to install and modify. 10BaseF refers to the specifications for fiber optic cable

    carrying Ethernet signals.

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

    immunity to environmental interference

    greater capacity (bandwidth of up to 2 Gbps)

    used for distances up to 100 kilometers

    carry information at vastly greater speeds

    very expensive

    small size and lighter weight

    difficult to install and modify, require highly skilled installers

  • 35

    adding additional nodes is difficult

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

    Microwave: Microwave system uses very high frequency radio signals to transmit data through

    space. The transmitter and receiver of a microwave system should be in line-of-sight because

    the radio signal cannot bend. With microwave very long distance transmission is not

    possible. In order to overcome the problem of line of sight and power amplification of weak

    signal, repeaters are used at intervals of 25 to 30 kilometers between the transmitting and

    receiving end.

    Communication Satellite: The problem of line-sight and repeaters are overcome by using

    satellites which are the most widely used data transmission media in modern days. A

    communication satellite is a microwave relay station placed in outer space. INSAT-1B is

    such a satellite that can be accessible from anywhere in India. In satellite communication,

    microwave signal is transmitted from a transmitter on earth to the satellite at space. The

    satellite amplifies the weak signal and transmits it back to the receiver. The main advantage

    of satellite communication is that it is a single microwave relay station visible from any point

    of a very large area. In microwave the data transmission rate is 16 giga bits per second. They

    are mostly used to link big metropolitan cities.

    4.4 COMPUTER NETWORK

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

    places. In computer network two or more computers are linked together with a medium and data

    communication devices for the purpose of communicating data and sharing resources. The

    computer that provides resources to other computers on a network is known as server. In the

    network the individual computers, which access shared network resources, are known as

    workstations or nodes.

    NEED of COMPUTER NETWORK

    Sharing information: the computer can help you centralize the

    information and maintain control over it if you select one computer to

  • 36

    store the shared information and have all other computers reference the

    information on that computer over the network. Sharing hardware

    resources: a network allows anyone connected to the network to use

    printers, fax modem, scanners, tape backup units or almost any other

    device that can be attached to a computer.

    Sharing software resources: administrator can centrally install and

    configure the software and also restrict access to the software. It is easier

    than doing it on every one of the computers in an organization.

    Preserving information: a network also allows for information to be

    backed up to a central location. It is difficult to maintain regular backups

    on a number of stand-alone computers so important information can be

    lost easily by mistake or by accident.

    Protecting information: a network provides a more secure environment

    for a company's important information than stand-alone computers.

    Networks provide an additional layer of security by way of passwords.

    Electronic-mail (e-mail): the computer network can also help people

    communicate by e-mail. You can attach electronic documents to mail

    message like photo, sound and video clip.

    Computer Networks may be classified on the basis of geographical area in two broad categories.

    1. Local Area Network (LAN)

    2. Wide Area Network (WAN)

    4.4.1 Local Area Network

    Networks used to interconnect computers in a single room, rooms within a building or buildings

    on one site are called Local Area Network (LAN). LAN transmits data with a speed of several

    megabits per second (106 bits per second). The transmission medium is normally coaxial cables.

    LAN links computers, i.e., software and hardware, in the same area for the purpose of sharing

    information. Usually LAN links computers within a limited geographical area because they must

    be connected by a cable, which is quite expensive. People working in LAN get more capabilities

  • 37

    in data processing, work processing and other information exchange compared to stand-alone

    computers. Because of this information exchange most of the business and government

    organisations are using LAN.

    Major Characteristics of LAN

    every computer has the potential to communicate with any other computers of the network

    high degree of interconnection between computers

    easy physical connection of computers in a network

    inexpensive medium of data transmission

    high data transmission rate

    Advantages

    The reliability of network is high because the failure of one computer in the network does not

    effect the functioning for other computers.

    Addition of new computer to network is easy.

    High rate of data transmission is possible.

    Peripheral devices like magnetic disk and printer can be shared by other computers.

    Disadvantages

    If the communication line fails, the entire network system breaks down.

    Use of LAN

    Followings are the major areas where LAN is normally used

    File transfers and Access

    Word and text processing

    Electronic message handling

    Remote database access

    Personal computing

    Digital voice transmission and storage

    4.4.2 Wide Area Network

  • 38

    The term Wide Area Network (WAN) is used to describe a computer network spanning a

    regional, national or global area. For example, for a large company the head quarters might be at

    Delhi and regional branches at Bombay, Madras, Bangalore and Calcutta. Here regional centers

    are connected to head quarters through WAN. The distance between computers connected to

    WAN is larger. Therefore the transmission medium used are normally telephone lines,

    microwaves and satellite links.

    4.4.3 Characteristics of WAN

    Followings are the major characteristics of WAN.

    1. Communication Facility: For a big company spanning over different parts of the country

    the employees can save long distance phone calls and it overcomes the time lag in overseas

    communications. Computer conferencing is another use of WAN where users communicate

    with each other through their computer system.

    2. Remote Data Entry: Remote data entry is possible in WAN. It means sitting at any location

    you can enter data, update data and query other information of any computer attached to the

    WAN but located in other cities. For example, suppose you are sitting at Madras and want to

    see some data of a computer located at Delhi, you can do it through WAN.

    3. Centralised Information: In modern computerised environment you will find that big

    organisations go for centralised data storage. This means if the organisation is spread over

    many cities, they keep their important business data in a single place. As the data are

    generated at different sites, WAN permits collection of this data from different sites and save

    at a single site.

    4.4.4 Examples of WAN

    1. Ethernet: Ethernet developed by Xerox Corporation is a famous example of WAN. This

    network uses coaxial cables for data transmission. Special integrated circuit chips called

    controllers are used to connect equipment to the cable.

    2. Aparnet: The Aparnet is another example of WAN. It was developed at Advanced Research

    Projects Agency of U. S. Department. This Network connects more than 40 universities and

    institutions throughout USA and Europe.

  • 39

    Difference between LAN and WAN

    LAN is restricted to limited geographical area of few kilometers. But WAN covers great

    distance and operate nationwide or even worldwide.

    In LAN, the computer terminals and peripheral devices are connected with wires and coaxial

    cables. In WAN there is no physical connection. Communication is done through telephone

    lines and satellite links.

    Cost of data transmission in LAN is less because the transmission medium is owned by a

    single organisation. In case of WAN the cost of data transmission is very high because the

    transmission medium used are hired, either telephone lines or satellite links.

    The speed of data transmission is much higher in LAN than in WAN. The transmission speed

    in LAN varies from 0.1 to 100 megabits per second. In case of WAN the speed ranges from

    1800 to 9600 bits per second (bps).

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

    distance covered is negligible.

    4.5 NETWORK TOPOLOGY

    Network Topology

    Network topology are the physical layout of the network that the locations of the computers and

    how the cable is run between them. It is important to use the right topology. Each topology has

    its own strengths and weakness.

    Bus topology A bus topology connects computers along a single or more cable to connect linearly as figure 1.

    A network that uses a bus topology is referred to as a "bus network" which was the original form

    of Ethernet networks. Ethernet 10Base2 (also known as thinnet) is used for bus topology.

  • 40

    Bus topology is the cheapest way of connecting computers to form a workgroup or departmental

    LAN, but it has the disadvantage that a single loose connection or cable break can bring down

    the entire LAN

    Termination is important issue in bus networks. The electrical signal from a transmitting

    computer is free to travel the entire length of the cable. Without the termination, when the signal

    reaches the end of the wire, it bounces back and travels back up the wire. When a signal echoes

    back and forth along an unterminated bus, it is called ringing. The terminators absorb the

    electrical energy and stop the reflections.

    Advantages of the bus are following.

    Bus is easy to use and understand and inexpensive simple network

    It is easy to extend a network by adding cable with a repeater that boosts the signal and allows it

    to travel a longer distance.

    Disadvantages are following.

    A bus topology becomes slow by heavy network traffic with a lot of computer because networks

    do not coordinate with each other to reserve times to transmit.

    It is difficult to troubleshoot a bus because a cable break or loose connector will cause reflections

    and bring down the whole network.

    Star topology A star topology links the computers by individual cables to a central unit, usually a hub as in

    figure 2. When a computer or other networking component transmits a signal to the network, the

    signal travels to the hub. Then, the hub forwards the signal simultaneously to all other

    components connected to the hub. Ethernet 10BaseT is a network based on the star topology.

  • 41

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

    network.

    Figure 2: Star topology

    Advantages of star topology are such as:\

    The failure of a single computer or cable doesn't bring down the entire network.

    The centralized networking equipment can reduce costs in the long run by making network

    management much easier.

    It allows several cable types in same network with a hub that can accommodate multiple cable

    types.

    Disadvantages of star topology are such as:

    Failure of the central hub causes the whole network failure.

    It is slightly more expensive than using bus topology.

    Ring topology A ring topology connects the computers along a single path whose ends are joined to form a

    circle as figure 3. The circle might be logical only but the physical arrangement of the cabling

    might be similar to star topology, with a hub or concentrator at the center. The ring topology is

    commonly used in token ring networks that the ring of a token ring network is concentrated

  • 42

    inside a device called a Multistation Access Unit (MAU) and fiber Distributed Data Interface

    (FDDI) networks that the ring in this case is both a physical and logical ring and usually runs

    around a campus or collection of buildings to form a high-speed backbone network.

    Figure 3: Ring topology

    Advantages are following:

    One computer cannot monopolize the network.

    It continue to function after capacity is exceeded but the speed will be slow.

    Disadvantages are following:

    Failure of one computer can affect the whole network.

    It is difficult to troubleshoot.

    Adding and removing computers disrupts the network.

    Mesh topology In a mesh topology, each computer on network has redundant data paths as showing in figure 4.

    The mesh topology provides fault tolerance-if a wire, hub, switch, or other component fails, data

    can travel along an alternate path. A diagram of a mesh network looks like a fishing net. A mesh

    topology is most often used in large backbone networks in which failure of a single switch or

    router can result in a large portion of the network going down.

  • 43

    Figure 4: Mesh topology

    Overview of the Internet

    What is the Internet?

    The Internet is a worldwide connection of millions of computers connected to thousands of

    different networks. These computers "communicate" that is, share, exchange, and transmit data

    to another computer on the same or another network.

  • 44

    Who runs it?

    Nobody owns or controls the Internet. It is a global information system similar in some respects

    to telephone networks that allow anybody to call any other number anytime, anywhere. Each

    network is run by its own operating center subject to the laws in their country and international

    conventions. There are, instead, several "councils of elders," consortiums, societies, and

    communities whereby representatives from various countries, institutions, and organizations

    collaborate occasionally to establish common standards for hardware, software, and

    telecommunications technologies.

    How did it come to be?

    The Internet was born in the era of the Cold War. At that time the U.S. Department of Defense

    was interested in establishing a communication system using computer, radio and satellite

    networks that will be able to work around power outtages in the event of a nuclear attack. How

    will the government communicate if the communication network is destroyed? The answer was

    to do away with a centralized communication network and come up with separate networks

    where each will be independently responsible for getting messages across through any route. An

    experimental network called the ARPAnet was set up in 1968 to enable scientists and researchers

    in universities to collaborate on this project. Some universities were later permitted during the

    1970s to connect their local area networks to ARPAnet. Demand grew as networking spread

    among schools. With the invention of the first e-mail program in 1972, academic resources

    started using the network not only for long-distance computing but more to exchange

    information and gossip with their colleagues. Concerned by security risks, the military broke off

    and established a separate network in 1983. By the late 1980s the National Science Foundation

    commissioned its own network called NSFNET to share its information resources for scholarly

    research. Major universities were connected to five computer centers using telephone lines. To

    avoid the cost of laying down telephone cables for every institution to connect directly to the

    computer centers, regional networks were created. This resulted in a chain that allowed schools

    to connect to their nearest neighbor, thus permitting their computers to forward messages from

    one link to another.

  • 45

    How does it work?

    This ability of computers and networks all over the world to share information was made

    possible by two important communication protocols - the Transmission Control Protocol (TCP)

    and the Internet Protocol (IP). Together they are often referred to as TCP/IP, and together they

    make the Internet known as a "packet-switched network.".

    A good analogy will be the postal service. Your computer is both your

    address and post office. To send a message to another computer you

    need to put the address of your destination, too.When you transmit, your

    message travels through cable lines or signals, in the case of wireless

    technologies. However, your message does not travel in one piece. It is

    first broken down into numbered, bite-size chunks called "packets" and

    sent separately through different routes, and then recombined again in

    their original form at their destination by Transmission Control Protocol.

    The Internet Protocol handles how these packets are routed. The packets

    are placed in separate IP "envelopes" and are sent through a series of

    switches or routers.

    Speed and efficiency are essential, as you will soon find out. Many

    breakthroughs in Internet and computer technologies are guided by the

    principle of sending and receiving data in the shortest time possible. The

    data is broken down into packets for faster transmission. As the packets

    travel in IP envelopes routers examine the addresses of these envelopes

    and determine the most efficient path for sending each packet to the

    nearest available router until these reach their final destination. Since the

    traffic load on the Internet constantly changes every second, the packets

    may travel in different routes and arrive in different order. At the their

    destination the TCP will reassemble the packets into their original form

  • 46

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

    determines that the file or message was corrupted in transit, and will

    request for retransmission.

    Here's another analogy. You have a big family who are traveling from one country to attend a

    reunion in another country. There are not enough seats on the plane to accommodate everyone so

    the TCP breaks up everybody in different planes (IP). These flights take different routes and

    make different stops. It is likely that the passengers in each flight have different destinations. At

    each of these stops or airports, the router checks the destination of every passenger's ticket and

    directs each to the next available flight towards their final destination. The members of the

    convention group arrive at their final destination separately. To regroup them the TCP will do a

    headcount making sure everybody is accounted for, and then usher them out of the airport in

    proper order, that is, grandpa first, grandma second, eldest child next, and so on.

    What is an Internet address?

    As you have learned how messages are transmitted from one computer to another, every

    computer in the Internet must have a unique and specific address. An Internet or IP address, as it

    is sometimes called, consists of four numbers separated by periods. The smallest address would

    be 0.0.0.0 while the biggest would be 1234.5678.9101.1121. Don't worry, only computers are

    expected to remember all these numbers without getting confused. For humans, we use the

    Domain Name System (DNS).

    What are domains?

    Like IP addresses which are numerical, the alphabetical domain names are also separated by

    periods or dots. Thus, the U.S. Library of Congress will have an IP address of 140.147.248.7 and

    the domain name will be www.loc.gov.

    Domain names have the format: hostname.subdomain.top-level-domain. My school's domain

    name, for example, is ocean.otr.usm.edu. This naming structure will give you clues about the

    address. Ocean is the name of the host computer, otr stands for "Office of Technology

    Resources" which manages the system, usm is the abbreviation for University of Southern

  • 47

    Mississippi, the sub-domain, and edu signifies that this is an educational institution. The gov for

    the Library of Congress indicates it is a government institution.

    Here are the existing top-level domains in the Internet:

    com - commercial

    .edu - educational

    .net - network

    .org - organization

    .gov - government

    .mil - military

    Other countries sometimes add their codes at the end, such as .au for Australia, .ph for

    Philippines, and .fr for France.

    Internet Services

    Most of these Internet Services operate on the client/server model or concept. A computer is a

    client if it is receiving files, and is a server if it is sending files. Another way of putting it is you,

    your computer, and the corresponding software for each type of service are all clients. A server is

    a software that allows a computer to offer a service to another computer. The computer on which

    the server software runs is also called a server. To gain access to the Internet most people open

    an account with an Internet Service Provider (ISP) in their area. To connect they "dial-up" to

    their ISP's server and "log-in" with their account name and password. If you noticed, these

    services are loosely and interchangeably used as nouns and verbs, i.e. "please e-mail me."

    Electronic Mail

    E-mail, so far, is still the most popular service of the Internet. Most users get acquainted with the

    Internet using this service. It is better than "snail mail" by post because your message can be

    transmitted in seconds. It is better than telephones because the recipient doesn't have to be

    around to receive the message. A person also has the option to read and respond to the messages

    at one's convenience. Cheaper than long distance phone calls, some people are even able to send

  • 48

    and receive e-mail wherever they go when they travel as long as they have access to a connected

    computer. Better than fax, through e-mail people can send forms, documents, colored pictures,

    etc. as attachments.

    Mailing List

    Listserv, a popular type of mailing list, is short for "list server" and is based on the e-mail

    protocol. As an electronic mailing list it is very convenient when somebody wants to send a

    message or newsletter, for example, to many people at once. There are thousands of listservs for

    every imaginable purpose, interest, service, and information like online newsletters, online sales

    or services, and class listservs. To join a listserv means to be included in the mailing list. You

    send an e-mail saying you want to subscribe and you will henceforth receive announcements,

    notices, and information through your e-mail inbox.

    Newsgroups

    This is the Internet equivalent of a discussion group or an electronic bulletin board. There are

    newsgroups for every conceivable topic and more, from educational technology and Brazil

    culture to stamp collecting and mountaineering. Those with specific hobbies or unusual interests

    are quiet happy to have this service in the Internet when there are so few people in their area to

    discuss their interests with. You can usually tell a newsgroup by its name. Computer newsgroups

    start with comp as in comp.apps.spreadsheets. while recreational newsgroups start with

    rec as in rec.arts.cinema. The others are alt for alternate, soc for social, sci for science,

    and news for news.

    Some newsgroups are moderated, others are not. If it is moderated a

    human moderator screens all messages and decides if these are worth

    posting. Discussions can be "threaded." For example, in a newsgroup for

    beer (alt.beer), one member might ask about good beer pubs in England and

    another will start discussing how to keep a beer fresh. More than one

    threaded discussion can occur at the same time with different members

    posting their opinions and reactions to either one or more threads.

  • 49

    Chat

    Another popular form of communication over the Internet. Unlike e-mail, listservs, and

    newsgroups, chat allows people to converse in "real time." People may actually see you type

    your questions and responses. Chats are also organized in chat channels and chat rooms

    according to different factors. There are chat rooms for "techies," cat lovers, singles, etc.

    FTP

    File Transfer Protocol is the standard method for transferring files, whether downloading or

    uploading, to and from your computer with another computer on the Internet. It is fairly simple

    to use and is the most popular way to download software and other files from the Internet. All

    the files in this web site -- the HTML, graphics, etc. -- were uploaded into the Web using

    WS_FTP95. There are private FTP sites that require you to log-in with your account or user

    name and password before you are allowed to enter. There are also anonymous FTP sites that

    allow you to enter using "anonymous" as your user name and your e-mail address as your

    password.

    Telnet

    Telnet is short for "terminal emulation." It is one amazing feature of the Internet that lets you use

    the resources of another computer in another part of the world. This is done by remotely logging

    to the distant computer which is called the host. Once you are connected you can operate a

    remote computer using your keyboard. Some systems require you to log in as a "guest" and

    others require your name and address, or user name and password. The telnet is most useful to

    access the databases of public services like library catalogs and government directories. Telnet

    also allows you to access your e-mail account if you can remotely log in to your ISP's server

    computer.

    The World Wide Web

    The World Wide Web is one of the latest information service to arrive on the Internet but is

    arguably the technology that revolutionized the Internet. It is the fastest growing and most

    exciting feature. People who "surf" or "browse" are describing activities on the WWW. Other

    words pertaining to the Web are homepages, websites, URL, HTML, and HTTP. This section

    certainly deserves a page or two of its own so please click on the "Next" button to proceed.

  • 50

    How internet is useful in Education

    There are many advantages to using the services of the Internet, particularly the tools and

    resources on the Web, in education. Instruction materials such as syllabi, lecture notes,

    presentations assignments, and announcements could be made available online.

    The Internet puts the concept of "anytime, anywhere" into a higher level as far as learning is

    concerned. Students will be able to learn at their pace. The primary beneficiaries would be

    students and adult learners who are too far or too busy to attend classes. Even traditional students

    will benefit when instructional materials are available to support or complement classroom

    attendance. Students will be able to prepare for the next class if they are reminded of the

    assignments and topics of discussion. Those who missed class or missed the teacher's point can

    go over the lecture notes and presentation.

    Both teacher and student will also benefit from being able to research any topic from library

    catalogs, topical databases, and the World Wide Web. Anonymous FTP and Telnet will alow

    them to access public databases maintained by government institutions. Services like e-mail and

    mailing lists can support communication between teacher and student, and among peers (teacher

    to teacher, student to student). Using a combination of e-mail and the Web, teachers and students

    can collaborate on research and creative projects even with those who don't live in the same city

    or country.

    The World Wide Web

    What is the difference between the Internet and the World Wide Web?

    Think of the Net as primarily hardware and software, you know, technical stuff -- and the Web

    as wholly content and information, as in creative and intellectual in nature. The Net consists of

    cables, computers, satellites, and networks. Computers are able to communicate using different

    software and protocols with each other, connected either by cable or wireless technology. The

    Web, on the other hand, is an abstract concept that exists in cyberspace. When we speak of the

    Web we talk of text, sound, graphics, and videos that are presented in Web page formats. To

  • 51

    navigate, surf, or browse around the Web is to move from one site to another, from one page to

    another, one file to another using the hypertext links.

    Who invented it?

    The father of the World Wide Web is Tim Berners-Lee, a physicist working at CERN, the

    European Particle Physics Laboratory in Switzerland. In 1989 he developed a network protocol

    called Hypertext Transfer Protocol (HTTP) as a way for physicists to send documents over the

    internet to share research information. He is also credited as the man who coined the words

    "World Wide Web" and defined standards such as the Uniform Resource Locator (URL) and

    Hypertext Mark-up Language (HTML).

    What is a Web page?

    It is a document written in HTML code that contains text and links to other pages, files, or parts

    of the document. The earliest Web pages were all-text documents and at present there are still

    text-based browsers like Lynx. Although Tim Berners-Lee also wrote the first multimedia

    browser in 1990, graphical user-interface (GUI) browsers didn't become popular until Mosaic

    came along in 1993.

    What are browsers?

    Browsers are viewer programs that display Web pages. There are also browsers to view e-mail ,

    newsgroup discussions, etc. The most popular GUI browsers today are Netscape and Internet

    Explorer. Marc Anderssen, the founder of Netscape, is

    also the brains of Mosaic.

    Web browsers interpret HTML codes how

    to display text, graphics, links, and

    multimedia files in a page. When your

    computer loads a web page, that is, an

    HTML file, you don't see these codes

    unless you give the "View at Page

    Source" command. To see what the HTML

  • 52

    code for this page looks like press CtrlandUat the same time, or

    click on the word View in the toolbar above you, and select Page

    Source.

    Not all files on the Web can be displayed by a browser. There are, for

    example, applications that perform specific tasks when you click on the

    appropriate link, like e-mail.

    With their "point-and-click" features, GUI browsers dramatically made the

    Internet user-friendly to novice users and its popularity exploded when

    people were able to dial-in using a home computer and modem to an

    Internet Service Provider. Before this only large institutions like

    universities, corporations, and government organizations that could afford

    to install cables have access to the Internet. These two innovations

    opened up the Internet to a critical mass of individual users, people who

    don't have the time or inclination to learn technical stuff, and people who

    use computers at home for work and personal activities.

    Next to the e-mail, the Web is the most popular service on the Internet.

    According to the Online Computer Literacy Center, as of June 28, 1999,

    there are 4.8 million Web sites all over the world, a 71 percent increase

    from 1998.

    Websites, Homepages, and URL

    A website is a collection of pages in the Web. Home page, as the name suggests, is the main or

    opening page of a website. You will notice that several websites use the word "Home" or an

    image of a house to guide surfers back to the main page. The URL or Unform Resource Locator

    is the specific address of a webpage, like

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

    at your Location Toolbar above you will see this address displayed. Sometimes, the URL of

    another website is all you need to go to that site. Try this, click and delete the URL of this page

  • 53

    and in its place, type http://cnn.com which is the URL for the home page of "CNN

    Interactive," and hit Enter. You can always click on the Back button to return to this page.

    URLs are also used in newsgroups, FTP, and telnet to access other addresses and files.

    What makes the Web so popular?

    Ease of use, thanks to the graphical user interface and point-and-click features. Navigation is

    non-linear and non-hierarchical. The hypertext links allows you to jump from one section, page,

    file, or site to another in any direction as you please. The variety of file types makes it interactive

    and multimedia. Once again, the hypertext links to different file types allows you to perform any

    task such as read articles and documents; write an e-mail; view pictures or computer-generated

    animation; watch a video clip; listen to music and radio; take an online test; fill out a survey

    form; and download files and software.

    This sec