0% found this document useful (0 votes)
32 views42 pages

Aaron Computer Sceince Notes

Uploaded by

Chris Kollapu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views42 pages

Aaron Computer Sceince Notes

Uploaded by

Chris Kollapu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 42

COMPUTER SCIENCE-SEM-III

CHAPTER-I:

1. Define computer.

2. Why computer is called data processor.

3. Characteristics of computer.

4. Block diagram of computer system.

5. Explain primary memory and secondary memory.

Ram, Rom, s-ram, d-ram, cache memory, SSD, HDD.

6. Input and output devices.

7. Classification of computers with respect to

Type of data it handles

Generation

Mode of use

Data organization

Number conversion

CHAPTER-II:

1. Computer network definition, application.

2. Network topology definition.

Explain bus, ring, star, mesh, and hybrid and tree topology.

3. Types of network or types of computer network.

LAN, WAN and MAN.

Email.

Http- Hypertext transfer protocol.

Https-Hypertext transfer protocol secure.

Webpage.

URL-Uniform Resource Locator.

Router, Hub and Switch.


CHAPTER-III

1. Define algorithm and explain with an example

2. Define flow chart and explain with an example

3. List different symbols used in drawing flow chart

4. Rules to follow while drawing flow chart

5. Steps in learning C

6. Define constant, variable and keyword

7. Classification of C constants

8. Rules to construct integer constant

9. Rules to construct real constant

10. Rules to define variable name

11. SCAN F Function

12. PRINT F Function

13. Explain decision control in C with an example

14. All c programs explained in class and given as homework

CHAPTER-I
1. Define computer.

-Computer is an electronic device for storing and processing data, typically in binary form, according to
instructions given to it in a variable program.

-A computer is a device that accepts information (in the form of digitalized data) and manipulates it for
some result based on a program or sequence of instructions on how the data is to be processed.

-The first mechanical computer, created by Charles Babbage in 1822.

2. Why computer is called data processor.


3. Characteristics of computer.

1. Automatic: Work on a problem without human intervention.

2. Speed: Very fast device. Can perform several billion (109) even trillion (1012) arithmetic
operations per second.

3. Accuracy: High accuracy.

4. Diligence: Can work continuously without getting tired i.e. free from monotony, lack of
concentration, tiredness.

5. Versatility: Able to perform wide variety of tasks.

6. Power of remembering: Can store & recall any amount of information at any time with the
help of storage devices.

7. No I.Q.: Cannot take its own decisions, has to be instructed what to do & in what sequence.

8. No feelings: As a machine devoid of emotions & feelings. Cannot make judgments based on
feelings & instincts.

9. Input Unit:

-It accepts (reads) instructions & data from user.


-Input interfaces converts these instructions &data in computer acceptable form.

-It supplies converted instructions & data to the storage unit for storage & further processing.

10. Output Unit:

-The Data & Instructions required for processing.

-It accepts the produces results, which are in coded form.

-Output interfaces converts these coded results to human acceptable (readable) form.

-It supplies converted result to user.

11. Storage Unit:

It holds,

-It accepts the produces results, which are in coded form.

-Intermediate results of processing.

-Final results of processing, before the system releases them to an o/p unit.

12. Types of Storage:

-The broad categories of storage are:

1. Primary Storage.

2. Secondary Storage.

13. Primary Storage (Main Memory) (RAM):

-Made up of semiconductor devices.

-Used to hold running program instructions.

-Used to hold data, intermediate results and results of ongoing processing of job(s).

-Fast in operation (CPU can access directly).

-Small capacity.

-Expensive.

-Volatile.

14. Secondary Storage (External Memory) (Hard Disk):

-Used to hold stored program instructions.

-Used to hold data and information of stored job.

-Slower than primary storage.

-Large Capacity.
-Cheaper than primary storage.

-Retains data even without power/ Nonvolatile.

15. Arithmetic Logic Unit (ALU):

-CPU transfers data & instruction from RAM to ALU.

-ALU processes the data.

-Intermediate & main results are again transferred to RAM.

-Arithmetic Operation-Add, Subtract, multiply, divide.

-Logic operations- <,>, =

16. Control Unit:

-Does not perform any actual processing of jobs, but acts as a central nervous system for components of
computer systems.

-Manages & coordinates the operations of all other components.

17. Central Processing Unit:

-Brain of computer.

-CU+ALU.

-Performs all major calculations & comparisons.

-Activates & controls the operations of other units of the computer system.

4. Block diagram of computer system.

-Refer Question No-3 for the block diagram.

5. Explain primary memory and secondary memory.

RAM, ROM, S-RAM, D-RAM, CACHE MEMORY, SSD, HDD.

>Primary Storage (Main Memory):

-Made up of semiconductor devices.

-Used to hold running program instructions.

-Used to hold data, intermediate results and results of ongoing processing of job(s).

-Fast in operation (CPU can access directly).

-Small capacity.
-Expensive.

-Volatile.

>Secondary Storage (External Memory):

-Used to hold stored program instructions.

-Used to hold data and information of stored job.

-Slower than primary storage.

-Large Capacity.

>RAM (Random Access Memory)

o RAM (Random Access Memory) is the internal memory of the CPU for storing data, program,
and program result.

o It is a read/write memory which stores data until the machine is working. As soon as the
machine is switched off, data is erased.

o Data in the RAM can be accessed randomly but it is very expensive.

o RAM is volatile

o RAM is small, both in terms of its physical size and in the amount of data it can hold.

o RAM is of two types -

1. Static RAM (SRAM)

2. Dynamic RAM (DRAM)


>Static RAM (SRAM)

o The word static indicates that the memory retains its contents as long as power is being
supplied. However, data is lost when the power gets down due to volatile nature.

o SRAM chips use a matrix of 6-transistors and no capacitors. Transistors do not require power to
prevent leakage, so SRAM need not be refreshed on a regular basis.

-Characteristic of Static RAM

o Long life compared to DRAM

o No need to refresh

o Faster

o Used as cache memory

o Large size

o Expensive

o High power consumption

>Dynamic RAM (DRAM)

o DRAM, unlike SRAM, must be continually refreshed in order to maintain the data.

o This is done by placing the memory on a refresh circuit that rewrites the data several hundred
times per second.

o DRAM is used for most system memory as it is cheap and small.

o All DRAMs are made up of memory cells, which are composed of one capacitor and one
transistor.

-Characteristics of Dynamic RAM

o Short data lifetime

o Needs to be refreshed continuously

o Slower as compared to SRAM

o Used as RAM

o Smaller in size

o Less expensive
o Less power consumption

>Read Only Memory (ROM)

o The memory from which we can only read but cannot write on it.

o This type of memory is non-volatile. The information is stored permanently in such memories
during manufacture.

o A ROM stores such instructions that are required to start a computer.

-Programmable Read Only Memory (PROM)

o PROM is read-only memory that can be modified only once by a user.

o The user buys a blank PROM and enters the desired contents using a PROM program.

o Inside the PROM chip, there are small fuses which are burnt open during programming.

o It can be programmed only once and is not erasable.

-Erasable and Programmable Read only Memory (EPROM)

o EPROM can be erased by exposing it to ultra-violet light for a duration of up to 40 minutes.


o During programming, an electrical charge is trapped in an insulated gate region. The charge is
retained for more than 10 years because the charge has no leakage path.

o For erasing this charge, ultra-violet light is passed through a quartz crystal window (lid).

-Electrically Erasable and Programmable Read Only Memory (EEPROM)

o EEPROM is programmed and erased electrically.

o It can be erased and reprogrammed about ten thousand times. Both erasing and programming
take about 4 to10 ms (millisecond).

o In EEPROM, any location can be selectively erased and programmed.

o EEPROMs can be erased one byte at a time, rather than erasing the entire chip. Hence, the
process of reprogramming is flexible but slow.

-Advantages of ROM

o Non-volatile in nature

o Cannot be accidentally changed

o Cheaper than RAMs

o Easy to test

o More reliable than RAMs

o Static and do not require refreshing

o Contents are always known and can be verified

>Cache Memory

o A CPU cache is a hardware cache used by the central processing unit (CPU) of a computer to
reduce the average cost (time or energy) to access data from the main memory.

o A cache is a smaller, faster memory, located closer to a processor core, which stores copies of
the data from frequently used main memory locations.

o Most CPUs have a hierarchy of multiple cache levels (L1, L2, often L3, and rarely even L4), with
different instruction-specific and data-specific caches at level 1.
>HDD (Hard Disk Drive) / SSD (Solid State Drive)
6. Input and output devices.

-Input Devices

o Keyboard

o Mouse

o Joy Stick

o Scanner

o Microphone

o Magnetic Ink Card Reader (MICR)

o Bar Code Reader

o Optical Card Reader (OCR)

o Light Pen

o Track Ball

1) Keyboard

o Input device which helps to input data to the computer.


o There are some additional keys provided for performing additional functions.
o Now keyboards with 104 keys or 108 keys are also available for Windows and Internet.

2) Mouse

o Mouse is the most popular pointing device.

o It is a very famous cursor-control device having a small palm size box with a round ball at its
base, which senses the movement of the mouse and sends corresponding signals to the CPU
when the mouse buttons are pressed.

o Generally, it has two buttons called the left and the right button and a wheel is present between
the buttons.

o A mouse can be used to control the position of the cursor on the screen, but it cannot be used
to enter text into the computer.

3) Joystick

o Joystick is also a pointing device, which is used to move the cursor position on a monitor screen.

o It is a stick having a spherical ball at its both lower and upper ends. The lower spherical ball
moves in a socket.
o The joystick can be moved in all four directions.

o The function of the joystick is similar to that of a mouse.

o It is mainly used in Computer Aided Designing (CAD) and playing computer games.

4) Light Pen

o Light pen is a pointing device similar to a pen.

o It is used to select a displayed menu item or draw pictures on the monitor screen.

o It consists of a photocell and an optical system placed in a small tube.

o When the tip of a light pen is moved over the monitor screen and the pen button is pressed, its
photocell sensing element detects the screen location and sends the corresponding signal to the
CPU.

5) Track Ball

o Track ball is an input device that is mostly used in notebook or laptop computer, instead of a
mouse.
o This is a ball which is half inserted and by moving fingers on the ball, the pointer can be moved.
o Since the whole device is not moved, a track ball requires less space than a mouse.
o A track ball comes in various shapes like a ball, a button, or a square.
6) Scanner

o Scanner is an input device, which works more like a photocopy machine.


o It is used when some information is available on paper and it is to be transferred to the hard
disk of the computer for further manipulation.
o Scanner captures images from the source which are then converted into a digital form that
o Can be stored on the disk. These images can be edited before they are printed.
7) Microphone

o Microphone is an input device to input sound that is then stored in a digital form.
o The microphone is used for various applications such as adding sound to a multimedia
presentation or for mixing music.
8) Magnetic Card Reader (MICR)

o MICR input device is generally used in banks as there are large number of cheques to be
Processed every day.
o The bank's code number and cheque number are printed on the cheques with a special type of
ink that contains particles of magnetic material that are machine readable.
o This reading process is called Magnetic Ink Character Recognition (MICR).
o The main advantages of MICR is that it is fast and less error prone.

9) Bar code reader

o Bar Code Reader is a device used for reading bar coded data (data in the form of light and
o Dark lines).
o Bar coded data is generally used in labelling goods, numbering the books, etc.
o It may be a handheld scanner or may be embedded in a stationary scanner.
o Bar Code Reader scans a bar code image, converts it into an alphanumeric value, which is
o Then fed to the computer that the bar code reader is connected to.

10) Optical Character Reader (OCR)

o OCR is an input device used to read a printed text.


o OCR scans the text optically, character by character, converts them into a machine readable
code, and stores the text on the system memory.

11) Optical Mark Reader (OMR)

o OMR is a special type of optical scanner used to recognize the type of mark made by pen or
pencil.
o It is used where one out of a few alternatives is to be selected and marked.
o It is specially used for checking the answer sheets of examinations having multiple choice
questions.

-Output Devices

o Monitor

o Printer

1) Monitor
Monitors, commonly called as Visual Display Unit (VDU), are the main output device of
A computer. It forms images from tiny dots, called pixels that are arranged in a rectangular
Form. The sharpness of the image depends upon the number of pixels.
There are two kinds of viewing screen used for monitors.
-Cathode-Ray Tube (CRT)
-Flat-Panel Display
Cathode-Ray Tube (CRT) Monitor
The CRT display is made up of small picture elements called pixels. The smaller the pixels,
The better the image clarity or resolution. A finite number of characters can be displayed on a
screen at once. The screen can be divided into a series of character boxes - fixed location on the
screen where a standard character can be placed. Most screens are capable of displaying 80
characters of data horizontally and 25 lines vertically.

There are some disadvantages of CRT:


-Large in Size
-High power consumption

Flat-Panel Display Monitor


o The flat-panel display refers to a class of video devices that have reduced volume,
weight and power requirement in comparison to the CRT.
o You can hang them on walls or wear them on your wrists.
o Current uses of flat-panel displays include calculators, video games, monitors, laptop
computer, and graphics display.
The flat-panel display is divided into two categories:
-Emissive Displays - Emissive displays are devices that convert electrical energy
Into light. For example, plasma panel and LED (Light-Emitting Diodes).
-Non-Emissive Displays - Non-emissive displays use optical effects to convert
Sunlight or light from some other source into graphics patterns. For example, LCD
(Liquid-Crystal Device).

2) Printer

Printer is an output device, which is used to print information on paper.


There are two types of printers:
-Impact Printers
-Non-Impact Printers

Impact Printers
Impact printers print the characters by striking them on the ribbon, which is then pressed on the
paper.
Characteristics of Impact Printers are the following:
-Very low consumable costs
-Very noisy
-Useful for bulk printing due to low cost
-There is physical contact with the paper to produce an image

Dot Matrix Printer


o In the market, one of the most popular printers is Dot Matrix Printer. These printers are popular
because of their ease of printing and economical price.
o Each character printed is in the form of pattern of dots and head consists of a Matrix of Pins of
size (5*7, 7*9, 9*7 or 9*9) which come out to form a character which is why it is called Dot
Matrix Printer.
o Advantages
o Inexpensive
o Widely Used
o Other language characters can be printed
o Disadvantages
o Slow Speed
o Poor Quality

Non-impact Printers
Non-impact printers print the characters without using the ribbon. These printers print a
Complete page at a time, thus they are also called as Page Printers.
These printers are of two types -
-Laser Printers
-Inkjet Printers
Characteristics of Non-impact Printers
-Faster than impact printers
-They are not noisy
-High quality
-Supports many fonts and different character size

Laser Printers
These are non-impact page printers. They use laser lights to produce the dots needed to
Form the characters to be printed on a page.

Advantages
-Very high speed
-Very high quality output
-Good graphics quality
-Supports many fonts and different character size
Disadvantages
-Expensive
-Cannot be used to produce multiple copies of a document in a single printing Inkjet Printers

o Inkjet printers are non-impact character printers based on a relatively new technology.
o They print characters by spraying small drops of ink onto paper. Inkjet printers produce high
quality output with presentable features.
o They make less noise because no hammering is done and these have many styles of printing
modes available. Color printing is also possible.
o Some models of Inkjet printers can produce multiple copies of printing also.
o Advantages
-High quality printing
-More reliable
o Disadvantages
-Expensive as the cost per page is high
-Slow as compared to laser printer

7. Classification of computers with respect to

Type of data it handles.

Generation.

Mode of use.

Data organization.

Number conversion.

-Classification of Computer

o According to type of data it handles

1. Analog Computers
2. Digital Computers

3. Hybrid Computers

 Analog Computers

o These computers recognize data as a continuous measurement of a physical property (voltage,


pressure, speed and temperature). Example: Automobile speedometer

o These computers are ideal in situations where data can be accepted directly from measuring
instrument without having to convert it into numbers or codes.

o Used for certain specialized engineering and scientific applications

o Analog computers do not require any storage capability because they measure and compare
quantities in a single operation. Output from an analog computer is generally in the form of
readings on a series of dial (Speedometer of a car) or a graph on strip chart.

Applications

o They are frequently used to control process such as those found in oil refinery where flow and
temperature measurements are important.

o In paper making and chemical industry.

 Digital Computers

 A Digital Computer, as its name implies, works with digits to represent numerals, letters
or other special symbols. Digital Computers operate on inputs which are ON-OFF type
and its output is also in the form of ON-OFF signal. Normally, an ON is represented by a
1 and an OFF is represented by a 0.
 So we can say that digital computers process information which is based on the presence
or the absence of an electrical charge or we prefer to say a binary 1 or 0.
 A digital computer can be used to process numeric as well as non-numeric data.
 It can perform arithmetic operations like addition, subtraction, multiplication and division
and also logical operations.
 Most of the computers available today are digital computers. The most common
examples of digital computers are accounting machines and calculators.
 The results of digital computers are more accurate than the results of analog computers.
 Analog computers are faster than digital.
 Analog computers lack memory whereas digital computers store information.
 Hybrid Computers
 A hybrid is a combination of digital and analog computers.
 It combines the best features of both types of computers, i-e. It has the speed of analog
computer and the memory and accuracy of digital computer.
 Hybrid computers are used mainly in specialized applications where both kinds of data
need to be processed. Therefore, they help the user, to process both continuous and
discrete data.
 For example a petrol pump contains a processor that converts fuel flow measurements
into quantity and price values.
 In hospital Intensive Care Unit (ICU), an analog device is used which measures patient's
blood pressure and temperature etc, which are then converted and displayed in the form
of digits.
Hybrid computers for example are used for scientific calculations, in defense

-Classification of Computer

o Generations of Computers

The basic terms related to generations of computers are listed below.

1. Vacuum Tube: Vacuum tubes have the functionality of controlling the flow of electronics in a
vacuum. Generally, it is used in switches, amplifiers, radios, televisions, etc.

2. Transistor: A transistor helps in controlling the flow of electricity in devices, it works as an


amplifier or a switch.

3. Integrated Circuit (IC): Integrated circuits are silicon chips that contain their circuit elements like
transistors, resistors, etc.

4. Microprocessors: Microprocessors are the components that contain the CPU and its circuits and
are present in the Integrated Circuit.

5. Central Processing Unit (CPU): The CPU is called the brain of the computer. CPU performs
processing and operations work.

6. Magnetic Drum: Magnetic Drum is like a cylinder that stores data and cylinder.

7. Magnetic Core: Magnetic cores are used to store information. These are arrays of small rings.

8. Machine Language: Machine Language is the language that a computer accepts (in the form of
binary digits). It is also called low-level programming language.

9. Memory: Memory is used to store data, information, and program in a computer.

10. Artificial Intelligence: Artificial Intelligence deals with creating intelligent machines and
behaviors.

o First Generation Computers

The main features of the first generation are:


• 1946-1959

• Vacuum tube technology

• Unreliable

• Supported machine language only

• Very costly

• Generates lot of heat

• Slow input and output devices

The main features of the first generation are:

• Huge size

• Need of AC

• Non-portable

• Consumes lot of electricity

Some computers of this generation were:

• ENIAC, EDVAC, UNIVAC,IBM-701,IBM-750

o Second Generation Computers

The main features of the Second generation are:

• 1959-1965

• Reliable in comparison to first generation computers

• Smaller size as compared to first generation computers

• Generates less heat as compared to first generation computers

• Consumed less electricity as compared to first generation computers

• Faster than first generation computers

• Still very costly

The main features of the second generation are:

• AC required

• Supported machine and assembly languages

Some computers of this generation were:

IBM 1620 , IBM 7094 , CDC 1604 , CDC 3600 , UNIVAC 1108

o Third Generation Computers


The main features of the Third generation are:

• 1965-1971

• IC used

• More reliable in comparison to previous two generations

• Smaller size in comparison to previous two generations

• Generated less heat in comparison to previous two generations

• Faster in comparison to previous two generations

• Lesser maintenance in comparison to previous two generations

The main features of the Third generation are:

• Costly

• AC required

• Consumed lesser electricity in comparison to previous two generations

• Supported high-level language

Some computers of this generation were:

IBM-360 series, Honeywell-6000 series, PDP (Personal Data Processor), IBM-370/168, TDC-316

o Fourth Generation Computers

The main features of the Fourth generation are:

• 1971-1980

• VLSI technology used

• Very cheap

• Portable and reliable

• Use of PCs

• Very small size

• Pipeline processing

The main features of the Fourth generation are:

• No AC required

• Concept of internet was introduced

• Great developments in the fields of networks

• Computers became easily available


Some computers of this generation were:

DEC 10, STAR 1000, PDP 11,CRAY-1(Super Computer), CRAY-X-MP(Super Computer)

o Fifth Generation Computers

The main features of the Fifth generation are:

• 1980-till date.

• ULSI technology

• Development of true artificial intelligence

• Development of Natural language processing

• Advancement in Parallel Processing

• Advancement in Superconductor technology

• More user-friendly interfaces with multimedia features

• Availability of very powerful and compact computers at cheaper rates

• Some computers of this generation were:

• Desktop, Laptop, Notebook

-Classification of Computer

 Data organization

o A file is a named collection of related data

o A file system is the logical view that an operating system provides so that users can manage
information as a collection of files

o A file system is often organized by grouping files into directories(folders)

 File

o Most files, contain a specific type of information

Ex.-a file may contain a Java program, a JPEG image, or a MP3 audio clip

o The kind of information contained in a document is called the file type

o File names are often separated, usually by a period, into two parts

o Main name

o File extension

o The file extension indicates the type of the file


 File Operations

-Create a file

-Delete a file

- Open a file

- Close a file

- Read data from a file

- Write data to a file

-Append data to the end of a file

-Truncate a file (delete its contents)

-Rename a file

-Copy a file

-Classification of Computer

 NUMBER SYSTEMS
-Decimal number system-value of base is 10 (0,1,2,3,4,5,6,7,8,9)
-Binary number system- value of base is 2 (0 & 1)
-Octal number system- value of base is 8 (0,1,2,3,4,5,6,7)
-Hexadecimal number system- value of base is 16 (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)
CHAPTER-II
1. Computer network definition, application.

Computer network
 A computer network is a set of two or more computers connected together for the
purpose of sharing resources.
 Network consists of two or more computers that are linked in order to share resources
(such as printers and CDs), exchange files, or allow electronic communications.
 The computers on a network may be linked through cables, telephone lines, radio waves,
satellites, or infrared light beams.

Computer Network Applications


1. File Sharing: Allows file sharing and remote file access. It saves the time.
2. Resource Sharing: Printers, modem etc. can be shared over a network.
3. Increased Storage Capacity: As there is more than one computer on a network which can
easily share files, so it increases storage capacity.
4. Communication: Main advantage of computer networks. Different types of software can be
installed which are useful for transmitting messages and e-mails at fast speed.
5. Instant and multiple accesses
Many users can access the same information at the same time.
6. Video conferencing: Organizations and business sectors can call the live video conferencing
for important discussions and meetings
7. Internet Service: Every single computer attached to the network can experience the high
speed internet
8. Increased Cost Efficiency: Computer networks resolve this issue as the A expensive software
can be installed on a server and can be used by other computers.
9. Broad casting: News and important messages can be broadcasted just in few secs.
10. Remote access and login: Employees of different or same organization connected by the
networks can access the network.
11. Flexible: Supports addition for extra components and terminals to the network.
12. Reliable: The service provided in computer network is reliable.

2. Network topology definition.

Explain bus, ring, star, mesh, and hybrid and tree topology.

Network Topology
A network topology refers to the way in which the network links its nodes (computers or
other communication devices) together.
It is the study of arrangement of the elements (links, nodes, etc.) of a network.
1. Bus Topology

 Bus topology is a specific kind of network topology in which all of the various devices in
the network are connected to a single cable or line.
 The physical Bus Network Topology is the simplest and most widely used of the
network designs. It consists of one continuous length of cable that is shared by all the
nodes in the network . Bus networks make up what is known as a passive topology. Bus-
connected computers act "expectantly," that is, before transmitting data, they verify that
none of the other computers on the bus are transmitting information, sending packets
when the connection is free. In general, passive networks based on contention (so-called
because each computer has to compete for the transmission time).
 Bus networks usually use coaxial cables that connect to each of the computers through T-
shaped connectors. A terminator specific to the type of cable used placed on each end
node of the network (if a cable used 50 Ohm, 50 Ohm terminators must use). Since the
bus network is nothing more than a set of cables, connectors, and terminators, the signal
is not amplified when traveling through the wiring.
Advantages
 It uses established standards and it is relatively easy to install and the use for small
networks.
 It requires less media than other topologies.
 Failure of one node does not affect the network functioning.
 Cost is less as only one main cable is required and least amount of cable is required to
connect computers.
 Expansion is easier. New node can be easily added by using a connector.

Disadvantages

 If the main central line fails the entire network collapses.


 The bus networks are difficult to reconfigure, especially when the acceptable number of
connections or maximum distances have been reached.
 They are also difficult to troubleshoot because everything happens on a single media
segment. This can have dangerous consequences because any break in the cabling brings
the network to its knee.
 Sharing a single communication channel results in slower access time.
 In this topology, higher network traffic slows down the bus speed. Only one device
transmits at a time, other devices wait for their turn. As a result there is no coordination
between the devices for reservation of transmission time slots, so data collisions are
frequent.
2. Ring Topology

 Each node has two adjacent nodes, forming a single continuous pathway for signals
through each node - a ring.
 A node can directly communicate with the two adjacent nodes.
 No master node for controlling other nodes. A node receives data from one of its two
adjacent nodes.
 If the data is addressed to that node it utilizes it or else just passes on to the next node.
Data travel from node to node, with each node along the way handling every packet.
 The physical ring Topology is a circular loop of point-to-point links. Message travel
around the ring from node to node in a very organized manner. Each workstation checks
the message for a matching destination address. If the address doesn't match the node
simply regenerates the message and sends it on its way. If the address matches, the node
accepts the message and sends a reply to the originating sender.
 In ring topology, the various nodes are connected in form of a ring or circle (physical
ring), in which data flows in a circle, from one station to another station.
 It has no beginning or end that needs to be terminated.
 There are two kinds of ring topologies:
1. Single ring - In single ring network, a single cable is shared by all the devices and data travel
only in one direction. Each device waits for its turn and then transmits. When the data reaches its
destination, another device can transmit.
2. Dual ring: This topology uses two rings to send the data, each in different direction. Thus
allowing more packets to be sent over the network.
Advantages
 It works well where there is no central node for making routing decisions.
 More reliable than star as communication is not dependent on a single central node.
Alternate routing is possible if link or node fails.
 There is no master computer on controller. Every computer has equal chance to place the
data.
 There are no collisions.
 Data packets travel at greater speeds.
 It is easier to locate the problems with device and cable i.e. fault isolation is simplified. If
one device does not receive a signal within a specified time, it can issue an alarm. This
alarm alerts the network operator to the problem and its location.
Disadvantages
 More complicated control software.
 A ring network requires more cable than a bus network.
 A break in cable ring brings down entire network (in case of single ring).
 Adding or removing the node disturbs the network activity.
 In ring network, communication delay is directly proportional to the number of nodes in
the network. Hence addition of new nodes in the network also increases communication
delay.
 It is considerably difficult to install and reconfigure ring Topology
 Media failure on unidirectional or single loop causes complete network failure.

3. Mesh Topology

 In a mesh topology, all nodes over a network are interconnected with one another. Every
node not only sends its own signals but also relays data from other nodes.
 Full mesh topology is the one where every node is connected to every other node in the
network.
 The mesh network topology uses redundant connections between the node on the
network, applying a fault tolerance strategy.
 Each node included in the network connected to the rest of the node, which explains why
this type of topology requires extensive wiring.
 This type of topology can cope with the failure of one or two segments of the network
without interrupting traffic since it has redundant lines.
 Mesh networks are more expensive and difficult to install than other types of network
topologies due to the large number of connections they require.
 In most cases, networks that use this redundant connection strategy included within the
broader hybrid networks.
Advantages of Mesh Topology
1. It is robust as the failure of one node does not collapse the entire system. If one link fails, the
entire system continues to work.
2. There is no traffic congestion problem as dedicated links are being used.
3. Dedicated links ensure faster transmission without any delay.
4. Dedicated links also ensure data privacy and security.
5. Point to point links makes fault identification and isolation easier.
Disadvantages
1. Connecting each device to every other device in the network makes installation and
reconfiguration difficult.
2. It has high cabling cost as n (n-l)/2 links are required to connect n nodes.
4. Star Topology

 The physical star Topology uses a central controlling or hub with dedicated legs
pointing in all directions – like points of a star.
 Each network device has a dedicated point-to-point link to the central hub.
 There is no direct link between these computers and the computers can communicate via
central controller only.
 This strategy prevents troublesome collisions and keeps the lines of communications
open and free of traffic.
 Since in the star topology each computer on the network uses a different cable
connection, this type of topology is expandable, only limited by the number of ports
available in the hub (although it is possible to join several hubs to increase the number of
ports ).
 The expansion of a star topology network does not present any difficulty, since adding
another computer to the network means nothing more than placing a cable between the
computer and the hub. In fact, the rest of the network users will not even notice the
extension.
 The routing function is performed by the central controller which centrally controls
communication between any two computers by establishing a logical path between them.
 It means that if one computer A wants to send data to another computer B, Computer A
sends the data to the controller & this controller then sends the data to computer B.
 This Topology, obviously, require a great deal of cabling.
 This design provides an excellent platform for reconfiguration and trouble-shooting.
 Changes to the network are as simple as plugging another segment into the hub and a
break in the LAN is easy to isolate and doesn't affect the rest of the network.
Advantages of Star Topology
The benefits of star topology are:
1. It is easier to add new node or modify any existing node without disturbing
network i.e. expansion is easier.
2. Addition of new node does not increase communication delay.
3. If any local computer or link fails, the entire system does not collapse. Only that link or
computer is affected.
4. It is easy to find device and cable problems i.e. fault identification and isolation is easier.
5. Media faults are automatically isolated to the failed segment.

Disadvantages of Star Topology

The disadvantages are considered as follows:


1. If the central controller or hub fails, entire system collapses.
2. Cabling cost is more as each node is connected individually to the hub.
3. Requires more cable than most topologies
4. Moderately difficult to install

5. Hybrid Topology
The hybrid Topology is a type of Topology that is composed of one or more interconnections
of two or more networks that are based upon different physical topologies in a single network
that is composed of one or more interconnections of two or more networks that are based upon
the same physical topology.
6) Tree Topology
Tree or Hierarchical Topology: The type of Topology in which a central 'root' node, the top
level of the hierarchy, is connected to one or more other nodes that are one level lower in the
hierarchy i.e., the second level, with a point-to-point link between each of the second level nodes
and the top level central 'root' node, while each of the second level nodes that are connected to
the top level central 'root' node will also have one or more other nodes that are one level lower in
the hierarchy, i.e., the third level, connected to it, also with a point-to-point link, the top level
central 'root' node being the only node that has no other node above it in the hierarchy – the
hierarchy of the tree is symmetrical, each node in the network having a specific fixed number, f,
of nodes connected to it at the next lower level in the hierarchy, the number, f, being referred to
as the 'branching factor' of the hierarchical tree.

Advantages:
 Supported by several hardware and software venders.
 It allows more devices to be attached to a single central hub and can therefore increases
the distance a signal can travel between devices.
Disadvantages:
 Overall length of each segment is limited by the type of cabling used.
 If the backbone line breaks, the entire segment goes down.
 More difficult to configure and wire than other topologies.
It has higher cabling cost in setting up a tree structure.

3. Types of network or types of computer network.

LAN, WAN and MAN.

Types of Computer Network


 LAN (Local Area Network)
 A Local Area Network spans a relatively small area. LAN are usually confined to one building
or a group of buildings. Data travel between network devices via network cables. The most
common type of Local Area Network is called Ethernet.
 A Local Area Network is a privately owned computer network covering a small Networks
geographical area, like a home, office, or groups of buildings e.g. a school Network. A LAN is
used to connect the computers and other network devices so that the devices can communicate
with each other to share the resources.
 The resources to be shared can be a hardware device like printer, software like an application
program or data. The size of LAN is usually small. The various devices in LAN are connected to
central devices called Hub or Switch using a cable.
 For example, a library will have a wired or wireless LAN Network for users to interconnect
local networking devices e.g., printers and servers to connect to the internet.

Distance coverage: Limited coverage, about up to 2 miles (or 2500 meters)


Speed of operation: High, typically 10 Mbps, 100 Mbps and 1000 Mbps
Technologies used for medium: Locally installed, twisted pair, fiber optic cable, wireless (e.g.
WLAN, ZigBee)
Applications: Used mainly by fixed desktop computers and portable computers
2) MAN (Metropolitan Area Networks)
 MAN stands for Metropolitan Area Networks is one of a number of types of networks. A MAN is a
relatively new class of network. MAN is larger than a local area network and as its name implies, covers
the area of a single city. MANs rarely extend beyond 100 KM and frequently comprise a combination of
different hardware and transmission media.
 It can be single network such as a cable TV network, or it is a means of connecting a number of LANs
into a larger network so that resources can be shared LAN to LAN as well as device to device.
 A MAN can be created as a single network such as Cable TV Network, covering the entire city or a group
of several Local Area Networks (LANs). It this way resource can be shared from LAN to LAN and from
computer to computer also. MANs are usually owned by large organizations to interconnect its various
branches across a city.
 The two most important components of MANs are security and standardization. Security is
important because information is being shared between dissimilar systems. Standardization is
necessary to ensure reliable data communication.
 A MAN usually interconnects a number of local area networks using a high-capacity backbone
technology, such as fiber-optical links, and provides up-link services to wide area networks and
the Internet.
What is it? : Large network which connects different organizations
Distance coverage: Limited coverage, about up to 100 miles (or 100 km)
Speed of operation: High, typically 100 Mbps
Technologies used for medium: Locally installed and based on common carrier e.g. twisted
pair, fiber optic cable etc.
Applications: Used mainly by desktop and mini computers.

3) WAN (Wide Area Networks)


 A wide area network (WAN) is a telecommunication network. A wide area network is simply a LAN of
LANs or Network of Networks. WANs connect LANs that may be on opposite sides of a building, across
the country or around the world. WANS are characterized by the slowest data communication rates and
the largest distances. WANs can be of two types: an enterprise WAN and Global WAN.
 Computers connected to a Wide Area Networks are often connected through public networks,
such as the telephone system. They can also be connected through leased lines or satellites. The
largest WAN in existence is the Internet. Some segments of the Internet, like VPN based
extranets, are also WANs in themselves. Finally, many WANs are corporate or research
networks that utilize leased lines.
 Numerous WANs have been constructed, including public packet networks, large corporate
networks, military networks, banking networks, stock brokerage networks, and airline
reservation networks.
 A Wide Area Network exist over a large area Data travels through telephone or cable lines
Usually requires a Modem The world’s largest Wide Area Network in the Internet.
What is it? Two or more LANs connected and located over large geographical area
Distance coverage: Unlimited (usually in 1000Km) range, uses repeater and other connectivity
for range extension
Speed of operation: Slow, about 1.5 Mbps (May vary based on wireless technologies used)
Technologies used for medium: Locally installed and based on common carrier e.g. twisted pair
wires, fiber, coaxial cable, wireless including wireless and cellular network based
Applications: Can be used by any devices, but desktop devices are mainly using this network
type.

Parameters LAN MAN WAN


Full Form Local Area Network Metropolitan Area Wide Area Network
Network
• Systems are close to
each other
• Large network which • Two or more LANs connected
• contained in one office
What is it? connects different • Located over large geographical
or building
organizations area
• one organization can
have several LANs

Limited coverage, about Limited coverage, about Unlimited (usually in 1000Km) range,
Distance
upto 2 miles(or 2500 upto 100 miles(or 200 uses repeater and other connectivity
coverage
meters) km) for range extension

Speed of High, typically 10 Mbps, High, typically 100 Slow, about 1.5 Mbps (May vary based
operation 100 Mbps and 1000 Mbps Mbps on wireless technologies used)
Locally installed, twisted Locally installed and Locally installed and based on
Technologies pair, fiber optic cable, common carrier e.g. twisted pair
based on common
used for wireless wires, fiber, coaxial cable, wireless
carrier e.g. twisted pair,
medium including wireless and cellular
(e.g. WLAN, ZigBee) fiber optic cable etc.
network based
Used mainly by fixed
desktop computers and
portable computers (e.g.
Used mainly by desktop Can be used by any devices, but
Applications laptops). Now-a-days it is desktop devices are mainly using
and mini computers.
used by smart phones due This network type.
to emergence of WLAN
network

E-mail (Electronic Mail)


 Electronic mail (Email) is a method of exchanging messages between people using
electronics.
 Email operates across computer networks, which today is primarily the Internet.
 Some early email systems required the author and the recipient to both be online at the
same time, in common with instant messaging.
 Today's email systems are based on a store-and-forward model. Email servers accept,
forward, deliver, and store messages.
 Neither the users nor their computers are required to be online simultaneously; they need
to connect only briefly, typically to a mail server or a webmail interface, for as long as it
takes to send or receive messages.
 Email allows individuals and groups to Communicate with one another.
 Information Interchange
 Brain Storming and Problem Solving
 Record Keeping
 Group Work
 Staying in Touch Professionally
 Staying in Touch Socially
 Transmitting Documents
 Retrieving mail is done using a software program called an MUA (Mail User Agent).
 When the MUA is a program installed on the user's system, it is called an email client.
 MTAs act as the post office(the sorting area and mail carrier, which handle message
transportation)
 MDAs act as mailboxes, which store messages (as much as their volume will allow) until
the recipients check the box.
 Advantages of E-mail
 Cheap. Once you’re online, there is no further expense.
 Easy to reference. Sent and received messages and attachments can be stored safely,
logically and reliably.
 Easy to use. Once you’re set up, sending and receiving messages is simple. That goes for
a host of other email functions. Data storage and contacts can be accessed quickly and
easily.
 Fast. Message to send? Done, under a second! Email is by far the fastest form of written
communication.
 Global. Web based email means you can access your messages anywhere online. Going
oversees? Before you go, mail yourself a copy of your passport number, travel insurance
details or your accommodation details.

Disadvantages of E-mail
 Emotional responses. Some emails cause upset or anger. A reply in the heat of the moment
can’t be retracted.
 Information overload. Too many people send too much information.
 Lacks the personal touch. Some things are best left untyped. Email will never beat a hand
written card or letter when it comes to relationships.
 Misunderstandings. Emails from people who don’t take the time to read what they write
before clicking ‘send’. Time is wasted, either to clarify or, worse, acting on a
misinterpretation of the message.

HTTP (Hypertext Transfer Protocol)


 HTTP provides a set of rules and standards that govern how information is transmitted on
the World Wide Web.
 Computers on the World Wide Web use the HTTP to talk with each other.
 HTTP is a client-server protocol by which two machines communicate using a reliable,
connection-oriented transport service
 A browser is an HTTP client because it sends requests to an HTTP server (Web server),
which then sends responses back to the client
 An HTTP server is a program that sits listening on a machine's port for HTTP requests.
 The standard (and default) port for HTTP servers to listen on is 80, though they can use
any port.
 HTTP is stateless. The lifetime of a connection corresponds to a single request-response
sequence.
 An HTTP client opens a connection to the server via a socket, transmits a request for a
document, then waits for a reply from the server. Once the request-response sequence is
completed, the socket is closed.
 There is no "memory" between client connections.
 The pure HTTP server implementation treats every request as if it was brand-new.
Advantages of HTTP:
 Platform independent- Allows straight cross platform porting.
 No Runtime support required to run properly.
 Usable over Firewalls! Global applications possible.
 Not Connection Oriented- No network overhead to create and maintain session state and
information.

Disadvantages of HTTP:
 Privacy :Anyone can see content
 Integrity: Someone might alter content.
 HTTP is insecure since no encryption methods are used.
 Authentication: Not clear who you are talking with.
 Stateless : Need State management techniques to maintain the information across
multiple request-response cycles

HTTPS (Hypertext Transfer Protocol over Secure Socket Layer)


 HTTPS encrypts an HTTP message prior to transmission and decrypts a message upon
arrival.
 HTTPS by default uses port 443 as opposed to the standard HTTP port of 80.
 URL's beginning with HTTPS indicate that the connection between client and browser is
encrypted using SSL
 Need SSL if ,
 you have an online store or accept online orders and credit cards ,
 you offer a login or sign in on your site
 you process sensitive data such as address, birth date, license, or ID numbers
 you need to comply with privacy and security requirements

Webpage
 Web pages are what make up the World Wide Web. These documents are written in
HTML (hypertext markup language) and are translated by your Web browser.
 Web pages can either be static or dynamic. Static pages show the same content each time
they are viewed. Dynamic pages have content that can change each time they are
accessed.
 These pages are typically written in scripting languages such as PHP, Perl, ASP, or JSP.
 The scripts in the pages run functions on the server that return things like the date and
time, and database information.
 All the information is returned as HTML code, so when the page gets to your browser, all
the browser has to do is translate the HTML.
 Please note that a Web page is not the same thing as a Web site.
 A Web site is a collection of pages.
 A Web page is an individual HTML document.

URL (Uniform Resource Locator)


 URL stands for Uniform Resource Locator that identifies a particular Internet resource.
 URL help the user to locate web page, gopher service, library catalog and image or text
file locations.
 URLs are the standard addressing system of the www.
 A complete URL provides the web client with all the information it needs to contact a
server and make a request for information.
Example: http://www.ecomputernotes.com/software
a. Protocol (http ://) – The information appearing before the colon in any URL indicates the type
of information server or protocol. For example http:// indicates that the server to be connected is
a www server.
b. Domain name (www.ecomputernotes.com) – The second piece of information is the address of
the server. In this example ecomputernotes.com is the name of the machine at PS Exam in World
Wide Web.
c. Resource name (software.htm) – The third piece of information is the path to the actual
document requested. In this example the URL indicates that the document in the system
directory and is named software.htm.
CHAPTER-III
1. Define algorithm and explain with an example

2. Define flow chart and explain with an example

3. List different symbols used in drawing flow chart

4. Rules to follow while drawing flow chart

-Algorithm can be defined as: “A sequence of activities to be processed for getting desired
output from a given input.”
E.g. write an algorithm to read two numbers and find their sum.
Algorithm:
Step 1: Start
Step 2: Read the first num1.
Step 3: Read the second num2.
Step 4: Sum= num1+num2
Step 5: Print Sum
Step 6: End
Flowchart:
A graphical representation of an algorithm is known as flowchart.
Flowchart Symbols:
General Rules for flowcharting
1. All boxes of the flowchart are connected with Arrows. (Not lines)
2. Flowchart symbols have an entry point on the top of the symbol with no other entry points.
The exit point for all flowchart symbols is on the bottom except for the Decision symbol.
3. The Decision symbol has two exit points; these can be on the sides or the bottom and one side.
4. Generally a flowchart will flow from top to bottom. However, an upward flow can be shown
as long as it does not exceed 3 symbols.
5. Connectors are used to connect breaks in the flowchart
6. All flow charts start with a Terminal or Predefined Process (for interrupt programs or
subroutines) symbol.
7. All flowcharts end with a terminal or a contentious loop.
E.g. draw a flowchart to find the area of a circle of radius r.
5. Steps in learning C

6. Define constant, variable and keyword

 Constants
It is a quantity that doesn’t change.

 Variables

-The name given to location where constant is stored.


-The contents of the variable can change.

 Keywords

-These are words whose meaning has already been explained to the C compiler.

7. Classification of C constants

8. Rules to construct integer constant

-It must have at least one digit.

-It must not have a decimal point.

-It could be either +ve or –ve.

-No commas or blanks are allowed within an integer constant.

-Ex.: +325

-32

9. Rules to construct real constant

-Must have at least one digit.


-Must have a decimal point.
-Either +ve or –ve.
-No commas or blanks are allowed within an integer constant.
-Ex.: +325.300
-32.76

10. Rules to define variable name

-A variable name is any combination of alphabets, digits or underscores.

-Some compilers allow variable names whose length up to 40 characters but it is safer to have max
length 8 characters.

-The first character in the variable name must be an alphabet.

-No commas or blanks are allowed within a variable name.

-No special symbol other than underscore can be used.


-Ex. si_basic

m_hra

11. SCAN F Function

The scanf () function in C is used to read formatted input from the standard input (keyboard). It works
similarly to the printf () function, but instead of printing output, it reads input values and stores them in
variables. Here's a short explanation along with an

12. PRINT F Function

The scanf () function in C is used to read formatted input from the standard input
(keyboard). It works similarly to the printf() function, but instead of printing
output, it reads input values and stores them in variables. Here's a short
explanation along with an

13. Explain decision control in C with an example

A decision control instruction can be implemented in C using:

a) The if statement

Syntax:

If (this condition is true)

Execute this statement;

b) The if-else statement

Syntax:

If (condition)

Do this;

Else

Do this;

c) The conditional operator

These are also called as ternary (To run one code when the condition is true and another code
when the condition is false) operators.

The general form is,

a) Expression 1? expression 2 : expression 3

b) i.e. “ if expression 1 is true then


Value returned will be expression 2

Else

Value returned will be expression 3.”

You might also like