Computer Networks
Computer Networks
Computer Networks
Rajender Nath
Chapter 1
Computer Fundamentals
Structure
1.1 Introduction
1.2 Objective
1.4 Summary
1.1 Introduction
Computer is an advanced electronic device that takes raw data as input from the user and processes
these data under the control of set of instructions and gives the result and saves output for the future
use. Nowadays, computers are an integral part of our lives. Computers have wide applications,
which are difficult to list. Some of the applications, where computers are used for the reservation of
tickets for airplanes and railways, payment of bills, deposit and withdrawal of money from banks,
processing of business data, forecasting of weather conditions, diagnosis of diseases, searching for
information on the Internet, etc. Computers are also used extensively in schools, universities,
organizations, music industry, fashion industry, movie industry, scientific research etc.
A computer interacts with the external environment via the input-output devices attached to it. Input
device is used for providing data and instructions to the computer. After processing the input data,
computer provides output to the user via the output device. The I/O devices that are attached,
2
externally, to the computer machine are also called peripheral devices. Different kinds of input and
output devices are used for different kinds of input and output requirements.
1.2 Objectives
In this chapter you will learn meaning of computers and their classifications on various grounds.
You will also learn different kinds of input devices and output devices. Different storage devices
such as hard disks, optical disks and flash drives are covered in sufficient details.
A computer is an electronic machine that accepts data in a specified format, stores it, processes it at
a very high speed according to the instructions provided by the user, and finally returns the results
to the user in the desired format. A modern computer can process data, pictures, sound and graphics.
They can solve highly complicated problems quickly and accurately. A computer has following five
3
Arit hmet ic &
Logic Unit
The ALU, CU and MU (Registers, On Chip Cache etc.) of a computer system are jointly known as
the Central Processing Unit (CPU). It takes all major decisions, makes all sorts of calculations and
directs different parts of the computer functions by activating and controlling the operations.
The following paragraphs, describe each of the five functional unit of a computer system in detail.
a) Input Unit (IU): Input is the process of entering data and programs in to the computer system.
The IU takes data from the outside world and converts it into computer understandable form. Some
of the input devices which are used in computers are Keyboard, Mouse, Joy Stick, Light pen, Track
Ball, Scanner, Graphic Tablet, Microphone, Magnetic Ink Card Reader (MICR), Optical Character
b) Memory Unit (MU): The process of saving data and instructions permanently is known as
4
storage. 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
• All data and instructions are stored here before and after processing.
c) Arithmetic and Logic Unit (ALU): After you enter data through the input unit, it is stored in the
memory 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 memory unit when required. After
processing, the output is returned back to memory unit for further processing or getting stored.
d) Control Unit (CU): The control unit maintains order within the computer system and directs the
flow of operations and data. The flow of control is indicated by the dotted arrows in the diagram.
The control unit selects one program statement at a time from the program storage area, interprets
the statement, and sends the appropriate electronic impulses to the arithmetic-logic unit and storage
section to cause them to carry out the instruction. The control unit does not perform the actual
processing operations on the data. Specifically, the control unit manages the operations of the CPU,
like a traffic director. It decides when to start and stop (control and timing), what to do (program
instructions), where to keep information (memory), and with what devices to communicate (I/O). It
controls the flow of all data entering and leaving the computer. It accomplishes this by
communicating or interfacing with the arithmetic-logic unit, memory, and I/O areas. It provides the
computer with the ability to function under program control. Depending on the design of the
5
computer, the CPU can also have the capability to function under manual control through
man/machine interfacing. Modern control unit is also capable of shutting down the computer when
e) Output Unit (OU): This is the process of producing results from the data for getting useful
information. Similarly the output produced by the computer after processing must also be kept
somewhere inside the computer before being given to you in human readable form. Again the
Computers differ based on their data processing abilities. They are classified according to purpose,
data handling, working principle, number of user, functionality, speed etc. According to purpose,
computers are either general purpose or specific purpose. General purpose computers are designed
to perform a range of tasks. They have the ability to store numerous programs, but lack in speed and
efficiency. Specific purpose computers are designed to handle a specific problem or to perform a
specific task. A set of instructions is built into the machine to solve particular problem. According to
number of users, they are of two types - single user and multi-user. If only one user can work at a
time then computer is called as single user. If more than one user can work at a time then it is called
as multi-user computer. There are many other basis on that computers can be classified.
On the basis of input signals and working principles, computers are of three types:
a) Analog Computer
b) Digital Computer
6
c) Hybrid Computer
a) Analog Computer: Analog computers are used to process continuous data. Analog computers
represent variables by physical quantities. They solve problems by translating physical conditions
such as flow, temperature, pressure, angular position or voltage etc. into related mechanical or
electrical related circuits. Modern analog computers usually employ electrical parameters, such as
voltages, resistances or currents, to represent the quantities being manipulated. Such computers do
not deal directly with the numbers. They measure continuous physical magnitudes. In general it is a
computer which uses an analog quantity and produces analog values as output. Thus an analog
computer measures continuously. Analog computers produce their results very fast. But their results
are approximately correct. All the analog computers are special purpose computers in nature. For
b) Digital Computer: A computer that performs calculations and logical operations with quantities
represented as digits, usually in the binary number system. It works on the principle of counting.
Digital computer represents physical quantities with the help of digits or numbers. These numbers
are used to perform arithmetic calculations and also make logical decision to reach a conclusion,
inputting and outputting in both digital and analog signals. A hybrid computer system setup offers a
cost effective method of performing complex simulations. They give the results with more accuracy
and at a faster rate. Hybrid computers incorporate the measuring feature of an analog computer and
counting feature of a digital computer. For computational purposes, these computers use analog
7
1.3.3.2 On the basis of Size, Speed, Memory etc.
On the basis of size, speed, memory etc. computers are of the following seven types.
a) Super Computer
b) Mainframe Computer
c) Mini Computer
d) Desktop Computer
e) Laptop Computer
f) Palmtop Computer
g) Nailtop Computer
a) Super Computer: The fastest and most powerful type of computer in the world is called as super
computer. They are at the frontline of current processing capacity, particularly speed of calculation.
Supercomputers are the most powerful and expensive in terms of computational capability, memory
size and speed, I/O technology, and topological issues such as bandwidth and latency. These
computers are not cost-effective to perform batch or transaction processing. Speed of the today’s
supercomputer is of the order of Peta Floaps (approx. 1015 floating point calculations per second),
main memory size is of the order of Tera Bytes. Supercomputers are employed for specialized
applications that require immense amount of mathematical calculations. For example, weather
forecasting, oil exploration, brain mapping, nuclear reaction simulation etc. Examples of
supercomputers are Cray XK7 from USA, Fusitsu K-Computer from Japan, Tianhe 1A
supercomputer from China, PARAM YUVA and PARAM PADMA supercomputers from India.
The main difference between a supercomputer and a mainframe is that a supercomputer channels all
its power into executing a few programs as fast as possible, whereas a mainframe uses its power to
8
b) Mainframe Computer: Mainframe computers are multi-user, multi-programming and high
performance computers. In the hierarchy, mainframe computers are just below the supercomputers.
In some ways, mainframes are more powerful than supercomputers because they support more
simultaneous programs. But supercomputers can execute a single program faster than a mainframe.
Mainframe computers are very large, often filling an entire room. They can store enormous amount
of information, can perform many tasks at the same time, can communicate with many users at the
same time, and are very expensive. The price of a mainframe computer frequently runs into the
millions of dollars. Mainframe computers usually have many terminals in hundreds or thousands
connected to them. These terminals look like small computers but they are only devices used to
send and receive information from the actual computer using wires. Terminals can be located in the
same room with the mainframe computer, but they can also be in different rooms, buildings, or
cities.
There are organizations such as banks and insurance companies, which process large number of
transactions on-line. They require computers with very large disks to store several Terabytes of data
and transfer data from disk to main memory at several hundred Megabytes/sec. The processing
power needed from such computers is hundred million transactions per second. These computers
are much bigger and faster than workstations and several hundred times more expensive. They
normally use proprietary operating systems, which usually provide high expensive services such as
user accounting, file security and control. They are normally much more reliable when compared to
Operating System on PCs. There are a few manufacturers of mainframes (e.g., IBM, Hitachi,
Fusitsu etc.).
c) Mini Computer: It is a mid-sized computer. In size and power, minicomputers lie between
desktop and mainframe computers. Minicomputers are digital computers, generally used in multi-
9
user systems. They have high processing speed and high storage capacity than the microcomputers.
The users can access the minicomputer through their PCs or terminal. In the past decade, the
distinction between large minicomputers and small mainframes has blurred, however, as the
Minicomputers are much smaller than mainframe computers and they are also much less expensive.
The cost of these computers can vary from a few thousand dollars to several hundred thousand
dollars. They possess most of the features found on mainframe computers, but on a more limited
scale. They can still have many terminals, but not as many as the mainframes. They can store a
tremendous amount of information, but again usually not as much as the mainframe. Medium and
small businesses typically use these computers. They are used for real-time applications in
industries, research centers, etc. PDP 11, IBM (8000 series) are some of the widely used
minicomputers.
Microcomputers are small, low-cost and single-user digital computer. They consist of CPU, input
unit, output unit, storage unit and the software. Although microcomputers are stand-alone machines,
they can be connected together to create a network of computers that can serve more than one user.
IBM PC and Apple Macintosh are some examples of microcomputers. Microcomputers include
desktop computers, notebook computers or laptop, tablet computer, handheld computer, smart
e) Desktop Computer: It is a microcomputer computer sufficient to fit on the top of a desk. So, it
is called as desktop computer. It is also, called as Personal Computer (PC). Desktop Computer or
PC is the most common type of microcomputer. It is a stand-alone machine that can be placed on
10
the desk. Externally, it consists of three units—keyboard, monitor, and a system unit containing the
CPU, memory, hard disk drive, etc. It is not very expensive and is suited to the needs of a single
user at home, small business units, and organizations. Apple, Microsoft, HP, Dell and Lenovo are
keyboard. It is smaller in size than a desktop computer and larger than a notebook computer. They
look like an office brief case and are easy to carry from one place to another place. They are also
termed as "Portable Computers”. Due to the small size and light weight, they have become quite
popular among the users. The users found laptop very useful during traveling and when they are far
away from their desktop computers. A typical laptop computer has all the facilities that are available
g) Palmtop Computer: It is a hand-sized computer. Palmtops have no keyboard but the screen
serves both as an input and output device. Examples of palmtop computers are digital diary,
notebook, PDA, smart phones etc. With miniaturization and high-density packing of transistor on a
chip, computers with capabilities nearly that of PCs which can be held in a palm have emerged.
Palmtop computers accept handwritten inputs using an electronic pen which can be used to write on
a Palm’s screen (besides a tiny keyboard), have small disk storage and can be connected to a
wireless network. One has to train the system on the user’s handwriting before it can be used as a
mobile phone, Fax, and e-mail machine. An Indian initiative to meet the needs of rural population
of developing countries is called Simputer. Simputer is a mobile hand-held computer with input
through icons on a touch sensitive overly on the LCD display panel. A unique feature of Simputer is
the use of free open source OS called GNU/Linux. The cost of ownership is thus low as there is no
software cost for OS. Another unique feature of Simputer not found in Palm, is a smart card
11
personalization of a single Simputer for several users.
Tablet Computer has features of the notebook computer but it can accept input from a stylus or a
pen or touch instead of the keyboard or mouse. It is a portable computer. Tablet computer are the
There are some more classes of computers, which are prevalent among users:
they are more powerful providing processor speeds about 10 times that of PCs. Most workstations
have a large-size colored video display. Normally, they have large main memory and Hard Disk.
b) Server: Server usually refers to a computer that is dedicated to provide a service. For example, a
computer dedicated to a database may be called a database server. File servers manage a large
collection of computer files. Web servers process web pages and web applications. Many smaller
servers are actually personal computers that have been dedicated to provide services for other
computers.
c) Embedded computers: They are computers, which are a part of a machine or device. Embedded
computers generally execute a program that is stored in non-volatile memory and is only intended
to operate a specific machine or device. Embedded computers are very common. Embedded
computers are typically required to operate continuously without being reset or rebooted, and once
employed in their task the software usually cannot be modified. An automobile may contain a
number of embedded computers. On the other hand, a washing machine and a DVD player would
12
contain only one computer. The CPUs used in embedded computers are often sufficient only for the
computational requirements of the specific application and may be slower and cheaper than CPUs
A computer interacts with the external environment via the input-output devices attached to it. Input
device is used for providing data and instructions to the computer. After processing the input data,
computer provides output to the user via the output device. The I/O devices that are attached,
externally, to the computer machine are also called peripheral devices. Different kinds of input and
output devices are used for different kinds of input and output requirements. I/O devices can be
a) Input Device
b) Output Device
c) Input/output Device
The input unit is formed by the input devices attached to the computer e.g. Keyboard, Microphone
etc. An input device takes the input from the user and converts it into binary form so that it can be
understood by the computer. Today, a computer has a large number of input devices as listed below:
Keyboard
Mouse
Joy Stick
13
Light pen
Track Ball
Scanner
Graphic Tablet
Microphone
(a) Keyboard: The most common and very popular input device is keyboard. The keyboard helps
in inputting the data to the computer. The layout of the keyboard is like that of traditional
typewriter, although there are some additional keys provided for performing some additional
functions. Keyboards are of two sizes 84 keys or 101/102 keys, but now 104 keys or 108 keys
keyboard is also available for Windows and Internet. A typical keyboard is shown in Figure 1.2.
When a key is pressed on the keyboard, it generates ASCII value of that key. For example, when a
key labeled with ‘A’ is pressed then ASCII value of 65 is generated by the keyboard and sent to
CPU in the form of Binary language (i.e. 1000001). Then operations are done on this data. The table
14
Sr.
Keys Description
No.
These keys include the letter keys (A-Z) and digits keys (0-9) which are generally
1 Typing Keys
give same layout as that of typewriters.
The twelve functions keys are present on the keyboard. These are arranged in a
Function
3 row along the top of the keyboard. Each function key has unique meaning and is
Keys
used for some specific purpose.
These keys provides cursor and screen control. It includes four directional arrow
4 Control keys key. Control keys also include Home, End, Insert, Delete, Page Up, Page Down,
Special Keyboard also contains some special purpose keys such as Enter, Shift, Caps
5
Purpose Keys Lock, Num Lock, Space bar, Tab, and Print Screen.
(b) Mouse: It is a very famous cursor-control device. It is a small palm size box with a round ball at
its base which senses the movement of mouse and sends corresponding signals to CPU on pressing
the buttons. When the mouse is moved on any surface, the pointer on the screen is also moved. It
contains a potentiometer coupled with the roller. This potentiometer senses the motion of mouse
and converts it into digital value. Generally it has two buttons called left and right button and scroll
bar is present at the mid as shown in Figure 1.3. Mouse can be used to control the position of cursor
15
on screen, but it cannot be used to enter text into the computer. They are very easy to use. They are
not very expensive. They move the cursor faster than the arrow keys of keyboard. Now a day's
Optical mouse makes use of one or more light-emitting diodes (LEDs) and an imaging array of
photodiodes to detect movement relative to the underlying surface. A laser mouse is an optical
mouse that uses coherent (laser) light. The earliest optical mouse detected movement on pre-printed
mouse pad surfaces. But the modern optical mouse works on most opaque surfaces. Laser diodes
are also used for better resolution and precision. Battery powered, wireless optical mouse flash the
LED intermittently to save power, and only glow steadily when movement is detected.
(c) Joystick: Joystick is also a pointing device, which is used to move cursor position on a monitor
screen. It is a stick having a spherical ball at its both lower and upper ends as shown in Figure 1.4.
16
Figure 1.4 Joystick
The Joystick can be moved in all four directions. The function of joystick is similar to that of a
mouse. It is mainly used in Computer Aided Designing (CAD) and playing computer games.
(d) Bar Code Reader: It is a device, which is used to read the code from the products that are
usually in the form of Bars. It contains a light sensitive detector which identifies the values of the
bars on the product & converts them into numeric code. A typical barcode reader is shown in Figure
1.5. The Bar Code Readers are used in shopping malls in a very large scale.
(e) Digital Camera: As the name specifies, these camera stores the data digitally, which then can be
stored in the computer and can be stored for a long time. But it has very limited storage capacity.
These are very popular because of less expensive photographs & speed.
17
(f) Light Pen: It is a pointing device, which is similar to a pen. It consists of a photocell and an
optical system placed in a small tube. When light pen's tip is moved over the monitor screen and
pen button is pressed, its photocell sensing element detects the screen location and sends the
corresponding signal to the CPU. A typical light pen is shown in Figure 1.6. It is used to select a
displayed menu item or draw pictures on the monitor screen. But this is not in very much use these
days.
(g) Track Ball: Track ball is an input device that is mostly used in notebook or laptop computer,
instead of a mouse. It consists of a ball held by a socket containing sensors to detect a rotation of
the ball about two axes. The user rolls the ball with the thumb, fingers, or the palm of the hand to
move a pointer. Since the whole device is not moved, a track ball requires less space than a mouse.
A track ball comes in various shapes like a ball, a button and a square. A typical track ball is shown
in Figure 1.7. Large trackballs are common on CAD workstations for easy precision.
18
Figure 1.7 Track Ball
(h) Scanner: It is an input device that optically scans images, printed text, handwriting, or an
object, and converts it to a digital image. In desktop (or flatbed) scanner as shown in Figure 1.8, the
document is placed on a glass window for scanning. Modern scanners typically use a charge-
coupled device (CCD) or a Contact Image Sensor (CIS) as the image sensor.
In drum scanners, photomultiplier tube is used as the image sensor. A rotary scanner, used for high-
speed document scanning, is another type of drum scanner, using a CCD array instead of a
photomultiplier. Other types of scanners are planetary scanners, which take photographs of books
(i) Digitizer: It is an input device which converts analog information into a digital form. Digitizer
can convert a signal from the television camera into a series of numbers that could be stored in a
computer. They can be used by the computer to create a picture of whatever the camera had been
pointed at. Digitizer is also known as Tablet or Graphics Tablet because it converts graphics and
pictorial data into binary inputs. A graphic tablet as digitizer is used for doing fine works of drawing
19
and images manipulation applications.
(j) MIC's or Microphones: It is an input device to input sound that is stored in digital form. Most
voltage signal from mechanical vibration. A typical mic is shown in Figure 1.9. The microphone is
used for various applications like adding sound to a multimedia presentation or for mixing music. It
can be used for Internet voice chat, speech recognition and voice command applications etc.
(k) Magnetic Ink Card Reader (MICR): MICR input device is generally used in banks because of
a large number of cheques to be processed every day. 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. This reading process is called Magnetic Ink Character Recognition (MICR).
The main advantages of MICR is that it is fast and less error prone.
There are two major MICR fonts in use: E-13B and CMC-7. E-13B has a 14 character set, while
CMC-7 has 15—the 10 numeric characters, plus control characters. The MICR E-13B font is the
printing is a magnetic ink or toner, usually containing iron oxide. The MICR text is passed before a
MICR reader. The ink on the paper is first magnetized and then the characters are passed over a
MICR read head. As each character passes over the head it produces a unique waveform that can be
easily identified by the system. The use of MICR allows the characters to be read reliably even if
(l) Optical Character Reader (OCR): OCR is an input device used to read a printed text. OCR
scans text optically character by character, converts them into a machine readable code and stores
(m) Bar Code Readers: Bar Code Reader is a device used for reading bar coded data (data in form
of light and dark lines). Bar coded data is generally used in labelling goods, numbering the books
Bar Code Reader scans a bar code image, converts it into an alphanumeric value which is then fed
(n) Optical Mark Reader (OMR): OMR is a special type of optical scanner used to recognize the
type of mark made by pen or pencil. It is used where one out of a few alternatives is to be selected
and marked. It is specially used for checking the answer sheets of examinations having multiple
choice questions.
An output device is any peripheral device that converts machine-readable information into people-
21
readable form such as a monitor, printer, plotter and voice output device. The following is the list of
output devices:
Monitors
Printers
Plotters
Modems
(a) Monitors: Monitor commonly called as Visual Display Unit (VDU) is the main output device of
a computer. It is a screen used to display the output. Images are represented on monitors by
individual dots called pixels. A pixel is the smallest unit on the screen that can be turned on and off
or made different shades. The density of the dots determines the clarity of the images, the
resolution. Screen resolution is the degree of sharpness of a displayed character or image. The
screen resolution is usually expressed as the number of pixels in X-direction by number of pixels in
Y-direction. A 1024x768 resolution means that it has 1024 dots in a line and 768 lines. A smaller
Monitors can be interlaced or non-interlaced. An interlaced technique refreshes the lines of the
screen by exposing all odd lines first then all even lines next. A non-interlaced technology that is
developed later refreshes all the lines on the screen from top to bottom. The non- interlaced method
gives more stable video display than interlaced method. It also requires twice of signal information
There are two forms of display: Cathode-Ray Tubes (CRTs) and flat-panel display.
22
Cathode Ray Tubes (CRT): A CRT is a vacuum tube used as a display screen for a computer output
device. Although the CRT means only a tube, it usually refers to all monitors. In CRT, monitor can
be Monochrome Monitor or Color Monitor. A monochrome monitor has two colors, one for
foreground and the other for background. The colors can be white, amber or green on a dark (black)
background. The monochrome monitors display both text and graphics modes. On the other hand, a
color monitor can display more than two colors. Color monitors have been developed through the
following paths.
CGA: This stands for Color Graphics Adapter. It is a circuit board introduced by IBM and the first
graphics standard for the IBM PC. With a CGA monitor, it is harder to read than with a
monochrome monitor, because the CGA (320 X 200) has much fewer pixels than the monochrome
EGA: It stands for Enhanced Graphics Adapter. EGA is a video display standard that has a
resolution of 640 by 350 pixels and supports 16 colors. EGA supports previous display modes and
VGA: VGA stands for Video Graphics Array. This is a video display standard that provides medium
to high resolution. In a text mode, the resolution of this board is 720 by 400 pixels. It supports 16
colors with a higher resolution of 640 by 480 pixels and 256 colors with 320 X 200 pixels.
Super VGA: This is a very high resolution standard that displays up to 65,536 colors. Super VGA
can support a 16.8 million colors at 800 by 600 pixels and 256 colors at 1024 by 768 pixels. A high-
priced super VGA allows 1280 by 1024 pixels. Larger monitors (17" or 21" and larger) with a high
resolution of 1600 by 1280 pixels are available. VESA (Video Electronics Standards Association)
23
Flat Panel Displays are more compact and consume less power than CRTs. Portable computers use
Liquid-Crystal Displays (LCDs): A display technology that creates characters by means of reflected
light and is commonly used in digital watches and laptop computers. LCDs replaced LEDs (light
emitting diodes) because LCDs use lesser power. LCDs are difficult to read in a strong light,
because they do not emit their own light. Portable computers wanted to have brighter and easier to
read displays. Backlit LCDs are used for the purpose now.
Backlit LCDs: This is a type of LCD display having its own light source provided from the back of
the screen. The backlit makes the background brighter and clear, as a result the texts and images
appear sharper. However, this still is much less clear than CRTs. Thus, better technology is needed.
Active Matrix LCDs: This is an LCD display technique in which every dot on the screen has a
transistor to control it more accurately. This uses a transistor for each monochrome or each red,
green and blue dot. It provides better contrast, speeds up screen refresh and reduces motion
smearing.
Electroluminescent (EL) Displays: A flat panel display technology that actively emits light at each
pixel when it is electronic charged. This provides a sharp, clear image and wide viewing angle. The
Gas Plasma Displays: This is also called a gas panel or a plasma panel and is another flat screen
technology. A plasma panel contains a grid of electrodes in a flat, gas filled panel. The image can
persist for a long time without refreshing in this panel. The disadvantages of the gas plasma
displays are that they must use AC power and cannot show sharp contrast.
24
(b) Printers: A printer is an output device that produces a hard copy of data. The resolution of
printer output is expressed as DPI (Dot Per Inch). Printers can be classified into different types in
several ways. First, the printers can be divided into three categories by the way they print.
Serial Printers: Also called a character printer. Print a single character at a time. They are usually
Line Printers: Print a line at a time. They are expensive and very fast. Line printers use a band, a
chain, etc.
Page Printers: Also called a laser printer. Print a page at a time. They usually use a laser to produce
page images. Quality is best. This is a little bit expensive, but the price of the personal laser printer
is decreasing.
Second, printers can be classified into two forms according to the use of a hammer.
Impact Printers: Hammer hits ribbons, papers or print head. Dot-matrix and daisy-wheel printers are
Nonimpact Printers: They do not have the hammer and do not hit. Examples of such printers are
Bit-Mapped Printers: Images are formed from groups of dots and can be placed anywhere on the
page. They have many printing options and good printing quality. They use PostScript as a standard
Character-based Printers: Printer print characters into the lines and columns of a page. These
25
printers use predefined set of characters and are restricted in position of characters.
Microcomputers use five kinds of printers. They are daisy wheel printers, chain printers, dot-matrix
printers, ink-jet printers, and laser printers. Each one of them is described in brief in the following
paragraphs.
Daisy-Wheel Printer: Daisy-Wheel is a printer mechanism that uses any kind of hub (wheel) having
a set of spokes at the margin of the hub. The wheel can be removed to use a different character set.
The end of each spoke is a raised image of a type character. When the wheel is turned and the
required character is aligned to the print hammer, the character is then struck into a ribbon and onto
a paper with the hammer. Daisy-Wheel Printer prints typewriter-like very high quality characters.
However, they are slower and less reliable than dot-matrix printers. Microcomputer users seldom
use this printer, because the better dot-matrix printers and inexpensive laser printers are available
today.
Chain Printer: A chain printer uses a printing mechanism that uses character typefaces linked
together in a chain. The chain spins horizontally around a set of hammers aligned with each
position. When the required character is in front of the selected print position, hammer in that
position hits the paper into the ribbon against the character in the chain.
This printer is not commonly found around microcomputers, because it is a very expensive, high-
speed machine designed originally for mainframes and minicomputers. Chain printers are very
Dot-Matrix Printer: Dot-matrix printers are printers that write characters and form graphic images
using one or two columns of tiny dots on a print head. The dot hammer moving serially across the
paper strikes an inked-ribbon and creates images on paper. Dot matrix printers are popular printers
26
used with microcomputers, because the printers are highly reliable and inexpensive. They are used
for tasks where a high-quality image is not essential. Many users, however, move from dot printers
to laser printers, because the price of laser printers is falling down. Several kinds of dot matrix
printers are available with print heads that have 7, 9, 18, or 24 pins.
Ink-Jet Printer: Ink-jet is a printer mechanism that sprays one or more color of ink at high speed
onto the paper and produces high-quality printing. This printer also produces color printing as well
as high-quality image. That is, ink-jet printers can be used for variety of color printing at a
relatively low cost. Ink-jet printing has two methods: Continuous stream method and drop-on-
demand method.
Laser Printer: A laser printer is a printer that uses the electrophotograpic method used in a copy
machine. The printer uses a laser beam light source to create images on a photographic drum. Then
the images on the drum are treated with a magnetically charged toner and then are transferred onto a
In 1984, Hewlett-Packard introduced the first desktop laser printer, called the LaserJet. The laser
printer revolutionized personal computer printing and has spawned desktop publishing.
The laser printer produces high-resolution letters and graphics quality images, so it is adopted in
applications requiring high-quality output. Although a high-priced color laser printer is also
available in the market, a less expensive, desktop gray scale laser printer is widely used. Recently,
the laser printer is gaining its market share dramatically, mainly because the lowered price and the
quality.
(c) Plotters: A plotter is a special-purpose output device that draws images with ink pens. That is,
the plotter is a graphics printer for making sophisticated graphs, charts, maps, and three-
dimensional graphics as well as high-quality colored documents. It can also produce larger size of
27
documents.
Plotters require data in a vector graphics format that can produce images with a series of lines.
Drum Plotter: This is a plotter that has a drum. A paper wraps the drum that rotates to produce plots.
Pens in a drum plotter move across the paper while the drum is turning. A drum plotter is usually
Flatbed Plotter: This is a plotter that has a bed. This is also called a table plotter. The plotter draws
graphics on the paper placed on the bed. There are several sizes of beds. This plotter is usually used
(d) Voice-Output Devices: This device produces a human speech like sound, but actually is
prerecorded vocalized sounds. Voice output is used in the telephone information system, where the
requested number is reported using a voice output system. For example, when a student enrolls
courses using a telephone registration system, he or she hears voice output upon your request. Voice
(e) Modem: Another form of the output device is a modem. A modem is short for "MOdulator-
the process of converting from analog to digital. The modem enables digital microcomputers to
send output through analog telephone lines. Both voice and data can be carried over through the
modem. The modem is not only an output device but also an input device that receives data and
28
1.3.5 Secondary Storage Devices
Alternatively referred to as external memory and auxiliary storage, secondary storage is a storage
medium that holds information until it is deleted or overwritten regardless if the computer has
power. Examples of secondary storage media include recordable CDs and DVDs, floppy disks, and
removable disks, such as Zip disks etc. Each one of these types of media must be inserted into the
appropriate drive in order to be read by the computer. While floppy disks and removable disks are
rarely used anymore, CDs and DVDs are still a popular way to save and transfer data from one
place to another place. Because secondary storage technology is not always accessible by a
computer, it is commonly used for archival and backup purposes. If a computer stops functioning, a
secondary storage device may be used to restore a recent backup to a new system. In the following
sections, we shall discuss three types of storage devices viz. hard disk, pen drive and optical disks.
A hard disk is secondary magnetic storage device. It is used for storing and
retrieving digital information. A hard disk can retain its data even when powered off. Data is read in
individual blocks of data can be stored or retrieved in any order rather than sequentially.
29
Figure 1.9 Components of a Hard Disk
A HDD as shown in Figure 1.9 consists of the following components: one or more platters, spindle,
read/write heads, head sliders, head arms, head actuators and spindle motor, connectors & jumpers
and hard disk controller. Now, each of these components of the hard disk will be discussed one by
one.
Platters: Every hard disk uses one or more circular, flat disks called platters. Platters are coated on
both sides with a magnetic material to store information in the form of magnetic patterns. Platters
are composed of two main substances. First is aluminium alloy that forms the bulk of the platter and
gives it structure and rigidity. Second is a magnetic media coating which actually holds the
magnetic impulses that represent the data. All the platters are mounted on a spindle called disk pack.
The size of the platters in the hard disk is the primary determinant of its overall physical
dimensions, which are generally called the drive's form factor. Different form factors of standard
hard disks are 1.0”, 1.8”, 2.5”, 3.5”, 5.25" etc. But now days, the most common hard disk platter
size is 3.5". The rigid and stiff platters are more resistant to shock and vibration. Drives with many
platters are more difficult to engineer due to the increased mass of the spindle unit, the need to
perfectly align all the drives, and the greater difficulty in keeping noise and vibration under control.
30
Read/Write Heads: These are responsible to store and retrieve information on magnetic surfaces.
The heads are the read/write interface to the magnetic physical media on which the data is stored in
a hard disk. The heads do the work of converting bits to magnetic pulses and storing them on the
platters, and then reversing the process when the data needs to be read back. Heads are one of the
more expensive parts of the hard disk to enable areal densities and disk spin speeds to increase.
There are many technologies, which are used in read/write heads - Ferrite Heads, Metal-In-Gap
(MIG) Heads, Thin Film (TF) Heads, Anisotropic Magneto resistive (AMR/MR) Heads, Giant
Magneto resistive (GMR) Heads and Colossal Magneto resistive (CMR) Heads etc. However, GMR
Each bit of data to be stored is recorded onto the hard disk using a special encoding method that
translates zeros and ones into patterns of magnetic flux reversals. Each hard disk platter has two
surfaces used to store the data and there is normally one head for each surface used on the drive.
Since most hard disks have one to four platters, most hard disks have between two and eight heads.
Some larger drives can have 20 heads or more. Only one head can read from or write to the hard
disk at a given time. Special circuitry is used to control, which head is active at any given time. The
amount of space between the heads and the platters is called head gap. When the disk spins up to
operating speed, the high speed forms air cushion that lifts the heads off the surface of the platter to
create head gap. Normally, the heads only contact the surface when the drive is either starting up or
stopping. If the heads contact the surface of the disk while it is at operational speed can result in
data loss, damage to the heads or damage to the surface of the disk etc. This is usually called a head
crash.
When the platters are not spinning, the heads rest on the surface of the disk. When the platters spin
up, the heads rub along the surface of the platters until sufficient speed is gained for them to lift off
by air cushion. Similarly, when the drive is spun down, the process is repeated in reverse. To avoid
31
head crash during these periods, most disks set aside a special track that is designated to be where
the heads are placed for takeoffs and landings. This area is called the landing zone, and no data can
be placed there. The process of moving the heads to this designated area is called head parking.
Head Slider: Each hard disk head is mounted to a special device called a head slider. The function
of the head slider is to physically support the head and hold it in the correct position relative to the
platter as the head floats over its surface. Each slider is mounted onto a head arm to allow it to be
Head Arms: These are thin pieces of metal, usually triangular in shape onto which the head sliders
carrying the read/write heads are mounted. There is one arm per read/write head, and all of them are
lined up and mounted to the head actuator to form a single unit. That means that when the actuator
moves, all of the heads move together in a synchronized fashion. The arms themselves are made of
a lightweight, thin material, to allow them to be moved rapidly radially inward and outward.
Head Actuator: The actuator is the device used to position the head arms to different tracks on the
surface of the platter that means to different cylinders. Head actuators come in two general
varieties-Stepper Motors and Voice Coils. The main difference between the two designs is that the
Stepper Motor is an absolute positioning system, while the Voice Coil is a relative positioning
Spindle Motor: The spindle motor is responsible for rotating the disk pack. A spindle motor
provides stable, reliable and consistent rotating power for thousands of hours of often continuous
use. These are configured for direct connection. There are no belts or gears that are used to connect
them to the spindle. The various rotation speeds are 3,600 RPM (Revolutions Per Minute), 7200
RPM and 10,000 RPM. More is the speed, faster is the read/write.
32
Connectors and Jumpers: There are several different connectors and jumpers in a hard disk which
are used to configure the hard disk and to connect it with the system. The number and types of
connectors on the hard disk depend on the data interface used, the manufacturer of the drive etc.
Hard Disk Controller: Every hard disk has a controller to control the working of the hard disk. It
is the interface that enables the computer to read and write information to the hard drive. Modern
disk controllers are integrated into the disk drive in the form of circuit board and chip. For example,
SCSI disks have built-in SCSI controllers. The most common types of interfaces provided
nowadays by disk controllers are PATA (IDE) and Serial ATA for home use. High-end disks use
Information Organization: Information on the hard disk is organized in the form of sectors, tracks
33
Figure 1.10 Hard Disk drive
Track and Cylinder: The circular paths under the read/write heads are called as tracks. Information
is stored on a disk surface in concentric tracks of small width. For disk packs, the tracks with the
same diameter on all the surfaces constitute cylinder. The number of tracks on a disk range from a
few hundred to a few thousand. The capacity of each track typically range from tens of Kilo Bytes
Sector: Tracks are divided into fixed size physical data block, called sectors. The division of a
track into sectors is hard-coded on the disk surface and cannot be changed. Size of all sectors on a
track are equal but size of sectors increases as you move outward from inner most trach to the outer
most track.
Block and Interblock Gaps: A physical data record, separated on the medium from other blocks
34
by inter-block gaps is called block. The division of a track into equal sized disk blocks is set by the
operating system during disk formatting. Block size is fixed during initialization and cannot be
changed dynamically. Typical disk block sizes range from 512 to 4096 bytes. A disk with hard
coded sectors often has the sectors subdivided into blocks during initialization. An area between
data blocks, which contains no data and which separates the blocks is called interblock gap.
Access Time of Hard Disk: Hard disk is a direct access device. The smallest unit addressable on
hard disk is sector. Address of a sector in hard disk consists of (cylinder no., track no. on that
cylinder and sector no. on that track). Access time of a hard disk consists of seek time, latency time
Seek Time: Seek time is the time taken to take read/write head assembly from current position to
the desired cylinder. This is a measure of the speed at which the actuator moves the heads across the
surface of the platters. The value of seek time varies from 0 to some maximum time. If read/write
head is on the same cylinder that is to be read or written then seek time is zero. If read/write head is
on the innermost cylinder and the data to be read or written is on the outermost cylinder then seek
time is maximum. So, we always talk of average seek time. In hard disks, average seek time is of
Latency Time (Rotational Time): It is the rotational needed to bring the required sector under the
read-write head. It depends on rotational speed of a disk. Average rotational latency for hard disk
Transfer Time: It is the time required to transfer one sector of data from RAM to disk or vice-
35
Capacity of Hard Disk: The capacity of an HDD reported to an end user by the operating system is
less than the amount stated by a drive or system manufacturer due to different units of measuring
capacity, capacity consumed by the file system etc. The common sizes are 160GB, 250GB, 320GB,
Internal Vs External HDD: Ext ernal or removable HDD are t ypically connect ed through
via USB. These are available as preassembled integrated products. External hard drives generally
The foundation for all current optical disk technology was formed in the late 1960s and early 1970s
by early video disk research. In mid-1971, N. V. Philips began conducting experiments in recording
video signals on a flat glass plate using a spiral track of optically detectable depressions. This
system was refined until it could store 30 minutes of color video and sound, and was called Video
Long Play (VLP). It was first demonstrated on September 5, 1972. The development of small
inexpensive semiconductor laser diodes in 1975 stimulated development further, and the use of
plastic disk platters which were cheaper and more easily replicated than glass platters was
pioneered. Eventually, the technological base for the development of the optical disks in use today
was emerged from the research efforts in the fields of optics, disk material technology, tracking and
Optical storage is any storage method in which data is written and read with a laser for archival or
backup purposes. The optical disk consists of a circular plastic substrate usually made up of poly
(vinyl chloride) or poly (methyl methacrylate). One side of that is coated with a thin film of
Tellurium alloy (10-50 nanometers) that forms the active recording surface. Data is recorded on the
36
disk by a series of optically detectable changes to its surface. Small changes in reflectivity called
"pits" are thermally induced in the active layer through the application of energy from a laser. The
The encoding pattern follows a continuous, spiral path covering the entire disc surface and
extending from the innermost track to the outermost track. The data is stored on the disc with a laser
or stamping machine and can be accessed when the data path is illuminated with a laser diode. The
optical disk spins at speeds of about 200 to 4,000 RPM or more, depending on the drive type, disc
format, and the distance of the read head from the center of the disc. The reverse side of an optical
disc usually has a printed label, sometimes made of paper but often printed or stamped onto the disc
itself. The front side of the disc contains the actual data and is typically coated with a transparent
Optical discs are usually between 7.6 cm and 30 cm (i.e. 3” to 12”) in diameter. The most common
size of optical disk is 12 cm (i.e. 4.75”). A typical disc is about 1.2 mm (0.05”) thick and the
On the basis of recording type, the optical disks can be put into the following three categories:
Compact Disk (CD) and Compact Disk Read Only Memory (CD-ROM)
1.3.5.2.1 Compact Disk (CD) and Compact Disk Read Only Memory (CD-ROM)
These disks have data written onto them when they are manufactured. After that, data recorded on
them cannot be changed. Examples of this type are CD (Compact Disk) or CD-ROM (Compact
37
CD: The compact disk (CD) was introduced by Philips and Sony in 1980 to replace LP records. A
standard 120 mm, 700 MB CD-ROM can actually hold about 737 M. The data cannot be altered so
cannot be accidently deleted. CDs are used to distribute all sorts of software such as application
CD is a small plastic disk with a reflecting metal coating, usually aluminum. CD data are stored as a
series of tiny indentations known as “pits”, encoded in a spiral track moulded into the top of the
polycarbonate layer. The areas between pits are known as “lands”. Each pit is approximately 100
nm deep by 500 nm wide, and varies from 850 nm to 3.5 µm in length. CD-ROM capacities are
normally expressed with binary prefixes, subtracting the space used for error correction data.
CD players use laser technology to read the optically recorded data in the form of Bits and Pits on a
CD. About 20000 or more tracks are found in a CD’s recording surface. A CD is read by focusing a
780 nm wavelength (near infrared) semiconductor laser through the bottom of the polycarbonate
layer. The change in height between pits and lands results in a difference in intensity in the light
reflected. By measuring the intensity change with a photodiode, the data can be read from the disc.
The pits and reflective surface represents logic 0 and logic 1 respectively. A Non-return-to-zero,
inverted (NRZI) encoding is used i.e. a change from pit to land or land to pit indicates a one, while
The CD-ROMs came as an extension of the CD in 1984. In principle, the media and the drives are
the same. The difference is in the data storage organization. In a CD-ROM, the data are stored in
sectors, which can be read independently in the way similar to a hard disk. The CD-ROM has
become an important media in the PC world. It can hold 650/700 MB of data, and it is very
inexpensive to produce.
38
1.3.5.2.1 CD Recordable (CD-R)
CD-R is a type of write once, read many (WORM) compact disc (CD) format that allows one-time
recording on a disc. The CD-R format was introduced by Philips and Sony in their 1988
CD-Rs are composed of a polycarbonate plastic substrate, a thin reflective metal coating, and a
protective outer coating. However, in a CD-R, a layer of organic polymer dye between the
polycarbonate and metal layers serves as the recording medium. The composition of the dye is
additional protective layer to make them less vulnerable to damage from scratches, since the data is
closer to the label side of the disc. A pre-grooved spiral track helps to guide the laser for recording
data, which is encoded from the inside to the outside of the disk in a single continuous spiral. The
laser creates marks in the dye layer that mimic the reflective properties of the pits.
CD-R discs usually hold 74 minutes (650 MB) of data, although some can hold up to 80 minutes
(700 MB). With packet writing software and a compatible CD-R drive, it is possible to save data to
a CD-R in the same way that one can save it to a floppy disk. But the disc can only be written once
so it is not possible to delete files and then reuse the space. CD-Rs can be created in any CD-R
drive.
It is a compact disc (CD) format that allows repeated recording on a disc. The CD-RW format was
39
introduced by Hewlett-Packard, Mitsubishi, Philips, Ricoh, and Sony, in 1997. Modern CD-RW
drives can write both CD-R and CD-RW discs and can read any type of CD.
CD-RWs are composed of a polycarbonate plastic substrate, a thin reflective metal coating, and a
protective outer coating. In a CD-RW, the dye is replaced with an alloy that can change back and
forth from a crystalline form when exposed to a particular light, through a technology called optical
phase change. The patterns created are less distinct than those of other CD formats, requiring a
The CD-RW's polycarbonate substrate is pre-formed with a spiral groove to guide the laser. The
alloy phase-change recording layer, which is commonly a mix of silver, indium, antimony, and
tellurium, is sandwiched between two layers of dielectric material that draw excess heat from the
recording layer. After heating to one particular temperature, the alloy becomes crystalline when it is
controlling the temperature of the laser, crystalline areas and non-crystalline areas are formed. The
crystalline areas reflect the laser, while the other areas absorb it. The differences register as digital
data that can be decoded for playback. To erase or write over recorded data, the higher temperature
laser is used, which results in the non-crystalline form, which can then be reformed by the lower
temperature laser.
CD-RW discs usually hold 74 minutes (650 MB) of data, although some can hold up to 80 minutes
(700 MB) and, according to some reports, can be rewritten as many as 1000 times. With packet
writing software and a compatible CD-RW drive, it is possible to save data to a CD-RW in the same
40
DVD also called as Digital Video Disc (DVD) is a small plastic disc used for the storage of digital
data. The successor media to the compact disc (CD), a DVD can have more than 100 times the
storage capacity of a CD. When compared to CD technology, DVD also allows for better graphics
and greater resolution. In the case of an audio recording, where the data to be stored is in analog
rather than digital form, the sound signal is sampled at a rate of 48,000 or 96,000 times a second,
then each sample is measured and digitally encoded on the 12 CM disc as a series of microscopic
pits on an otherwise polished surface. The disc is covered with a protective, transparent coating so
that it can be read by a laser beam. As with other optical disks nothing touches the encoded portion,
and the DVD is not worn out by the playing process. Because DVD drives are backward compatible
DVD formats include DVD-Video, DVD-ROM, and DVD-Audio. DVD-Video discs hold digitized
movies or video programs and are played using a DVD player hooked up to a standard television
receiver. DVD-ROM discs hold computer data and are read by a DVD-ROM drive hooked up to a
computer. These disks can only be read. The disks are impressed with data at the factory but once
written cannot be erased and rewritten with new data. DVD-ROM also includes recordable
variations. DVD-R discs can be written to sequentially but only once. DVD-RAM (Random Access
Memory), DVD-RW discs can be written to thousands of times. When DVD was released in 1996
there was no DVD-Audio format. The DVD-Audio format was introduced in 1999. A DVD is a
high-capacity optical disc that looks like a CD, but can store much more information. While a CD
can store 650 to 700 MB of data, a single-layer, single-sided DVD can store 4.7 GB of data. This
enables massive computer applications and full-length movies to be stored on a single DVD.
The advanced DVD formats are even more amazing. There is a two-layer standard that doubles the
single-sided capacity to 8.5 GB. These disks can also be double-sided each side with dual layers,
41
making the maximum storage on a single disc to 17 GB.
Blu-ray is an optical disc format designed to deliver high definition video to the consumer
electronics marketplace and storage of large amounts of data to the commercial marketplace. It is
the successor to DVD. It was given the name Blu-Ray because it uses a blue laser to read from and
write to the disc rather than the red laser of CD or DVD players. Storage capacities of Blu-ray
media are 25GB per disc (single-layer), 50GB per disc (dual-layer) and 100GB per disc (quad-
layer) on a single-sided medium. Single-sided Blu-ray discs can store up to 13 hours of standard
It provides much greater longevity over CD and DVD because hard protective coating protects the
media surface against scratches, dust particles, and other contaminants. As it is liquid repellent it
provides greater protection against extreme temperature and humidity over that provided by CDs
and DVDs.
format and useful for archival-type data storage applications requiring protection against deliberate
format, known as BD-RE, allows deletions of data and the ability to re-claim storage capacity on
the disc.
42
It can perform multi-tasking.
Disadvantage of Blu-Ray Disc: The following is the main disadvantages of this disc.
Due to lack of blue-violet laser required to read the discs, Blu-ray discs cannot play on
HD DVD is the successor to the standard DVD format or is one of two formats for high definition
DVDs. The other one is Blu-Ray. HD DVD is an optical disc storage technology which competed
with Blu-ray to become the next generation high-definition DVD format. In the HD DVD blue-
violet lasers is used which increases its capacity. A single-layer HD DVD can store 15GB of data
and a dual-layer disc can hold 30GB. The theoretical limit is 60GB. This is a big improvement over
DVD but not over Blu-ray's capacity. Most DVDs use MPEG-2 compression. HD-DVDs can use
MPEG-2, but they typically use the more efficient MPEG-4, which allows higher video quality with
A magneto-Optical storage device uses the principles of both magnetic and optical technologies to
obtain ultra-high data density. Conventional magnetic diskettes are 3.5inch in size and can store
1.44 MB of data. In 1988, the initial release of Magneto-Optical offered 650 MB per platter. Since
then the storage capacity is continuously increasing year by year and finally to the current capacity
of 9.1 GB in 2001.
43
MO discs system writes magnetically and reads optically. These discs are coated with special
magnetized materials which make changes in their properties with the change in temperature. These
can be magnetized only at a relatively high temperature of approximately 300 degrees, called the
Curie Point. Curie temperature is the temperature where a material's permanent magnetism changes
to induced magnetism.
For reading, a less intense laser is projected on the disc. Due to the Magneto-Optic Kerr Effect
(MOKE), the reflected light varies according to the magnetic state of the surface. Reflected light
from a magnetized surface can change in both polarization and reflected intensity. MOKE is similar
to the Faraday’s effect. The Faraday’s effect describes changes to light transmitted through a
magnetic material, while the Kerr effect describes changes to light reflected from a magnetic
surface.
For recording purpose, the power of the laser is increased to heat the material to the Curie point in a
single spot. When the spot cools, it retains the orientation of the magnetic field, which represents a
data bit. Data can be erased and/or overwritten an unlimited number of times.
Presently MO discs are available in two formats. These are: 5¼-inch and 3½-inch.
MO drives are slower than hard disk drives but usually faster than conventional 3.5-inch
diskette drives.
The latest optical storage technology named Ultra density optical, commonly referred to as UDO, is
the ideal successor to 9.1 GB Magneto Optical (MO) archival storage because it adheres to the
5.25" ISO standard form factor and increases capacities up to 30 GB by using an extremely focused
blue laser to write and read data. There are available in three format - True WORM (Write Once
True WORM UDO Format: It uses a different phase change recording surface than the Rewritable
media. WORM recording surface cannot be erased or altered, making them most stable in terms of
data integrity, because the physical record is kept authentic. This level of data integrity is not
usually matched by other magnetic disc or tape technologies using normal write once emulation.
Rewritable UDO Format: It uses a specially formulated Phase Change recording surface that
allows recorded data to be deleted and modified. Files can be written, erased and rewritten,
Compliant Write Once UDO Format: It has the same operational properties as UDO True WORM
media but with one clear and important difference i.e. individual records written to these media can
45
be destroyed once their retention period expires. The shred function is controlled at an application
It can record high definition television (HDTV) without any quality loss.
It can record one program while watching another on the disc without any disturbance.
It can automatically search for an empty space on the disc to avoid recording over a
program.
There is a specially designed shred operation in Compliant Write Once media where
Optical jukebox (often called optical disk libraries) is an automatic disc changer. It is a robotic data
storage device that can automatically load and unload optical discs, such as Compact Disc, DVD,
Ultra Density Optical or Blu-ray disc etc. It serves as a type of tertiary storage.
A USB flash drive also called as pen drive, thumb drive, jump drive, key drive, memory stick etc.is
46
a plug and play portable storage device. It includes flash memory with an integrated Universal
Serial Bus (USB) interface. These are typically removable, faster and rewritable, and physically
much smaller than an optical disc. These are used for storage, back up & transfer of computer files
from one computer to another. These are more durable and reliable because there are no moving
parts in them.
A flash drive consists of a small printed circuit board carrying the circuit elements and a USB
connector. It is electrically insulated and protected inside a plastic or metal case. It draws power
from the computer via the USB connection. Its performance depends on the type of memory used in
it i.e. SLC (Single Level Cell) or MLC (Multilevel cell). SLC stores 1 bit in each memory cell
whereas MLC stores 2 bits in each cell. Although SLC is two times faster than MLC. Currently,
USB flash drives are built using MLC memory as these are cheaper than SLC. Figure below shows
These days, pen drives are available in different storage capacities such as 4 GB, 8 GB, 16 GB, 32
47
Figure 1.13 shows internal parts of a pen drive, which are explained in brief below.
(i) USB Standard: It is a Male A-plug, which provides a physical interface to the host computer.
(ii) USB mass storage controller device: It is a small microcontroller with a small amount of on-
(iii) Test points: It is for testing during the flash drive's manufacturing or loading code into the
microprocessor.
(v) Crystal oscillator: It produces the device's main 12 MHz clock signal and controls the
(vi) LED (Optional): It indicates data transfers or data reads and writes.
(vii) Write-protect switch (Optional): It enables or disables writing of data into memory.
(viii) Space for second flash memory chip: It provides space to include a second memory
48
chip.
Flash memory stores information in an array of floating gate transistors, called cells, each of which
traditionally stores one bit of information. Flash memory are constructed either using NOR gate or
NAND gate.
In NOR gate flash, each cell has two gates instead of one. One gate is the control gate (CG), and the
second is a floating gate (FG) insulated all around by an oxide layer. The FG is between the CG and
the substrate. Because the FG is isolated by insulating oxide layer, any electrons placed on it get
trapped there and thus store the information. When electrons are on the FG, they modify the electric
field coming from the CG, which modifies the threshold voltage (Vt) of the cell.Thus, when the cell
is read by placing a specific voltage on the CG, electrical current either flows or does not flow,
depending on the Vt of the cell, which is controlled by the number of electrons on the FG. This
presence or absence of current is sensed and translated into 1s and 0s, reproducing the stored data.
When electrons are present on the floating gate, no current flows through the transistor, indicating
logic 0. The transistor is conducting, indicating logic 1, when electrons are removed from the
floating gate.
NAND gate flash uses tunnel injection for writing and tunnel release for erasing. NAND flash also
uses floating-gate transistors. Several transistors are connected in series. These groups are then
connected via some additional transistors to a NOR-style bit line array. NAND flash might address
it by page, word and bit. Bit-level addressing suits bit-serial applications (such as hard disk
emulation), which access only 1 bit at a time. Execute-In-Place applications, on the other hand,
require every bit in a word to be accessed simultaneously. This requires word-level addressing. In
49
any case, both bit and word addressing modes are possible with either NOR or NAND flash.
To read, first the desired group is selected. Next, most of the word lines are pulled up above the Vt
of a programmed bit, while one of them is pulled up to just over the Vt of an erased bit. The series
Table below gives the comparison between NOR flash and NAND flash memories.
sequence
Applications Suitable for storing large data Suitable for storing boot or
These are inexpensiveas compared to hard disk and other mass storage devices
These consume lesser power than hard disk and other drives
50
Over time flash drive files can become corrupted and unreadable
Improperly wired USB ports can destroy the circuitry of pen drives
1.4 Summary
A computer is an electronic machine that accepts data in a specified format, stores it,
processes it at a very high speed according to the instructions provided by the user, and
Digital computer represents physical quantities with the help of digits or numbers.
The fastest and most powerful type of computer in the world is called as super computer.
A computer interacts with the external environment via the input-output devices attached
to it.
Today, a computer has a large number of input devices such as Keyboard, Mouse, Joy Stick,
Light pen, Track Ball, Scanner, Graphic Tablet, Microphone, Magnetic Ink Card
Reader(MICR), Optical Character Reader(OCR), Bar Code Reader, Optical Mark Reader
etc.
An output device is any peripheral device that converts machine-readable information into
people-readable form such as a monitor, printer, plotter and voice output device.
A hard disk is a secondary storage device, which can store information permanently.
The circular paths under the read/write heads are called as tracks.
For disk packs, the tracks with the same diameter on all the surfaces constitute cylinder.
Tracks are divided into fixed size physical data block, called sectors.
Seek time is the time taken to take read/write head assembly from current position to the
desired cylinder.
51
Latency time is the rotational needed to bring the required sector under the read-write
head.
Optical storage is any storage method in which data is written and read with a laser for
Optical jukebox (often called optical disk libraries) is an automatic disc changer. It is a
robotic data storage device that can automatically load and unload optical discs, such as
Compact Disc, DVD, Ultra Density Optical or Blu-ray disc etc. It serves as a type of tertiary
storage.
A USB flash drive also called as pen drive, thumb drive, jump drive, key drive, memory
2002
3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth Edition,
MGH, 2002
2009
1. What is computer? What are five essential components of digital computer? Explain the
purpose of each.
52
2. Draw the block diagram of a digital computer? Explain the function of each block in the
diagram.
3. How do you classify computers on the basis of input signals and working principles?
5. How do you classify computers on the basis of size, speed, memory etc.? Explain each
8. What are input devices? Explain different types of input devices in brief.
9. Write short note on: Joy stick, light pen and track ball.
10. Explain the following input devices: Scanner, MICR, OCR, OMR and bar code reader.
11. What are output devices? List output devices that can be attached with a microcomputer.
15. Differentiate among character printer, line printer and page printer.
20. What are different types of plotters? Explain the working of each type of plotter.
23. What are secondary storage devices? List different types of secondary storage devices.
53
24. Explain the following with respect to a hard disk: sector, track, cylinder, inter record gap,
26. Explain the following components of a hard disk: disk pack, read-write heads, head
slider, head arms, head actuator, spindle motor, hard disk controller.
27. What is optical disk? List different types of optical disks in use today.
29. What is CD-ROM? Explain its working. How is it different from CD?
30. What is CD-RW? Explain its working. How is it different from CD?
32. What is Blu-Ray Disk? Explain its working. What are its advantages and disadvantages?
34. What is Magneto-Optical Disk? Explain its working. What are its benefits and
limitations?
35. What is UDO? Explain its different recording formats. What are its advantages?
36. What is pen drive? Explain internal parts of a pen drive in brief.
54
Writer Dr. Rajender Nath
Chapter 2
Number Systems
Structure
2.1 Introduction
2.2 Objective
1
2.3.5 Converting Binary into Octal and Hexadecimal or Vice Versa
2.3.5.3 Direct Conversion from Hexadecimal to Octal via Binary &Vice Versa
2.4 Summary
2.1 Introduction
A number system is the set of symbols used to express quantities as the basis for counting,
the set of characters and mathematical rules that are used to represent a number. A number
attached to each digit while in a non-positional number system; no weight is attached to the
this chapter, we will discuss the positional number systems only. They are also called as
weighted number system. Every positional number system has a base, which is also called as
radix. Base of a number system means number of symbols used in a number system. For
instance, in decimal numbers system, there are 10 different symbols viz. 0 to 9. Hence, base
of decimal number system is 10. Depending upon the value of base, there are different types
of number systems such as binary, ternary, octal, duo-decimal, hexadecimal number system
etc. A number expressed in one number system can be converted into another number system.
In this chapter, you will learn commonly used number systems and conversion of one number
2
2.2 Objective
The objective of this chapter is to introduce you the concepts of number system, positional
and non-positional number systems. Based on radix/base, different types of number systems
are presented. You will also learn conversion of a number expressed in one number system
A number system is a set of symbols used to express quantities as the basis for counting,
a set of characters and mathematical rules that are used to represent a number. Examples
include the Arabic, Babylonian, Chinese, Egyptian, Greek, Mayan, and Roman number
systems. The ISBN and Dewey Decimal System are examples of number systems used in
Represents a useful set of numbers (e.g. all whole numbers, integers, or real numbers)
In a positional number system, the position of the digit has some weight associated with it. A
number expressed in a positional number system has least weight attached to the right most
digit called least significant digit and maximum weight attached to the left-most digit called
most significant digit. A positional number system is also known as place-value notation or
weighted number system. Let us take the example of decimal number system where base is
10. So, we use ten different symbols called digits viz. 0, ..., 9 and use the position of a digit to
signify the power of ten (weight of the digit) that the digit is to be multiplied with. For
3
example, the number 304 can be expressed as 3×102 + 0×101 + 4×10 0. So, here digit 4 has a
weight of 1, digit 0 has a weight of 10 and digit 3 has a weight of 10 2 i.e. 100. The Hindu-
Arabic numeral system, borrowed from India, is a positional base 10 system, which is used
In general, if b is the base of a number system, we write a number in the numeral system of
base b by expressing it in the form a nbn + a n − 1bn − 1 + an − 2bn − 2 + ... + a0b 0 and writing the
enumerated digits anan − 1a n − 2 ... a0 in descending order. The digits are natural numbers
between 0 and b − 1, inclusive. By using a dot, a positional system can also express real
The numbers b k and b−k are the weights of the corresponding digits before dot and after dot.
The position k is the logarithm of the corresponding weight w, that is k = logbw = logbbk.
Position 3 2 1 0 -1 -2 ...
Weight b3 b2 b1 b0 b − 1 b − 2 ...
Digit a3 a2 a1 a0 c1 c2 ...
4
Table 2.1 shows the weight associated with the position in a number system with base b. It
There are different types of positional number systems. Some of them are given in the Table
In binary number system, base is 2. Therefore, there are two different symbols in it viz “0”
and “1” called binary digits or bits which is short for binary digits. In ternary number system,
base is 3. Therefore, there are three different symbols in it viz “0”, “1” and “2” called ternary
digits. In quaternary number system, base is 4. Therefore, there are four different symbols in
it viz “0”, “1”, “2” and “3” called quaternary digits. In quinary number system, base is 5.
Therefore, there are five different symbols in it viz “0”, “1”, “2”, “3” and “4” called quinary
digits and so on. In the octal system, base is 8. Therefore, there are eight different symbols in
it viz "0", "1", "2", "3", "4", "5", "6" and "7" called octal digits. In the decimal number
system, there are ten different symbols viz "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" called
decimal digits or simply digits. In the duo decimal number system, there are twelve different
5
symbols viz "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", “A” and “B” called duo-decimal
digits. In the hexadecimal number system, there are sixteen different symbols viz "0", "1",
"2", "3", "4", "5", "6", "7", "8", "9" , "A", "B", "C", "D", "E" and "F" called hexadecimal
When you are dealing with numbers represented in different number systems then you need
to tell in which number system the number is expressed. This can be done by writing base of
At present, all computers use the binary number system. As discussed above, binary digits (0
and 1) are called as bits. There are two possible states in a bit, usually expressed as 0 and 1.
Any physical system that can exist in two distinct states (e.g., 0-1, on-off, high-low, yes-no,
up-down, north-south, etc.) has the potential of being used to represent bits.
A series of eight bits strung together makes a byte. With 8 bits, there exists 28 = 256 possible
approximately equal to one thousand. Thus, 1 Kilobyte (KB) is equal to 1024 bytes.
6
(Giga). It is approximately equal to a billion. 1 Giga Byte (GB) is 1024*1024*1024 bytes.
Next, 1024G is referred to as a “T” (Tera). It is approximately equal to a Trillion. 1 Tera Byte
and so on.
Right hand side of the above equation gives the decimal equivalent of the number expressed
in base b. Where bk and b -k are the weights of the corresponding digits ak and ck respectively
in the given number. Now, conversion of commonly used number systems into decimal will
Let's consider the number 110.11 2 in binary system. Table 2.3 shows the bits of the
Weights 22 21 20 2 -1 2-2
Bits 1 1 0 . 1 1
7
To convert this into decimal, multiply each bit by its corresponding weight and sum
1*2 2 = 1*4 = 4.
1*2 1 = 1*2 = 2.
0*2 0 = 0*1 = 0.
6.75
Table 2.3(a)
Let's consider the number 210.213 in ternary system. Recall that, base in ternary
system is three and digits are 0, 1, 2. Table 2.4 shows the digits of the number and its
corresponding weight.
Weights 32 31 30 3-1 3 -2
Digits 2 1 0 . 2 1
To convert this into decimal, multiply each digit by its corresponding weight and sum
8
2*32 = 2*9 = 18.
1*31 = 1*3 = 3.
0*30 = 0*1 = 0.
21.77…
number is non-terminating and has recurring group i.e. 7. A recurring number can be
Let's consider the number 134.02 5 in quinary system. Recall that, base in quinary
system is five and digits are 0, 1, 2, 3, 4. Table 2.6 shows the digits of the number and
Weights 52 51 50 5-1 5 -2
Digits 1 3 4 . 0 2
To convert this into decimal, multiply each digit by its corresponding weight and sum
9
1*52 = 1*25 = 25.
4*50 = 4*1 = 4.
44.08
Let's consider the number 726.52 8 in octal system. Recall that, base in octal system is
eight and digits are 0, 1, 2, 3, 4, 5, 6, 7. Table 2.8 shows the digits of the number and
Weights 82 81 80 8 -1 8-2
Digits 7 2 6 . 5 2
To convert this into decimal, multiply each digit by its corresponding weight and sum
decimal.
10
7*8 2 = 7*64 = 448.
6*8 0 = 6*1 = 6.
470.9375
Let's consider the number 29B.8A12 in duo decimal system. Recall that, base in duo
value of A is 10 and for B is 11. Table 2.10 shows the digits of the number and its
corresponding weight.
Digits 2 9 B . 8 A
To convert this into decimal, multiply each digit by its corresponding weight and sum
11
2*12 2 = 2*144 = 288.
407.73544…
Let's consider the number 29F.8A in Hexadecimal system. Recall that, base in
F. Here numerical value of A is 10, for B is 11, for C is 12, for D is 13, for E is 14 and
for F is 15 . Table 2.12 shows the digits of the number and its corresponding weight.
Digits 2 9 F . 8 A
To convert this into decimal, multiply each digit by its corresponding weight and sum them
decimal.
12
2*162 = 2*256 = 512.
671.5390625
A simple algorithm for converting integers in decimal into a number with base b is through
repeated division by the base b till the quotient becomes zero and obtaining the successive
remainders. First remainder gives the least significant digit and last remainder gives the most
significant digit. For example, let us convert 102030410 in decimal into septenary (a number
with base 7) by using above mentioned algorithm. ‘r’ below indicates remainder.
1020304 / 7 = 145757 r 5
145757 / 7 = 20822 r 3
20822 / 7 = 2974 r 4
2974 / 7 = 424 r 6
424 / 7 = 60 r 4
60 / 7 = 8r4
8/7= 1r1
1/7= 0r1
13
To convert a decimal fraction into a number with base b, do repeated multiplication by the
base b and taking the integral part of the product as the digits. This process can be repeated
till the fractional part becomes zero or desired precision is achieved. Unfortunately a
terminating fraction in one base may not terminate in another. The first digit of the integral
part (from left) is the most significant digit and the last digit of the integral part is the least
significant digit. For example, let us convert .2510 into septenary number system7 by using
0.25 × 7 = 1.75
0.75 × 7 = 5.25
0.25 × 7 = 1.75
0.75 × 7 = 5.25
0 or 1. Collecting the remainders from our repeated divisions gives us the binary
answer. To convert fractional part, multiply fractional part repeatedly till it becomes
zero or you achieve desired precision. For example: let's convert a 1341.8125 10 into
binary equivalent.
First, convert integral part of the given decimal number into binary.
14
_________________________________
_________________________________
670/2 = 335 0
335/2 = 167 1
167/2 = 83 1
83/2 = 41 1
41/2 = 20 1
20/2 = 10 0
10/2 = 5 0
5/2 = 2 1
2/2 = 1 0
Now, let us convert fractional part of the decimal number into binary equivalent. Multiply
decimal fraction repeatedly by 2 till the fractional part becomes zero or we get the desired
precision i.e. decimal number of places. Collect the integral part in the successive products
0.8125 × 2 = 1.6250
0.6250 × 2 = 1.2500
0.2500 × 2 = 0.5000
0.5000 × 2 = 1.0000
15
Therefore, .812510 is equivalent to .1 1 0 12. Now, combining integral and fractional part of
repeatedly divide the decimal number by 3 i.e. the base of the ternary system.
repeated divisions gives us the ternary answer. For example: let's convert a decimal
First, convert integral part of the given decimal number into ternary.
___________________________________________________
___________________________________________________
26/3 = 8 2
8/3 = 2 2
___________________________________________________
Now, let us convert fractional part of the decimal number into ternary equivalent. Multiply
decimal fraction repeatedly by 3 till the fractional part becomes zero or we get the desired
16
precision i.e. decimal number of places. Collect the integral part in the successive products
0.25 × 3 = 0.75
0.75 × 3 = 2.25
0.25 × 3 = 0.75
0.75 × 3 = 2.25
Therefore, (.25)10 is equivalent to (.02)3. Now, combining integral and fractional part of the
repeatedly divide the decimal number by 5 i.e. the base of the quinary system.
For example: let's convert a decimal number (78.25)10 into quinary equivalent.
First, convert integral part of the given decimal number into quinary.
17
_________________________________
_________________________________
15/5 = 3 0
_________________________________
Now, let us convert fractional part of the decimal number into quinary equivalent. Multiply
decimal fraction repeatedly by 5 till the fractional part becomes zero or we get the desired
precision i.e. decimal number of places. Collect the integral part in the successive products
0.25 × 5 = 1.25
0.25 × 5 = 1.25
Therefore, (.25)10 is equivalent to (.11)5. Now, combining integral and fractional part of the
repeatedly divide the decimal number by 8 i.e. the base of the octal system. Division
18
by 8 either gives a remainder of 0, 1, 2, 3, 4, 5, 6 or 7, which are octal digits.
Collecting the remainders from our repeated divisions will give us the octal answer.
For example: let's convert a decimal number (278.35)10 into octal equivalent.
First, convert integral part of the given decimal number into octal.
_________________________________________________
__________________________________________________
34/8 = 4 2
___________________________________________________
Now, let us convert fractional part of the decimal number into octal equivalent. Multiply
decimal fraction repeatedly by 8 till the fractional part becomes zero or we get the desired
precision i.e. decimal number of places. Collect the integral part in the successive products
0.35 × 8 = 2.8
0.8 × 8 = 6.4
0.4 × 8 = 3.2
0.2 × 8 = 1.6
0.6 × 8 = 4.8
19
Therefore, (.35)10 is equivalent to (.26314). It can be noted that 6314 is a repeating group and
is represented by a bar over it. Now, combining integral and fractional part of the given
repeatedly divide the decimal number by 12 i.e. the base of the duodecimal system.
(i.e. B), which are duodecimal digits. Collecting the remainders from our repeated
For example: let's convert a decimal number (9147.725)10 into duodecimal equivalent.
First, convert integral part of the given decimal number into duodecimal.
_________________________________________________
__________________________________________________
762/12 = 63 6
63/12 = 5 3
___________________________________________________
20
Now, let us convert fractional part of the decimal number into duodecimal equivalent.
Multiply decimal fraction repeatedly by 12 till the fractional part becomes zero or we get the
desired precision i.e. decimal number of places. Collect the integral part in the successive
0.725 × 12 = 8.7
0.7 × 12 = 8.4
0.4 × 12 = 4.8
0.8 × 12 = 9.6
0.6 × 12 = 7.2
0.2 × 12 = 2.4
Therefore, (.725)10 is equivalent to (.884972)12. Now, combining integral and fractional part
will repeatedly divide the decimal number by 16 i.e. the base of the hexadecimal
(i.e. A), 11 (i.e. B), 12 (i.e. C), 13 (i.e. D), 14 (i.e. E) or 15 (i.e. F), which are
hexadecimal digits. Collecting the remainders from our repeated divisions will give us
For example: let's convert a decimal number (9147.725)10 into hexadecimal equivalent.
First, convert integral part of the given decimal number into hexadecimal.
21
_________________________________________________
__________________________________________________
571/16 = 35 11 i.e. B
35/16 = 2 3
2/16 = 0 2 (MSD)
___________________________________________________
Now, let us convert fractional part of the decimal number into hexadecimal equivalent.
Multiply decimal fraction repeatedly by 16 till the fractional part becomes zero or we get the
desired precision i.e. decimal number of places. Collect the integral part in the successive
0.725 × 16 = 11.6
0.6 × 16 = 9.6
0.6 × 16 = 9.6
Therefore, (.725)10 is equivalent to (.B99)16. Now, combining integral and fractional part of
There is a direct correspondence between the binary system and the octal system, where three
bits corresponding to one octal digit. Likewise, four bits translate directly into one
22
hexadecimal digit. In computer usage, hexadecimal notation is especially common because it
easily replaces the binary notation, which is too long and human mistakes in transcribing the
0 0 0000 0 000
1 1 0001 1 001
2 2 0010 2 010
3 3 0011 3 011
4 4 0100 4 100
5 5 0101 5 101
6 6 0110 6 110
7 7 0111 7 111
8 8 1000
9 9 1001
10 A 1010
11 B 1011
12 C 1100
13 D 1101
14 E 1110
15 F 1111
23
By using Table 2.14 , we can directly convert octal into binary, binary into octal,
hexadecimal into binary, binary into hexadecimal, and also octal into hexadecimal via binary
Let us convert 5745.0328 into binary directly. This can be done by replacing each octal digit
by corresponding 3-bit binary equivalent of octal digit (See Base Conversion Table) given in
Table 2.14.
Octal 5 7 4 5 . 0 3 2 number
Now, let us convert 1100101110.010110112 into octal directly. This can be done by making
pair of three-bits starting from binary point in either direction and replacing each 3-bit binary
pair by corresponding octal digit (See Base Conversion Table). If last 3-bit pair on either side
of the binary point is incomplete then make it complete by putting zeros as putting zeros on
extreme left or extreme right do not change the value of the number. Pairs in either side of
Table 2.15
Make 3-bit pair complete, by putting extra zeros on either side as shown in Table 2.16.
24
001 100 101 110 . 010 110 110
Given binary number
Table 2.16
Now, write octal digit corresponding to each 3-bit pair as shown in Table 2.17.
Table 2.17
Let us convert 9A7C.6BE in hexadecimal into binary directly. This can be done by replacing
each hex digit by corresponding 4-bit binary equivalent of hex digit (See Base Conversion
Hexadecimal number 9 A 7 C . 6 B E
Table 2.18
can be done by making pair of four-bits starting from binary point in either direction and
replacing each 4-bit binary pair by corresponding hex digit (See Base Conversion Table). If
last 4-bit pair on either side of the binary point is incomplete then make it complete by
25
putting extra zeros as much as needed. As putting zeros on extreme left or extreme right do
not change the value of the number. Step-by-step procedure is given in Table 2.19.
Table 2.19
Make 4-bit pair complete, by putting extra zeros on either side as shown in Table 2.20.
Table 2.20
Now, write hex digit corresponding to each 4-bit pair as shown in Table 2.21.
Table 2.21
2.3.5.3 Direct Conversion from Hexadecimal to Octal via Binary and Vice Versa
explained below:
Hexadecimal number A 7 C . 6 B
Table 2.22
26
Step 2: Write 4-bit binary equivalent of each hex digit as shown in Table 2.23:
Hexadecimal number A 7 C . 6 B
Table 2.23
Step 3: Make the pair of 3-bits each starting from the binary point in either direction. If last
pair is not of 3-bit then complete it by putting extra zeros as shown in Table 2.24.
Hexadecimal number A 7 C . 6 B
Table 2.24
Step 4: Write octal digit corresponding to each 3-bit pair as shown in Table 2.25:
Hexadecimal number A 7 C . 6 B
Octal equivalent 5 1 7 4 . 3 2 6
Table 2.25
explained below:
Octal number 2 7 0 5 . 6 2 3
Table 2.26
27
Step 2: Write 3-bit binary equivalent of each octal digit as shown in Table 2.27:
Octal number 2 7 0 5 . 6 2 3
Table 2.27
Step 3: Make the pair of 4-bits each starting from the binary point in either direction. If last
pair is not of 4 bits then complete it by putting extra zeros as shown in Table 2.28:
Octal number 2 7 0 5 . 6 2 3
Binary equivalent
Binary equivalent 010 111 000 101 . 110 010 011
Table 2.28
Step 4: Write hex digit corresponding to each 4-bit pair as shown in Table 2.29:
Octal number 2 7 0 5 . 6 2 3
Binary equivalent
010 111 000 101 . 110 010 011
Binary equivalent
4-bit pairs 0101 1100 0101 . 1100 1001 1000
Hexadecimal equivalent 5 C 5 . C 9 8
Table 2.29
2.4 Summary
A number system is the set of symbols used to express quantities as the basis for
28
representing values. It is the set of characters and mathematical rules that are used to
represent a number.
no weight is attached to the digits of a number, for example, Roman number system.
number system. These symbols are called as digits e.g. in decimal number system,
base is 10 and hence there are 10 different symbols viz 0…9 and are called digits.
Depending upon the value of base, there are many different types of number
systems. Some commonly used number systems are binary, ternary, octal, decimal,
We can change a number from one base to another e.g. binary to decimal, octal to
PHI, 2002
Education, 2009
29
2.6 Self Assessment Questions
2. Convert the following numbers in decimal to binary, ternary, octal, duo decimal and
hexadecimal.
3. Convert the following numbers in binary to decimal, ternary, octal, duo decimal and
hexadecimal.
(iii) 11110101000.1100101
4. Convert the following numbers in quinary to decimal, binary, ternary, octal, duo
6. Convert the following numbers in octal to binary, ternary, quinary, decimal, duo
30
Writer Dr. Rajender Nath
Chapter 3
BCD & Character Codes
Structure
3.1 Introduction
3.2 Objective
3.3.4.3 Unicode
3.4 Summary
1
3.1 Introduction
characters, graphics, pictures, movies, songs etc. Ten decimal digits can be represented with 4-bit
binary codes called binary coded decimals (BCD). Billions of different types of BCD codes are
possible. But we are not interested in all such codes. In this chapter, we will discuss only those
When information is transferred from one place (source) to another place (destination) in a
error due to electrical or magnetic noise, dust particles, heat, moisture etc. to cope up with this
problem, we need to design codes, which can detect errors automatically and even correct errors
automatically. Errors can be detected and corrected without paying any cost. To develop error
detecting and correcting codes, we use some extra bits called parity bits. In this chapter, we will
present the methods to detect and correct errors automatically by using parity methods.
set consists of numerals, alphabets, space and some special symbols. All these characters should
decides number of bits required in the code. There are many standard character codes such as
ASCII, EBCDIC, Unicode etc. which are widely used in computers. Each of these character
2
Representation of numbers will be discussed in the next chapter. Representation of graphics,
pictures, movies and audios are beyond the scope of your syllabus.
3.2 Objective
In this chapter, you will learn commonly used BCD codes. There are mainly three classes of
BCD codes viz. weighted BCD codes, self-complementing BCD codes and cyclic BCD codes. In
each class there will be different types of BCD codes each of them will be explained with lot of
examples. You will also learn the design of codes which can automatically detect and correct
errors, which are called error detecting and error correcting codes respectively. Such codes are
designed by using extra bits called parity bits. Even or odd parity can be used to detect errors.
Single error detecting and single error correcting Hamming code will be discussed in detail. This
chapter also discusses commonly used character codes viz. ASCII, EBCDIC and Unicode.
The ten decimal digits (viz. 0…9) can be represented uniquely by four bits. These 4-bit binary
codes for decimal digits are called as Binary Coded Decimal (BCD). With four bits 16 unique
combinations are possible. If you are the designer of the BCD code, you can choose any 10
combinations out of 16 possible combinations and can assign each unique combination to 10
decimal digits. Choosing 10 combinations from 16 combinations, there are billions of ways and
3
hence billions of different types of BCD codes possible. We are not interested in all the BCD
codes. In this chapter, we will discuss only those BCD codes, which are commonly used.
In weighted BCD code, each bit is assigned some weights. Then the sum of products of bit and
its corresponding weight gives the digit. Let b1, b2, b3, and b4 are four bits of the BCD code and
w1, w2, w3, and w4 are the corresponding weights of the bit b1, b2, b3, and b4 respectively. Then
d = ∑ biwi where i = 1, 2, 3, 4.
Weights in the weighted BCD codes should be selected in such a way that by summing one or
more weights, we get all possible digits from 1 to 9. Weights can be unique, repeating or even
negative. Examples of weighted BCD codes are 8421, 2421, 4221, and 842’1’ BCD codes,
which are given in the following table 3.1. 8421 BCD code is also called as natural BCD codes
because 8421 are the weights of natural binary numbers. In 2421 BCD code, weight 2 is repeated
4
Decimal Digit 8421 2421 4221 842’1’
0 0000 0000 0000 0000
A BCD code is self-complementing if it has the feature that if you take the complement ( i.e.
changing 0 to 1 and 1 to 0) of the code for the digit d (complement of d is represented as d’) then
you get the code for the digit 9 – d. For instance, if you take the complement of code for digit 0,
then it becomes the code for the digit 9. If you take the complement of code for digit 1, it
becomes the code for the digit 8. So on and so forth. Examples of self-complementing BCD
codes are excess-3, 2421, 4221 and 842’1’ BCD codes, which are shown in table 3.2 below:
5
Decimal Digit Excess-3 2421 4221 842’1’
0 0011 0000 0000 0000
Before we discuss the cyclic code, first let us define hamming distance. Hamming distance
between two codes is equal to number of positions where bits in two codes differs. For example,
one code is 1101 and second code is 1000. These two codes differ in bits at second and fourth
positions (from left hand side). So, the hamming distance between these two codes is 2.
Now, let us define cyclic BCD code also called as gray or reflected code. A BCD code is cyclic
BCD code, if the hamming distance between any two consecutive codes (including first and last
code) is constant. There can be numerous ways to write cyclic BCD codes but the table 3.3
6
below shows the two cyclic BCD codes, where hamming distance between any two consecutive
1 0100 1100
2 1100 1000
3 1000 1001
4 1001 1011
5 1011 1010
6 1010 1110
7 1110 0110
8 0110 0010
9 0010 0000
When data are transmitted from one place to another in a computer system or over a
communication channel then some bits may get flipped due to electrical or magnetic noise or due
to dust particles like in hard disks/floppies or due to heat etc. to cope up with this problem, we
design error detecting codes, which can detect error automatically. To do this, some extra bits are
7
odd parity
even parity
In the odd parity, the parity bit is set in such a way that total number of 1’s in the code (including
parity bit) becomes odd. Table 3.4 below shows the odd parity for the excess-3 BCD code. The
value of the parity bit P (see table) for the code 0011(first code) is 1 so that total number of 1’s
has become three which is odd. Similarly, the value of the parity bit P for the code 0100 is 0 so
that total number of 1’s has become one which is again odd.
1 0100 0
2 0101 1
3 0110 1
4 0111 0
5 1000 0
6 1001 1
7 1010 1
8 1011 0
9 1100 1
At the source (from where information is transferred), there is a parity generator circuit, which
generates the odd parity. Now information to be transmitted from the source would have one
8
extra bit i.e. parity bit. For example, excess-3 code for digit 9 is 1100. At the source, odd parity
generated, is 1. Now, total numbers of bits to be transmitted from the source are 5 bits i.e. 11001.
At the destination (where information is received), there is a parity checker circuit. When the
information is received at the destination, the parity checker circuit counts the total number of
1’s in the code including parity bit. If count comes odd that means correct code is received at the
destination else the code has become erroneous. In this way, erroneous code is detected for odd
parity.
In the even parity, the parity bit is set in such a way that total number of 1’s in the code
(including parity bit) becomes even. Table 3.5 below shows the even parity for the cyclic BCD
code. The value of the parity bit P (see table) for the code 0100 (second code) is 1 so that total
number of 1’s has become two which is even. Similarly, the value of the parity bit P for the code
1100 is 0 so that total number of 1’s has become two which is again even. Erroneous code for
Limitation for odd and even parity based error detection methods is that these can detect errors
only when odd number of errors (i.e. error in one bit or three bits or five bits …) is committed. If
number of errors in the code is even then this method fails to detect the errors.
9
Decimal Digit Cyclic Code Even Parity Bit P
0 0000 0
1 0100 1
2 1100 0
3 1000 1
4 1001 0
5 1011 1
6 1010 0
7 1110 1
8 0110 0
9 0010 1
Error correcting codes are one step ahead of error detecting codes. Error correcting codes not
only detect errors but they correct errors automatically. This can happen if we know the
erroneous bit in the erroneous code. Because a bit has two values only i.e. 0 or 1. If 0 value is
incorrect then correct value is 1. Similarly, if 1 value is incorrect then correct value is 0. This can
be done easily by complementing the erroneous bit in the code. In this way, an error can be
corrected automatically.
10
We will discuss two methods of error correcting codes. First method uses the parity bits along
rows and columns for a group of codes and second more advanced method is hamming code for
error detection and correction. The following paragraphs describe these methods one by one.
Method 1: This method is suitable where a group of codes is transferred from source to
destination. This method can detect single error and can correct single error automatically in the
group of information codes. In this method, parity bits (say odd) are generated along rows and
1 1100 1
2 1101 0
3 1110 0
4 1111 1
Table 3.6: Error Correcting Code Using Parity Bits Row-wise & Column-wise
In this example, the block of code (after assigning parity bits) consisting of 5 rows and 5
columns is transferred from the source to the destination. Now, assume that single error takes
place (say 3rd bit from the left of the 3rd row) as shown in the table 3.7 below with the bit in
bold.
11
Now, at the destination, first parity bits along the rows are checked. Parity bits for 1st and 2nd
rows pass but the parity bit for third row fails as it is not odd. Parity bits for the 4th and 5th rows
also pass. Failure of parity bit in 3rd row detects the erroneous code. To detect the erroneous bit
in the erroneous code, parity bits along columns are checked. Parity bits for 1 st and 2nd columns
pass but the parity bit for the 3rd columns fails as it is not odd. Parity bits for 4th and 5th columns
again pass. Failure of parity bit for the 3rd column (from the left) detects that 3rd bit in the
erroneous code is erroneous. Now the 3rd bit in the erroneous code is complemented
1 1100 1
2 1101 0
3 1100 0
4 1111 1
Method 2: Single Error Detecting and Single Error Correcting Hamming Code.
Hamming showed that by using additional parity bits, we can not only detect the error but can
correct the error also. We can design a code which can detect multiple errors in a code and can
12
correct multiple errors in the code. In general, if a group of code has a minimum of Hamming
(C + D) ≤ (L – 1) ---------- (1)
Where D represents the number of errors detected and C represents the number of errors
corrected. It should be noted that C can not be greater than D. If the value of L is 4 then the value
Now, we discuss the design of Hamming code for single error detection and single error
correction. That means the value of C and D each has 1 and the minimum value of L comes out
to be 3. This implies that to detect single error and to correct single error, the minimum hamming
If a code has I number of information bits then number of parity bits required is given by the
following inequality:
2P ≥ I + P + 1 ------------(2)
Where P is the number of parity bits required for I bit code. Let us assume that we want to design
the single error detecting and single error correcting code for excess-3 BCD code. Therefore, the
value of I is 4 and the value of P can be computed from the inequality (2) given above, which
comes out to be 3. So, total number of bits in the code becomes 7 (i.e. 4 + 3). Now, the 7 bits are
13
numbered from 1 to 7 from left to right as shown in table below. The positions of the parity bits
can be 2i, where i can be 0, 1, …, P-1. For our example case, the positions of parity bits will be 1,
2 and 4. Parity bits are designated by P1, P2 and P4. Remaining positions are for information bits
and are designated by I3, I5 , I6 and I7 as shown in the table 3.8 below.
1 2 3 4 5 6 7 →bit positions
P1 P2 I3 P4 I 5 I6 I7 →bit designations
0 0 1 1
0 1 0 0
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
Parity bit P1 is set according to bit positions 3, 5, 7. Parity bit P2 is set according to bit position 3,
6, 7. Parity bit P4 is set according to bit position 5, 6, 7. These positions are computed by writing
the information bit positions I in 3-bit binary equivalent as shown in the table 3.9 below. The
14
I P4 P2 P1
3 0 1 1
4 1 0 0
5 1 0 1
6 1 1 0
7 1 1 1
Table 3.9: Showing Information Bit Positions according to that Parity bits are Set
BCD Code
1 2 3 4 5 6 7 →bit positions
P1 P2 I3 P4 I 5 I6 I7 →bit designations
0 1 0 1 0 1 1
0 1 0 0 1 0 0
1 0 0 1 1 0 1
0 0 0 1 1 1 0
1 1 0 0 1 1 1
0 0 1 1 0 0 0
1 1 1 0 0 0 1
0 1 1 0 0 1 0
1 0 1 1 0 1 1
1 0 1 0 1 0 0
Table 3.10: Single Error Detecting & Single Error Correcting Hamming Code for Excess-3
15
least significant bit is for the parity bit P1, next significant bit is for parity bit P2 and the most
significant bit is for the parity bit P4. Now look on the column Pi where i = 1, 2, 4 the value of Pi,
where i = 1, 2, 4 are set according to those information bits Ij, where j = 3, 4, 5, 7 for that
corresponding value of Pi is 1.
Now, the parity bits Pi where i = 1, 2, 4 are set (assuming odd parity) according to the above
mentioned information bits (I) i.e. the parity bit P1 is set according to information bit position 3,
5, 7. Parity bit P2 is set according to information bit position 3, 6, 7. Parity bit P4 is set according
to information bit position 5, 6, 7. Table 3.10 above gives single error detecting and single error
Let us now discuss how error is detected and corrected automatically. When the code is received
Now, check the decimal equivalent of C4C2C1, if it comes zero then there is no error in the code
and if it is other than zero then decimal equivalent gives the position of the erroneous bit. Once
the position of the erroneous bit is detected, it is corrected automatically by complementing the
erroneous bit.
16
Consider the example that the code (first code in the table) 0 1 0 1 0 1 1 is
The bit shown in bold has become erroneous. Apply the procedure mentioned above to detect the
Decimal equivalent of C4C2C1 (110) is 6. It implies that the 6th bit in the destination code is
Fundamentally, computers just deal with numbers. They store letters and other characters by
assigning a number for each one. In computers and in data transmission between them, i.e. in
digital data processing and transfer, data is internally presented as octets (8-bit), also called byte.
An octet is a small unit of data with a numerical value between 0 and 255, inclusively. One octet
may correspond to one character according to some mapping table (encoding). Naturally, this
names of characters and a sample presentation of characters in visible form. Notice that it may
contain characters which look the same in some presentations but are regarded as logically
17
A mapping defines a one-to-one correspondence between characters in a character repertoire and
a set of nonnegative integers. That is, it assigns a unique numerical code to each character in the
repertoire. The set of nonnegative integers corresponding to characters need not consist of
consecutive numbers. In fact, most character codes have "holes", i.e. positions reserved for
control functions or for future use. A character encoding defines how sequences of numeric
codes are presented as (i.e., mapped to) sequences of octets. In the simplest case, each character
is mapped to an integer in the range 0 - 255 according to a character code. Naturally, this only
works for character repertoire with at most 256 characters. For larger sets, more complicated
encodings are needed. For example, in the ASCII character code the numeric codes for "A", "B",
"C" are 65, 66, 67 respectively. A glyph is a visual appearance of a character. For example, the
There are many character codes available. The widely used character codes in computer systems
ASCII Code
EBCDIC
Unicode
18
3.3.4.1 ASCII Codes
The name ASCII is an abbreviation for "American Standard Code for Information Interchange".
ordering of the English alphabet. Historically, ASCII developed from telegraphic codes. Its first
commercial use was as a seven-bit teleprinter code promoted by Bell data services. The first
edition of the standard was published during 1963, a major revision during 1967, and the most
ASCII is a seven-bit code, which includes definitions for 128 characters. The definition of ASCII
also specifies a set of 33 control codes such as linefeed (LF) and escape (ESC). The printable
characters of ASCII are listed in table 3.11 below (where the first item is the blank, or space
character):
!"#$%&'()*+,-./
0123456789:;<=>?
@ABCDEFGHIJKLMNO
PQRSTUVWXYZ[\]^_
`abcdefghijklmno
pqrstuvwxyz{|}~
19
In ASCII standard, code values are assigned to characters consecutively in the order in which
the characters are listed in Table 2 (row-wise), starting from 32 (assigned to the blank) and
ending up with 126 (assigned to the tilde character ~). Positions 0 through 31 and 127 are
reserved for control codes. They have standardized names and descriptions, but in fact their
The character encoding specified by the ASCII standard is very simple, and the most obvious
one for any character code where the code numbers do not exceed 255: each code number is
presented as an octet with the same value. Octets 128 - 255 are not used in 7-bit ASCII. Table
20
13 015 0D 00001101 CR Carriage Return
14 016 0E 00001110 SO Shift Out / X-On
15 017 0F 00001111 SI Shift In / X-Off
16 020 10 00010000 DLE Data Line Escape
17 021 11 00010001 DC1 Device Control 1
18 022 12 00010010 DC2 Device Control 2
19 023 13 00010011 DC3 Device Control 3
20 024 14 00010100 DC4 Device Control 4
Negative
21 025 15 00010101 NAK
Acknowledgement
22 026 16 00010110 SYN Synchronous Idle
23 027 17 00010111 ETB End of Transmit Block
24 030 18 00011000 CAN Cancel
25 031 19 00011001 EM End of Medium
26 032 1A 00011010 SUB Substitute
27 033 1B 00011011 ESC Escape
28 034 1C 00011100 FS File Separator
29 035 1D 00011101 GS Group Separator
30 036 1E 00011110 RS Record Separator
31 037 1F 00011111 US Unit Separator
21
37 045 25 00100101 % Procenttecken
22
60 074 3C 00111100 < Less than
23
83 123 53 01010011 S Uppercase S
24
106 152 6A 01101010 j Lowercase j
25
8-Bit ASCII Code: The ASCII code was extended from 7-bit code to 8-bit. The
extended ASCII codes are from 128-255. There are several different variations of the 8-
bit ASCII table. One of them is according to ISO 8859-1, also called ISO Latin-1. Codes 129-
159 contain the MS-Windows Latin-1 extended characters. These include Latin letters, symbol
for ½, ¾, ¼ etc.
EBCDIC (pronounced as eb-sih-dik) was created in 1963 and 1964 by IBM. It is an abbreviation
for Extended Binary Coded Decimal Interchange Code and an 8-bit character encoding is used.
This code is in use on IBM mainframe computers etc. EBCDIC has non-contiguous alphabet
unlike to ASCII. In EBCDIC 8-bits are divided into two parts. Least significant 4-bit are called
as information bit and most significant 4-bit are called as zone bit. For example, for digits from 0
to 9, zone bits are ‘1111’ and information bits goes from ‘0000’ to ‘1001’. The complete table of
3.3.4.3 Unicode
Unicode is a global encoding scheme which seeks to include all characters in all scripts in one
super global encoding system. It is designed to consistently and uniquely encode characters used
in written languages throughout the world. Unicode consists of a repertoire of more than 110,000
characters covering more than 100 scripts. The goal of Unicode is to replace the existing
character encoding schemes with Unicode and its standard Unicode Transformation Format
(UTF) schemes. The standard has been implemented in many recent technologies, including
26
XML, the Java programming language, the Microsoft .NET Framework, CORBA 3.0, WML and
The Unicode standard uses hexadecimal to express a character. For example, the value 0x0040
represents the Latin character A. The Unicode standard was initially designed using 16 bits to
encode characters because the primary machines were of 16-bit. When the specification for the
Java language was created, the Unicode standard was accepted and the char data type was
defined as a 16-bit data type, with characters in the hexadecimal range from 0x0000 to 0xFFFF.
27
Dec Hex Code Dec Hex Code Dec Hex Code Dec Hex Code
0 00 NUL 32 20 64 40 space 96 60 -
1 01 SOH 33 21 65 41 97 61 /
2 02 STX 34 22 66 42 98 62
3 03 ETX 35 23 67 43 99 63
4 04 36 24 68 44 100 64
5 05 HT 37 25 LF 69 45 101 65
6 06 38 26 ETB 70 46 102 66
8 08 40 28 72 48 104 68
9 09 41 29 73 49 105 69
10 0A 42 2A 74 4A [ 106 6A |
11 0B VT 43 2B 75 4B . 107 6B ,
12 0C FF 44 2C 76 4C < 108 6C %
13 0D CR 45 2D ENQ 77 4D ( 109 6D _
15 0F SI 47 2F BEL 79 4F |! 111 6F ?
17 11 49 31 81 51 113 71
18 12 50 32 SYN 82 52 114 72
19 13 51 33 83 53 115 73
20 14 52 34 84 54 116 74
21 15 53 35 85 55 117 75
22 16 BS 54 36 86 56 118 76
23 17 55 37 EOT 87 57 119 77
24 18 CAN 56 38 88 58 120 78
25 19 EM 57 39 89 59 121 79 ‘
26 1A 58 3A 90 5A !] 122 7A :
27 1B 59 3B 91 5B $ 123 7B #
28 1C IFS 60 3C 28 92 5C * 124 7C @
29
152 98 q 184 B8 216 D8 Q 248 F8 8
Unicode was originally designed to be a 16-bit code, but it was extended to 32 bit to incorporate
all the languages of the world. Unicode can be implemented by different character encodings.
The most commonly used encodings are UTF-8. It uses 1 byte for all ASCII characters, which
have the same code values as in the standard ASCII encoding. This encoding form was
developed to work with existing software implementations that were designed for processing 8-
UTF-16: The original design goal of representing all characters using exactly 16 bits had two
benefits. First it made processing efficient since every character was exactly the same size, and
there were never any special states or escape sequences. Secondly, it made the mapping between
codepoints in the coded character set and code units in the encoding form trivial. Each character
would be encoded using the 16-bit integer that is equal to its Unicode scalar value. The
characters that are most commonly used, on average, are encoded in the Basic Multilingual Plane
30
(BMP). Thus, for many texts it is never necessary to refer to characters above U+FFFF. If a 16-
bit encoding form were used in which characters in the range U+0000..U+FFFF were encoded as
16-bit integers that matched their scalar values, this would work for such texts, but fail if any
supplementary-plane characters occurred. If, however, some of the codepoints in that range were
permanently reserved, perhaps they could somehow be used in some scheme to encode
UTF-32 encodes each code position as a 32-bit binary integer, i.e. as four octets. Its encoding
form is very simple. Every codepoint is encoded using a 32-bit integer equal to the scalar value
of the codepoint.
Advantages of Unicode: (a) It allows one web page to display multiple scripts. Earlier only the
(b) It allows text files from any computer in any language to be exchanged without special
encoding-translation algorithms.
(d) It allows each character in each script to have one encoding code point
3.4 Summary
The ten decimal digits (viz. 0…9) can be represented uniquely by four bits. These 4-bit
binary codes for decimal digits are called as Binary Coded Decimal (BCD).
With four bits 16 unique combinations are possible. If you are the designer of the BCD
code, you can choose any 10 combinations out of 16 possible combinations and can
31
The BCD codes can be classified as Weighted BCD Codes, Self-complementing BCD
In weighted BCD code, each bit is assigned some weights. Then the sum of products of
A BCD code is self-complementing if it has the feature that if you take the complement
A BCD code is cyclic BCD code, if the hamming distance between any two consecutive
In the odd parity, the parity bit is set in such a way that total number of 1’s in the code
In the even parity, the parity bit is set in such a way that total number of 1’s in the code
Hamming code can be designed to detect D errors and correct C errors. C should be less
than or equal to D. if D =1 and C =1 then number of parity bits (P) required will be equal
Fundamentally, computers just deal with numbers. They store letters and other characters
An octet is a small unit of data with a numerical value between 0 and 255, inclusively.
Octets are often called bytes but in principle, octet is a more definite concept than byte.
A character is a minimal unit of text that has semantic value. A character set is a
set is a character set where each character is assigned a unique number. A code point is a
32
value that can be used in a coded character set. A code point is a 32-bit int data type,
where the lower 21 bits represent a valid code point value and the upper 11 bits are 0.
concept from the glyph concept. A glyph is a presentation of a particular shape which a
There are many character codes available. The widely used character codes in computer
ASCII code is 7-bit or 8-bit, EBCDIC is 8-bit and Unicode is, 8-bit, 16-bit and 32-bit
code.
2002
3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth Edition,
MGH, 2002
Education, 2009
2. What are weighted BCD codes? Give at least three examples of weighted BCD codes.
33
3. What are self-complementing BCD codes? Give at least three examples of self-
4. What are cyclic BCD codes? Give at least three examples of cyclic BCD codes.
5. Represent 20794 in 8421, excess-3, 4221, 842’1’, 2421 and cyclic BCD codes.
8. What is error-detecting code? What is the limitation of error detection by parity bits?
9. Design an error detecting excess-3 BCD code and explain error detection with an
example.
10. What is error-correcting code? What is the principle used in designing of error correcting
code?
11. How can you correct single error by using parity bits along rows and columns? Explain
with an example.
12. Design a single error detecting and single error correcting Hamming code for 8421,
13. How many parity bits will be required to detect single error and correct single error for 16
bit information code? Also specify the positions of the parity bits and setting of parity
bits.
a. ASCII
b. EBCDIC
c. Unicode
15. Represent “Y2K”, “Pentium 4” and “2013” in ASCII, EBCDIC and 16-bit Unicode.
34
Writer Dr. Rajender Nath
Chapter 4
4.1 Introduction
4.2 Objective
-1-
4.3.2.1.3 Addition & Subtraction in 2’s Complement Representation
4.4 Summary
4.1 Introduction
A number can be integer or real. Integer is a whole number without decimal point and can have
positive or negative sign. A real number has a fractional part in addition to integral part i.e. it has
a decimal point and can have positive or negative sign. In a computer system numbers are stored
in a binary form. In a computer numbers are stored in memory locations or CPU registers.
Memory location or CPU register is of fixed size. Therefore, in a computer system, we can store
finite numbers only to the limit decided by the size of memory location or CPU register.
In computers, integers can be represented in a variety of ways such as sign-magnitude form, 1’s
complement form, 2’s complement form, BCD form etc. Real numbers are represented as
normalized floating point form and IEEE 754 standard is used in almost all computers
-2-
integers and real numbers. In computers, 2’s complement is widely accepted representation for
the reasons – it has single representation for zero and needs simpler algorithms for arithmetic
operations. Booth multiplication works in 2’s complement and is widely used multiplication
algorithm in computers.
4.2 Objective
In this chapter, you will learn different representations of integers such as sign-magnitude, 1’s
complement, 2’s complement, and BCD. After having learnt all these you would be able to
answer which representation is the most suitable for computers and why? You can perform
addition, subtraction, multiplication and division operations on integers. You will be able to do
algorithm for multiplying two numbers represented in 2’s complement is also presented. For real
numbers, you will learn normalized-floating point representation and most widely used IEEE
754 standard. At the end arithmetic operations – addition, subtraction, multiplication, division –
A number can be integer or real. Integer is a whole number without decimal point and can have
positive or negative sign. A real number has a fractional part in addition to integral part i.e. it has
a decimal point and can have positive or negative sign. In a computer system numbers are stored
in a binary form. In a computer numbers are stored in memory locations or CPU registers.
-3-
Memory location or CPU register is of fixed size. Therefore, in a computer system, we can store
finite numbers only to the limit decided by the size of memory location or CPU register. In the
following sections, we will discuss the representation of integers and real numbers in computers.
memory location or a CPU register. So the size of the largest and the smallest integer that can be
stored in a computer system is decided by the size of the memory location/register of that
computer system. When the integer becomes larger than the largest integer that can be stored in a
computer system gives the overflow condition. Similarly, when the integer becomes smaller than
the smallest integer that can be stored in a computer system gives the underflow condition. When
these conditions occur the value of the number stored becomes unpredictable. In a computer
system, a provision must be made to detect and deal with these conditions.
Sign-Magnitude Representation
BCD Representation
-4-
4.3.1.1.1 Sign-Magnitude Representation
As we have said earlier that numbers are stored in the computer’s memory locations/CPU
registers. One bit is reserved to store the sign of the integer and called sign bit. Conventionally,
sign bit ‘0’ indicates the plus sign and ‘1’ indicates the minus sign. Remaining bits of the
Consider the memory location/register size of 16 bits. Assume first bit is sign bit and remaining
1 bit 15 bits
Let us represent, +29 in this format. Since sign is ‘+’ so sign bit is ‘0’ and magnitude is binary
0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1
Figure 4.2
-5-
1 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1
Figure 1.3
In sign-magnitude representation, there are two representations for zero i.e. +0 and -0 as shown
in Figure 4.4 :
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 → Represents + 0
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 → Represents - 0
Figure 4.4
The largest and the smallest integers for the example format are as follows in Figure 4.5 :
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 → Represents + 32767
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 → Represents - 32767
Figure 4.5
For your ready reference, Table 4.1 below shows the complete range of 4-bit signed and
-6-
4-bit Binary Number Decimal equivalent Decimal equivalent
0000 +0 0
0001 +1 1
0010 +2 2
0011 +3 3
0100 +4 4
0101 +5 5
0110 +6 6
0111 +7 7
1000 -0 8
1001 -1 9
1010 -2 10
1011 -3 11
1100 -4 12
1101 -5 13
1110 -6 14
1111 -7 15
Table 4.1
-7-
4.3.1.1.2 1’s Complement Representation
Again consider the memory location/register size of 16 bits. In 1’s complement (also called
radix-minus-one complement), the positive integers are represented in a similar way as that of
the sign-magnitude representation discussed in the previous section and the negative integers are
represented as 1’s complement of the positive equivalent of that integer. 1’s complement is
obtained by changing 0 to 1 and 1 to 0. For example, 1’s complement of 011010 is 100101. This
For example, +29 and -29 in 1’s complement are represented as shown in Figure 4.6 :
0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 →Represents +29
1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 0 →Represents -29
Figure 4.6
Like sign-magnitude representation, in 1’s complement representation also, there are two
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 → Represents + 0
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 → Represents - 0
Figure 4.7
The largest and the smallest integers for the example format are as follows in Figure 4.8 :
-8-
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 → Represents + 32767
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 → Represents - 32767
Figure 4.8
If the integer is unsigned then the sign bit is also utilized to store the magnitude thus doubling the
range. For 16 bit unsigned integer, the range will be from 0 to 65535.
0000 +0 0
0001 +1 1
0010 +2 2
0011 +3 3
0100 +4 4
0101 +5 5
0110 +6 6
0111 +7 7
1000 -7 8
1001 -6 9
1010 -5 10
1011 -4 11
1100 -3 12
-9-
1101 -2 13
1110 -1 14
1111 -0 15
Table 4.2
For your ready reference, in Table 4.2 below shows the complete range of 4-bit signed and
Again consider the memory location/register size of 16 bits. In 2’s complement (also called radix
complement), the positive integers are represented in a similar way as that of the sign-magnitude
representation discussed above and the negative integers are represented as 2’s complement of
the positive equivalent of that integer. 2’s complement is obtained by adding 1 to the 1’s
complement of the given number. For example, 2’s complement of 011010 is 100110. This can
also be obtained by copying the bits of the given number (from right) as it is till the first 1 is
For example, +29 and -29 in 2’s complement are represented as shown Figure 4.9:
0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1 →Represents +29
1 1 1 1 1 1 1 1 1 1 1 0 0 0 1 1 →Represents -29
Figure 4.9
- 10 -
Unlike to sign-magnitude and 1’s complement, in 2’s complement representation, there is only
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 → Represents + 0
Figure 4.10
The largest and the smallest integers for the example format are as follows in figure 2.1 :
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 → Represents + 32767
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 → Represents - 32768
Figure 4.11
If the integer is unsigned then the sign bit is also utilized to store the magnitude thus doubling the
range. For 16 bit unsigned integer, the range will be from 0 to 65535. For your ready reference,
in Table 4.3 below shows the complete range of 4-bit signed and unsigned integers represented
0000 +0 0
0001 +1 1
0010 +2 2
0011 +3 3
- 11 -
0100 +4 4
0101 +5 5
0110 +6 6
0111 +7 7
1000 -8 8
1001 -7 9
1010 -6 10
1011 -5 11
1100 -4 12
1101 -3 13
1110 -2 14
1111 -1 15
Table 4.3
Various types of BCD codes have discussed in the last chapter. Integers can be represented by
BCD codes. Sign can be represented by one bit. Conventionally, sign bit ‘0’ indicates the plus
sign and ‘1’ indicates the minus sign. Each decimal digit can be represented by 4-bit BCD code
- 12 -
Sign Number in Decimal Number in
Figure 4.12
You can observe, the range of unsigned integer (represented in sign-magnitude, 1’s complement,
2’s complement forms) in 16-bit is from 0 to 65535 while in BCD representation this has
reduced from 0 to 9999. BCD representation is suitable for display while in other forms first it
There are several ways to represent real numbers on computers. Fixed point places a radix point
somewhere in the middle of the digits. For example, in four decimal digit real number we can
write 10.82, or 00.01. The range of numbers represented in four digit format will be 00.00-99.99.
The main limitations of the fixed-point representation are small range of numbers that can be
- 13 -
represented by this method and loss of significant digits during multiplication and division
operations.
Floating-point representation - the most common solution - basically represents real numbers in
scientific notation. Scientific notation represents numbers as a base number (or mantissa) and an
exponent. For example, 123.456 could be represented as 1.23456 × 102, here 1.23456 is mantissa
and 102 is exponent. Other examples of floating point numbers are 23.5678 × 1021,
0.000023456× 1045 etc. If you see second example, there are leading zeros, which do not carry
useful information but may result in loss of significant digits when stored in limited storage.
To overcome this problem, we have normalized floating point number, which aims at retaining
made less than 1 and greater than or equal to .1. For example, 23.5678 × 1021 can be normalized
as .235678 × 1023 by shifting mantissa towards right and adjusting exponent. Similarly
0.000023456× 1045 can be normalized as .23456 × 1041 by shifting mantissa towards left and
adjusting exponent. Normalization is the process of shifting the mantissa either towards left or
right in order to make mantissa less than 1 and greater than or equal to .1 and adjusting exponent
accordingly.
point has a fixed window of representation, which limits it from representing very large or very
small numbers. Also, fixed-point is prone to a loss of precision when two large numbers are
- 14 -
In the similar way, a binary number can be represented in the normalized floating point form. For
IEEE 754 floating-point numbers have three basic components: the sign, the exponent, and the
mantissa. The mantissa is composed of the fraction and an implicit leading digit (explained
below). The exponent base (2) is implicit and need not be stored. There are two widely used
formats – single precision and double precision. The following Figure 2.3 shows the layout for
single-precision (32-bit) and double-precision (64-bit) floating-point values. The number of bits
for each field are shown (bit ranges are in square brackets – bits are numbered from 0 to 31 for
single precision and 0 to 63 for double precision. Numbering is done from least significant bit to
Figure 4.13
Sign bit: The sign bit is as simple as it gets. 0 denotes a positive number; 1 denotes a negative
number. Flipping the value of this bit flips the sign of the number.
- 15 -
The Exponent: The exponent field needs to represent both positive and negative exponents. To
do this, a bias is added to the actual exponent in order to get the stored exponent. For IEEE
single-precision floats, this value is 127. Thus, an exponent of zero means that 127 is stored in
the exponent field. A stored value of 200 indicates an exponent of (200-127), or 73. For double
The Mantissa: The mantissa, also known as the significand, represents the precision bits of the
number. The mantissa is stored in normalized form. It is composed of an implicit leading bit and
the fraction bits. This puts the binary point after the first non-zero bit. In normalized form, 101 is
represented as 1.01 × 210. In binary, the only possible non-zero bit is 1. Thus, we can just assume
a leading bit of 1, and don't need to represent it explicitly. As a result, the mantissa has
The range of numbers represented by single and double precision numbers in IEEE 754 standard
Table 4.4
There are five distinct numerical ranges that single-precision floating-point numbers are not able
to represent:
- 16 -
Zero
Overflow means that values have become too large for the representation. Underflow is a less
serious problem because is just denotes a loss of precision, which is guaranteed to be closely
approximated by zero.
Special Values: IEEE 754 reserves exponent field values of all 0s and all 1s to denote special
Zero: As zero can not be directly represented in the straight format, due to the assumption of a
leading 1. Therefore, we need to specify a true zero mantissa to yield a value of zero. Zero is a
special value denoted with an exponent field of zero and a fraction field of zero. Note that -0 and
Denormalized : If the exponent is all 0s, but the fraction is non-zero (else it would be interpreted
as zero), then the value is a denormalized number, which does not have an assumed leading 1
before the binary point. Thus, this represents a number (-1)s × 0.f × 2-126, where s is the sign bit
and f is the fraction. For double precision, denormalized numbers are of the form
(-1)s × 0.f × 2-1022. From this we can interpret zero as a special type of denormalized number.
Infinity: The values +infinity and -infinity are denoted with an exponent of all 1s and a fraction
of all 0s. The sign bit distinguishes between negative infinity and positive infinity. Being able to
- 17 -
denote infinity as a specific value is useful because it allows operations to continue past overflow
situations. Operations with infinite values are well defined in IEEE 754 floating point numbers.
Not A Number (NaN): The value NaN is used to represent a value that does not represent a real
number. NaN's are represented by a bit pattern with an exponent of all 1s and a non-zero
fraction. There are two categories of NaN: QNaN (Quiet NaN) and SNaN (Signalling NaN).
Operation Result
n ÷ ±Infinity 0
±Infinity × ±Infinity ±Infinity
±nonzero ÷ 0 ±Infinity
Infinity + Infinity Infinity
±0 ÷ ±0 NaN
Infinity - Infinity NaN
±Infinity ÷ ±Infinity NaN
±Infinity × 0 NaN
Table 4.5
A QNaN is a NaN with the most significant fraction bit set. QNaN's propagate freely through
most arithmetic operations. These values pop out of an operation when the result is not
mathematically defined. An SNaN is a NaN with the most significant fraction bit clear. It is used
to signal an exception when used in operations. SNaN's can be handy to assign to uninitialized
variables to trap premature usage. Semantically, QNaN's denote indeterminate operations, while
- 18 -
Special Operations: Operations on special numbers are well-defined by IEEE. In the simplest
case, any operation with a NaN yields a NaN result. Other operations are as shown above in the
Table 4.5 .
- 19 -
The Table 4.6 above summarizes the IEEE 754 floating-point representation of numbers.
division etc. can be performed. In this section, we will discuss addition and subtraction
complement form. We will also discuss the Booth’s multiplication algorithm to multiply two
The rules to add and subtract two bits are given by the following Table 4.7, where a designates
the augends bit, b designates the addend bit, s designates the sum bit and c designates the carry
bit, x designates the minuend bit, y designates the subtrahend bit, d designates the difference bit
a b s c x y d B
0 0 0 0 0 0 0 0
0 1 1 0 0 1 1 1
1 0 1 0 1 0 1 0
1 1 0 1 1 1 0 0
Table 4.7
- 20 -
For simplicity, we consider a number is represented in 5 bits. First bit represents sign. This
Adding a negative number to a positive number is equivalent to subtraction. Decision Table 4.8
below summarizes the rules for addition and subtraction in sign-magnitude representation.
Actions
m(result) = X - - - - X
m(x) + m(y)
m(result) = - X - X - -
m(y) - m(x)
m(result) = - - X - X -
m(x) - m(y)
Table 4.8
- 21 -
In the table 1.8 above, x and y represent the two operands. The operand x is taken to be the first
operand i.e. augends for addition and minuend for subtraction. The operand y is taken to be the
second operand i.e. addend for addition and subtrahend for subtraction. Magnitudes of operands
x and y are designated by m(x) and m(y) and signs by s(x) and s(y) respectively. In the table 1.
In 1’s complement, two numbers (augend and addend) are added along with their sign bits. If any
end-around carry is generated that is added to the least significant bit of the result. Augend and
addend can have any sign i.e. positive or negative. If signs of augend and addend are opposite
then operation is equivalent to subtraction. If signs of augend and addend are same then
operation is equivalent to addition. Note that unlike to sign-magnitude, in 1’s complement, signs
of operands are not required to be checked. The result automatically gets the correct sign.
Examples: Let us consider registers size of 5 bits including sign bits. The range of integers in 1’s
complement that can be stored in these registers is -15 to 0 to +15. As long as the size of the
result lies in this range, we get the correct answer. If the result goes beyond this range then we
get incorrect answer due to overflow/underflow conditions. Let us consider the two operands as
given below:
- 22 -
Let us perform A + B = (+A) + (+B). In 1’s complement, the two operands will be represented as
Carry 0001
Operand A 0 1 0 0 1 +9
Operand B 0 0 1 0 1 +5
Result 0 1 1 1 0 +14
Table 4.9
Let us perform -A - B = (-A) + (-B). In 1’s complement, the two operands will be represented as
Carry 1110
110000
Table 4.10
Let us perform A - B = (+A) + (-B). In 1’s complement, the two operands will be represented as
- 23 -
Carry 11000
Adding 100011
Result 00100 +4
Table 4.11
Let us perform -A + B = (-A) + (+B). In 1’s complement, the two operands will be represented as
Carry 0 10 0
Result 1 1 0 1 1 -4
In 1’s complement it is -4
` Table 4.12
In 2’s complement, two numbers (augend and addend) are added along with their sign bits. If any
end-around carry is generated that unlike to 1’s complement is discarded. Augend and addend
- 24 -
can have any sign i.e. positive or negative. If signs of augend and addend are opposite then
operation is equivalent to subtraction. If signs of augend and addend are same then operation is
equivalent to addition. Note that unlike to sign-magnitude, in 2’s complement, signs of operands
are not required to be checked. The result automatically gets the correct sign.
Examples: Let us consider registers size of 5 bits including sign bits. The range of integers in 2’s
complement that can be stored in these registers is -16 to 0 to +15. As long as the size of the
result lies in this range, we get the correct answer. If the result goes beyond this range then we
get incorrect answer due to overflow/underflow conditions. Let us consider the two operands as
given below:
Let us perform A + B = (+A) + (+B). In 2’s complement, the two operands will be represented as
Carry 0001
Operand A 0 1 0 0 1 +9
Operand B 0 0 1 0 1 +5
Result 0 1 1 1 0 +14
Table 4.13
Let us perform -A - B = (-A) + (-B). In 2’s complement, the two operands will be represented as
- 25 -
Carry 11111
110010
Which is discarded
Table 4.14
Let us perform A - B = (+A) + (-B). In 2’s complement, the two operands will be represented as
Carry 11011
100100
Which is discarded
Result 00100 +4
Table 4.15
- 26 -
Let us perform -A + B = (-A) + (+B). In 2’s complement, the two operands will be represented as
Carry 0111
Result 1 1 1 0 0 -4
In 2’s complement it is -4
Table 4.16
When we compare the arithmetic operations in these three representations, we find that addition
and subtraction operations are the most complex in sign-magnitude as compared to other two
find that 2’s complement should be preferred on two accounts – one there is single representation
for zero i.e. +0 in 2’s complement, so no special mechanism is required to detect whether it is +0
or -0 as it is the case in 1’s complement and second, the end around carry is discarded so no
additional hardware is needed to add the end around carry as it is needed in 1’s complement.
actually much simpler than decimal multiplication. In the case of decimal multiplication, we
- 27 -
need to remember 3 x 9 = 27, 7 x 8 = 56, and so on. In binary multiplication, we only need to
0x0=0
0x1=0
1x0=0
1x1=1
Note that since binary operates in base 2, the multiplication rules we need to remember are those
that involve 0 and 1 only. Let us multiply 101 by 11. First we multiply 101 by 1, which produces
101. Then we put a 0 as a placeholder as we would in decimal multiplication, and multiply 101
101
x11
101
1010
Figure 4.14
In computers, 2’s complement representation is used. The most widely used multiplication
method in 2’s complement is Booth multiplication, which is described in the next section.
- 28 -
4.3.2.2.1 Booth’s Multiplication Algorithm
Booth’s multiplication algorithm gives the fastest way to multiply two integers represented in 2’s
complement form. It works on the principle that strings of 0’s in the multiplier require no
multiplication but just shifting and a string of 1’s in the multiplier from bit weight 2k to weight
2m can be treated as 2k+1 – 2m. For example, the multiplier 01111000 (= +120 in 2’s complement)
has a string of 1’s from 26 to 23. So k = 6 and m = 3. Therefore, the number can be represented as
M X 27 – M X 23. This is also true for negative multipliers represented in 2’s complement. For
example, the multiplier 11000110 (= - 58 in 2’s complement). There are two strings of 1’s. So it
the multiplier from right hand side, when first 1 is encountered then write its weight with minus
sign and after that when first 0 is encountered then write its weight with plus sign, repeat this
The register configuration to implement booth multiplication is shown in Figure 4.15 below. All
registers are assumed of size n bits. Qn indicates the nth bit (LSB) of the QR register and Qn+1
numbers of n bits each, we get the product of 2n bits. At the end of multiplication process, the
- 29 -
BR Register
Sequence Counter (SC)
Complementer and
Parallel Adder
Qn Qn+1
AC Register QR Register
Figure 2.5
Register Configuration for Booth Multiplication
Now, the booth algorithm in the form of flowchart is presented in Figure 4.16 below. Pair of bits
QnQn+1 are examined, if it is 10 that means first 1 is encountered in the string of 1’s so the
multiplicand is subtracted from the partial product, if it is 01 that means first 0 is encountered
after a string of 1’s so the multiplicand is added to the partial product, if it is 00 or 11 then the
- 30 -
Start
BR←Multiplicand
QR←Multiplier
AC←0
Qn+1←0
SC←n
QnQn+1
= 10 = 01
= 00
= 11
AC←AC+BR+1 AC←AC+BR
ashr(AC&QR&Qn+1)
SC SC - 1
SC=0No
FigureYes
2.6
Stop
- 31 -
As the operands are in signed 2's complement form, the arithmetic shift is used for the
right shifts above, i.e., the MSB bit (sign bit) is always repeated while all other bits are
shifted to the right. This guarantees the proper sign extension for both positive and
complement.
10 Subtract BR 01011
01011 01001 0
01 Add BR 10101
11010 10100 1
10 Subtract BR 01011
01001 10101
Table 4.17
- 32 -
Example of Booth multiplication: Let us multiply -11 by -14. So, BR = 10101 and QR = 10010.
Like multiplication, dividing binary values is the same as long division in decimal. For example,
lets do the following division: 1001 ÷ 11 (decimal 910 ÷ 310). Figure 4.17 shows division.
Figure 4.17
Which gives us 0011, now we can convert this value into decimal, which gives 310
In general, in order to perform any floating-point arithmetic operation, the computer must:
First represent each operand as a normalized number within the limits of its
significant digits)
- 33 -
Denormalize the smaller of the numbers if an addition or subtraction is being
normalization)
Perform the operation (which again may result in representation error due to the
Examples: In order to illustrate some of the details of floating point arithmetic, we will consider
a hypothetical floating point format in which the exponent is stored in 5 bits, the significand is
stored in 10 bits, and 1 bit is used to store the sign of the number. Using exponent biasing and
reserving the values 0 and 31 (2 5 - 1), our bias value will be 15 and our exponent will therefore
be able to represent the values -14 to 15. Since the significand is stored in 10 bits, and 2 10 - 1 =
1,023, we see that our hypothetical format provides us with three decimal digits of precision
(since all of the numbers from 0 to 999 fit in 10 bits, but not all those from 0 to 9,999 fit). We
will do all of our examples using decimal, but always keep in mind that the computer always
uses binary. In floating point form, we can perform addition, subtraction, multiplication and
Addition: For our first example, let us consider the sum: 122 + 12.
Before, we add first we have to make lower exponent equal to higher exponent by
denormalizing it as
- 34 -
.12 X 10 2 becomes .012 X 10 3.
For addition augend mantissa is added to addend mantissa and exponent part remains
Augend .122 X 10 3
Addend .012 X 10 3
The answer is of course equal to 134. If the relative sizes of the two numbers are too different,
we may have one of two errors. As an example of the first type of error, consider the sum 1220 +
But when we denormalize the smaller number before adding, the fact that we have only 3
That is, the second significant digit was lost due to limited significance of 3 digits. In fact, if we
consider the sum 1220 + 1.4, we see that the second operand (1.4) is denormalized to zero:
This is called an "underflow" error. Let us call underflow error and the truncation errors together
as "representation errors". You are already familiar with representation errors: some numbers
- 35 -
have no finite representation in the decimal number system, such as 1/3 (which cannot be written
down as a finite string of numbers to the right of the decimal point). For the same reasons, many
numbers have no finite representation in binary. This includes all so-called "non-terminating"
numbers in decimal, as well as any fraction with a power of 5 in the denominator (which may
Subtraction: For our first example, let us consider the difference: 122 – 12 which are written in
Before, we subtract first we have to make lower exponent equal to higher exponent by
denormalizing it as
For subtraction subtrahend mantissa is subtracted from minuend mantissa and exponent part
Minuend .122 X 10 3
Subtrahend .012 X 10 3
Multiplication: Let us consider the product 125 * 21. This product is represented in normalized
- 36 -
For floating point multiplication of two numbers, multiplicand mantissa and multiplier mantissa
But because of the finite precision inherent in the computer (which here has only 3 digits of
precision), the result is truncated (before normalization!) to .026 X 10 5 and is then normalized to
.26 X 10 4.
Division: For floating point division of two numbers, the mantissa of dividend is divided by the
mantissa of divisor and the exponent of divisor is subtracted from the exponent of dividend as
But because of the finite precision inherent in the computer (which here has only 3 digits of
1
precision), the result is truncated (before normalization!) to .595 X 10 which is already
normalized. We notice that the representation errors can also occur during multiplication and
division operations.
4.4 Summary
In a computer system numbers are stored in a binary form. In a computer numbers are
fixed size. Therefore, in a computer system, we can store finite numbers only to the limit
- 37 -
In computers, integers can be represented in a variety of ways such as sign-magnitude
form, 1’s complement form, 2’s complement form, BCD form etc.
algorithms for arithmetic operations and hence not suitable for computers.
1’s complement representation also has two representations for zero but simpler
2’s complement representation has only one representation for zero and very simple
ammeter etc.
When the integer becomes larger than the largest integer that can be stored in a computer
system gives the overflow condition. Similarly, when the integer becomes smaller than
the smallest integer that can be stored in a computer system gives the underflow
condition.
Booth’s algorithm is fastest and widely used algorithm for multiplication in 2’s
complement.
In normalized floating-point representation, mantissa is made less than 1 and greater than
or equal to .1.
IEEE 754 floating-point numbers have three basic components: the sign, the exponent,
and the mantissa. The mantissa is composed of the fraction and an implicit leading digit.
Overflow means that values have become too large for the representation. Underflow is a
less serious problem because is just denotes a loss of precision, which is guaranteed to be
- 38 -
4.5 Suggested Readings/References
2002
3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth Edition,
MGH, 2002
Education, 2009
system?
6. Find the range of integers that can be represented in a 16-bit register when an integer is
7. Represent 2397 in 8421, excess-3, 2421, 84-2-1 and cyclic BCD codes.
- 39 -
9. Explain IEEE 754 standard for representing real numbers in a computer system. Also give
10. Represent 0, 123.2 and -76.125 in IEEE 754 single precision format.
12. If A = 25, B = 17, perform the following calculations assuming 6-bit registers
In (i) sign-magnitude, (ii) 1’s complement and (iii) 2’s complement representations and also
17. Multiply -17 by 23 and -19 by -21 using Booth’s multiplication algorithm. Show all the steps
- 40 -
Writer Dr. Rajender Nath
Chapter 5
of Boolean Expressions
Structure
5.1 Introduction
5.2 Objective
-1-
5.3.1.9.1 Converting Non-Canonical or Nonstandard Representation into
Canonical Representation
5.4Summary
5.5Suggested Readings/References
5.1 Introduction
One of the primary requirements when dealing with digital circuits is to find ways to make
them as simple as possible. This constantly requires that complex logical expressions be
reduced to simpler expressions that produce the same results under all possible conditions. The
simpler expression can then be implemented with a smaller, simpler circuit, which in turn
saves the price of the unnecessary gates, reduces the number of gates needed, and reduces the
One tool to reduce logical expressions is the mathematics of logical expressions, introduced by
George Boole in 1854 and known today as Boolean algebra. The rules of Boolean algebra are
simple and straight-forward, and can be applied to any logical expression. The resulting
-2-
reduced expression can then be readily tested with a Truth Table, to verify that the reduction
was valid.
Boolean logic forms the basis for computation in modern binary computer systems. You can
represent any algorithm, or any electronic computer circuit, using a system of Boolean equations.
This chapter provides a brief introduction to Boolean algebra, truth tables, canonical
5.2 Objective
In this chapter you will learn Boolean algebra, basic theorems of Boolean algebra, logic gates,
and universal gates. You will learn different representations of Boolean functions. You will also
learn methods of simplification of Boolean functions and roles of don’t care conditions in
simplifications.
The most obvious way to simplify Boolean expressions is to manipulate them in the same way as
normal algebraic expressions are manipulated. With regards to logic relations in digital forms, a
set of rules for symbolic manipulation is needed in order to solve for the unknowns.
A set of rules formulated by the English mathematician George Boole describe certain
propositions whose outcome would be either true or false. With regard to digital logic, these
-3-
rules are used to describe circuits whose state can be either, 1 (true) or 0 (false). In order to fully
understand this, the relations among AND gate, OR gate and NOT gate operations should be
understood. A number of rules can be derived from these relations, which will be discussed in
In 1904, E.V. Huntington formalized postulates of Boolean algebra. According to him, Boolean
Algebra is an algebraic structure defined by a set S, together with the two binary operators ‘+’
and ‘•’ provided that the following postulates are satisfied. Postulate means something that is
-4-
x • y = y • x , for each value of x and y belonging to S
5. For every element x in S there exists an inverse element (called complement, x` in S) such that
Now, this is left as an exercise for you to compare Boolean algebra and ordinary algebra.
It can be observed that first five postulates of Boolean algebra have two parts i.e. part (a) and
part (b). Part (b) can be obtained from part (a) by converting ‘+’ into ‘.’ ; ‘.’ into ‘+’; ‘0’ into ‘1’;
‘1’ into ‘0’ in part(a) or vice-versa. This property of Boolean algebra is called as Principle of
Duality. The significance of this principle is that if one theorem is proved then its dual theorem is
-5-
Proof:
= x + x’ by postulate 2(b)
=1 by postulate 5(a)
x. 1 = x (multiplication law)
Proof:
=x by postulate 2(b)
x + (x · y) = x (Redundancy Law)
Proof:
-6-
= x.(1 + y) by postulate 4(a)
= x. (y + 1) by postulate 3(a)
=x by postulate 2(b)
x · (x + y) = x
Theorem 5: A + (A’ . B) = A +B
Proof:
A .(A’ + B) = A.B
In 1938, C.E. Shannon introduced a two-valued Boolean algebra, which is known as switching
operation, • is called as AND operation and complement (`) is called as NOT operation. All the
three operations are defined by truth tables below along with their logic gates. Logic
gates are digital circuits constructed from diodes, transistors, and resistors connected in such a
way that the circuit output is the result of a basic logic operation (OR, AND, NOT) performed on
the inputs.
-7-
5.3.1.5 Logic Operations
In this paragraph logic operations such as OR, AND, NOT, NOR, NAND, XOR, NXOR etc. are
discussed with the help of truth tables and logic diagrams. A truth table is a means for describing
how a logic circuit's output depends on the logic levels present at the circuit's inputs. In the
following paragraphs, operations are defined with two inputs A & B and one output X.
1. The logic OR operation is implemented by OR gate. Symbol for OR gate and its truth table are
shown in Figure 5.1 and Table 5.1 respectively. The expression X = A + B reads as "X equals
A OR B". The + sign stands for the OR operation, not for ordinary addition. The OR operation
produces a result of 0 only when all the input variables are 0 otherwise it produces 1.
The notion of two-input OR gate can be extended to three-input OR gate. Figure 5.2 and Table
5.2 respectively shows three-input OR gate along with its truth table. It is obvious from the truth
table that output is 0 only when all inputs are 0 otherwise output is 1.
-8-
Figure 5.2 Symbol of OR Gate with 3 inputs
AND Operation: The AND operation produces a result of 1 only when all inputs are 1 otherwise
The multiplication sign (•) stands for the AND operation, By chance it is same for ordinary
multiplication of 1s and 0s. The output is 0 for any case where one or more inputs are 0. AND
operation is implemented by AND gate. The symbol and truth table for AND gate is shown
Figure 5.3 and Table 5.3 respectively. It can be observed that logic of AND gate is reverse of
that of OR gate.
-9-
Figure 5.3 symbol of AND Gate
The logic of two-input AND gate can easily be extended to three-input AND gate. Figure 5.4 and
Table 5.4 shows three-input AND gate along with its truth table. It is obvious from the truth table
that the output is 1 only when all inputs are 1 otherwise output is 0.
- 10 -
Table 5.4 Table of AND Gate with 3 inputs
NOT Operation: The NOT operation is unlike the OR and AND operation, it can be performed
on a single input variable. For example, if the variable A is subjected to the NOT operation, the
result X can be expressed as X = A' where the prime (') represents the NOT operation. This
expression is read as: “X equals NOT A” or “X equals the inverse of A” or “X equals the
complement of A”. Each of these is in common usage and all indicate that the logic value of X =
A' is opposite to the logic value of A. In NOT operation when input is 0 then output is 1 or when
input is 1 then output is 0 as shown in truth table below. The NOT operation is implemented by
NOT gate.
The symbol for NOT gate along with its truth table 5.5 is given below. In the Figure 5.5, small
- 11 -
Figure 5.5 Symbol of NOT Gate
The precedence order of Boolean operators are as (i) parenthesis (ii) NOT operator (iii) AND
operator (iv) OR operator. It means the expression within parenthesis will be solved first by
applying same precedence order. After parenthesis NOT operation then AND operation and
finally OR operation.
AND, OR and NOT are basic gates implementing AND, OR and NOT basic operations
respectively. By using these gates any circuit can be realized. Following eight Figure 5.6 show
- 12 -
Figure 5.6 Implementations of Boolean Postulates & Basic Theorems
NOR Operation: NOR means NOT OR where output of OR gate is inverted. In two-input NOR
gate output is 0 when one of the inputs or both of the inputs are 0. In other words, output is 1
only when both inputs are 0. The symbol and truth table of NOR gate is shown below in Figure
5.7 and Table 5.7 respectively. In the symbol of NOR gate there is a small circle on the output of
OR gate. This small circle represents the inversion operation. Therefore, the output expression of
X = (A + B )'
- 13 -
Figure 5.7 Symbol of NOR Gate
NAND Operation: NAND means NOT AND where output of AND gate is inverted. In two-
input NAND gate output is 1 when one of the inputs or both of the inputs are 0. In other words,
output is 0 only when both inputs are 1. The symbol and truth table of NAND gate is shown
below in Figure 5.8 and Table 5.8. In the symbol of NAND gate there is a small circle on the
output of AND gate. This small circle represents the inversion operation. Therefore, the output
- 14 -
Figure 5.8 Symbol of NAND Gate
XOR Operation: XOR means Exclusive OR. In two-input XOR gate output is 1 only when one
of the two inputs is 1. The truth table of XOR gate is as shown below in Table 5.9(a).
A B Q=A⊕B
0 0 0
0 1 1
1 0 1
1 1 0
- 15 -
The Boolean expression for XOR is Q = A`B + AB`. Table 5.9(b) shows the truth table of XOR.
A B A` B` A`B AB` Q
0 0 1 1 0 0 0
0 1 1 0 1 0 1
1 0 0 1 0 1 1
1 1 0 0 0 0 0
The symbol and realization of XOR gate is as shown below in Figure 5.9 (c) .
NXOR Operation or XNOR operation or Equivalence Operation: NXOR means NOT XOR
- 16 -
Figure 5.10 Symbol of XNOR Gate
In two-input NXOR gate output is 1 only when both inputs are equal. This is an XOR gate with
the output inverted, as shown in Figure 5.10. The truth table of NXOR gate is shown below in
Table 5.10(a):
A B Q=Aʘ B
0 0 1
0 1 0
1 0 0
1 1 1
The output Q is true if inputs A and B are the same (i.e. both true or both false). The Boolean
expression for this operation is Q = A`B`+AB, which can be proved by using truth table as
- 17 -
A B A` B` A`B` AB Q
0 0 1 1 1 0 1
0 1 1 0 0 0 0
1 0 0 1 0 0 0
1 1 0 0 0 1 1
NAND and NOR gates are called as universal gates. Because, either by using NAND gate or by
using NOR gate only all the three basic operations i.e. AND, OR and NOT can be implemented.
With the basic operations, any logic circuit can be implemented. Hence, by using NAND gate
only or by using NOR gate only, any logic circuit can be implemented. Hence, NOR and NAND
- 18 -
Figure 5.11 shows the implementation of basic operations using NAND gate only.
In a similar manner, the Figure 5.12 shows that NOR gate can implement any of the basic
Boolean operations.
Figure 5.12
In the Figure 5.13 below, the left side of the illustration shows the standard symbol for each logic
gate, and the right side shows the alternate symbol, which are used by some authors. The
alternate symbol for each gate is obtained from the standard symbol by doing the following:
Invert each input and output of the standard symbol. This is done by adding bubbles
(small circles) on input and output lines that do not have bubbles, and by removing
- 19 -
Change the operation symbol from AND to OR, or from OR to AND. (In the special case
Figure 5.13
DeMorgan's theorems are extremely useful in simplifying expressions in which a product or sum
of variables is inverted. The DeMorgan’s theorems for two variables are defined as:
- 20 -
Theorem (a) says that when the OR sum of two variables is inverted, this is the same as inverting
each variable individually and then ANDing these inverted variables. Theorem (b) says that
when the AND product of two variables is inverted, this is the same as inverting each variable
These theorems can be proved by using truth tables. The truth table below shows the proof of
1 2 3 4 5 6 7
0 0 0 1 1 1 1
0 1 1 0 1 0 0
1 0 1 0 0 1 0
1 1 1 0 0 0 0
Table 5.14
It can be observed that column 4 and column 7 are identical. Hence, the theorem is proved. On
the similar line theorem (b) can be proved by using truth table.
x = ((a'+c) • (b+d'))'
- 21 -
= (a'+c)' + (b+d')' by using theorem (a)
These theorems can be extended to n variables and can be proved by using truth tables.
A Boolean function is composed of standard logical operators and Boolean variables. For
Boolean variables. It means value of X will depend upon values of A, B, C. So, variable X is a
some authors.
Boolean functions can be expressed in a canonical form using the dual concepts
of minterms and maxterms. All logical functions are expressible in canonical form, both as a
"sum of minterms" and as a "product of maxterms". This allows for greater analysis into the
circuits.
- 22 -
A Boolean function expressed as a sum of minterms is commonly known as the "sum of
products", and its De Morgan dual is the "product of sums", which is a function expressed as
a product of maxterms.
Minterm: For a Boolean function of n variables x1,...xn, a product term in which each of
Thus, a minterm is a logical expression of n variables consisting of only the logical (.) operator
and the complement operator. For example, a.b.c, a.b'.c and a.b.c' are examples of minterms for a
a`b`c` 0 m0
a`b`c 1 m1
a`bc` 2 m2
a`bc 3 m3
ab`c` 4 m4
ab`c 5 m5
abc` 6 m6
abc 7 m7
- 23 -
There are 2n minterms of n variables - this is true since a variable in the minterm expression can
either be in the form of itself or its complement. Three variables minterms are represented in
different forms as shown in table below 5.15 ( ‘.’ Operator is omitted for simplicity).
If Table 5.16 is given a truth table of a logical function, it is possible to write the function as a
"sum of products".
A B F(A,B)
0 0 1
0 1 0
1 0 1
1 1 0
Observing that the rows that have an output of 1 are the first and third, so we can write F(A,B) as
F(A,B) = m0 + m2 or
= a'b' + ab' or
= ∑0, 2
Maxterm: A maxterm is a logical expression of n variables consisting of only the + operator and
the complement operator. Maxterms are a dual of the minterm. Instead of using ANDs and
- 24 -
complements, we use ORs and complements, and proceed similarly. For example, the following
Three variables maxterms are represented in different forms as shown in table 5.17. There are
again 2n maxterms of n variables - this is true since a variable in the maxterm expression can also
The complement of a minterm is the respective maxterm. This can be easily verified by using de
m1' = M1
(a'b)' = a+b'
a+b+c 0 M0
a+b+c` 1 M1
a+b`+c 2 M2
a+b`+c` 3 M3
a`+b+c 4 M4
a`+b+c` 5 M5
a`+b`+c 6 M6
a`+b`+c` 7 M7
- 25 -
Again observing the truth table of F(A,B) that the rows that have an output of 0 are the second
and fourth, so we can write F (A,B) as a product of maxterms in the following three different
forms.
F(A,B) = M1 .M3
= (a+b').(a'+b')
= π 1, 3
Now, it is clear that any Boolean function can be represented in either of the canonical form.
Standard Forms: The two canonical forms of Boolean algebra are basic forms. Another way to
express Boolean functions is in standard form. In this configuration, the terms that form the
function may contain one, two or any number of literals. Again, these are of two types: the sum
The sum of product form is a Boolean expression containing AND terms, called product terms,
of one or more literals each. The sum denotes the ORing of these terms. An example of this form
is given below:
The function has three product terms of one, two, and three literals each, respectively. These
- 26 -
A product of sums is a Boolean expression containing OR terms, called sum terms. Each term
may have any number of literals. The product denotes the ANDing of these terms. An example
F(a, b, c, d) = a.(b+c’).(a+c+b’+d)
This expression has three sum terms of one, two and four literals each. The product is an AND
operation.
A Boolean function can also be expressed in a nonstandard form. For example, the function:
F(a, b, c, d) = (a’.b+c.d).(a.b’+c’.d’)
Representation
A nonstandard expression can be changed to a canonical form by using Boolean postulates and
theorems.
Converting Non-canonical form into SOP form: Consider an example F = x + y’.z, which is in
standard form but not in canonical form. This can be converted into canonical form as explained
- 27 -
The first terms x is missing two variables viz. y and z. Therefore, by using x.1 = x & x+x’ = 1
This is still missing one variable viz. z. by applying same rules we get:
The second terms y’z is missing one variable viz. x. so, we get:
But x.y’.z appears twice, and according to theorem (a + a = a) , so one of the term can be
= m1 + m4 + m5 + m6 + m7
= ∑(1,4,5,6,7)
Converting Noncanonical form into POS form: In the similar way, a noncanonical form can
Example: Consider the Boolean function F = a.b + a’.c which is not in canonical form. In the
first term c is missing and in second term b is missing. Function has three variables a, b, c.
F = a.b+a’.c
- 28 -
= (a’+b).(a+c).(b+c)
The function has been transformed into standard POS form. Each OR term is missing one
variable. Therefore, the first term is missing c. So, the first term can be written as
Combining all the three terms and removing those that appear more than once, we finally obtain:
F = (a+b+c).(a+b’+c).(a’+b+c).(a’+b+c’)
= (0, 2, 4, 5)
Earlier, Boolean postulates and theorem have been presented, which can be used to simplify any
- 29 -
simplifications. Each line gives a form of the expression, and the rule or rules used to derive it
from the previous one. Generally, there are several ways to reach the final result and hence not
Example 1: Prove that x + (y. z) = (x + y). (x +z) using Boolean algebra postulates
Solution:
x + (y. z) = (x + y) . (x +z)
= x .x + x .z + y .x + y .z
= x + x .z + x .y + y .z using x + (x · y) = x
= x + x .y + y .z using x + (x · y) = x
= x + y .z Hence proved
K-maps provide an alternative technique for representing and simplifying Boolean functions. A
K-map is a pictorial method used to minimize Boolean expressions without having to use
Boolean algebra theorems and equation manipulations. It can be thought of as a special version
of a truth table.
The Karnaugh map comprises a box for every line in the truth table.
Unlike a truth table, in which the input values typically follow a standard binary sequence
(00, 01, 10, 11), the Karnaugh map's input values must be ordered such that the values for
adjacent columns vary by only a single bit, for example, 00, 01, 11, and 10. This ordering
is known as a gray code, and it is a key factor in the way in which Karnaugh maps work.
- 30 -
The Karnaugh map provides a simple and straight-forward method of minimizing
Boolean expressions. With the Karnaugh map Boolean expressions having up to four and
The Figure5.19 below illustrates the correspondence between the Karnaugh map and the
The values inside the squares are copied from the output column of the truth table, therefore
there is one square in the map for every row in the truth table 5.20.
The Karnaugh map uses the following rules for the simplification of expressions by grouping
- 31 -
Groups must not include any cell containing a zero
Groups may wrap around the table. The leftmost cell in a row may be grouped with the
rightmost cell and the top cell in a column may be grouped with the bottom cell.
There should be as few groups as possible, as long as this does not contradict any of the
previous rules.
Minimization: Note that the combination of variable values represented by any block on a K-
map differs from that of its adjacent block only in one variable, that variable being
complemented in one block and true (or uncomplemented) in the other. For example, consider
corresponds to 010 or A'BC', and m3 corresponds to 011 or A' BC. The values for A and B
remain the same while C is different in these adjacent blocks. This property where the two terms
differ by only one variable is called logical adjacency. In a K-map, then, physically adjacent
blocks are also logically adjacent. In the three variables K-map, block 2 is physically adjacent to
- 32 -
blocks 0, 3, and 6. Note that m2 is also logically adjacent to m0, m3, and m6. This adjacency
Fill the entries in the map as 1 for the minterms given in the F as shown in Table 5.21. Rest of
- 33 -
Two groups are possible, one of four 1’s and second of two 1’s as shown above. In the group of
four 1’s, two literals are eliminated viz. A & B. In the group of two 1’s, one literals is eliminated
F(A, B, C) = C + A’.B
m8 = 1000 = AB'C'D'
Also,
=AC’D’. (1)
=AC'D'
- 34 -
That is, we can combine m8 and m12. This combination is shown below in Figure 5.23 by the
grouping of 1s on the K-map. Note that by this grouping, we eliminated the variable B because it
Similarly, the grouping of m9 and m13 yields AC'D and grouping m5 and m13 yields BC'D.
This in effect is equivalent to grouping all four 1s in the top right corner of the K-map, as shown
- 35 -
Figure 5.24 Grouping in Four variable K-map
By forming a group of two adjacent 1s we eliminated 1 literal from the product term; by
grouping four adjacent 1s we eliminated 2 literals. In general, if we group 2n adjacent 1s, we can
1s as possible. The number of 1s in any group must be a power of 2; that is, 1, 2, 4, 8,. . ., etc.
Once the groups are formed, the product term corresponding to each group can be derived by the
Eliminate the variable that changes in value within the group (move from block to block
within the group to observe this change) from a product term containing all the variables
of the function.
A variable that has a value of 0 in all blocks of the group should appear complemented in
A variable that has a value of 1 in all blocks of the group should appear uncomplemented
For the group of four 1s in the above K-map the product term is AC`.
- 36 -
Some more examples of 4-variable K-Maps: F(A, B, C, D) = ∑2, 3, 4, 5, 7, 8, 10, 13, 15
(c) (d)
Figures (a), (b), (c) & (d) above shows the sequence of forming groups. From Figure (d) the
- 37 -
5.3.1.10.3 Don't-care Conditions
Up to this point we have considered logic reduction problems where the input conditions were
completely specified. That is, an n-variable truth table or Karnaugh map had 2 n entries. It is not
always necessary to fill in the complete truth table for some real-world problems. Don't cares in a
Karnaugh map, or truth table, may be either 1s or 0s, as long as we don't care what the output is
for an input condition. There are two reasons for don't-care conditions:
The corresponding combinations of inputs are impossible, therefore they never occurs.
These are represented in the Karnaugh map using X symbol. Some authors represent it by phi
symbol or * symbol. When forming groups of cells, treat the don't care cell as either a 1 or a
0. This is helpful if it allows us to form a larger group then we assume the value of don’t care
as 1 otherwise 0. There is no requirement to group all or any of the don't cares. Only use
minterms.
Place a 1 corresponding to each minterm given in the Boolean expression and X for each
don’t care minterm given in the Boolean expression and rest of the entries are filled with 0s
- 38 -
Figure 5.26 K-map with 4 inputs
In this example two don’t care conditions are combined to form a group of four otherwise
that could have been of two 1’s only. So, the simplified form of the given function is as given
below:
(Tabulation Method)
The map method is convenient as long as the number of variables does not exceed five or six, but
when the number increases it becomes difficult to use this method. The tabulation method
overcomes this difficulty, besides it is suitable for computer mechanisation. It was first
- 39 -
formulated by Quine and later improved by McCluskey. It is also known as the Quine-
Let us illustrate determination of prime implicants and essential prime implicants with the help
of an example.
First create the groups of minterms containing zero 1’s, one 1’s, two 1’s and three 1’s as shown
in first list in figure 5.27 below. Then, one can start combining minterms with other minterms. If
two terms vary by only a single digit changing, that digit can be replaced with a dash indicating
that the digit doesn't matter. Terms that are combined can be ticked.
- 40 -
Figure 5.27 Quine-McCluskey Procedure
The chart is used to remove redundant prime implicants. A grid is prepared having all the prime
implicants listed at the left and all the minterms of the function along the top. Each minterm
- 41 -
covered by a given prime implicant is marked in the appropriate position.
From the above chart Figure 5.28, BD is an essential prime implicant. It is the only prime
implicant that covers the minterm decimal 15 and it also includes 5, 7 and 13. is also an
essential prime implicant. It is the only prime implicant that covers the minterm denoted by
decimal 10 and it also includes the terms 0, 2 and 8. The other minterms of the function are 1, 3
and 12. Minterm 1 is present in and D. Similar is the case for minterm 3. We can therefore
use either of these prime implicants for these minterms. Minterm 12 is present in A and
AB , so again either can be used. Hence, essential prime implicants selected in the final answer
5.4 Summary
In 1904, E.V. Huntington formalized postulates of Boolean algebra. There are six
- 42 -
In 1938, C.E. Shannon introduced a two-valued Boolean algebra, which is known as
In two-input OR gate output is 1 only when either of the input is 1 or both of the inputs
are 1.
In two-input AND gate output is 1 only when both of the inputs are 1.
In two-input NXOR gate output is 1 only when either both of the inputs are 0 or 1.
In two-input NOR gate output is 1 only when both of the inputs are 0.
In two-input NAND gate output is 0 only when both of the inputs are 1.
NAND and NOR gates are called as universal gates. Because, either by using NAND gate
or by using NOR gate only all the three basic operations i.e. AND, OR and NOT can be
implemented.
a minterm.
There are three different ways to simplify the Boolean functions/expressions: by using
Functions that have unspecified output for some input combinations are called
- 43 -
Unspecified minterms of a functions are called don’t care conditions. We simply don’t
care whether the value of 0 or 1 is assigned to F for a particular minterm. Don’t care
Don’t care conditions play a central role in the specification and optimization of logic
2002
3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth Edition,
MGH, 2002
Education, 2009
- 44 -
5 Prove x.x = x by using Boolean postulates.
9 What are universal gates? Explain why they are called universal gates.
10 What is XOR gate? Draw the truth table for two-input and three-input XOR gate.
11 What is NXOR gate? Draw the truth table for two-input and three-input NXOR gate.
12 What are NAND and NOR gates? Draw the truth table for two-input and three-input NAND
15 Explain the concepts of minterms and maxterms used in the representation of Boolean
functions.
16 Convert the following Boolean expressions into sum of minterms (SOP) and POS forms:
(v) X’z’+y’z’+yz’+xy
(vi) AC’+B’D+A’CD+ABCD
(vii) A + B’C
17 Discuss the rules to simplify the Boolean functions using K-maps of three-variables and four-
variables.
- 45 -
18 Simplify the following Boolean functions using Boolean algebra:
(i) (X+Y.(X.Z+Z).(Y’+X.Z)’
(ii) X.Y+X’.Z+Y.Z
(iv) (A+C)(AD+AD)+AC+C
(v) A’B’C+AB’C’+AB’C+ABC’+ABC
20 What are don’t care conditions? Discuss their roles in simplifications of Boolean functions.
- 46 -
Writer Dr. Rajender Nath
Chapter 6
Combinational Circuit I
Structure
6.1 Introduction
6.2 Objective
6.3.1.1 Adders/Subtractors
6.4 Summary
- - 1
6.1 Introduction
A combinational circuit is one for which the output value is determined solely by the values of
the inputs. Such a circuit can be represented by a truth table and a Boolean function. Desired
characteristics of such a circuit are a minimum number of gates, simple rather than complex
gates, and a minimum number of levels of gates. The first two characteristics can be stated as
minimizing the number of gate inputs, which has the effect of minimizing cost. Minimizing the
number of levels minimizes the number of gate delays and makes the circuit faster.
For simple functions, it is possible to design a circuit by inspection of the function. For more
complex functions, the appropriate circuit design may not be immediately obvious. Fortunately,
there exists a completely mechanical way of designing a correct circuit for any Boolean function.
Any function represent able by a truth table can be implemented by using logic gates. A circuit
designed in this way can be a two-level circuit, plus any inverters needed to form complement
terms. Unless special steps are taken to simplify the expression, which drives the circuit design,
such a circuit may not necessarily have the minimum number of gate inputs.
6.2 Objective
In this chapter, you will learn different types of combinational circuits such as half-adder, full-
adder, half subtractor, full subtractor, parallel binary adder, BCD adder etc. At the end of this
- - 2
6.3 Presentation of Contents
Logic circuits for digital systems may be combinational or sequential. A combinational circuit
consists of logic gates whose outputs at any time are determined by combining the values of the
applied inputs using logic operations. A combinational circuit performs an operation that can be
specified logically by a set of Boolean expressions. In addition to using logic gates, sequential
circuits employ elements that store bit values. Adders, subtractors, multiplexers, demultiplexers,
Sequential circuit outputs are a function of inputs and the bit value in storage elements. These
values, in turn, are a function of previously applied inputs and stored values. As a consequence,
the outputs of a sequential circuit depend not only on the presently applied values of the inputs,
but also on past inputs. Flip-flops, registers, counters etc. are examples of sequential circuits.
A combinational circuit consists of input variables, output variables, logic gates and
interconnections. Figure 6.1 shows a block diagram of a combinational circuit with n inputs and
m outputs. The interconnected logic gates accept signals from the inputs and generate signals at
the output. The n input variables come from the environment of the circuit, and the m output
variables are available for use by the environment. Each input and output variable exists
For n input variables, there are 2n possible binary input combinations. For each binary
combination of the input variables, there is one possible binary value on each output. Thus, a
combinational circuit can be specified by a truth table that lists the output values for each
- - 3
combination of the input variables. A combinational circuit can also be described by m Boolean
functions, one for each output variable. Each such function is expressed as function of the n input
Figure 6.1
Combinational Circuit Design: The design of combinational circuit starts from a specification
of the problem and culminates in a logic diagram or set of Boolean equations from which the
logic diagram can be obtained. The procedure involves the following steps:
From the specifications of the circuit, determine the required number of inputs and
Derive the truth table that defines the required relationship between inputs and outputs.
Obtain the simplified Boolean functions of each output as function of the input variables.
- - 4
6.3.1.1 Adders/Subtractors
Adders/subtractors are combinational circuits used for adding/subtracting binary digits. In this
Half Adder
Full Adder
Half Subtractor
Full Subtractor
Parallel Adder
BCD Adder
Half adder is a combinational circuit, which performs the addition of two bits. It has two inputs
and two outputs. Two inputs are augends and addend bits and two output bits are sum bit and
carry bit. Let us designate two inputs by A and B and two outputs by S (sum) and C (carry).
- - 5
Now, the above truth table can be expressed as canonical Boolean functions as:
C(A, B) = ∑3 = AB
The Boolean function S(A, B) can be implemented by XOR gate and C(A, B) by AND gate as
HA
- - 6
6.3.1.1.2 Full Adder
A full adder is a combinational circuit that forms the arithmetic sum of three input bits. It
consists of three inputs and two outputs. Two of the input variables represent the two significant
bits to be added i.e. augends and addend bits. The third input represents the carry from the
previous lower significant position. Two outputs represent sum bit and carry bit.
The truth table of the full adder is as shown in Table 6.2 below.
C Z
S
A B CARRY CARRY
SUM
(IN) (OUT)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Now, the truth table shown in Table 6.2 can be expressed as canonical Boolean functions as:
- - 7
(now, let H = A’B + AB’ then H’ = A’B’ +AB)
= H’C + HC’
= HC + AB
Hence, Z can be implemented by using one OR gate as shown in Figure 6.4 below.
- - 8
Figure 6.5 gives the symbol of full adder.
FA
Half subtractor is a combinational circuit, which performs the subtraction of two bits. It has two
inputs and two outputs. Two inputs are subtrahend and minuend bits and two output bits are
difference bit and borrow bit. Let us designate two inputs by X and Y and two outputs by D
(Difference) and B (Borrow). Truth table of half subtractor is as shown in Table 6.3 below:
Now, the above truth table can be expressed as canonical Boolean functions as:
B(X, Y) = ∑2 = X’Y
- - 9
The half subtractor can be implemented as shown in Figure 6.6 below.
HA
A full subtractor is a combinational circuit that forms the arithmetic difference of three input bits.
It consists of three inputs and two outputs. Two of the input variables represent the two
- - 10
significant bits to be subtracted i.e. subtrahend and minuend bits. The third input represents the
borrow from the previous lower significant position. Two outputs represent difference bit and
borrow bit.
The truth table of the full subtractor is as shown in Table 6.4 below.
C D Z
B
Borrow (IN) Difference Borrow (OUT)
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
Now, the above truth table can be expressed as canonical Boolean functions as:
= H’C + HC’
- - 11
Hence, D can be implemented by two half subtractors.
= H’C + A’B
Hence, Z can be implemented using by one OR gate as shown in Figure 6.8 below.
FS
- - 12
6.3.1.1.5 Parallel Binary Adder
The adders discussed in the previous section have been limited to adding single-digit binary
numbers and carries. The largest sum that can be obtained using a full adder is (11)2. Parallel
adders let us add multiple-digit numbers. A n-bit parallel binary adder is a combinational circuit
that can add two n-bit binary numbers. It can be realized by using n full adders or by using n-1
For example, 3-bit parallel binary adder can add two 3-bit binary numbers. Let augend is
X2X1X0 and addend is Y2Y1Y0 then sum can be of four bits CoutZ2Z1Z0 as shown below.
X2X1X0 augends
Y2Y1Y0 addend
---------------------------
---------------------------
Circuit for this parallel binary adder can be realized either by two full adders and one half
adder as shown in Figure 6.10 or with three full adders as shown in Figure 6.11 below:
- - 13
Figure 6.10: 3-bit Parallel Binary Adder Using 2 Full Adders and 1 Half Adder
Thus, to add two 4-bit numbers to produce a 4-bit sum (with a possible carry), we need four
full adders with carry lines cascaded, as shown in Figure 6.12 below.
- - 14
Figure 6.12: 4-bit Parallel Binary Adder
BCD Addition: BCD, or binary-coded decimal, represents the 10 decimal digits in terms of
binary numbers. It is possible to build digital hardware that manipulates BCD directly, and such
hardware could be found in early computers and many hand-held calculators. The BCD system
- - 15
was chosen for the internal number system in these machines because it is easy to convert it to
alphanumeric representations for printouts and displays. The compelling advantages of BCD
have waned over time, and these digits are supported by more modern hardware simply to
provide backward compatibility with earlier generations of machines. In this section, we briefly
For example, let's consider the addition of the two BCD digits 5 and 3:
The sum is 1101 = 13, but this result should be correctly represented as 0001 0011 in BCD
notation. There is a simple way to find the correct result. We add 6 (0110) to the digit sum if it
In both cases, by adding six we obtain the correct answer in BCD. Using this logic, now, we
- - 16
BCD adder: A BCD adder is a combinational circuit that adds two BCD digits and input carry
in parallel and produces a sum digit also in BCD and output carry. When we add two BCD digits
we get the 0 to 19 possible sums. The highest possible sum will be 19 (= 9(first digit)+9(second
digit)+1(carry)). Table below shows the possible binary sum and BCD sum.
It is observed from the table that up to decimal sum 9, binary sum and BCD sum are same.
Therefore, binary 0110 should not be added to the binary sum in order to convert it into the BCD
sum. In rest of cases, binary 0110 should be added to the binary sum in order to convert it into
the BCD sum. Observing the Table 6.5, we find that correction of binary 0110 should be added
to the binary sum in the following cases: when K is 1 or Z3 & Z2 are 1 or Z3 & Z1 are 1. This
K+Z3Z2+Z3 Z1
K Z3 Z2 Z1 Z0 C S3 S2 S1 S0
0 0 0 0 0 0 0 0 0 0 0
1 0 0 0 0 1 0 0 0 0 1
2 0 0 0 1 0 0 0 0 1 0
3 0 0 0 1 1 0 0 0 1 1
4 0 0 1 0 0 0 0 1 0 0
5 0 0 1 0 1 0 0 1 0 1
6 0 1 1 0 0 0 1 1 0 0
- - 17
7 0 0 1 1 1 0 0 1 1 1
8 0 1 0 0 0 0 1 0 0 0
9 0 1 0 0 1 0 1 0 0 1
10 0 1 0 1 0 1 0 0 0 0
11 0 1 0 1 1 1 0 0 0 1
12 0 1 1 0 0 1 0 0 1 0
13 0 1 1 0 1 1 0 0 1 1
14 0 1 1 1 0 1 0 1 0 0
15 0 1 1 1 1 1 0 1 0 1
16 1 0 0 0 0 1 1 1 0 0
17 1 0 0 0 1 1 0 1 1 1
18 1 0 0 1 0 1 1 0 0 0
19 1 0 0 1 1 1 1 0 0 1
A BCD adder must include the correction logic discussed above in its internal construction. To
add 0110 to the binary sum, we use a second 4 bit binary adder to produce the binary sum. When
the K+Z3Z2+Z3 Z1 is equal to zero, nothing is added to the binary sum. When it is equal to one
binary 0110 is added to the binary sum through another 4 bit binary adder. Figure 6.13 shows the
- - 18
Figure 5.13: BCD Adder
By cascading such BCD adders, we can design parallel BCD adders. Parallel BCD adders are
6.4 Summary
A combinational circuit consists of logic gates whose outputs at any time are determined
Half adder is a combinational circuit, which performs the addition of two bits.
A full adder is a combinational circuit that forms the arithmetic sum of three input bits. It
- - 19
Half subtractor is a combinational circuit, which performs the subtraction of two bits. It
A full subtractor is a combinational circuit that forms the arithmetic difference of three
An n-bit parallel binary adder is a combinational circuit that can add two n-bit binary
numbers. It can be realized by using n full adders or by using n-1 full adders and one half
adder.
To reduce the computation time, we can devise faster ways to add two binary numbers by
A BCD adder is a circuit that adds two BCD digits in parallel and produces a sum digit
also in BCD.
2002
3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth Edition,
MGH, 2002
Education, 2009
- - 20
6.6 Self Assessment Questions
2. What is half adder? Draw its truth table and logic circuit diagram.
3. What is full adder? Draw its truth table and logic circuit diagram.
4. What is full adder? Draw its truth table and logic circuit diagram by using two half adders
5. What is half subtractor? Draw its truth table and logic circuit diagram.
6. What is full subtractor? Draw its truth table and logic circuit diagram.
7. What is full subtractor? Draw its truth table and logic circuit diagram using two half
8. What is parallel binary adder? Draw a logic circuit diagram for a 4-bit parallel binary
adder.
10. What is carry look-ahead parallel adder? Draw its logic diagram and explain its working.
- - 21
Writer Dr. Rajender Nath
Chapter 7
Combinational Circuit II
Structure
7.1 Introduction
7.2 Objective
7.3.1.2 Decoder
7.3.1.3 Encoder
7.3.1.4 Multiplexer
7.3.1.5 Demultiplexer
7.4 Summary
1
7.5 Suggested Readings/References
7.1 Introduction
In the last chapter, we discussed various types of combinational circuits such as half
adder/subtractor, full adder/subtractor, parallel binary adder, BCD adder etc. In this
chapter, we will discuss some more combinational circuits such as code converters,
7.2 Objective
At the end of this chapter, you would be able to design code converters, decoders,
A combinational circuit consists of input variables, output variables, logic gates and
interconnections. The interconnected logic gates accept signals from the inputs and
generate signals at the output. The n input variables come from the environment of the
circuit, and the m output variables are available for use by the environment. Each input
and output variable exists physically as a binary signal that represents logic 1 or logic 0.
2
Different types of combinational circuits are used in a computer system. We can design a
combinational circuit to convert any code into another code. For example, we can design
a code converter, which can convert Hollerith code into ASCII code. Decoder circuits are
used to decode addresses of memory locations or I/O devices. Encoder circuits are used
in keyboards. Multiplexer and demultiplexer circuits are used in the design of buses.
Code converter is a combinational circuit that is used for converting one code to another
code. These can be used to make two systems using different codes compatible.
Need for code converters: The availability of a large variety of codes for the same
discrete elements of information results in the use of different codes by different digital
systems. It is sometimes necessary to use the output of one system as the input to another.
A conversion circuit must be inserted between the two systems if each uses different
codes for the same information. For example, there are many character codes such as
ASCII, EBCDIC, Unicode etc. if different computers use different character codes then
to transfer text stored in one computer to another computer requires code converter.
BCD to Excess–3 Code Converter: For example consider the conversion of BCD
numbers to Excess – 3 code. Truth table for this code conversion is given in Table 7.1.
From the truth Table 7.1, we get the following four Boolean functions:
W(A, B, C, D) = ∑(5, 6, 7, 8, 9 ) + don’t care conditions ∑ (10, 11, 12, 13, 14)
3
X(A, B, C, D) = ∑( 1, 2, 3, 4, 9 ) + don’t care conditions ∑ (10, 11, 12, 13, 14)
A B C D W X Y Z
0 0 0 0 0 0 1 1
0 0 0 1 0 1 0 0
0 0 1 0 0 1 0 1
0 0 1 1 0 1 1 0
0 1 0 0 0 1 1 1
0 1 0 1 1 0 0 0
0 1 1 0 1 0 0 1
0 1 1 1 1 0 1 0
1 0 0 0 1 0 1 1
1 0 0 1 1 1 0 0
Simplifying these Boolean functions by using K-maps we get the following simplified
Boolean functions:
W = A + BC+BD=A+B(C+D)
4
X = B’C+B’D+BC’D’=B’(C+D) +B(C+D)’
Y = CD+C’D’=CD+(C+D)’
Z = D’
Using these Boolean functions we can draw a circuit diagram (which is left for the
readers to draw).
This code converter can also be developed by using 4-bit parallel binary adder discussed
in the previous chapter. One 4-bit number is BCD code another 4-bit number is 0011 (i.e.
3). At the output of 4-bit parallel binary adder you will get excess-3 code.
7.3.1.2 Decoder
A decoder is a combinational circuit that has n input lines and maximum 2 n output lines.
At a given time only one output line is high depending upon inputs. If an enable input is
used for the decoder then it must be ON for the decoder to function, otherwise its outputs
assume a single "disabled" output code word. Decoding is necessary in applications such
An AND gate can be used as the basic decoding element, because its output is HIGH
only when all its inputs are HIGH. For example, if the input binary number is 0110, then,
to make all the inputs to the AND gate HIGH, the two outer bits must be inverted using
two inverters.
5
There are many different types of decoders:
A 2-to-4 line decoder is a combinational circuit that has 2 input lines and 4 output lines.
In this decoder, we have not considered enable input. Let two inputs are A0 and A1 and
four outputs are D0, D1, D2, and D3. The truth table of the decoder is as shown in Table
7.2:
A1 A0 D0 D1 D2 D3
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
From the above truth table following Boolean functions can be written:
D0(A1, A0) = ∑0
D1(A1, A0) = ∑1
6
D2(A1, A0) = ∑2
D3(A1, A0) = ∑3
Now, using these four Boolean functions, the circuit diagram for 2-to-4 Line Decoder can
A 3-to-8 line decoder is a combinational circuit that has 3 input lines and 8 output lines.
Let three inputs are A, B, C and eight outputs are D0, D1, D2, D3, D4, D5, D6, and D7. The
From the above truth table given in Table 7.3 the following Boolean functions can be
written:
7
D0(A, B, C) = ∑0
D1(A, B, C) = ∑1
D2(A, B, C) = ∑2
D3(A, B, C) = ∑3
D4(A, B, C) = ∑4
D5(A, B, C) = ∑5
D6(A, B, C) = ∑6
D7(A, B, C) = ∑7
A B C D0 D1 D2 D3 D4 D5 D6 D7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1
8
Figure 7.3 Circuit diagram for 3-to-8 Line Decoder (Binary-to-Octal Decoder)
Now, using these eight Boolean functions, the circuit diagram for 3-to-8 Line Decoder
9
Applications of 3-to-8 Line Decoder: Now we enumerate few applications of the 3 to 8
line decoder.
The output lines of the decoder corresponding to the minterms of the function are
Any combinational circuit with n inputs and m outputs can be implemented with
For example, you can convert 3-to-8 Line Decoder into full adder by using two OR gates.
X Y Z S C
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
10
Boolean functions for S and C can be written as:
S(X, Y, Z) = ∑1, 2, 4, 7
C(X, Y, Z) = ∑3, 5, 6, 7
Now, the full adder can be implemented by using two OR gates as shown in Figure
7.4(a).
In the similar way, you can implement full subtractor by using 3-to-8 Line Decoder. This
11
7.3.1.2.3 The 4-to-16 Line Decoder
0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
0 1 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
0 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 1 1 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0
1 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
This decoder takes 4-bit binary number as an input and produces an output on one of 16
output lines. Let the four inputs are A0, A1, A2 , A3 and 16 outputs are D0, D1, D2, D3, D4,
12
D5, D6, D7, D8, D9, D10, D11, D12, D13, D14, D15. We can draw the truth table for this
From the above truth table the following Boolean functions are obtained:
13
D13(A0, A1, A2, A3) = ∑13
Now, using these sixteen Boolean functions, the circuit diagram for 4-to-16 Line Decoder
A0 A1 A2 A3 D0 D1 D2 D3 D4 D5 D6 D7 D8 D9
0 0 0 0 1 0 0 0 0 0 0 0 0 0
0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 1 0 0 0 1 0 0 0 0 0 0 0
0 0 1 1 0 0 0 1 0 0 0 0 0 0
0 1 0 0 0 0 0 0 1 0 0 0 0 0
0 1 0 1 0 0 0 0 0 1 0 0 0 0
0 1 1 0 0 0 0 0 0 0 1 0 0 0
0 1 1 1 0 0 0 0 0 0 0 1 0 0
1 0 0 0 0 0 0 0 0 0 0 0 1 0
1 0 0 1 0 0 0 0 0 0 0 0 0 1
This decoder takes 4-bit binary number as an input and produces an output on one of 10
output lines. Let the four inputs are A0, A1, A2 , A3 and 10 outputs are D0, D1, D2, D3, D4,
14
D5, D6, D7, D8, D9. This decoder is also called as BCD decoder as it can decode the 10
digits of the BCD number. We can draw the truth table for this decoder as given in Table
7.6.
From the above truth table the following Boolean functions are obtained:
D0(A0, A1, A2, A3) = ∑0 + don’t care conditions ∑10, 11,12, 13, 14, 15
D1(A0, A1, A2, A3) = ∑1 + don’t care conditions ∑10, 11,12, 13, 14, 15
D2(A0, A1, A2, A3) = ∑2 + don’t care conditions ∑10, 11,12, 13, 14, 15
D3(A0, A1, A2, A3) = ∑3 + don’t care conditions ∑10, 11,12, 13, 14, 15
D4(A0, A1, A2, A3) = ∑4 + don’t care conditions ∑10, 11,12, 13, 14, 15
D5(A0, A1, A2, A3) = ∑5 + don’t care conditions ∑10, 11,12, 13, 14, 15
D6(A0, A1, A2, A3) = ∑6 + don’t care conditions ∑10, 11,12, 13, 14, 15
D7(A0, A1, A2, A3) = ∑7 + don’t care conditions ∑10, 11,12, 13, 14, 15
D8(A0, A1, A2, A3) = ∑8 + don’t care conditions ∑10, 11,12, 13, 14, 15
D9(A0, A1, A2, A3) = ∑9 + don’t care conditions ∑10, 11,12, 13, 14, 15
Now, simplify the above 10 Boolean functions by using K-Maps and draw the circuit
diagram. The resultant circuitry requires lesser number of inputs to the AND gates.
15
Figure 7.5: 4X10 Line Decoder
A 4-to-10-line decoder can also be constructed from a 4-to-16-line decoder by using first
10 output lines (i.e. from D0 to D10) of the 4-to-16-line decoder and making remaining 6
outputs redundant as shown in Figure 7.5. Circuit has been realized using NAND gates
and NOT gates. It can also be realized by using AND gates and NOT gates.
16
7.3.1.3 Encoder
An encoder has 2n (or less) input lines and n output lines. At a time out of 2n input lines,
only one input line will be high. The output lines generate the binary code for the high
input line. An encoder is a combinational circuit that produces a reverse operation from
Inputs Outputs
D7 D6 D5 D4 D3 D2 D1 D0 Z Y X
1 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 1
0 0 1 0 0 0 0 0 0 1 0
0 0 0 1 0 0 0 0 0 1 1
0 0 0 0 1 0 0 0 1 0 0
0 0 0 0 0 1 0 0 1 0 1
0 0 0 0 0 0 1 0 1 1 0
0 0 0 0 0 0 0 1 1 1 1
17
The octal to binary encoder consists of eight inputs, one for each of the eight octal digits,
and three output lines that generate the corresponding binary number. The truth table for
From the above truth table, we can obtain the following Boolean functions:
X = D1 + D3 + D5 + D7
Y = D2 + D3 + D6 + D7
Z = X4 + X5 + X6 + X7
The circuit diagram of the octal to binary encoder is as shown in Figure 7.6.
18
There are two ambiguities associated with the design of encoders:
Only one input can be active at any given time. If two inputs are active
An output with all zeroes can be generated when all the inputs are zeroes or D0 is 1.
7.3.1.4 Multiplexer
Multiplexer is a combinational circuit that has 2n input lines and one output line. In this n
control lines are used to select one input line out of 2n lines and the selected input is
An 2-to-1 Line Multiplexer is a combinational circuit that has 21 ( = 2) input lines and
one output line. Only 1 control line is used to select one input line out of 2 lines and the
In the truth table given in Table 7.8, A and B are two input lines, S is a selector (control)
line and Z is output line. If S=0 then input line A is selected i.e. whatever input at A is the
same will appear at output Z. Similarly, if S=1 then input line B is selected i.e. whatever
input at B is the same will appear at output Z. Now, the Boolean function for this truth
19
S A B Z
1 1 1
1 0 1
0
0 1 0
0 0 0
1 1 1
1 0 0
1
0 1 1
0 0 0
It can be realized with two 2-input AND gates, one 2-input OR gate and one NOT gate as
20
7.3.1.4.1 The 4-to-1 Line Multiplexer
An 4-to-1 Line Multiplexer is a combinational circuit that has 22 ( = 4) input lines and
one output line. Two control lines are used to select one input line out of 4 lines and the
selected input is geared to the output line. Let four input lines are designated by I0, I1, I2,
I3, two control/selection lines are designated by S0, S1 and output line is designated by F.
Table 7.9 gives the relationship between control lines values and selection of input line.
0 0 I0
0 1 I1
1 0 I2
1 1 I3
Figure 7.9 shows the truth tables and logic circuit diagram of the 4-to-1 Line Multiplexer.
A 2-to-4 line decoder is used to select one input line, which is to be connected to the
output line as shown in the diagram as in Figure 7.9. Inputs to the decoder are two control
signals S0 and S1. If S0 = 0 & S1 = 0 then line I0 is selected and connected to output line F.
0 then line I2 is selected and connected to output line F and If S0 = 1 & S1 = 1 then line I3
is selected and connected to output line F. Truth tables below shows that output on F will
21
Figure 7.9: 4-to1 Line Multiplexer
22
7.3.1.5 Demultiplexer
is a combinational circuit that has one input line and 2n output lines. The n control
lines are used to select one output line out of 2n lines and the input line is connected
The 1-to-4 line Demultiplexer: It is a combinational circuit that has one input line
and 22 (= 4) output lines. 2 control lines are used to select one output line out of 4
lines and the input line is connected to the selected output line.
Let four output lines are designated by F0, F1, F2, F3, two control/selection lines are
designated by S0, S1 and input line is designated by I0. Table 7.10 shows the relationship
0 0 F0
0 1 F1
1 0 F2
1 1 F3
23
Figure 7.10 below shows the truth tables and logic circuit diagram of the 1-to-4 Line
demultiplexer. A 2-to-4 line decoder is used to select one output line to which input line
is to be connected as shown in the diagram. Input to the decoder are two control signals
S0 and S1, and input line I0. Control signals select the output line as given in truth table of
Another common and very useful combinational logic circuit is that of the Digital
Comparator circuit. Digital or Binary Comparators are made up from standard AND,
NOR and NOT gates that compare the digital signals at their input terminals and
24
produces an output depending upon the condition of the inputs. For example, whether
Digital Comparators can compare a constant or variable for example A (A1, A2, A3, ....
An, etc) against that of a constant or another variable say B (B1, B2, B3, .... Bn, etc) and
produce an output depending upon the result. It produces the following three output
conditions:
A > B, A = B, A < B
This is useful if we want to compare two values and produce an output when the
1-bit comparator circuit is a combinational circuit, which can compare two numbers each
of 1 bit. Let two 1-bit numbers are represented by A and B and three output conditions
that A = B, and the output at E indicates that A > B. Truth table of the 1-bit comparator
Inputs Outputs
B A E=A>B D=A=B C=A<B
0 0 0 1 0
0 1 1 0 0
1 0 0 0 1
1 1 0 1 0
25
Now, the Boolean expressions for C, D and E can be written as:
C = A’B
D = A’B’ + AB = (A’B+AB‘)‘
E = AB’
The circuit diagram for the 1-bit comparator circuit can be drawn as shown in figure
below:
By extending this notion, we can design 2-bit comparator, 3-bit comparator and n-bit
comparator circuits.
Now, let us design a 4-bit comparator circuit. To design 4-bit or n-bit comparator
26
circuit an algorithm is formulated. Step-by-step procedure to design a 4-bit comparator
A A3 A2 A1 A0
B B3 B2 B1B0
operation)
significant digits. If the two digits are equal, we compare the next lower significant pair
of digits. The comparison continues until a pair of unequal digits is reached. The
27
Now, the circuit diagram of 4-bit comparator circuit can be designed as shown in Figure
7.12 below.
7.4 Summary
A combinational circuit consists of logic gates whose outputs at any time are
determined by combining the values of the applied inputs using logic operations.
28
An encoder is a combinational circuit that performs the inverse operation of a
decoder. If a device output code has fewer bits than the input code has, the device
A binary decoder has n inputs and 2n outputs. Only one output is active at any one
Multiplexer is a combinational circuit that has 2n input lines and one output line. n
control lines are used to select one input line out of 2 n lines and the selected input
a combinational circuit that has one input line and 2n output lines and n control
lines are used to select one output line out of 2n lines and the input line is
Code converter is a combinational circuit that is used for converting one code to
another code thus making the two systems using different codes compatible.
PHI, 2002
29
4. John D. Carpinelli, Computer System Organization and Architecture, Pearson
Education, 2009
2. Design 3X8 line decoder and convert this into full adder.
3. Design 3X8 line decoder and convert this into full subtractor.
10. What is encoder? Design an octal to binary encoder. Also discuss the applications
of encoders.
30
Writer Dr. Rajender Nath
Chapter 8
Sequential Circuit I
Structure
8.1 Introduction
8.2 Objective
8.3.2 Flip-flops
8.4 Summary
8.5 Suggested Readings/References
8.1 Introduction
In the last two chapters, we learnt that the output of a combinational circuit depends
solely upon the input. The implication is that combinational circuits have no memory.
circuits whose output depends upon both the input of the circuit and its previous state.
In other words, we need circuits that have memory. For a device to serve as a
It is possible to produce circuits with memory using the digital logic gates. To do that,
we need to introduce the concept of feedback. So far, the logical flow in the circuits
studied in last chapters has been from input to output. Such a circuit is called acyclic.
Now, we introduce a circuit in which the output is fed back to the input, giving the
current value, like a memory cell. The memory elements are devices capable of
storing binary info. The binary info stored in the memory elements at any given time
defines the state of the sequential circuit. The input and the present state of the
memory element determine the output. Memory elements next state is also a function
There are two types of sequential circuits. Their classification depends on the timing
of their signals:
8.2 Objective
In this chapter you will learn sequential circuits. Sequential circuits are of two types –
synchronous and asynchronous. You will learn different types of flip flops and their logic
diagrams, working with the help of characteristics tables. The following flip flops: basic
flip-flops, clocked RS flip flop, D flip flop, JK flip flop, T flip flop, master-slave JK flip
flop, edge-triggered flip flop are presented in detail. You will also learn how can you
Sequential logic is a type of logic circuit whose output depends not only on the present
inputs but also on the previous outputs of the circuit ie output of the sequential circuit is a
characteristics:
It is a system whose behavior can be defined from the knowledge of its signals at
clock generator.
The clock pulses are distributed throughout the system in such a way that memory
elements are affected only with the arrival of the synchronization pulse.
Synchronous sequential circuits that use clock pulses in the inputs of memory
The memory elements used in clocked sequential circuits are usually clocked flip
flops.
following characteristics:
It is a sequential circuit whose behavior depends only on the order in which its
The following types of sequential circuits will be discussed in this chapter and in the next
chapter:
Flip-flops
Counters
Registers
8.3.2 Flip-Flops
A flip flop is a bi-stable sequential circuit that has two stable states – output is either
0 or 1.
A flip-flop is a digital circuit capable of serving as a one-bit memory.
A flip-flop typically includes zero, one, or two input signals; a clock signal; and an
output signal.
The major differences among various types of flip-flops are in the number of inputs
they possess and in the manner in which the inputs affect the binary state.
The different types of flip flops are RS flip flop, D flip flop, JK flip flop, T flip flop,
SR flip flop is a flip flop, which is capable of storing one bit of information. It is also
called as basic latch or basic flip flop or RS flip flop.. It has two inputs. One input is
called as S (Set) and another input is called as R (Reset). It has two outputs, which are
complement to each other. If Q is 0 then flip flop is said to be in reset state and if Q is 1
then flip flop said to be in set state. It can be constructed from two NAND gates or two
NOR gates
SR Flip Flop using NOR gates: In this, two NOR gates are wired in such a way that the
output of one feeds back to the input of another, and vice versa as shown in Figure 8.1.
The characteristic table shows the relationships between inputs and outputs of a flip flop.
Table 8.1 shows the characteristic table of SR flip flop and is explained below:
Figure 8.1 SR Flip Flop using NOR gates
The first input condition S=1 and R=0 forces the output of the second NOR gate to
low and hence Q’ is low. Both the inputs to the first NOR gate are zero so the output
The second input condition in the characteristics table is R=0, S=0. Since a 0 at the
input of a NOR gate has no effect on its output, the flip flop simply remains in its
The third input condition S=0 and R=1 forces the output of the first NOR gate to low
and hence Q is 0. Now, both the inputs to the second NOR gate are zero so the output
The fourth input condition in the characteristics table is R=0, S=0. Since a 0 at the
input of a NOR gate has no effect on its output, the flip flop simply remains in its
to low and hence Q and Q’ are low (i.e. 0), which is abnormal output as outputs must
be complement to each other. After that, if both input signals are made low then
output is unpredictable.
SR Flip Flop using NAND gates: SR Flip flop can also be designed using NAND gate.
In this, two NAND gates are wired in such a way that the output of one feeds back to the
input of another, and vice versa as shown in Figure 8.2. it can be noted that, SR flip flop
using NAND gates works in reverse logic as compared to that of SR flip flop using NOR
gates.
Table 8.2 shows the characteristic table of the SR flip flop and is explained below:
The first input condition S=1 and R=0 forces the output of the second NAND gate to
high and hence Q’ is 1. Both the inputs to the first NAND gate are one so the output
at first NAND gate Q is 0. Since Q is 0, so the flip flop is said to be in the reset state.
The second input condition in the characteristics table is R=1, S=1. Since a 1 at the
input of a NAND gate has no effect on its output, the flip flop simply remains in its
The third input condition S=0 and R=1 forces the output of the first NAND gate to
high and hence Q is 1. Now, both the inputs to the second NAND gate are one so the
output at second NAND gate is 0. Since Q is 1, so flip flop is said to be in the set
state.
The fourth input condition in the characteristics table is R=1, S=1. Since a 1 at the
input of a NAND gate has no effect on its output, the flip flop simply remains in its
The fifth input condition S=0 and R=0 forces the outputs of the both the NAND gates
to high and hence both Q and Q’ are high (i.e. 1), which is abnormal output as outputs
must be complement to each other. After that, if both input signals are made high then
output is unpredictable.
The clocked RS flip flop consists of a basic NOR flip-flop and two AND gates. The
outputs of two AND gates remain at 0 as long as the clock pulse is 0, regardless of the S
& R input values. When the clock pulse goes to 1, information from the S and R inputs is
allowed to reach the basic flip flop. The logic diagram of clocked RS flip is shown in
Figure 8.3.
Table 8.3 shows the characteristics table of the clocked RS flip flop. The set state is
reached with S=1, R=0 and CP=1. To change to the clear state inputs must be S=0, R=1
and CP=1.
Clocked D flip flop can be designed by modifying any of the RS flip flops discussed
above. The two-input of the RS flip-flop are connected through NOT gate and single
input is represented as D (D for Delay) as shown in Figure 8.4. Input to D flip flop is
available at output after delay of one clock pulse. The main characteristics of this flip flop
are:
The D input goes directly to the S input, and its complement, is applied to the R input
The D input is sampled during the occurrence of a clock pulse. If it is 1, the flip flop
switches to set state. If it is 0, the flip flop switches to reset state as shown in the
Table 8.4.
The D flip flop receives the designation from its ability to transfer data into a flip-
flop. That is what is at input the same is output after the delay of one clock pulse.
It is basically an RS flip-flop with an inverter in the R input. This reduces the number
The limitation of the clocked RS flip flop is that when two inputs are high then output is
undetermined as shown in Table 8.3. To overcome this limitation, JK flip flop is designed
by modifying clocked RS flip flop as shown in Figure 8.6. The output of the first NOR
gate is fed back into the first AND gate and the output of the second NOR gate is fed
JK flip flop is a refinement of the RS flip flop in that the indeterminate state of the RS
In a JK flip flop, J and K inputs behave like S and R in clocked RS flip flop to set and
When inputs are applied to both J and K as 1 simultaneously, flip flop switches to its
complement state as shown in Table 8.5. Hence, problem of clocked RS flip flop is
removed.
clocked SR flip-flop it still suffers from timing problems called "race-around problem”. It
occurs when both inputs are one i.e. J=1 and K=1. If the output Q changes state before
the timing pulse of the clock input goes "OFF". Then output becomes unpredictable as
output flips between 0 and 1 as long as clock pulse remains present. To avoid this, the
timing pulse period ( T ) must be kept as short as possible (high frequency). As this is
sometimes not possible with modern TTL IC's so another answer to this problem is
The T flip-flop is a single input version of the JK flip-flop. As shown in Figure 8.8 the T
flip-flop is obtained from the JK type if both inputs are tied together. The output of the T
Table 8.6 shows the characteristics table for the T flip flop. It is clear from the table that
A master-slave flip-flop is constructed from two separate flip-flops. One flip flop serves
as a master and the other as a slave. The logic diagram of the master-slave flip-flop is
shown in Figure 8.10. The master flip-flop is enabled on the positive edge of the clock
pulse CP and the slave flip-flop is disabled by the inverter. The information at the
external R and S inputs is transmitted to the master flip-flop. When the pulse returns to 0,
the master flip-flop is disabled and the slave flip-flop is enabled. The slave flip-flop then
The timing relationship is shown in Figure 7.11 and is assumed that the flip-flop is in the
clear state prior to the occurrence of the clock pulse. The output state of the master-slave
flip-flop occurs on the negative transition of the clock pulse. Some master-slave flip-flops
change output state on the positive transition of the clock pulse by having an additional
problem. When input to JK flip flop is J=1 and K=1 then output, Q toggles to 0 and 1
continuously; and it becomes uncertain to predict the output. This condition is known as
Master-slave JK flip flop as shown in Figure 8.12 is basically two gated SR flip-flops
connected together in a series configuration with the slave having an inverted clock pulse.
The outputs from Q and Q from the "Slave" flip-flop are fed back to the inputs of the
"Master" with the outputs of the "Master" flip-flop being connected to the two inputs of
the "Slave" flip-flop. This feedback configuration from the slave's output to the master's
The input signals J and K are connected to the gated "master" SR flip-flop which "locks"
the input condition while the clock (Clk) input is "HIGH" at logic level "1". As the clock
input of the "slave" flip-flop is the inverse (complement) of the "master" clock input, the
"slave" SR flip-flop does not toggle. The outputs from the "master" flip-flop are only
seen by the gated "slave" flip-flop when the clock input goes "LOW" to logic level "0".
When the clock is "LOW", the outputs from the "master" flip-flop are latched and any
additional changes to its inputs are ignored. The gated "slave" flip-flop now responds to
the state of its inputs passed over by the "master" section. Then on the "Low-to-High"
transition of the clock pulse the inputs of the "master" flip-flop are fed through to the
gated inputs of the "slave" flip-flop and on the "High-to-Low" transition the same inputs
are reflected on the output of the "slave" making this type of flip-flop edge or pulse-
triggered. The characteristic table of master-slave JK flip flop is same as that of JK flip
Then, the circuit accepts input data when the clock signal is "HIGH", and passes the data
to the output on the falling-edge of the clock signal. In other words, the Master-Slave JK
Flip-flop is a "Synchronous" device as it only passes data with the timing of the clock
signal.
The state of a flip-flop is changed by a momentary change in the input signal. This
change is called a trigger and the transition it causes is said to trigger the flip-flop. The
basic flip flops require an input trigger defined by a change in signal level. This level
must be returned to its initial level before a second trigger is applied. Clocked flip-flops
The feedback path between the combinational circuit and memory elements in the flip
flops can produce instability if the outputs of the memory elements (flip-flops) are
changing while the outputs of the combinational circuit that go to the flip-flop inputs are
being sampled by the clock pulse. A way to solve the feedback timing problem is to make
the flip-flop sensitive to the pulse transition rather than the pulse duration.
The clock pulse goes through two signal transitions: from 0 to 1 and the return from 1 to
0. As shown in Figure 8.13 the positive transition is defined as the positive edge and the
The clocked flip-flops already introduced are triggered during the positive edge of the
pulse, and the state transition starts as soon as the pulse reaches the logic-1 level. If the
other inputs change while the clock is still 1, a new output state may occur. If the flip-
flop is made to respond to the positive (or negative) edge transition only, instead of the
Another type of flip-flop that synchronizes the state changes during a clock pulse
transition is the edge-triggered flip-flop. When the clock pulse input exceeds a specific
threshold level, the inputs are locked out and the flip-flop is not affected by further
changes in the inputs until the clock pulse returns to 0 and another pulse occurs. Some
edge-triggered flip-flops cause a transition on the positive edge of the clock pulse
triggered).
right controls the output. When the D input (at lower left) is high, the lower-left latch is
set whenever the clock is low. This triggers the set input of the upper-left latch, which
sets the output latch whenever the clock is high. When the D input is low, the lower-left
latch is reset, causing the output latch to be reset whenever the clock is high.
The result is that output can only change state when the clock makes a transition from
low to high. When using different types of flip-flops in the same circuit, one must ensure
that all flip-flop outputs make their transitions at the same time, ie., during either the
Flip-flops in IC packages sometimes provide special inputs for setting or clearing the
flip-flop asynchronously. They are usually called preset and clear. They affect the flip-
flop without the need for a clock pulse. These inputs are useful for bringing flip-flops to
an initial state before their clocked operation. For example, after power is turned on in a
digital system, the states of the flip-flops are indeterminate. Activating the clear input
clears all the flip-flops to an initial state of 0. The graphic symbol of a JK flip-flop with
Table 8.7 shows the characteristics table of JK flip flop with direct clear.
8.3 Summary
A flip flop is a bi-stable sequential circuit that has two stable states – output is
either 0 or 1.
PHI, 2002
Education, 2009
3. What is flip flop? Draw the logic diagram of a basic flip flop and explain its
working.
4. What is SR flip flop? Draw the logic diagram of SR flip flop using NOR gates
5. What is SR flip flop? Draw the logic diagram of SR flip flop using NAND gates
the help of its characteristics table. What is the limitation of this flip flop?
7. What is D flip flop? Draw its logic diagram and explain its working with the help
8. What is JK flip flop? Draw its logic diagram and explain its working with the help
9. What is race around problem in JK flip flop? How can you remove it?
10. What is T flip flop? Draw its logic diagram and explain its working with the help
11. What is master-slave JK flip flop? Draw its logic diagram and explain its working
12. What are positive and negative clock pulse transitions? Explain with suitable
diagrams.
13. What is edge-triggered D flip flop? Draw its logic diagram and explain its
working.
14. What are direct inputs to flip flops? Why do you need them? Explain.
Writer Dr. Rajender Nath
Chapter 9
Sequential Circuit II
Structure
9.1 Introduction
9.2 Objective
9.3.1 Registers
9.3.2 Counters
1
9.3.2.2.2 Synchronous Binary Counters
9.4 Summary
9.1 Introduction
In the last chapter, we have discussed basic sequential circuits i.e. various types of flip-
flops. In this chapter, some advanced sequential circuits based on flip-flops are discussed
such as registers and counters. Registers consist of a set of flip-flops where each flip-flop
stores one bit of information. External gates may be used to control the inputs of the flip-
flops. Registers are widely used in the working of a computer. CPU contains registers
such as PC, MAR, MBR etc. Computer Memory can be organized by collecting a large
2
Another sequential circuit that is covered in this chapter is counter. A sequential circuit
that goes through a prescribed sequence of states upon the application of input pulses is
called a counter. Counters are generally made up of flip-flops and logic gates. Counters
also play an important role in computers. Their main applications are timing, control and
counting.
9.2 Objective
In this chapter, you will learn registers and counters. Based upon movement of data, shift
Parallel-Out (PIPO) Shift Register. We will also discuss bidirectional shift register and
We will explain synchronous and asynchronous counters and their pros and cons. In
counters the following types of counters will be discussed: binary counter, Modulo-N
counter, Presettable counter. We will also present the design procedure for designing any
3
9.3 Presentation of Contents
9.3.1 Registers
Register is a sequential circuit used to store binary information. It consists of a set of flip-
flops where each flip-flop stores one bit of information. Number of flip flops used in a
register constitute the size of the register. External gates may be used to control the inputs
of the flip-flops. That is when and how new binary information is transferred to the flip-
flops. The same clock pulse triggers all flip-flops of a register. All registers are built by
flip-flops that are sensitive to pulse transition rather than pulse duration. The flip-flops in
In shift registers, a group of flip-flops connected in a chain so that the output from one
flip-flop becomes the input to the next flip-flop. Shift regsisters can transfer information
from left to right or right to left. They can load and output information sequentially or
parallely. All the flip-flops are driven by a common clock, and all are set or reset
simultaneously.
A counter is a sequential circuit that goes through a prescribed sequence of states upon
the application of input pulses. The counter basically is a register that can go through
some pre-defined sequence of states. The counter has 0 inputs and n outputs. Thus, the
value after the clock transition depends only on old values of the outputs.
4
9.3.1.1 Shift Registers
A register is used to store a binary number. There must be one flip flop for each bit in the
binary number. The flip-flops must be connected in such a way that the binary number
can be entered into the register and possibly shifted out. A group of flip-flops connected
to provide either or both of these functions is called a shift register. Figure 9.1 shows the
basic movements of data in a shift register. Based upon these movements, shift registers
5
Rotate Right Shift Register (Figure 9.1 (d)) (Ring Counter)
The SISO shift register accepts data serially – that is, one bit at a time on a single line. It
produces the stored information on its output also in serial form. A basic three-bit shift
register can be constructed using three D flip-flops, as shown Figure 9.2(a) below. Three
flip-flops are attached in a series. Input is at data in and output is from data out. The
operation of the circuit is as follows. The register is first cleared, forcing all the three flip-
flops to reset states. The input data is then applied sequentially to the D input of the first
flip-flop on the left. During each clock pulse, one bit is transmitted from left to right.
Assume a data word to be 100. The least significant bit of the data has to be shifted
6
SISO register can also be designed using JK flip flops also. Figure 9.2(b) shows a 3-bit
SISO register in which JK flip-flops are cascaded in such a way that Q is connected to J,
Q' to K with clocks in parallel. J input of first JK flip flop is inverted and connected to K
A serial-in/serial-out shift register has a clock input, a data input, and a data output from
the last stage. In general, the other stage outputs are not available. Otherwise, it would be
7
The waveforms shown in Figure 9.3 are applicable to either one of the preceding two
versions of the serial-in-serial-out shift register. The three pairs of arrows show that a
three stage shift register temporarily stores 3-bits of data and delays it by three clock
periods from input to output. Some commercially available SISO shift registers is 16-bit
54F676 74F676.
For this kind of register, data bits are entered serially in the same manner as discussed
above. The difference is the way in which the data bits are taken out of the register. Once
the data are stored, each bit appears on its respective output line, and all bits are available
Four D flip-flops are cascaded in a series. Clock pulses are applied simultaneously to all
the flip-flops. CLEAR signal can be used to initialize the register to zero. Data is inputted
serially at D terminal of the first flip-flop FF0. Outputs can be obtained in parallel at
Q0Q1Q2Q3. The SIPO register can be used to change serial data into parallel data format.
That is why this register is also called as serial to parallel data format changer. The
8
practical application of the SIPO shift register is to convert data from serial format on a
single wire to parallel format on multiple wires. Some commercially available SIPO shift
registers are SN74ALS164A, SN74AHC594, CD4094 (all are 8-bit shift register).
Figure 9.5 gives a close look at the internal details of a 3-stage PIPO shift register. A
stage consists of a type D Flip-Flop for storage, and an AND-OR selector to determine
whether data will load in parallel, or shift stored data to the right. In general, these
elements will be replicated for the number of stages required. We show three stages due
to space limitations. Four, eight or sixteen bits are normal for real parts. The PISO shift
register can be used to convert parallel data into serial data. That is why this shift register
Figure 9.5 shows the parallel load path when SHIFT/LD' is logic low. The upper AND
gates serving DA DB DC are enabled, passing data to the D inputs of type D Flip-Flops Q A
9
QB DC respectively. At the next positive going clock edge, the data will be clocked from
D to Q of the three FFs. Three bits of data will load into QA QB DC at the same time.
The type of parallel load just described, where the data loads on a clock pulse is known as
synchronous load because the loading of data is synchronized to the clock. This needs to
be differentiated from asynchronous load where loading is controlled by the preset and
clear pins of the Flip-Flops, which do not require the clock. Only one of these load
methods is used within an individual device, the synchronous load being more common
in the devices.
The shift path is shown in figure 9.6 when SHIFT/LD' is logic high. The lower AND
gates of the pairs feeding the OR gate are enabled giving us a shift register connection of
Figure 9.7 shows the waveforms, which depict both parallel loading of three bits of data
and serial shifting of this data. Parallel data at DA DB DC is converted to serial data at SO.
10
Figure 9.7 Timing Diagram for PISO Shift register
What we previously described with words for parallel loading and shifting is now set
down as waveforms in Figure 9.7. As an example, we present 101 to the parallel inputs
DAA DBB DCC. Next, the SHIFT/LD' goes low enabling loading of data as opposed to
shifting of data. It needs to be low a short time before and after the clock pulse due to
setup and hold requirements. It is considerably wider than it has to be. Though, with
synchronous logic, it is convenient to make it wide. We could have made the active low
SHIFT/LD' almost two clocks wide, low almost a clock before t 1 and back high just
before t3. The important factor is that it needs to be low around clock time t 1 to enable
11
Note that at t1 the data 101 at DA DB DC is clocked from D to Q of the Flip-Flops as
shown at QA QB QC at time t1. This is the parallel loading of the data synchronous with
Some commercially available PISO shift registers are 8-bit 74HC165N, 8-bit 74LV165,
In this type of registers both input and output can be parallel. Figure 9.9 shows a four bit
parallel in parallel out register. Four D types of flip-flops are used to construct this
register. Clock pulse is applied simultaneously to all the four flip-flops. Four parallel
12
input bits are applied at I0, I1, I2, I3 inputs respectively. Four parallel output bits are
obtained from O0, O1, O2, O3 outputs respectively. The PIPO registers are also called as
data registers.
For example, we want to store 1101 binary information in this register. These four bit are
input at I0, I1, I2, I3 respectively. Clock pulse is applied to all the flip-flops simultaneously.
As soon as clock pulse is present, these four bits are loaded parallel into the register.
Some commercially available PIPO shift registers are 4-bit SN74LS395A, 8-bit
SN74ALS299 etc.
The registers discussed so far involved only right shift operations. Each right shift
operation has the effect of successively dividing the binary number by two. If the
13
operation is reversed (left shift), this has the effect of multiplying the number by two.
With suitable gating arrangement a serial shift register can perform both operations called
bidirectional shift register. A bidirectional shift register is one in which the data can be
shift either left or right. A four-bit bidirectional shift register using D flip-flops is shown
Figure 9.10.
Here a set of NAND gates are configured as OR gates to select data inputs from the right
Today, high speed bi-directional "universal" type Shift Registers such as the TTL
74LS194, 74LS195 or the CMOS 4035 are available as a 4-bit multi-function devices that
"Universal". These devices can perform any combination of parallel and serial input to
14
output operations but require additional inputs to specify desired function and to pre-load
Universal shift registers are very useful digital devices. They can be configured to
respond to operations that require some form of temporary memory, delay information
such as the SISO or PIPO configuration modes or transfer data from one point to another
in either a serial or parallel format. Universal shift registers are frequently used in
arithmetic operations to shift data to the left or right for multiplication or division.
9.3.2 Counters
A sequential circuit that goes through a prescribed sequence of states upon the
application of input pulses is called a counter. Counters are generally made up of flip-
flops and logic gates. There are three main areas where counters are used: timing,
sequencing and counting. An n-bit counter has 0 inputs and n outputs. In a counter, the
current value depends only on the previous values of the outputs. The values of the
outputs are interpreted as a sequence of binary digits. We shall designate the n outputs as
o0, o1, ..., The value of the outputs for the counter after a clock transition is a binary
number which is one plus the binary number of the outputs before the clock transition.
Let us explain this behavior more formally with a state table of the counter. As an
example, let us take a counter with n = 4. It can count from 0 to 15. The left side of the
state table given in Table 9.11 contains 4 columns, labeled o0, o1, o2, and o3. This means
15
As you see, the right hand side of the table is always one plus the value of the left hand
side of the table, except for the last line, where the value is 0 for all the outputs. That
Counters play an important role in computers. Some of them are visible to the
programmer, such as the program counter (PC). Some of them are hidden to the
programmer, and are used to hold values that are internal to the central processing unit,
The ability to clear the contents of the counter if some additional input is 1
16
The ability to count using a different representation of numbers from the normal
Asynchronous counters, also known as ripple counters, are not clocked by a common
pulse and hence every flip-flop in the counter changes at different times. The flip-flops in
an asynchronous counter is usually clocked by the output pulse of the preceding flip-flop.
The first flip-flop is clocked by an external event. A synchronous counter however, has
an internal clock, and the external event is used to produce a pulse, which is synchronized
On the other hand, a synchronous counter usually consists of two parts: the memory
element and the combinational element. The memory element is implemented using flip-
flops while the combinational element can be implemented in a number of ways. Using
logic gates is the traditional method of implementing combinational logic and is widely
used. However, there are other methods of implementing combinational logic such as
multiplexers (MUX), read-only memory (ROM) and programmable logic array (PLA).
17
The following are the pros and cons of asynchronous and synchronous counters:
while for an asynchronous counter, the propagation delays of the flip-flops add
together to produce the overall delay. Hence, more the number of flip-flops in an
The ripple counter is one in which each flip flop is triggered by the previous flip-flop,
and thus the counter has a cumulative settling time. Counters such as these are also called
serial or asynchronous binary counters. Flip-flops in these counters do not change their
state at the same time. An n-bit synchronous binary counter can count from 0 to 2n-1 and
then 0 again.
We can design a 4-bit ripple counter to count the sequence shown in Table 9.12. If we
examine a four-bit binary count sequence from 0000 to 1111, a definite pattern will be
18
Table 9.12 Count Sequence of 4-bit Ripple Counter
Note how the least significant bit (LSB) toggles between 0 and 1 for every step in the
count sequence, while each succeeding bit toggles at one-half the frequency of the one
before it. The most significant bit (MSB) only toggles once during the entire sixteen-step
design a series of frequency divider circuits, each circuit dividing the frequency of a
J-K flip-flops are ideally suited for this task, because they have the ability to "toggle"
their output state at the input of a clock pulse when both J and K inputs are made "high"
19
(1). Figure 8.13 shows the circuit diagram of the 4-bit ripple counter using JK flip-flops
clock inputs), we simply connect the clock input of each flip-flop to the Q output of the
flip-flop before it, so that when the bit before it changes from a 1 to a 0, the "falling edge"
of that signal would "clock" the next flip-flop to toggle the next bit.
20
This circuit would yield the output waveforms as shown in Figure 9.15 when "clocked"
The first flip-flop (the one with the Q0 output), has a positive-edge triggered clock input,
so it toggles with each rising edge of the clock signal. As indicated by all the other arrows
in the waveforms diagram, each succeeding output bit is toggled by the action of the
preceding bit transitioning from "high" (1) to "low" (0). This is the pattern necessary to
Another solution for generating an "up" sequence using positive-edge triggered flip-flops
is to "clock" each flip-flop using the Q' output of the preceding flip-flop rather than the Q
output as shown in Figure 9.16. Since the Q' output will always be the exact opposite
state of the Q output on a J-K flip-flop (no invalid states with this type of flip-flop), a
21
the Q' output. In other words, each time the Q output of a flip-flop transitions from 1 to 0,
the Q' output of the same flip-flop will transition from 0 to 1, providing the positive-
going clock pulse we would need to toggle a positive-edge triggered flip-flop at the right
moment.
One way we could expand the capabilities of either of the two counter circuits discussed
above is to regard the Q' outputs as another set of four binary bits. If we examine the
pulse diagram for such a circuit, we see that the Q' outputs generate a down-counting
Figure 9.17 shows the diagram of a simultaneous Up/Down ripple counter. Figure 9.18
shows waveforms outputs of up count and Figure 9.19 shows the waveforms outputs of
down count.
22
Figure 9.17 Simultaneous UP/DOWN 4-bit Ripple Counter
23
Figure 9.19 Waveforms for Simultaneous 4-bit Ripple Down Counter
In a synchronous binary counter all the flip-flops change their state at the same time
because the clock pulse is present to each flip-flop at the same time. Two synchronous
binary counters – a 4-bit synchronous binary (Up) counter and a 4-bit synchronous binary
A 4-bit synchronous binary (up) counter can count a binary sequence as given in Table
9.22 i.e. from 0 to 15. It can be constructed using four JK flip-flops. Q3, Q2, Q1, Q0
represent outputs of four flip-flops. The clock pulse is made to be present to all the four
JK flip-flops at the same time. So, all the four flip-flops change their state at the same
24
Now, look at the Table 9.20 closely. It can be seen that any given bit changes its value
(from 1 to 0 or from 0 to 1) whenever all the previous bits have a value of 1. First column
in the table (LSB) corresponds to first flip-flop, second column in the table corresponds
to second flip-flop, third column in the table corresponds to third flip-flop and fourth
column in the table (MSB) corresponds to fourth flip-flop. It is clear from the table that
first flip-flop changes its state every time when clock pulse is present. So output of first
flip flop is made input to the second flip-flop. Third flip-flop changes its state only when
outputs of first and second flip-flops are 1. So, input to the third flop-flop is AND of
outputs of first and second flip-flops. Similarly, fourth flip-flop changes its state only
when outputs of first, second and third flip-flops are 1. So, input to the fourth flop-flop is
Q3Q2Q1Q0
25
After having analyzed the bit patterns change, a circuit diagram of a 4-bit binary
A 4-bit synchronous binary (down) counter can count binary sequence from 15 to 0. To
make a synchronous "down" counter, we need to build the circuit to recognize the
appropriate bit patterns predicting each toggle state while counting down. Let us again
examine the four-bit binary count sequence given in Table 9.22 we see that all preceding
26
Q3Q2Q1Q0
Since each J-K flip-flop comes equipped with a Q' output as well as a Q output, we can
use the Q' outputs to enable the toggle mode on each succeeding flip-flop, being that each
Q' will be "high" every time that the respective Q is "low". Using four JK flip-flops and
logic explained above, a circuit diagram for a 4-bit synchronous binary (down) counter
27
Figure 9.23 A 4-bit Synchronous Binary Down Counter
The idea of Up Synchronous Binary Counter and Down Synchronous Binary Counter can
be taken one step further to design an Up/Down Synchronous Binary Counter. We can
build a counter circuit with selectable between "up" and "down" count modes by having
dual lines of AND gates detecting the appropriate bit conditions for an "up" and a "down"
counting sequence, respectively. Then use OR gates to combine the AND gate outputs to
28
Figure 9.24 A 4-bit Synchronous Binary Up/Down Counter
The Up/Down control input line simply enables either the upper string or lower string of
AND gates to pass the Q/Q' outputs to the succeeding stages of flip-flops. If the
Up/Down control line is "high," the top AND gates become enabled, and the circuit
functions exactly the same as the first ("up") synchronous counter circuit shown in Figure
9.24. If the Up/Down control line is made "low," the bottom AND gates become enabled,
and the circuit functions identically to the second ("down" counter) circuit shown in
Figure 9.24.
Normal binary counter counts from 0 to 2N - 1, where N is the number of bits (or number
of flip-flops) in the counter. In some cases, we want it to count to numbers other than 2N -
1. This can be done by allowing the counter to skip states that are normally part of the
counting sequence. There are a few methods of doing this. One of the most common
29
9.3.2.2.1 A 3-bit Synchronous Binary Mod-6 Counter
A Mod-6 counter can count a binary sequence from 0 to 5 i.e. (000, 001, 010, 011, 100,
101, 000, …). Number of flip-flops required is three as there are three bits in the highest
A 3-bit synchronous binary counter can be converted into a Mod-6 counter as shown in
Figure 9.25. Without the NAND gate, it is a 3-bit synchronous binary counter. Now, with
the NAND gate, the output from the NAND gate is connected to the asynchronous
CLEAR inputs of each flip-flop. The inputs to the NAND gate are the outputs of the B
and C flip-flops. So, all the flip-flops will be cleared when B = C = 1 (1102 = 610 ). When
the counter goes from state 101 to state 110, the NAND output will immediately clear the
counter to state 000. Once the flip-flops have been cleared, the B = C = 1 condition no
longer exists and the NAND output goes back to high. The counter will, therefore, count
from 000 to 101, and for a very short period of time, be in state 110 before the counter is
cleared. This state is called the temporary state and the counter usually only remains in a
30
temporary state for a few nanoseconds. We can essentially say that the counter skips 110
and 111 so that it goes only six different states; thus, it is a Mod-6 counter.
The BCD counter is just a special case of the Mod-N counter (where N = 10). BCD
counters are very commonly used because most human beings count in decimal. To make
a digital clock which can tell the hour, minute and second for example, we need 3 BCD
counters (for the second digit of the hour, minute and second), two Mod-6 counters (for
the first digit of the minute and second), and one Mod-2 counter (for the first digit of the
hour).
A Mod-10 counter has 10 possible states, in other words it counts from 0 to 9 and rolls
over. The first step is to determine how many flip-flops to use. Minimum number of flip-
flops required would be 4 as number of states i.e. 10<=24. We will use JK FFs for our
design. With four flip-flops, we can have total 16 states. The trick is to find a way not to
use all of those states. There must be a way to force the counter to stop counting at 9 and
roll over to 0. This is where asynchronous inputs (CLEAR) come into play. The
asynchronous inputs can over-ride the synchronous inputs and force the outputs to either
LOW or HIGH.
Looking at the Table shown in Table 8.4, the counter should run from 0000 to 1001 and
roll over to 0000 again. Since the counter has to display 1001, the next binary value 1010
will be used to reset the counter to 0. For a JK FF, we have an asynchronous input called
CLEAR, when you assert this as high, flip-flop's output goes to 0. Since, this CLEAR
31
input is high, we can use AND gate. The 2 FFs where a '1' occurs (in 1001) will be tied to
an AND gate and the output will be tied to a CLEAR inputs of all the flip-flops. When
the counter goes to 1001, the AND gate has a value '1' on its output and will activate the
CLEAR inputs of all FFs. Diagram shown in Figure 9.25 can be easily converted into
Ring counters are implemented using shift registers. It is basically a circulating shift
register in which the output of the most significant stage is fed back to the input of the
least significant stage. Figure 8.23 shows a 4-bit ring counter constructed from D flip-
flops. The output of each stage is shifted into the next stage on the positive edge of a
clock pulse. If the CLEAR signal is high, all the flip-flops except the first one FF0 are
Since the count sequence has 4 distinct states, the counter can be considered as a mod-4
counter. Only 4 of the maximum 16 states are used, making ring counters very inefficient
in terms of state usage. But the major advantage of a ring counter over a binary counter is
32
that it is self-decoding. No extra decoding circuit is needed to determine what state the
counter is in.
It is essentially a circulating shift register connected so that the last flip-flop shifts its
value into the first flip-flop. There is usually only a single 1 circulating in the register, as
The Johnson counter, also known as the twisted-ring counter, is exactly the same as the
ring counter except that the inverted output of the last flip-flop is connected to the input
of the first flip-flop. An n-stage Johnson counter yields a count sequence of length 2n, so
it may be considered to be a mod-2n counter. Figure 9.28 shows a 4-bit Johnson counter.
The state sequence for the counter is given in the Table 9.29. Again, the apparent
disadvantage of this counter is that the maximum available states are not fully utilized.
33
Figure 9.28 A 4-bit Johnson Counter
It can be noted that for both the Ring and the Johnson counter must initially be forced
into a valid state in the count sequence because they operate on a subset of the available
A Johnson counters represent a middle ground between ring counters and binary
counters. A Johnson counter requires fewer flip-flops than a ring counter but generally
more than a binary counter. It has more decoding circuitry than a ring counter but less
34
9.4 Summary
flip-flops where each flip-flop stores one bit of information. External gates may
In shift registers, a group of flip-flops connected in a chain so that the output from
one flip-flop becomes the input of the next flip-flop. All the flip-flops are driven
Shift register are of four types: SISO, SIPO, PISO, and PIPO.
The SISO shift register accepts data serially – that is, one bit at a time on a single
line. It produces the stored information on its output also in serial form.
common pulse and hence every flip-flop in the counter changes at different times.
A synchronous counter usually consists of two parts: the memory element and the
The ripple counter is one in which each flip flop is triggered by the previous flip-
flop, and thus the counter has a cumulative settling time. Counters such as these
35
A Mod-10 counter has 10 possible states, in other words it counts from 0 to 9 and
rolls over.
PHI, 2002
Education, 2009
3. How can you use shift register as data format changer? Explain.
4. Design a 3-bit SISO shift register and explain its working with the help of its
timing diagram.
6. Design a 3-bit PISO shift and explain its working with the help of its timing
diagram.
36
7. Design a 4-bit PIPO shift register.
11. Design a 4-bit ripple counter and explain its working with the help of timing
diagram.
12. Design 4-bit Up/Down ripple counter and explain its working
16. What is modulo-n counter? Design a 3-bit synchronous binary Mod-6 counter.
19. What is ring counter? Design a 4-bit ring counter. Discuss its applications.
20. What is Johnson counter? Design a 4-bit Johnson counter. Discuss the
37
Post Graduate Diploma in Computer Science and Applications
COMPUTER ORGANIZATION & NETWORKING FUNDAMENTALS
Lesson No. : 10
1. INTRODUCTION
2. OBJECTIVE
3. CONTENTS
3.1 INTRODUCTION TO COMPUTER NETWORKS
3.2 TYPES OF COMPUTER NETWORKS AND THEIR TOPOLOGIES
3.2.1 Classification by Transmission Technology
3.2.2 Classification by Area/Topology
3.3 TRANSMISSION MEDIA
4. SUMMARY
5. SUGGESTED READINGS
6. SELF ASSESSMENT QUESTIONS
1. INTRODUCTION
A transmission media can be broadly defined as anything that can carry information from a
source to a destination. In data communication, transmission medium is usually free space (air,
vacuum, and water), metallic cable, or fiber-optic cable. The information is usually a signal that
is a result of a conversion of data (in the form of 1’s and 0’s) in the form of electromagnetic or
light waves. Electromagnetic energy is a combination of electric and magnetic fields vibrating in
relation to each other. Transmission media can be guided which includes copper wires (twisted-
pair cable, coaxial cable) and fiber-optic cables or it can be unguided medium which is free
space where data is transmitted as radio waves, micro waves or infrared waves. Unguided media
are the base of wireless technology.
2. OBJECTIVE
In order to understand how data is communicated from one device to another, it is important to
understand the relationship between the communicating devices. The objective of this lesson is
to provide the basis for this relationship. Before examining the relationships and underlying
technologies, the goals and applications of computer networks are discussed in section 3.1 that
provide the motivation for networking and internetworking. Transmission technology/topology
and scale/area are the two factors that categorize networks and thus define the relationship
between the communicating devices. Section 3.2 discusses the possible line configurations
(transmission technologies): broadcast (multipoint) and point - to - point. Subsequently, the
categorization of networks according to scale – Local area, Metropolitan area and wide area
networks is described along with their architecture and design issues.
Sections 3.3 concentrates on the various types of transmission medias used for communicating
data. They have been classified as either guided or unguided (wireless). The commonly used
guided transmission media are copper media and optical fiber. Copper media exist in two forms
namely twisted pair and coaxial cable. Wireless techniques include radio waves, micro waves,
infrared and light waves. Each of these are discussed in detail along with their physical and
transmission characteristics and applications.
2
3. CONTENTS
3.1 INTRODUCTION TO COMPUTER NETWORKS
Business Applications
Mostly business organizations have a large number of computers for monitoring production,
keeping track of inventories, and for doing payroll etc. Each of the computers may work
independently but the management of the company may require extraction and correlation of
information about the entire company from these computers. Thus networking of all the
computers together may yield significant advantages which are described as follows:
Resource sharing: Goal is to make all programs, data, and equipment available to anyone on the
network without regard to the physical location of the resource and the user. This provides a high
3
availability of resources to users. For example, a group of office workers share a common
printer. A high-volume networked printer is cheaper, faster, and easier to maintain than a large
number of individual printers connected separately with each individual computer. Other devices
like scanners, CD burners etc can also be shared.
Load sharing: This is another aspect of resource sharing. Sharing load between multiple
computers connected together can reduce the delays for carrying out time intensive applications.
High reliability: High reliability can be achieved due to alternative sources of supply. For
example, all files could be replicated on two or three machines. So, if one of them is unavailable
(due to a hardware failure), the other copies could be used. In addition, the presence of multiple
CPUs means that if one goes down the others may be able to take over its work. For real time
applications such as military, banking, air traffic control etc., the ability to continue operating in
the face of hardware problems is of great importance.
Cost effectiveness: Small computers have a much better price/performance ratio than large ones.
Mainframes are roughly a factor of ten faster than the fastest single chip microprocessor, but they
cost a thousand times more. Thus it may be more appropriate to have network of low cost PCs
running in parallel rather than terminals (users) connected to a single high cost mainframe
operating in time-sharing mode. This imbalance has caused designers to build Client-Server
4
systems(described above) in which data is kept on one or more shared file server machines and
users (clients) can share (access) this data thru their personal computers connected to the
server(s) on a network. Such a network with many computers located in the same room or
building is called a Local Area Network (LAN). In contrast, there can be far flung networks
covering entire countries or continents. Such networks are called Wide Area Networks (WAN).
Scalability: A closely related point is the ability to increase system performance gradually as the
workload increases just by adding more PCs. With a central mainframe, when a system is full, it
must be replaced by a larger one, usually at great expense and with even greater disruption to the
users.
Powerful communication medium: A real time communication can be possible between two
persons sitting on-line and far apart (distant geographical locations). Two authors sitting far apart
can prepare a report together, making changes to the document and viewing it together at the
same time, instead of waiting several days for a letter.
Home Applications
Access to remote information: Access to remote information is one of the most important
applications of networks and it covers various areas such as access to financial institutions
(people can pay their bills, manage their bank accounts, and handle their investments
electronically), home shopping (on-line catalogs, instant video on any product, order placement
and home deliveries), on-line newspapers, magazines, scientific journals, on-line digital library
etc.
World Wide Web is an information access application area that provides access to information
about the arts, business, cooking, government, health, history, hobbies, recreation, science,
sports, travel and almost everything of interest. All these applications involve interactions
between a person and a remote database. News papers, magazines and scientific journals are
available online. Selected articles can be downloaded on your computer from remote locations.
On-line digital libraries are available and professional organizations such as ACM and IEEE
Computer Society have many journals and conference proceedings on-line.
5
containing text, audio and video. Real-time email allows remote users to communicate with no
delay along with seeing and hearing each other. This technology makes it possible to have virtual
meetings called videoconference, among far-flung people. Videoconferencing involves setting
up video cameras and televisions at different locations so that people at each location can see and
hear each other. In effect, they attend meetings or conferences without leaving their individual
locations. Figures and charts needed for presentations also can be broadcast for all to see.
People can also do instant messaging which allows two people to type messages to each other in
real time. When multiple persons are involved in messaging, it is known as a chat room.
Worldwide newsgroups, with discussions on every conceivable topic are another area providing
communication between a selected group of people. Here, one person posts a message and all the
subscribers to the newsgroup can read it. Unlike chat rooms, newsgroups are not real time and
messages are saved so that when someone comes back from a vacation, he or she can see all
messages posted in the meanwhile.
Another peer-to-peer communication eliminates central database by having each user maintain
his own database locally and providing a list of nearby people who are members of the system. A
new user can go to any existing member to see what he has and get a list of other members to
inspect for more information like music etc. This lookup process can build large local database.
Other communication oriented applications include using the Internet to carry telephone calls,
video phone, and Internet radio. Telelearning is also another application area where students can
attend on-line classes.
Interactive entertainment: Video on demand will provide access to any movie or any program in
any country. Live television with the audience participating in quiz shows and other similar
programs interactively is another area. Game playing in a worldwide shared 3-D virtual real
environment is another killer application where we have multiperson real time simulation games,
like hide-and-seek in a virtual dungeon, and flight simulators with the players on one team trying
to shoot players on the opposing team.
Electronic Commerce: Home shopping is a popular Internet application which enables users to
inspect the on-line catalogs of thousands of companies. Instant videos of products are also
6
provided by these catalogs. On-line technical support may also be available after a customer
buys a product.
Paying of bills, managing bank accounts etc are also E-Commerce facilities that provide access
to financial institutions.
On-line auction of second-hand goods is another area which is a peer-to-peer system rather than
client-server e-commerce.
Data communication takes places between two devices that are directly connected by some form
of point-to-point transmission medium. Often, however, it is impractical for two devices to be
directly, point-to-point connected. This is so because of one (or both) of the following reasons.
The devices are very far apart and it would be expensive to provide a dedicated link between
two devices thousands of miles apart.
There is a set of devices, each of which may require a link to many of the others at various times.
The solution to this problem is to attach each device to a communications network. The way in
which different devices are connected may be different depending upon the distance between the
devices.
Networks can thus be classified as per the following:
Transmission technology
Area / Scale
7
2. Point-to-point networks
Multipoint/Broadcast line configuration is one in which more than two specific devices share a
single link.
Broadcast networks have a single communication channel that is shared by all the machines on
the network. Short messages, called packets in certain contexts, sent by any machine are received
by all the others. An address field within the packet specifies for whom it is intended. Upon
receiving a packet, a machine checks the address field. If the packet is intended for itself, it
processes the packet; if the packet is intended for some other machine, it is just ignored.
In contrast, a point-to-point line configuration provides a dedicated link between two devices.
Point- to- point (also called store-and-forward or switched) networks consist of many
connections between individual pairs of machines. To go from the source to the destination, a
packet on this type of network may have to first visit one or more intermediate machines. Often
multiple routes, of different lengths are possible, so routing algorithms play an important role in
point to point networks.
As a general rule, smaller, geographically localized networks (Local Area Networks) tend to use
broadcasting; whereas larger networks (Wide Area Networks) usually are point to point.
Link Link
(a) Broadcast/Multipoint (b) Point-to-point
Fig.1
Network topology defines the interconnection structure of stations and links. In the following
section we will see that networks can also be classified according to area. The topologies are
discussed under each category of network. In general we have complete interconnection (mesh),
partial interconnection (partial mesh), star, tree, serial bus, and ring topologies. In addition, there
are wireless networks, which do not have a regular topology in the sense that the stations are not
physically connected to each other thru guided media (cables).
8
3.2.2 Classification by Area/Topology
Computer networks are frequently classified by the geographical area they encompass.
Accordingly a network can be a :
1. Size: LANs are restricted in size and may exist in a room, a building or a small campus.
3. Topology: Various topologies are possible for broadcast LANs. Fig. 2 shows a bus (a linear
cable) and a ring topology commonly used in LAN’s. In a bus network, at any instant one
machine is the master and is allowed to transmit. All other machines are required to refrain
9
from sending. An arbitration mechanism is needed to resolve conflicts when two or more
machines want to transmit simultaneously. The arbitration mechanism may be centralized or
distributed. IEEE 802.3, popularly called Ethernet, for example, is a bus-based broadcast
network with decentralized control operating at 10 or 100 Mbps. Computers on an Ethernet
can transmit whenever they sense no other transmission on the cable; if two or more packets
collide, each computer just waits a random time and tries again later. This mechanism is
known as Carrier Sense Multiple Access.
Bus Ring
Computers
Cable Computer
Fig 2. Two common LAN topologies
A bus topology has a multipoint configuration. One long cable acts as a backbone to link all the
devices in the network. Nodes are connected to the bus cable by drop lines and taps. A drop line
is a connection running between the device and the main cable. A tap is a connector that either
splices into the main cable or punctures the sheathing of a cable to create a contact with the
metallic core. As a signal travels along the backbone, some of its energy is transformed into heat.
Therefore, it becomes weaker and weaker the farther it has to travel. For this reason there is a
limit on the number of taps a bus can support and on the distance between those taps. A bus is
intrinsically broadcast as the shared transmission medium (twisted pair or coaxial cable)
interconnects all the stations. Simultaneous transmission by multiple stations results in
interference and so a media access control mechanism (arbitration mechanism to decide who will
transmit so that collisions do not take place) is needed to prevent or resolve contention. IEEE
802.3 Ethernet with two specifications, namely, 10Base2 and 10Base5 is a popular LAN based
on Bus topology.
10
Computer
Drop line
Cable end Tap Tap Tap Tap Cable end
Advantages of a bus topology include ease of installation. Backbone cable can be laid along the
most efficient path, and then connected to the nodes by drop lines of various lengths. In this way,
a bus uses less cabling than other topologies like mesh, star, or tree topologies. Easy expansion
of the network is possible in this topology. It is simple to tap into the transmission line at any
point, without affecting other stations. Also, only a single interface is needed to connect a
station, resulting in low expansion cost. Error and flow control are end to end and no routing is
required thereby leading to simple communication software.
Disadvantages include difficult reconfiguration and fault isolation. A bus is usually designed
to be optimally efficient at installation. It can therefore be difficult to add new devices. Signal
reflection at the taps can cause degradation in quality. This degradation can be controlled by
limiting the number and spacing of devices connected to a given length of cable. Adding new
devices may therefore require modification or replacement of the backbone. Repeaters may be
required if the length of the bus exceeds its limit (usually 1 or 2 km). All communication fails if
the transmission medium is cut, so redundant transmission lines may be required. Single
transmission line means it must be high capacity to cater for the sum of all the communication
within the network.
A second type of broadcast system is the ring topology. In a ring, each bit propagates around on
its own, not waiting for the rest of the packets to which it belongs. Typically, each bit
circumnavigates the entire ring in the time it takes to transmit a few bits, often before the
complete packet has even been transmitted. Like all other broadcast systems some rule is needed
for arbitrating simultaneous accesses to the ring. IEEE 802.5 (token ring) is a popular ring-based
LAN operating at 4 and 16 Mbps.
11
In ring topologies, each device has a dedicated point-to-point line configuration only with the
two devices on either side of it. A signal is passed along the ring in one direction, from device to
device, until it reaches its destination. Each device in the ring incorporates a repeater. When a
device receives a signal intended for another device, its repeater regenerates the bits and passes
them along (Fig. 4).
Computer
Repeater
Star topology is another topology that is used in LANs (IEEE 802.3, Ethernet LAN with 10
Base-T cabling). In a star topology, each device has a dedicated point-to-point link only to a
central controller, usually called a hub. The devices are not linked to each other.
12
Computer
Hub
A star topology is less expensive than some other topologies like mesh. In a star, each device
needs only one link and one I/O port to connect it to any number of others. This factor also
makes it easy to install and reconfigure.
Other advantages include robustness. If one link fails, only that link is affected. All other links
remain active. This factor also lends itself to easy fault identification and fault isolation.
More cabling is required in a star than in a ring or bus topology. Further, all communication
depends on the control hub and hence any fault in it will stop all the communication. This leads
to low reliability. IEEE Ethernet with 10BaseT specification is based on this topology.
Tree or Hierarchical topology is an extension of the star topology and so has very similar
characteristics.
13
Metropolitan Area Network
A Metropolitan area network (MAN) is a network designed to extend over an entire city. When
LANs in close proximity need to exchange data, they can be connected privately using cable and
routers or gateways. When LANs of a single enterprise are distributed over a large area (such as
a city or a large campus), however, privately owned connecting infrastructure is impractical.
Even if cables can be laid down, a better alternative is to use the services of existing utilities such
as a telephone company. One of these services is switched multimegabit data service (SMDS),
which normally uses another protocol called DQDB (IEEE 802.6).
MANs interconnect various buildings or other facilities within this city wide area. MANs
connect LANs and BNs (Backbone) located in different areas to each other and to wide area
networks. MANs typically span from 3 to 30 miles.
A MAN may be single network such as a cable television network, or it may be a means of
connecting a number of LANs into a larger network so that resources may be shared LAN-to-
LAN as well as device-to-device. For example, a company can use a MAN to connect the LANs
in all of its offices throughout a city.
A MAN may be wholly owned and operated by a private company, or it may be a service
provided by a public company such as a local telephone company. Cable television operators
have also started providing Internet access thru minor modifications in the cable TV system.
Cable TV is not the only MAN. Recent developments in high-speed wireless Internet access
resulted in another MAN, which has been standardized as IEEE 802.16.
Publ i c ci t y
Net wor k
Fig. 7
14
Wide Area Networks
A Wide Area Network (WAN) provides long - distance transmission of data, voice, image, and
video information over large geographical areas that may comprise a country, a continent, or
even the whole world.
In contrast to LANs (which depend on their own hardware for transmission), WANs may utilize
public, leased, or private communication devices, usually in combinations, and can therefore
span an unlimited number of miles.
A WAN that is wholly owned and used by a single company is often referred to as an enterprise
network. A WAN interconnects computers, LANs, BNs, MANs and others data transmission
facilities on countrywide or worldwide basis. Most organizations do not build their own WANs
by laying cables, building microwave towers, or sending up satellites. Instead, most
organizations lease circuits from inter-exchange carriers (eg. telephone network) and use those to
transmit their data.
Telep ho ne co mpan y
Cent ral o ffice
Swit ching
Co nnect o r cable
Mo dem
15
The network in Fig 8 is a point-to-point wide area network. A microcomputer is connected to a
remote host mainframe computer. This simple network includes:
Terminal or microcomputer: human to machine interface device where people can enter
and receive data or information.
Connector cable: This connects the microcomputer to the modem and is called a serial
cable or RS232 interface because the standard that defines which signal is carried on which
wire is the RS232 standard.
Modem: Converts the direct electrical signals (digital) produced by computer to modulated
analog signals that can be sent over telephone communication circuits.
Local Loops: Connections that interconnects your home or office to the telephone company
central office (switching office), or to the special common carrier network.
Central Office: (end office or exchange office) - Contains the switching and control
facilities that are operated by the telephone company or other special common carrier. When
we use a dial-up communication circuit, our data transmission goes through these switching
facilities. When we use a private leased circuit, the telephone company wires our circuit path
around the switching facilities to provide a clear unbroken path from one modem to the other.
Inter exchange Channels: Circuits that go from one telephone company central office to
another central office. These circuits can be microwave circuits, copper wire pairs, coaxial
cables, satellite circuits, optical fibers, or some other transmission medium. Usually lines are
leased from a ‘common carrier’ such as Telephone Company. When the message reaches the
distant host computer, it first passes through another modem, which converts the signal from
analog back to digital.
Host computer: CPU that processes our requests performs data base lookups and carries out
the processing required.
In most WANs, the network contains numerous cables or telephone lines, each one connecting a
pair of routers. If two routers that do not share a cable wish to communicate, they must do this
indirectly, via other routers. When a packet is sent from one router to another via one or more
intermediate routers, the packet is received at each intermediate router in its entirety, stored there
until the required output line is free, and then forwarded. A subnet using this principle is called a
point-to-point, store-and-forward or packet switched subnet. Nearly all WANs (except those
16
using satellites) have store-and-forward subnets. When the packets are small and all the same
size, they are called cells.
When a point-to-point subnet is used, an important design issue is what the router
interconnection topology should be. Some possible topologies are given below:
WAN topologies
Star and Mesh topology are commonly used in WANs (& MANs) (Ring, bus and Star topologies
are commonly used in LANs.)
Mesh topology: In a true (fully connected, complete) mesh topology, every node is connected
to every other node (switch, router) by a dedicated point-to-point communication circuit (line).
It is also known as a fully connected topology. The term dedicated means that the link carries
traffic only between the two devices it connects. A fully connected mesh network therefore has
n(n-1)/2 physical channels to link n devices. To accommodate that many links, every device on
the network must have n-1 input/output ports.
A complete mesh offers several advantages over other network topologies. First, the use of
dedicated links guarantees that each connection can carry its data load, thus eliminating the
traffic problems that can occur when links must be shared by multiple devices.
Second, a mesh topology is robust. If one link becomes unusable, it does not incapacitate the
entire system.
17
Finally, point-to-point links make fault identification and fault isolation easy. Traffic can be
routed to avoid links with suspected problems. This facility enables the network manager to
discover the precise location of the fault and aids in finding its cause and solution.
The main disadvantages of a mesh are related to the amount of cabling and the number of I/O
ports required.
First, because every device must be connected to every other device, installation and
reconfiguration are difficult. Second, the sheer bulk of the wiring can be greater than the
available space (in walls, ceilings, or floors) can accommodate.
And finally, the hardware required to connect each link (I/O ports and cable) can be expensive.
For these reasons a mesh topology is usually implemented in a limited fashion - for example, as a
backbone connecting the main computers of a hybrid network that can include several other
topologies.
Because of the high cost and cabling complexities of a fully connected mesh, it is seldom used.
Instead, usually one or more computers become switching centers, interconnecting computers
with others.
Telephone system is an example of such a topology. Routing becomes an important issue in such
a topology. Alternative paths are available between any two different nodes giving it a high
reliability level at low cost.
18
Star and Tree:
Fig. 11
Star topology has already been discussed in LANs. In this, each device has a dedicated point-to-
point link only to a central controller (hub or router).
Hybrid topology:
Often a network combines several topologies as subnetworks are linked together in a larger
topology.
Hub
Hub
Bus Ring
Another possibility for a WAN is a satellite or ground radio system. Each router has an antenna
through which it can send and receive. All routers can hear the output from the satellite, and in
some cases they can also hear the upward transmissions of their fellow routers to the satellite as
well. Sometimes the routers are connected to a substantial point-to-point subnet, with only some
of them having a satellite antenna.
19
3.3 TRANSMISSION MEDIA
Computers and other telecommunication devices use signals to represent data. These signals are
transmitted from one device to another in the form of electromagnetic energy. Electromagnetic
signals can travel through a vacuum, through air, or through other transmission media.
Guided (Wired).
Unguided (Wireless).
Guided or Wired media are those in which the signal energy is contained and guided within a
solid medium, and wireless or unguided media are those in which the signal propagates in the
form of unguided electromagnetic signals. Copper twisted pair, copper coaxial cable and optical
fiber are examples of guided media. The atmosphere and outer space are example of unguided
media that provide a means of transmitting electromagnetic signals but do not guide them.
Wired and Wireless media differ in a fundamental way. Wired media provide communication
media lead to well-defined discrete network topologies. Additional transmission capacity can be
procured by adding more wires. Unguided media, on the other hand, can achieve only limited
directionality and can be transmitted, as in the case of broadcast radio, in all directions making
the medium broadcast in nature. This condition leads to a network topology that is continuous in
nature. In addition, all users within receiving range of each other must share the frequency band
that is available and can thus interfere with each other. Unlike wired media, the ratio spectrum is
finite, and it is not possible to procure additional capacity. A given frequency band can be
20
Another difference between wired and wireless media is that wired media require establishing a
right-of-way through the land that is traversed by the cable. This process is complicated, costly
and time-consuming. On the other hand, systems that use wireless media do not require the
right-of-way and can be deployed by procuring only the sites where the antennas are located.
Wireless system can therefore be deployed more quickly and at lower cost.
Guided media, which are those that provide a channel from one device to another include:
Copper Media
Twisted-pair cable
Coaxial Cable
Fiber-optic Cable.
A signal traveling along any of these media is directed and contained by the physical limits of
the medium. Twisted-pair and Coaxial cable are Copper media which use metallic (copper)
conductors that accept and transport signals in the form of electrical current. Optical fiber is a
glass or plastic cable that accepts and transports signals in the form of light.
Copper Media
Twisted Pair
The least-expensive and most widely used guided transmission medium is twisted pair.
Physical Description: A twisted pair consists of two insulated copper wires arranged in a regular
spiral pattern. A wire pair acts as a single communication link. Typically, a number of these pairs
are bundled together into a cable by wrapping them in a tough protective sheath. Over longer
distances, cables may contain hundreds of pairs. The signal is transmitted through one wire in the
21
pair while a ground reference is transmitted through the other. The twisting tends to decrease the
cross talk interference between adjacent pairs in a cable. Cross talk refers to the picking up of
electrical signals from other adjacent wires. Because the wires are unshielded, there is also a
tendency to pick up noise, or interference from other electromagnetic sources such as broadcast
radio.
Transmission Characteristics: Twisted pair may be used to transmit both analog and digital
signals. For analog signals, amplifiers are required about every 5 to 6 km. For digital signals,
Compared to other commonly uses guided transmission media (coaxial cable, optical fiber),
twisted pair is limited in distance, bandwidth and date rate. Twisted pair are more prone to
attenuation (loss of signal strength with distance), noise and interference. Shielding the wire with
metallic braid or sheathing reduces interference. The twisting of the wire reduces low-frequency
interference, and the use of different twist lengths in adjacent pairs reduces cross talk.
Unshielded
Shielded
Unshielded twisted-pair cable is the most common type of telecommunication medium in use
today.
The two conductors (copper wires) have their own colored plastic insulation. The plastic
insulation is color-banded for identification. Colors are used both to identify the specific
conductors in a cable and to indicate which wires belong in pairs and how they relate to other
22
Fig. 13. Twisted-pair cable
Advantages of UTP are cost and ease of use. UTP is cheap, flexible, and easy to install. Higher
grades of UTP are used in many LAN technologies, including Ethernet and Token ring.
The Electronic Industries Association (EIA) has developed standards to grade UTP cables by
quality. Categories are determined by cable quality, with 1 as lowest and 5 (now 6 and 7) as
highest. The optimal choice for any use is the cable with the minimal quality necessary to do the
desired job safely and effectively. Each EIA category is suitable for certain uses and not for
Category 1: The basic twisted-pair cabling used in telephone systems. This level of quality is
fine for voice but inadequate for all but low-speed data communication.
Category 2: Suitable for voice and for low- speed digital data transmission of up to 4Mbps.
23
Category 3: Required to have at least 3-4 twists per foot, four pairs grouped together in a plastic
sheath for protection, and can be used for data transmission of up to 16 Mbps. It is now the
standard cable for most telephone systems. Can be used for Ethernet LANs, Fast Ethernet LANs,
Category 4: Must also have at least three twists or more per foot as well as other conditions to
bring the possible transmission rate from 16 to 20 Mbps. Used for data and voice transmission.
Suitable for Ethernet, Fast Ethernet, Gigabit Ethernet, token ring LANs.
Category 5: Used for voice and data transmission up to 100 Mbps. Much more tightly twisted -
3 to 4 twists per inch for less cross talk and better quality signal over longer distances. Contains
four pair of wires. Suitable for Ethernet, Fast Ethernet, Gigabit Ethernet, token ring, and ATM.
process is refined. Data rates of 1000Mbps. Suitable for Ethernet, Fast Ethernet, Gigabit
Category 6: 250 MHz rating (more than 1 Gbps). Suitable for Ethernet, Fast Ethernet, Gigabit
Ethernet, token ring, and ATM. Also can handle 550 MHz broadband video. High speed
Category 6 (STP): Shielded twisted pair. Rated at 600 MHz for data transmission. Suitable for
Ethernet, Fast Ethernet, Gigabit Ethernet, token ring, and high speed ATM.
Category 7: 600MHz rating. Can achieve higher speeds than Cat6. Will probably require new
connectors instead of current RJ-45. Cat7 (Class E) is the proposed international standard.
Of these, it is category 3 and category 5 cable that have received the most attention for LAN
applications.
24
Shielded Twisted pair (STP):
STP cable has a metal foil or braided-mesh covering that encases each pair of insulated
conductors (fig 15). The metal casing prevents the penetration of electromagnetic noise. It also
can eliminate a phenomenon called cross talk, which is the undesired effect of one circuit (or
channel) on another circuit (or channel). Shielding each pair of a twisted-pair cable can eliminate
most of the effects of cross talk. STP has the same quality considerations as UTP. STP also uses
the same connectors as UTP, but the shield must be connected to a ground. Materials and
manufacturing requirements make STP more expensive than UTP but less susceptible to noise.
STP can carry data at a faster speed than UTP. But it is more difficult to handle and less flexible.
Coaxial Cable
Physical Description: Coaxial cable (or coax) carries signals of higher frequency ranges than
twisted-pair cable, and so it can span longer distances at higher speeds. Its frequency ranges are
Instead of having two wires, coax has a central core conductor of solid (stiff) or stranded wire
(usually copper) enclosed in an insulating sheath, which in turn, encased in an outer conductor of
metal foil, braid or a combination of the two (also usually copper). The outer metallic wrapping
25
serves both as a shield against noise and as the second conductor, which completes the circuit.
This outer conductor is also enclosed in an insulating sheath and the whole cable is protected by
a plastic cover (fig 16).
Transmission characteristics: The construction and shielding of the coaxial cable give it a good
combination of high bandwidth and excellent noise immunity. The bandwidth possible depends
on the cable length. For 1-km cables, a data rate of 1 to 2 Gbps is feasible. Longer cables can
also be used, but only at lower data rates or with periodic amplifiers.
Baseband Coaxial is widely used in Local Area Networks. 10Base 5 (popularly called Thick
Coax) and 10Base 2 (Thin Coax) are the popular baseband cables used in 802.3 (Ethernet LAN)
cabling. 10Base 5 means that it operates at 10 Mbps, uses baseband (digital) signaling and can
support segments of up to 500 meters. 10Base 2 means it can support segments of up to 200
26
Fig. 17 (a) 10 base 5 (b) 10 base 2 (c) 10 base T
Connections to 10Base 5 are generally made using vampire taps, in which a pin is carefully
forced halfway into the coaxial cable’s core. It can support 100 machines per cable segment.
Connections to 10Base 2 are made using industry standard BNC (bayonet network connector)
connector to form T junction with a T-connector. BNC connector pushes on and locks into place
with a half turn into a T-connector. T-connector is a commonly used connector in thin Ethernet.
Thin Ethernet is much cheaper and easier to install, but it can run for only 200 meters and can
Terminators are another type of connectors, which are required for bus topologies where one
main cable acts as a backbone with branches to several devices but does not itself terminate in a
device. If the main cable is left unterminated, any signal transmitted over the line echoes back
and interferes with the original signal. A terminator absorbs the wave at the end, and eliminates
echo-back.
Broad Band Coaxial: The other kind of coaxial cable system uses analog transmission on
standard cable television cabling. It is called broadband. Broadband systems are divided up into
multiple channels, frequently the 6 MHz channels used for television broadcasting. Each channel
27
can be used for analog television, CD-quality audio (1.4 Mbps), or a digital bit stream,
independent of the others. Television and data can be mixed on one cable.
Applications:
Cable Television distribution & Cable Modem: A cable TV system can carry dozens or even
hundreds of TV channels at ranges up to miles. Existing cable television systems are arranged in
The master television signal originates at a head-end office, and unidirectional amplifiers
maintain the signal level. The signal is split along different branches until all subscribers are
reached. Because all the information flows from the head-end to the subscribers, cable
televisions were designed to be unidirectional. However, the coaxial network was not designed
to provide communications from the user to the network. Fig. 9 shows how coaxial cable
28
networks are being modified to provide upstream communications (for data) through the
directions.
Long-distance telephone network: Coaxial cable has traditionally been an important part of the
long-distance telephone network. Today, it faces increasing competition from optical fibers,
microwave, and satellite. Using frequency division multiplexing (FDM), a coaxial cable can
Short-run Computer system Links: Coaxial cable is also commonly used for short-range
connections between devices. Using digital signaling, coaxial cable can be used to provide high-
Local Area Networks & Ethernet LANs: Usage of 10Base 5 and 10Base 2 coaxial cables in
Fiber-Optic Media
The deployment of digital transmission systems using twisted pair and coaxial cable systems
established the trend towards digitization of the telephone network during the 1960’s and 1970’s.
29
These new digital systems provided significant economic advantages over previous analog
systems. Optical Fiber transmission systems, which were introduced in the 1970’s offered even
greater advantages over copper-based digital transmission systems. Copper (metallic) cables
transmit signals in the form of current whereas optical fiber, on the other hand, is made of glass
The typical T-1 or coaxial system requires repeaters about every 2 km. Optical fiber systems, on
the other hand, have maximum repeater spacing in the order of ten to hundreds of kilometers.
The introduction of optical fiber system has therefore resulted in great reduction in the cost of
digital transmission. Optical fiber systems have also allowed dramatic reductions in the space
required to house the cables. A single fiber strand is much thinner than twisted pair or coaxial
cable. Because a single optical fiber can carry much higher transmission rates than copper
systems, a single cable of optical fibers can replace many cables of copper wires. In addition,
optical fibers do not radiate significant energy and do not pick up interference from external
sources. Thus compared to electrical transmission, optical fibers are more secure from tapping
Physical Description:
The detector
Conventionally, a pulse of light indicates a 1 bit and the absence of light indicates a zero bit.
The transmission medium is an ultra-thin fiber of glass (2 to 125 µm), flexible, and capable of
conducting an optical ray. Various glasses and plastics can be used to make optical fibers. Ultra
30
pure fused silica is also used as optical fiber and gives lowest losses but it is difficult to
manufacture. Multi component glass fibers have higher losses but are more economical and
provide good performance. Plastic fiber is even less costly and can be used for short-haul links,
for which moderately high error rates (loss of signal) are acceptable.
An optical fiber cable has a cylindrical shape and consists of three concentric sections: the core,
Fig.20. (a) Side view of a single fiber (b) End view of a sheath with three fibers
At the center is the glass core through which light propagates. The core is surrounded by a glass
cladding with a lower index of refraction than the core, to keep all the light in the core. Next
comes a thin plastic jacket to protect the cladding. Fibers are typically grouped together in
bundles, protected by an outer sheath. (Fig 20 (b)). The detector or the receiving end of an
optical fiber consists of a photodiode, which gives off an electrical pulse when struck by light.
Two kinds of light sources can be used to do the signaling, LEDs (Light Emitting Diodes) and
semiconductor lasers.
Transmission Characteristics
The Nature of Light: Light is a form of electromagnetic energy. It travels at its fastest in a
31
depends on the density of the medium through which it is traveling (the higher the density the
slower is the speed).When a light ray passes from one medium to another, for example, from
fused silica to air, the ray is refracted (bent) at the silica/air boundary (fig 21).
Silica
Light source
Total internal
reflection
(a) (b)
Fig 21 (a) Three examples of a light ray from inside a silica fiber impinging on the air/silica
The amount of reflection depends on the properties of the two media (in particular, their indices
of refraction). For angle of incidence above a certain critical value, the light is refracted back into
the Silica; none of it escapes into the air. Thus a light ray incident at or above the critical angle is
trapped inside the fiber; as shown in fig-21 (b), and can propagate for many kilometers with
virtually no loss.
Propagation Modes: Fig 21(b) shows only one trapped ray, but since any light ray incident on the
boundary above the critical angle will be reflected internally, many different rays will be
bouncing around at different angles. Each ray is said to have a different mode so a fiber having
32
Reflected path
Direct
path
Applications:
The following characteristics distinguish optical fiber from twisted pair or coaxial cable:
Lower attenuation.
33
Following basic categories of application have become important for optical fiber:
Long – Haul Trunks: Optical fibers are becoming common in telephone network Backbone.
Local Area Networks: 10 BASE-FP Ethernet physical layer standard; Fiber Distribution Data
Interface (FDDI) ring-topology LAN, 100 BASE-FX Fast Ethernet physical layer standard,
Gigabit Ethernet (1000 BASE-X standards; 1000 BASE-SX & 1000 BASE-LX) all use optical
fibers.
For mobile users who need to be on-line all the time, who want to have connectivity even in an
air plane to read their e-mail through laptop, notebook, palmtop etc; twisted pair, coax and fiber
optics are of no use. Wireless also has advantages for even fixed devices in some circumstances.
For example, if running a fiber to a building is difficult due to the terrain (mountains, jungles,
When electrons move, they create electromagnetic waves that can propagate through free space
(even in vacuum). The number of oscillations per second of an electromagnetic wave is called its
By attaching an antenna of the appropriate size to an electrical circuit, the electromagnetic waves
can be broadcast efficiently and received by a receiver some distance away. All wireless
For transmission, the antenna radiates electromagnetic energy into the medium (usually air), and
for reception, the antenna picks up electromagnetic waves from the surrounding medium. There
are basically two types of configurations for wireless transmission: directional or omni
directional. For the directional configuration, the transmitting antenna puts out a focused
34
electromagnetic beam; the transmitting and receiving antennas must therefore be carefully
aligned. In the omni directional case, the transmitted signal spreads out in all directions and can
be received by many antennas. In general, the higher, the frequency of a signal, the more it is
frequency.
Radio Transmission
Radio waves are easy to generate, can travel long distances and penetrate buildings easily, so
they are widely used for communication, both indoors and outdoors. Radio waves also are omni
directional, meaning that they travel in all directions from the source, so that the transmitter and
The properties of radio waves are frequency dependent. At low frequencies, radio waves pass
through obstacles well, but the power falls off sharply with distance from the source. At high
frequencies, radio waves tend to travel in straight lines and bounce off obstacles. They are also
absorbed by rain. At all frequencies, radio waves are subject to interference from motors and
Microwave Transmission
Above 100MHz, the waves travel in straight lines and can therefore be narrowly focused.
Concentrating all the energy into a small beam using a parabolic antenna (like the familiar
satellite TV dish) gives a much higher signal to noise ratio, but the transmitting and receiving
35
In addition, this directionality allows multiple transmitters lined up in a row to communicate
with multiple receivers in a row without interference. Before fiber optics, for decades these
microwaves formed the heart of the long distance telephone transmission system.
Since the microwaves travel in a straight line, if the towers are too far apart, the earth will get in
the way. Consequently, repeaters are needed periodically. The higher the towers are, the further
apart they can be. The distance between repeaters goes up very roughly with the square root of
the tower height. For 100-m high towers, repeaters can be spaced 80 kms apart.
Unlike radio waves at lower frequencies, microwaves do not pass through buildings well. In
addition, even though the beam may be well focused at the transmitter, there is still some
divergence in space.
Physical Description:
Microwaves do not follow the curvature of the earth and therefore require line-of-sight
transmission and reception equipment. The distance coverable by a line-of-sight signal depends
on the height of the antenna: the taller the antennas, the longer the sight distance. Height allows
the signal to travel farther without being stopped by the curvature of the planet and raises the
signal above many surface obstacles, such as low hills and tall buildings that would otherwise
block transmission. Typically, antennas are mounted on towers that are in turn often mounted on
hills or mountains.
Microwave signals propagate in one direction at a time, which means that two frequencies are
reserved for transmission in one direction and the other for transmission in the other. Each
frequency requires its own transmitter and receiver. Today, both pieces of equipment usually are
36
combined in a single piece of equipment called a transceiver, which allows a single antenna to
Repeaters: To increase the distance served by terrestrial microwave a system of repeaters can be
installed with each antenna. A signal received by one antenna can be converted back into
Terrestrial microwave with repeaters provides the basis for most contemporary telephone
systems worldwide.
Satellite Communication
A communication satellite can be thought of as a big microwave repeater in the sky. It contains
several transponders, each of which listens to some portion of the spectrum, amplifies the
incoming signal, and then rebroadcasts it at another frequency, to avoid interference with the
incoming signal. The downward beam can be broad, covering a substantial fraction of the earth’s
37
Satellite microwave can provide transmission capability to and from any location on earth, no
matter how remote. This advantage makes high-quality communication available to undeveloped
parts of the world without requiring a huge investment in ground-based infrastructure. Satellite
themselves are extremely expensive, but leasing time or frequencies on one can be relatively
cheap. Based on the location of the orbit, satellites can be divided into three categories:
Geostationary Earth Orbit (GEO). Low-Earth Orbit (LEO), and Middle-Earth Orbit (MEO).
Geosynchronous Satellites (GEO): Line-of-sight propagation requires that the sending and
receiving antennas be locked onto each other’s location at all times (one antenna must have the
other in sight). For this reason, a satellite that moves faster or slower than the earth’s rotation is
useful only for short periods of time (just as a stopped clock is accurate twice a day). To ensure
constant communication, the satellite must move at the same speed as the earth so that it seems
to remain fixed above a certain spot. Such satellites are called geosynchronous.
Because orbital speed is based on distance from the planet, only one orbit can be
geosynchronous.
But one geosynchronous satellite cannot cover the whole earth. One satellite in orbit has line-of-
sight contact with a vast number of stations, but the curvature of the earth still keeps much of the
planet out of sight. It takes a minimum of three satellites equidistant from each other in
geosynchronous orbit to provide full global transmission. Fig. 25 shows three satellites, each 120
38
A new development in the communication satellite world is the development of low-cost micro
stations, sometime called VSATs (Very Small Aperture Terminals). These tiny terminals have
1-meter antenna and can put out about 1 watt of power. In many VSAT systems, the micro
stations do not have enough power to communicate directly with one another (via the satellite).
Instead, a special ground station, the hub with a large, high-gain antenna is needed to relay
In this mode of operation, either the sender or the receiver has a large antenna and a powerful
amplifier.
MEO Satellites: At much lower orbits we have MEO (Medium-Earth Orbit) satellites. As
viewed from earth, these drift slowly taking 6 hours to circle the earth. Because they are lower
than GEOs, they have a smaller footprint on ground and require less powerful transmitters to
reach them. The 24 GPS (Global Positioning System) satellites orbiting at about 18,000 km and
operated by US Department of Defence are examples of MEO satellites. GPS is used by military
forces, navigation (a driver of a car can find location of car), and clock synchronization ( cellular
telephone system uses GPS to create time synchronization between the base stations.
LEO Satellites: Moving down in altitude, we have LEO (Low-Earth Orbit) satellites. Due to
their rapid motion, large numbers of them are needed for a complete system. Because the
39
satellites are so close to the earth, the ground stations do not need much power. Three examples
of LEOs are Iridium, Globalstar, and Teledesic. Iridium is targeted at telephone users located at
odd places. These are used for paging, navigation, voice and data. Iridium relays calls from
satellite to satellite in space whereas Globalstar routes call from satellite to ground based
terrestrial network where it is switched from one to another to reach the destination satellite and
from there to the user. Teledesic is targeted at Internet users all over the world providing
broadband services.
Applications:
Television Distribution: Because of their broadcast nature, satellites are well suited to television
distribution. Programs are transmitted to the satellite and then broadcast down to a number of
Long distance Telephone Transmission: Satellite transmission is also used for point-to-point
Private Business Networks: The satellite provider can divide the total capacity into a number of
channels and lease these channels to individual business users. A user equipped with the
antennas at a number of sites can use a satellite channel for a private network. VSAT systems
have provided a low-cost alternative. A number of subscriber stations are equipped with low cost
VSAT antennas. Using some protocol, these stations share a satellite transmission capacity for
transmission to a hub station. The hub station can exchange messages with each of the
Unguided infrared and millimeter waves are widely used for short-range communication. The
remote controls used on televisions, VCRs and stereos all use infrared communication.
40
They are relatively directional, cheap and easy to build, but have a major drawback: they do not
pass through solid objects. An advantage of this is that an infrared system in one room of a
building will not interface with a similar system in adjacent rooms. Security of infrared systems
against eaves dropping is better than radio systems. No government license is needed o operate
Applications: Used in indoor wireless LANs. The computers and offices in a building can be
equipped with relatively unfocused (somewhat omni directional) infrared transmitters and
receivers. In this way, portable computers with infrared capability can be on the local LAN
without having to physically connect to it. When several people show up for a meeting with their
portables, they can just sit down in the conference room and be fully connected without having
to plug in. Infrared communication cannot be used outdoors because the sun shines as brightly in
4. SUMMARY
41
4. Topology refers to the physical or logical arrangement of a network. Devices may be
arranged in a mesh, star, tree, bus, ring or hybrid topology.
5. According to transmission technology used, a computer network may be categorized as
broadcast or store-and-forward (point-to-point). A network can be categorized as a
Local Area Network (LAN), a Metropolitan Area Network (MAN), or a Wide Area
Network (WAN) according to scale.
6. A LAN is a data communication system within a building, room, or campus, or nearby
buildings.
7. A MAN is a data communication system covering an area the size of a town or city.
8. A WAN is a data communication system spanning states, countries, or the whole
world.
9. Signals travel from transmitter to receiver via a path. This path called the medium can
be guided or unguided.
10. A guided medium is contained with in physical boundaries while an unguided medium
is boundless.
11. Twisted pair, Coaxial cable and Optical fiber are the most popular types of guided
media.
12. Twisted pair cable consists of two insulated copper wires twisted together.
13. Coaxial cable consists of a shielded copper wire covered with insulator, metallic
14. Fiber optic cables are composed of a glass or plastic inner core surrounded by
cladding, all encased in an outside jacket. It carries data signals in the form of light.
Fiber optic transmission is becoming increasingly popular due to its noise resistance,
15. Radio waves and microwaves use unguided media and are usually propagated through
the air.
42
16. Terrestrial microwaves use line-of-sight propagation for data transmission. Repeaters
are used to increase the distance a microwave can travel. Satellite communication uses
5. SUGGESTED READINGS
1. What is a computer network? How will you classify various networks according to
transmission technology and scale?
2. Does hooking of some computers together with a cable make a network? Justify.
3. Describe in brief the objectives and applications that motivated the development of
computer networks.
4. What are the main design issues that mark the distinction between point-to-point and
broadcast networks?
5. What are the distinguishing features of a LAN? Distinguish between point-to-point and
broadcast networks?
6. Name the different types of servers used in a LAN.
7. Distinguish between LAN, MAN and WAN?
8. What do you mean by the term topology? What are the common topologies followed in
LANs and WANs?
43
9. What are some of the factors that determine whether a communication system is a LAN,
MAN or WAN?
10. What do you mean by guided and unguided media of transmission? Describe various
13. Give advantages and disadvantages of using fiber optic cable over copper cables.
15. What are the advantages, limitations and applications of infrared communications?
16. Distinguish between twisted pair, base band and broad band coaxial cables. Specify the
44
Post Graduate Diploma in Computer Science and Applications
COMPUTER ORGANIZATION & NETWORKING FUNDAMENTALS
Lesson No. : 11
1. INTRODUCTION
2. OBJECTIVE
3. CONTENTS
3.1 NETWORK HARDWARE COMPONENTS
3.2 INTRODUCTION TO THE INTERNET
3.3 CONCEPTS OF INTERNET AND INTRANET
3.4 IP ADDRESSES
3.5 DNS
3.6 INTERNET SERVICES
3.7 E-MAIL
4. SUMMARY
5. SUGGESTED READINGS
6. SELF ASSESSMENT QUESTIONS
1. INTRODUCTION
Data networks that span long distances are fundamentally different from those that span short
distances. WAN technologies provide communication over long distances but usually operate at
slower speeds than LANs. LAN technologies provide the highest speed connections among
computers but cannot span long distances. LANs span small areas like a single building or a
small campus, and operates between speeds of 10 Mbps and 2 Gbps (billion bits per second). In
LAN technologies, each computer usually contains a device known as Network Interface Card
(NIC) that connects the machine directly to the network. The NIC is responsible for generating
1
and receiving electrical signals and the network itself need not contain much intelligence. In
WAN technologies, a network consists of a series of specialized computers called switches or
routers or gateways interconnected by long distance communication links. The size of the
network can be extended by adding a new switch and another communication line. Apart from
these, a number of other devices like connectors, hubs etc. are used in networking computer and
other communicating devices
Internet is a worldwide network that is a widely used to connect universities, government offices,
companies and private individuals. A machine to be on the Internet means it has an IP address,
and has the ability to send IP packets to all the other machines on the Internet. A private
individual having a personal computer can call up an Internet service provider using a modem,
be assigned a temporary IP address, and send IP packets to other Internet hosts.
2. OBJECTIVE
In this lesson, we first focus on a set of network hardware devices— connectors, network
interfaces, hubs, switches, bridges, routers, gateways etc. These devices interconnect individual
computers and ensure that they communicate efficiently. Section 3.1 is devoted to these devices.
The lesson then presents an overview of the Internet. Section 3.2 gives an introduction to the
Internet . Section 3.3 targets the distinctions between Internet and Intranet. Sections 3.4 describe
IPv4 addresses, which are currently being used in the Internet. We then discuss the IPv6
addresses, which may become dominant in the future. Section 3.5 discusses the Domain Name
System (DNS) which is a client/server application that provides name services for other
applications. Over the past 35 years, numerous ingenious and wonderful Internet applications
have been created which include the classic text-based applications that became popular in the
1980s: text e-mail, remote access to computers, file transfers, newsgroups, and text chat.
Another killer application of the mid-1990s was the World Wide Web. It includes many
2
multimedia applications, such as streaming video, Internet radio, Internet telephony, and video
conferencing. Section 3.6 titled as Internet Services is focused on these key applications. And
finally section 3.7 describes the E-mail service and its working.
3. CONTENTS
1. A hub, switch, router, bridge, gateway, firewall (which acts as the traffic cop on your
small information highway). These devices forward information from one
communicating device to another through the use of cables.
2. An interface card (hardware in each computer that provides connection to the
networking components)
3. A server (the central storage computer for information).
4. Cabling (coaxial, twisted pair, optical fiber).
5. Computers (clients), printers, scanners, etc.
We will discuss these devices in the following sections.
Connectors
Connector is best known for providing the physical link between two components. A connection
is established when the conducting wires or two components are attached together thru cable by
way of connectors in order to make and maintain continuous contact, allowing the signal to
simply move along the cable across the contact. Cable connectors provide the transition point
between the cable and the electrical equipment. Several types of connectors are available,
serving various purposes. For example, connectors are used to:
(a) Connect network interface cards, such as an Ethernet card, to a cable;
3
The type of connector used is usually a function of cable type. For example, eight-pin modular
connectors are used with UTP cable.
There are a number of different types of coaxial connectors. There are coaxial connectors which
you use at home with televisions and video equipment. You also have coaxial connectors that
operate with 10Base2 and 10Base5 Ethernet LAN networks.
F-Series Coaxial Connectors: The connectors which you use at home with video equipment are
referred to as F-series connectors.
N-Series Coaxial Connectors: The N-connector is very similar to the F-connector, with the
addition of a pin that fits over the center conductor. The N-type connector is used with thicknet
cables for data and video applications.
The BNC Connector: BNC stands for Bayonet Niell-Concelman. It is also sometimes referred
as British Naval Connector.
Applications include some traditional Ethernet LANs like 10Base-2 (thinnet). The following
connectors are in the BNC family:
BNC cable connector: soldered or crimped to the end of the cable.
BNC T-connector: connects the computer's network card to the network cable.
BNC Extender or BNC barrel connector: joins two coaxial cable segments to form a
longer one.
BNC terminator: placed at each end of a cable in a Bus network to absorb interference
signals. It is connected to earth. A bus network cannot function without them.
4
Ethernet 10Base2 : requires termination at both ends of segment using 50 ohm terminator.
Each computer connects to the cable with a T-Connector .10Base2 uses a bus topology as
depicted in the following diagram. The maximum number of nodes that can be attached per
segment is 30. Stations are attached using BNC T-connectors as shown in the following figures.
<>
5
Ethernet 10Base5 : 10Base5 also employs a bus topology, but uses a different method to attach
network nodes to the central cable in the bus. 10Base5 cable is connected by a vampire
connector with clamps holding the cable in place. A vampire tap is a connection to a coaxial
cable in which a hole is drilled through the outer shield of the cable so that a clamp can be
connected to the inner conductor of the cable. This cable connection is made with a unit that
clamps onto and "bites" into the cable, hence the vampire name.
A cable with AUI connectors is used to connect the transceiver to the network interface on a
computer, hub or repeater. The maximum length of the cable between a MAU and the AUI
connector on PC is 50 meter. The maximum number of nodes that can be attached per segment is
100.
UTP Connectors
The most common UTP connector is the RJ-45 connector. This connector is similar to the RJ-
11 used in telephony, but differs on a few points: RJ-45 is slightly larger and cannot be inserted
into an RJ-11 jack. In addition, the RJ-45 has eight pins while the RJ-11 has no more than six,
usually only four. This is a plastic connector that looks like a large telephone-style connector. A
slot allows the RJ-45 to be inserted only one way. RJ stands for Registered Jack, implying that
6
the connector follows a standard borrowed from the telephone industry. This standard designates
which wire goes with each pin inside the connector.
RJ-45(8P8C) connectors are used on the ends of the CAT-3 through CAT-7 Cable (RJ-11
connectors were used for the original CAT-1 Phone-Line Cable). Each pin in the connector
connects to a different wire. There are 8 pins numbered 1 through 8. Pins 1 & 2 send data; 3 & 6
receive data. Following figure shows different views of the RJ-45 connector to give an
understanding of how it looks like.
The original fiber-optic networks used multimode fiber (cheaper & more common) with ST
(Straight-Tip) & SC (Square Connector) connectors. ST was more common. The subscriber
channel (SC) connector is used in cable TV. It uses a push/pull locking system. The straight-tip
(ST) connector is used for connecting cable to networking devices. MT-RJ is a new connector
with the same size as RJ45. Following figure shows different views of these connectors.
7
Fig.6. Fiber-Optic Connectors
1000BaseX (802.3z): The IEEE 802.3z Gigabit Ethernet standard includes two Physical Layer
specifications for fiber optic media, 1000BaseSX and 1000BaseLX, and one for shielded copper
media, 1000BaseCX. IEEE standard specifies SC connectors. Both 1000BaseLX and
1000BaseSX use SC connectors or the newer LC (Local Connector) connectors. The LC
connectors are half the size as their predecessors and reduce the loss of light entering or leaving
the cable. LC connectors are available in single-mode and multimode versions.
Fig.7. LC Connector
Another small device that is commonly seen on a network is the external transceiver (also known
as a media converter). These are relatively simple devices that allow an NIC or other networking
device to connect to a different type of media than it was designed for.
For example, if you have a 100Base-TX switch and would like to connect it to another switch
using fiber-optic cabling, you would connect a fiber transceiver to each switch’s transceiver port
and then connect the two transceivers together with the appropriate fiber-optic cabling.
Replacing the network interface when a different media type is being implemented can be
expensive or even impossible if it is integrated into the network device. For example, when
10BaseT twisted-pair Ethernet started to replace 10Base2 and 10Base5 coaxial Ethernet, most of
8
the network equipment in use, such as routers, didn’t have a RJ-45 socket but a 10Base5 AUI
port. Transceivers, also referred to as media converters, were developed to overcome this
problem and allow for a more affordable transition to newer network technologies.
Repeaters: Signals that carry information within a network can travel a fixed distance before
attenuation effects data. A repeater receives a signal and, before it becomes too weak or
corrupted, regenerates the original bit pattern. The repeater then sends the refreshed signal. A
repeater can extend the physical length of a LAN. A repeater does not actually connect two
LANs; it connects two segments of the same LAN. The segments connected are still part of one
single LAN. Attenuation: Loss of signal strength as transmission travels away from source.
Analog signals pass through an amplifier, which increases not only voltage of a signal but also
noise accumulated.
Fig.8. An analog signal distorted by noise, and then amplified and a digital signal
regenerated using repeater
In 10Base5 Ethernet, the length of the cable is restricted to 500 m. To extend this length, we
divide the cable into segments and install repeaters between segments. The whole network is still
considered one LAN, but the portions of the network separated by repeaters are called segments.
Fig.9. (a) Extended LAN using Repeater (b) Repeater with two ports
9
• An important rule when using repeaters to expand a network is the 5-4-3 rule, which
defines that the maximum distance between two hosts on the same network can be 5
segments, 4 repeaters, and only 3 of the segments can be populated (a populated segment
is one which has one or more nodes attached to it) as illustrated in the following logical
network diagram:
Hubs: 10BaseT networks started using ‘Hubs’. A repeater was the first network device used in
10Base5/10Base2 coaxial networks which regenerated digital signals. Hubs are devices similar
to repeaters and they also receive frames, copy them and transmit them out on all the other
output ports just like repeater but hubs have more ports (connections) than repeaters(which have
only two).
On 10BaseT and 100BaseTX Ethernet networks, each computer or printer (or other networked
device) is connected to a hub. The hub is a small box that gathers the signals from each
individual device, optionally amplifies each signal, and then sends the signal out to all other
10
connected devices. Amplification helps to ensure that devices on the network receive reliable
information. Hubs are also called concentrators or repeaters. A simple 10BaseT or 100BaseTX
Ethernet network may consist of a few dozen individual computers, printers, or servers
connected to a single hub. In a more complex network, many hubs can be interconnected. Hubs
join devices in a star configuration.
A star topology is designed with each node (file server, workstations, and peripherals) connected
directly to a central network hub or concentrator. A concentrator is a device that provides a
central connection point for cables from workstations, servers, and peripherals. Most
concentrators contain the ability to amplify the electrical signal they receive.
Disadantages: Requires more cable length than a linear topology. If the hub or concentrator
fails, nodes attached are disabled. More expensive than linear bus topologies because of the cost
of the concentrators.
Nowadays hubs have become obsolete devices as they have been replaced by switches. We talk
about switches, bridges, and routers in the succeeding parts of this lesson. The primary
difference between a hub and a switch is that the hub shares the bandwidth across all of its ports
while a switch provides dedicated bandwidth to each port.
Thus, to summarize, a hub is a common connection point for devices in a network. Hubs are
commonly used to connect segments of a LAN. A hub contains multiple ports. When a packet
arrives at one port, it is copied to the other ports so that all segments of the LAN can see all
packets. Hubs can be passive or active. Hubs may connect to other hubs using coaxial cable or
twisted-Pair cable. When connecting similar devices (such as a hub to another hub) you must use
crossover cables (cables that have wiring reversed on each side). Straight-through cable (same
wiring on each side) connect different types of devices (computer to hub).
A network interface is a device that connects a client computer, server, printer or other
components to your network. Most often, a network interface consists of a small electronic
circuit board that is inserted into a slot inside a computer or printer. Alternatively, some
11
computers, printers, or other devices include network interfaces as part of their main circuit
boards (motherboards). In either case, the network interface provides two important services—it
connects your computer physically to your network, and it converts information on your
computer to and from electrical signals for your network.
The network interface connects to your network via a small receptacle called a port. For wired
networks, you insert the network cable into this port. Alternatively, for wireless networks, the
port includes a transmitter/receiver that sends/receives radio signals. Besides providing physical
connections, network interfaces convert information on your computer into electrical signals of
appropriate shape and transmission speed for your network. All network interfaces on your
network must conform to a common protocol in order for their electrical signals to be compatible
(and therefore to exchange information successfully). For example, if you are running a 10BaseT
Ethernet network, then all of your computers, printers, and servers must contain 10BaseT
Ethernet network interfaces.
Each network interface is associated with a unique address called its media access control
(MAC) address. The MAC address helps route information within your local area network and is
used by interconnecting devices such as switches and bridges. The exact role of network
interfaces with regard to MAC addresses varies a bit among different networks. On Ethernet
networks, each network interface receives a unique MAC address when it is manufactured.
When the network interface is installed into a slot or onto the motherboard of a computer or
printer, the interface MAC address becomes the address for the computer or printer. Another
network address is the device's Internet (IP) address. This address helps route information
between networks, and is used by interconnecting devices called routers. Network interfaces are
also called NICs (Network Interface Cards) or adapters, or sometimes just cards.
Most NICs are internal, with the card fitting into an expansion slot inside the computer. Some
computers use external boxes which are attached to a serial port or a SCSI port. Laptop
computers generally use external LAN adapters connected to the parallel port or network cards
that slip into a PCMCIA slot.
12
The three most common network interface connections are Ethernet cards, LocalTalk
connectors, and Token Ring cards. According to an International Data Corporation study,
Ethernet is the most popular, followed by Token Ring and LocalTalk
Ethernet cards are usually purchased separately from a computer, although many computers
include an option for a pre-installed Ethernet card. Ethernet cards contain connections for either
coaxial or twisted pair cables (or both). If it is designed for coaxial cable, the connection will be
BNC. If it is designed for twisted pair, it will have a RJ-45 connection and wireless networks
have adapters with an antenna. Some Ethernet cards also contain an AUI connector. This can be
used to attach coaxial, twisted pair, or fiber optics cable to an Ethernet card. When this method is
used there is always an external transceiver attached to the workstation. NICs come in three basic
varieties: 8-bit, 16-bit, and 32-bit. The larger the number of bits that can be transferred to the
NIC, the faster the NIC can transfer data to the network cable.
Bridges
A bridge is a device that connects two or more local area networks, or two or more segments of
the same network. For example, suppose that your network includes both 10BaseT Ethernet and
10Base5 Ethernet connections. You can use a bridge to connect these two networks so that they
can share information with each other. In addition to connecting networks, bridges perform an
13
additional, important function. They filter information so that network traffic intended for one
portion of the network does not congest the rest of the network.
When bridges were introduced in the 1980’s, they typically joined two homogeneous networks
(for example, two kinds of Ethernet networks). More recently it has become possible for bridges
to connect networks with different protocols. For example, you can use a bridge to connect an
Ethernet network to a Token Ring network.
A bridge is like a smart repeater. Bridges, like repeaters, can connect two network segments, but
bridges are a little smarter about the data they transport. Most bridges have the capacity to listen
to the network and figure out the address of each computer on both sides of the bridge. The
bridge can then inspect each message that comes from one side and broadcast it to the other side
of the bridge, if the message is intended for a computer that is on the other side. If the packet's
destination is on the same side of the bridge, it is discarded. This creates a more efficient scheme
for data transport.
Like switches, bridges learn the MAC addresses of all connected clients, servers, and
peripherals, and associate each address with a bridge port (network connection). When a bridge
(or switch) receives an incoming frame, it opens and reads its destination MAC address. If the
port that will receive the frame is different from the port connected to the sender, then the bridge
forwards the frame to the destination port. If the port that will receive the frame is the same as
the port connected to the sender, the bridge drops the frame. If the bridge cannot determine
which port is associated with a destination address, it passes the frame along to all ports.
• A bridge monitors and records network traffic – making it more intelligent than a repeater
– When a bridge receives a frame, it records the MAC address of the source device
– Eventually the bridge learns the location of each device on the network (and
creates a table of everyone’s addresses)
– Bridges keep track of the MAC addresses of devices in a table called the bridge
table that tracks the device name, MAC address, and segment it belongs to
– Using that knowledge, a Bridge can forward data to a specific computer system
(instead of just copying frames & sending them to everyone);
14
– If a bridge does not know the location of a device, it forwards the frame to all
segments
Switches
Like a hub, an Ethernet switch is a device that gathers the signals from devices that are connected
to it, and then regenerates a new copy of each signal. Switches, however, are more powerful than
hubs and can substantially increase your network performance.
Similar to a hub, a switch provides a central connection between two or more computers on a
network, but with some intelligence. Whereas for a hub any message received at the hub is
broadcast to all the attached computers, with a switch it is sent only to the destination computer
and is not visible to other attached devices.
Most common switches operate by learning the MAC addresses of all connected clients, servers,
and peripherals, and associating each address with one of its ports. When a switch receives an
incoming signal, it creates a temporary circuit between the sender and receiver. The temporary
circuit provides two important benefits.
First, the circuit allows the sender and receiver momentarily to exchange information
without intrusion from other devices on the network. That is, each pair of communicating
devices utilizes the full bandwidth (data carrying capacity) of the network instead of
sharing that bandwidth, as they do in unswitched Ethernet networks.
Second, the circuit ensures that information travels directly between the communicating
computers. In unswitched networks, data from a transmitting computer is sent by the
15
nearest hub to all connected devices (not just to the recipient) and therefore congests parts
of the network needlessly.
Switches have two benefits: (1) they provide each pair of communicating devices with a fast
connection; and (2) they segregate the communication so that it does not enter other portions of
the network. (Hubs, in contrast, broadcast all data on the network to every other device on the
network.)
Switches are very similar to bridges as they also maintain a table with MAC addresses per port to
make forwarding decisions, Some of the main differences between switches and bridges are:
Routers
Like bridges, routers are devices whose primary purpose is to connect two or more networks and
to filter network signals so that only desired information travels between them. However, routers
can inspect a good deal more information than bridges, and they therefore can regulate network
16
traffic more precisely. They also have another important capability: they are aware of many
possible paths across the network and can choose the best one for each data packet to travel.
Routers operate by examining incoming data for its network routing and transport information.
This information includes the source and destination network routing addresses. (Remember that
every client, server, and peripheral on the network maintains multiple addresses, including both a
physical address (MAC) and network routing addresses (IP). The two addresses are used for
different purposes.)
A router is like super-intelligent bridge. They can link multiple LANs and look deeper into the
data packet to determine its destination. Routers not only know the addresses of the computers
on the network but are aware of all the other bridges and routers on the network and can decide
the most efficient path in which to send data. The router uses a routing table of network
addresses to determine where to forward the packet. When a router receives data, it discards the
outer packet or frame or MAC address, repackages the data with network address, and
retransmits the signal. By stripping off the outer layers of data before sending a packet, the total
number of bits moving across the network is reduced. The router at the receiving end then
repackages the data into a packet of frame that is appropriate for its network.
Routers can be programmed to prevent information from being sent to or received from certain
networks or computers based on all or part of their network routing addresses. If you have
sensitive student records on a server, for example, you can use a router to filter packets headed
for the server so that only authorized personnel—for example, personnel whose network
addresses match a specified list—can connect to it.
17
The network components described above are often used in conjuction. The following network
diagram shows a simple network using three of them:
Gateways
A gateway is any hardware and software combination that connects dissimilar network
environments. Gateways are the most complex of network devices. For example, a gateway is
the device that connects a LAN environment to a mainframe environment. The two environments
are completely different. LAN environments use distributed processing, baseband
communications, and the ASCII character set. Mainframe environments use centralized
processing, broadband and baseband communications, and the EBCDIC character set. Each of
the LAN protocols is translated to its mainframe counterpart by the gateway software. Another
popular example is the e-mail gateway. Most LAN-based e-mail software, such as Novell’s
GroupWise and Microsoft’s Exchange, can’t communicate directly with Internet mail servers
without the use of a gateway. This gateway translates LAN-based mail messages into the SMTP
format that Internet mail uses.
18
3.2 INTRODUCTION TO THE INTERNET
The Internet is a global system of interconnected computer networks that use the standard
Internet Protocol Suite (TCP/IP) to serve billions of users worldwide. It is a network of networks
that consists of millions of private, public, academic, business, and government networks of local
to global scope that are linked by a broad array of electronic and optical networking
technologies. The Internet carries a vast array of information resources and services, most
notably the inter-linked hypertext documents of the World Wide Web (WWW) and the
infrastructure to support electronic mail.
The public Internet is a worldwide computer network, that is, a network that interconnects
millions of computing devices throughout the world. Earlier, these computing devices were
primarily traditional desktop PCs, UNIX-based workstations, and servers that stored and transmit
information such as Web pages and e-mail messages. However, now nontraditional Internet end
systems such as personal digital assistants (PDAs), TVs, mobile computers, cell phones,
automobiles, environmental sensing devices, picture frames, home electrical and security
systems, Web cams, and even toasters are being connected to the Internet. In Internet jargon, all
of these devices are called hosts or end systems. More than 233 million end systems are using
the Internet and this number continues to grow rapidly.
End systems are connected together by communication links which are made up of different
types of media like copper wires, optical fibers and wireless links. Different links can transmit
data at different rates, with the transmission rate of a link measured in bits/second.
End systems are not usually attached to each other via a single communication link. Instead, they
are indirectly connected to each other thru intermediate switching devices known as packet
switches. Two most prominent types of packet switches in today’s internet are Routers and
Link Layer Switches. From the sending end system to the receiving end system, the sequence of
communication links and packet switches traversed by a packet is known as a route or path
through the network.
End systems access the Internet through Internet Service Providers (ISP’s), including
residential ISP’s such as your local telephone or cable company; corporate ISP’s, university
ISP’s; that provide wireless access in airports, hotels, coffee shops, and other public places. Each
19
ISP is a network of Packet switches and communication links. ISP’s provide a variety of type of
network access to the end system including 56 KBPS dial-up modem access, residential
broadband access such as cable modem or DSL, high speed LAN access, and wireless access.
ISP’s also provide Internet access to content providers, connecting web sites directly to the
Internet. To allow communication among Internet users and to allow users to access world wide
internet content, these lower-tier ISP’s are interconnected through national and international
upper-tier ISP’s such as AT&T and Sprint. An upper-tier ISP consists of high speed routers
interconnected with high speed fiber optic link. Each ISP network, whether upper-tier or lower-
tier is managed independently, runs the IP protocol, and conforms to certain naming and address
conventions. There are a variety of ways for individuals, companies, or institutions to connect to
the Internet. Large organizations usually connect by means of direct, dedicated, high-speed links
to give their users high bandwidth networking capabilities. Home users connect by means of a
telephone line and a modem. Users search the Internet for all types of information, including
images, graphics, and sound and movie clips, in an ever growing number of remote host
computers. When users retrieve and distribute this information to others, network activity
becomes highly intensive in terms of file transfer times and traffic volume. This is now fueling
the upgrade of the Internet to wide band and broadband access and backbone facilities.
End systems, packet switches, and other pieces of the Internet, run protocols that control the
sending and receiving of the information with in the Internet. Transmission control protocol
(TCP) and the Internet protocol (IP) are two of the most important protocols in the Internet.
The IP protocol specifies the format of the packets that are sent and received among routers and
end systems. The internet’s principal protocols are collectively known as TCP/IP.
Fig. 17 gives a representation of a small piece of the Internet which supports the above
discussion and will make you understand how the pieces of Internet are connected together. Two
routers in the Company’s ISP are shown to be connected thru satellite link. Different connections
can be thru different communication channels as explained above.
20
router workstation
server
mobile
local ISP
regional ISP
company
network
The Internet has no centralized governance in either technological implementation or policies for
access and usage; each constituent network sets its own standards. Only the overreaching
definitions of the two principal name spaces in the Internet, the Internet Protocol address space
and the Domain Name System, are directed by a maintainer organization, the Internet
Corporation for Assigned Names and Numbers (ICANN). The technical underpinning and
standardization of the core protocols (IPv4 and IPv6) is an activity of the Internet Engineering
Task Force (IETF), a non-profit organization of loosely affiliated international participants that
anyone may associate with by contributing technical expertise.
Institutions of all kinds - academic, government and commercial to allow their staff to
collaborate with peers to rapidly coordinate complex, dispersed worldwide activities to
21
gather and share information by interconnecting their enterprise networks via Internet
backbone providers.
Professional communities of all kinds - especially research and development
organizations.
General public via local access providers and gateways to commercial public e-mail
carriers and other kinds of networks.
Internet
This is the world-wide network of computers accessible to anyone who knows their Internet
Protocol (IP) address - the IP address is a unique set of numbers (such as 209.33.27.100) that
defines the computer's location. Most will have accessed a computer using a name such as
http://www.hcidata.com. Before this named computer can be accessed, the name needs to be
resolved (translated) into an IP address. To do this your browser (for example Netscape or
Internet Explorer) will access a Domain Name Server (DNS) computer to lookup the name and
return an IP address - or issue an error message to indicate that the name was not found. Once
your browser has the IP address it can access the remote computer. Discussion on the Internet
has already been carried out in the previous section.
Intranet
This is a network that is not available to the world outside of the Intranet. If the Intranet network
is connected to the Internet, the Intranet will reside behind a firewall. The firewall helps to
control access between the Intranet and Internet to permit access to the Intranet only to people
who are members of the same company or organization.
An intranet is a private computer network that uses Internet Protocol technologies to securely
share any part of an organization's information or network operating system within that
organization. Internet is a network between organizations, and Intranet refers to a network
within an organization.
22
Characteristics of Intranets
An intranet is built from the same concepts and technologies used for the Internet, such as client-
server computing and the Internet Protocol Suite (TCP/IP). Any of the well known Internet
protocols may be found in an intranet, such as HTTP (web services), SMTP (e-mail), and FTP
(file transfer).
An intranet can be understood as a private analog of the Internet, or as a private extension of the
Internet confined to an organization.
Intranets are also contrasted with extranets. While intranets are generally restricted to employees
of the organization, extranets may also be accessed by customers, suppliers, or other approved
parties. Extranets extend a private network onto the Internet with special provisions for access,
authorization, and authentication (AAA protocol).
Intranets may provide a gateway to the Internet by means of a network gateway with a firewall,
shielding the intranet from unauthorized external access. The gateway often also implements
user authentication, encryption of messages, for off-site employees to access company
information, computing resources and internal communications.
Uses of Intranet
Increasingly, intranets are being used to deliver tools and applications, e.g., collaboration (to
facilitate working in groups and teleconferencing) or sophisticated corporate directories, sales
and customer relationship management tools, project management etc., to advance productivity.
Intranets are also being used as corporate culture-change platforms. For example, large numbers
of employees discussing key issues in an intranet forum application could lead to new ideas in
management, productivity, quality, and other corporate issues.
Intranet user-experience, editorial, and technology teams work together to produce in-house
sites. Most commonly, intranets are managed by the communications, HR or CIO departments of
large organizations, or some combination of these.
Benefits of Intranet
23
Workforce productivity: Intranets can also help users to locate and view information faster and
use applications relevant to their roles and responsibilities. With the help of a web browser
interface, users can access data held in any database the organization wants to make available,
anytime and - subject to security provisions - from anywhere within the company workstations,
increasing employees' ability to perform their jobs faster, more accurately, and with confidence
that they have the right information. It also helps to improve the services provided to the users.
Business operations and management: Intranets are also being used as a platform for
developing and deploying applications to support business operations and decisions across the
internetworked enterprise.
Cost-effective: Users can view information and data via web-browser rather than maintaining
physical documents such as procedure manuals, internal phone list and requisition forms. This
can potentially save the business money on printing, duplicating documents, and the environment
as well as document maintenance overhead. "
Promote common corporate culture: Every user is viewing the same information within the
Intranet.
24
Enhance Collaboration: With information easily accessible by all authorised users, teamwork is
enabled.
Built for One Audience: Many companies dictate computer specifications. Which, in turn, may
allow Intranet developers to write applications that only have to work on one browser.
Knowledge of your Audience: Being able to specifically address your "viewer" is a great
advantange. Since Intranets are user specific (requiring database/network authentication prior to
access), you know exactly who you are interfacing with. So, you can personalize your Intranet
based on role (job title, department) or individual ("Congratulations Jane, on your 3rd year with
our company!").
Most traditional communications media, such as telephone and television services, are reshaped
or redefined using the technologies of the Internet, giving rise to services such as Voice over
Internet Protocol (VoIP) and IPTV. Newspaper publishing has been reshaped into Web sites,
blogging, and web feeds. The Internet has enabled the creation of new forms of human
interactions through instant messaging, Internet forums, and social networking sites. Following
are some of the services provided by the Internet:
25
Information
WWW, an Internet environment, which began in 1993 is a software scheme for imposing order
over the mass of free-form information on the Internet by organizing it into easily understood
pages. Hyperlinking is a software technique that has made the web a powerful cyber helper.
When composing a web page, an author can create hyperlinked-words that appear in bold type
and indicate a path to some other information. Using a program known as a web browser on a
personal computer or workstation, one can read pages stored on any web computer.
The World Wide Web is a global set of documents, images and other resources, logically
interrelated by hyperlinks and referenced with Uniform Resource Locators (URLs). A URL is
the address of the document, which is to be retrieved from a network server.
These documents may also contain any combination of computer data, including graphics,
sounds, text, video, multimedia and interactive content including games, office applications and
scientific demonstrations. Through keyword-driven Internet research using search engines like
Yahoo! and Google, users worldwide have easy, instant access to a vast and diverse amount of
online information. Compared to printed encyclopedias and traditional libraries, the World Wide
Web has enabled the decentralization of information.
Applications generating real-time graphics using charts and colors to show trends in the stock
market, voter returns, Geographic Information Systems (GISs), weather maps, database statistics,
and analysis related to e-commerce are also available on the Internet.
Some of the Web server software is based on the concept of streaming media, which delivers
audio and video on demand, rather than requiring a user to download a file from the web and
play it back from the local server or hard drive.
The Web has also enabled individuals and organizations to publish ideas and information to a
potentially large audience online at greatly reduced expense and time delay. Publishing a web
page, a blog, or building a website involves little initial cost and many cost-free services are
26
available. Many individuals and some companies and groups use web logs or blogs, which are
largely used as easily updatable online diaries.
Advertising on popular web pages can be lucrative, and E-commerce or the sale of products and
services directly via the Web continues to grow. In the early days, web pages were usually
Communication
Internet telephony is another common communications service made possible by the creation of
the Internet. VoIP stands for Voice-over-Internet Protocol, referring to the protocol that underlies
all Internet communication. The benefit is that, as the Internet carries the voice traffic, VoIP can
be free or cost much less than a traditional telephone call, especially over long distances and
especially for those with always-on Internet connections such as cable or ADSL. VoIP has also
become increasingly popular for gaming applications, as a form of communication between
players. Popular VoIP clients for gaming include Ventrilo and Teamspeak. Wii, PlayStation 3,
and Xbox 360 also offer VoIP chat features.
Chat And Bulletin Boards: Chat is synchronous (happening in real time, like a phone
conversation, unlike an e-mail exchange), line-by-line communication with another user over a
network. Chat rooms are search for chats on subjects that interest you; if the room members are
discussing the stated topic, you may meet some interesting person.
You can protect your right to quality chat. By double clicking the name of a rude chatter and, in
the information about dialog box that comes up, check the Ignore Member button. Once a chatter
is ignored, his comments won’t show up on your scrolling chat screen. You can also give chat
preferences like getting notified when members arrive or leave. You can double-space incoming
messages or alphabetize the member list. You can also enable chat room sounds.
27
Another way to go about chatting is to search the member directory for people who share your
enthusiasm for say chess, live in the town you grew up etc. you can type location-specific and
name-specific search words to narrow down the search. The advance search offers you the option
of filling in everything about the person you seek.
You can chat in style by changing fonts, coloring letters, using bold, italics or underlines etc. you
can also use shorthands in chatting. Little pictures can also be drawn through the keyboard.
Once you enter a chat room, you can create your member profile depending on what kind of
attention you want to attract.
Bulletin boards are data banks that allow the free exchange of some software, files, or other
information. Electronic bulletin boards are a way to meet other computer users, voice opinions,
receive technical help, and download shareware etc. bulletin boards are often focused on a
particular subject area. Boards are more intimate and personal and provide an easy way for
people with similar interests to congregate and interact.
USENET: One of the most popular applications of computer networking is the worldwide
system of newsgroups called net news. Often net news is referred to as USENET.
A newsgroup is a worldwide discussion forum on some specific topic. People interested in the
subject can “subscribe” to the newsgroup. Subscribers can use a special kind of user agent, a
news reader, to read all the articles (messages) posted to the newsgroup. People can also post
articles to the newsgroup. Each article posted to a newsgroup is automatically delivered to all the
subscribers, wherever they may be in the world. The number of newsgroups is so large that they
are arranged in a hierarchy to make them manageable. Following figure shows the top levels of
the ‘official’ hierarchies.
USENET hierarchies
28
Humanities Literature and the humanities
Each of the categories listed is broken into subcategories, recursively. For example, rec.sport is
about sports, rec.sport.basketball is about basketball, and rec.sport.basketball.women is about
women’s basketball.
Data transfer
File sharing is an example of transferring large amounts of data across the Internet. A computer
file can be e-mailed to customers, colleagues and friends as an attachment. It can be uploaded to
a website or FTP server for easy download by others and can be accessed using FTP protocol. It
can be put into a "shared location" or onto a file server for instant use by colleagues. Sometimes
it is possible that we do not know the FTP site of a file which is available on the Internet.
ARCHIE is a facility on the Internet that maintains a database of hundreds of Internet sites
accessible via anonymous FTP.
Streaming media refers to the act that many existing radio and television broadcasters promote
Internet "feeds" of their live audio and video streams (for example, the BBC). This means that an
Internet-connected device, such as a computer can be used to access on-line media in much the
same way as was previously possible only with a television or radio receiver. Podcasting is
where—usually audio—material is downloaded and played back on a computer or shifted to a
portable media player to be listened to on the move.
29
Webcams can be seen as an even lower-budget extension of this phenomenon. While some
webcams can give full-frame-rate video, the picture is usually either small or updates slowly.
Internet users can watch animals around an African waterhole, ships in the Panama Canal, traffic
at a local roundabout or monitor their own premises, live and in real time. Video chat rooms and
video conferencing are also popular with many uses being found for personal webcams, with
and without two-way sound. YouTube was founded on 15 February 2005 and is now the leading
website for free streaming video with a vast number of users.
Remote Logging
Telnet is the Internet facility that allows you to execute commands on a remote host (another
computer, most likely one to which you do not have physical access) as if you were logged in
locally. You need to know the name of the machine to which you want to connect, and to have a
valid user name in it.
3.5 IP ADDRESSES
IPv4
The Internet requires an addressing convention: an address that identifies the connection of a
host to its network. Present addressing protocol in the Internet is IPv4.
Each Internet address consists of four bytes (32 bits), defining three fields: class type, netid, and
hostid. These parts are of varying lengths, depending on the class of the address (see Figure).
Class
Netid Hostid
31
To make the 32-bit form shorter and easier to read, Internet addresses are usually written in
decimal form with decimal points separating the bytes. Fig 20 shows the bit pattern and decimal
formats of a possible address.
Looking at the first byte of an address in decimal form allows us to determine at a glance to
which class a particular address belongs (see Fig.20).
Static IP Addresses: A static IP address is where each node on an IP based network is manually
given its own unique IP address. The main problems with this approach are:
Dynamic Host Configuration Protocol is the set of rules that allows client nodes such as
computers, routers and printers to request IP addresses from a DHCP server.
Internet Protocol version 6 (IPv6) is a version of the Internet Protocol that is designed to succeed
IPv4, the first publically used implementation, which is still in dominant use currently. The main
driving force for the redesign of Internet Protocol is the foreseeable IPv4 address exhaustion.
IPv6 has a vastly larger address space than IPv4. This results from the use of a 128-bit address,
whereas IPv4 uses only 32 bits. The new address space thus supports 2128 (about 3.4×1038)
addresses. This expansion provides flexibility in allocating addresses and routing traffic.
32
Fig. 21. An illustration of an IP address (version 6), in hexadecimal and binary.
The very large IPv6 address space supports a total of 2128 (about 3.4×1038) addresses—or
approximately 5×1028 (roughly 295) addresses for each of the roughly 6.8 billion (6.8×109)
people on the earth.
IPv6 addresses are normally written with hexadecimal digits and colon separators like
2001:db8:85a3::8a2e:370:7334, as opposed to the dot-decimal notation of the 32 bit IPv4
addresses. IPv6 addresses are typically composed of two logical parts: a 64-bit (sub-)network
prefix, and a 64-bit host part.
3.6 DNS
The Domain Name System (DNS) is a hierarchical naming system for computers, services, or
any resource connected to the Internet or a private network. Domain Name System (DNS) is a
distributed database system for managing host names and their associated Internet Protocol (IP)
addresses. Using DNS means that people can use simple names, such as "www.jkltoys.com" to
locate a host, rather than using the IP address (xxx.xxx.xxx.xxx). A single server may only be
responsible for knowing the host names and IP addresses for a small subset of a zone, but DNS
servers can work together to map all domain names to their IP addresses.
The IP address is a numeric address that serves a role analogous to a telephone number. In
representation, IP addresses always consist of four numbers: four decimal values separated by
33
periods (as discussed in the previous sections). The computer named int.cs.ku.edu, for instance,
is assigned a number 35.8.1.212 . IP addresses are numeric and can be easily understood and
manipulated by the hardware and software that must move information over the Internet. So IP
addresses are better suited to computers, and domain addresses are better suited to humans. DNS
allows a translation between the domain name and the IP address. Domain names do not
necessarily have four parts. They might have only two parts - a top-level domain such as ‘edu’ or
’com’, preceded by a sub domain – or three, four or many.
ICANN (Internet Corporation for Assigned Names and Addresses) is responsible for issuing the
top level domain names. These include generic categories (.edu, .com. .gov etc) and country
names (.uk, .in etc).
Most top level country domains issue a range of sub-domains based on categories similar to the
top level category domains. Individuals or organizations can register domain names within these
sub domains. Examples of sub-domains within .uk domain - .ac(academic institutions), .co
(companies), .org (non-profit organizations) etc.
Name Space
The names assigned to machines must be carefully selected from a name space with complete
control over the binding between the names and IP addresses. A name space that maps each
address to a unique name can be organized in two ways: flat or hierarchical.
Flat Name Space: In a flat name space, a name is assigned to an address. A name in this space is
a sequence of characters without structure. The main disadvantage of a flat name space is that it
cannot be used in a large system such as the Internet because it must be centrally controlled to
avoid ambiguity and duplication.
34
Hierarchical Name Space: In a hierarchical name space, each name is made of several parts.
Different parts in a name can define different aspects of an organization. For eg., the name
kuk.ac.in specifies kuk as the name of an organization in the academic zone of country India.
To have a hierarchical name space, a domain name space was designed. In this design the
names are defined in an inverted-tree structure with the root at the top. The tree can have only
128 levels: level 0 (root) to level 127. Each node in the tree refers to a particular domain name. A
domain is a subtree of the domain name space. The name of the domain is the domain name of
the node at the top of the subtree. A domain may itself be divided into domains (sometimes
called subdomains).
The structure of the domain name is important. The Root is located at the top and is represented
by a . dot or " " quotes. The .com refers to the Top Level Domain (TLD) assigned by
InterNIC. There have been traditionally seven top level domains .org (non-profit organisations),
.net (ISPs), .edu (education), .gov (government), .com (company), .arpa (ARPA) and .mil
(military). The additional TLDs are .aero, .biz, .coop, .info, .museum, .name and .pro As well
as these generic TLDs (gTLD), there are country-code Top Level Domains (ccTLD) such as
.uk for UK or .de for Germany etc.
The DNS Name Space tree has the following tree-like structure:
The Top Level Domains are closest to the Root and are the least specific.
35
A Sub-Domain is where a domain's name ends in another domain's name and is therefore part of
that larger domain. For instance, 'rhyshaden.com' is a second level domain of 'com'.
A domain name consists of one or more parts, technically called labels, that are conventionally
concatenated, and delimited by dots, such as example.com.
The right-most label conveys the top-level domain; for example, the domain name
www.example.com belongs to the top-level domain com.
A hostname is a domain name that has at least one IP address associated. For example, the
domain names www.example.com and example.com are also hostnames, whereas the com
domain is not. The general scheme and naming convention are as shown below:
Root
-----
Host_B . DEPT_ CS. UNIV_ KU. EDU
36
All hosts attached to a network or subnet of the Internet must be registered with one of the
domains (com, edu, gov etc.). The overall directory for the Internet is partitioned according to
these domains. The choice of domain to be registered under is made to minimize the number of
referrals. Hence, if a host is to be attached to a network that belongs to an educational institution,
it is registered within the EDU domain.
Each domain uses an appropriate naming hierarchy. In the EDU domain the next level in the
hierarchy is the names of the different educational institutions, while in the COM domain it is
each commercial organization.
The information contained in the domain namespace must be stored. The Domain Name System
distributes the responsibility of assigning domain names and mapping those names to IP
addresses by designating authoritative name servers for each domain.
Zones
DNS data is broken up into a hierarchy of domains. Servers are responsible to know only a small
portion of data, such as a single subdomain. The portion of a domain for which the server is
directly responsible is called a zone. A DNS server that has complete host information and data
for a zone is considered authoritative for the zone. The domain name space consists of a tree of
domain names. Each node or leaf in the tree has zero or more resource records, which hold
information associated with the domain name.
Resolver
The client-side of the DNS is called a DNS resolver. It is responsible for initiating and
sequencing the queries that ultimately lead to a full resolution (translation) of the resource
sought, e.g., translation of a domain name into an IP address. The query goes to the DNS servers
from where the mapping of IP address sought by the client in his query is returned back.
37
3.7 E-MAIL
An e-mail message has always been nothing more than a simple text message -- a piece of text
sent to a recipient. In the beginning and even today, e-mail messages tend to be short pieces of
text, although the ability to add attachments now makes many messages quite long. Even with
attachments, however, e-mail messages continue to be text messages.
E-mail Clients: You've probably already received several e-mail messages. To look at them, you
use some sort of e-mail client. Many people use well-known, stand-alone clients like Microsoft
Outlook, Outlook Express, Eudora or Pegasus. People who subscribe to free e-mail services like
Hotmail or Yahoo use an e-mail client that appears in a Web page. No matter which type of
client you're using, it generally does four things:
Shows you a list of all of the messages in your mailbox by displaying the message
headers. The header shows you who sent the mail, the subject of the mail and may also
show the time and date of the message and the message size.
Lets you select a message header and read the body of the e-mail message.
Let's you create new messages and send them. You type in the e-mail address of the
recipient and the subject for the message, and then type the body of the message.
Lets you add attachments to messages you send and save the attachments from messages
you receive.
A Simple E-mail Server: Given that you have an e-mail client on your machine, you are ready
to send and receive e-mail. All that you need is an e-mail server for the client to connect to.
38
Machines on the Internet can run software applications that act as servers. There are Web
servers, FTP servers, telnet servers and e-mail servers running on millions of machines on the
Internet right now. These applications run all the time on the server machine and they listen to
specific ports, waiting for people or programs to attach to the port. The simplest possible e-mail
server would work something like this:
1. It would have a list of e-mail accounts, with one account for each person who can receive
e-mail on the server. My account name might be cskuk, Rahuls might be rahul98, and so
on.
2. It would have a text file for each account in the list. So, the server would have a text file
in its directory named CSKUK.TXT, another named RAHUL98.TXT, and so on.
3. If someone wanted to send me a message, the person would compose a text message ("
Can we have lunch on Monday? Rahul") in an e-mail client, and indicate that the
message should go to cskuk. When the person presses the Send button, the e-mail client
would connect to the e-mail server and pass to the server the name of the recipient
(cskuk), the name of the sender (rahul98) and the body of the message.
4. The server would format those pieces of information and append them to the bottom of
the CSKUK.TXT file.
There are several other pieces of information that the server might save into the file, like the time
and date of receipt and a subject line.
Composition: Process of creating messages and answers. The system provides assistance with
addressing and the numerous header fields attached to each message. For example, when
answering a message, the e-mail system can extract the originator’s address from the incoming e-
mail and automatically insert it in to the proper place in the reply.
Transfer: This refers to moving messages from the originator to the recipient. This requires
establishing a connection to the destination or some intermediate machine, outputting the
message, and releasing the connection.
39
Reporting: The originator is informed about what happened to the message – delivered, rejected
or lost.
Displaying: This makes the incoming message displayed to the user so that he can read it.
Necessary conversions like formatting, conversion of digitized voice etc. is done if required.
Disposition: This is concerned with what the recipient does with the message after receiving it.
A message can be saved or deleted after reading or may be forwarded to some other person
Advanced features:
Mailbox creation: A user can create a mailbox to store incoming E-mail. Mailboxes can be
created and destroyed. Contents of mailboxes can be inspected and messages can be inserted and
deleted from the mailboxes.
Mailing list: A message can be sent to a group of persons together with a single command.
When a message is sent to the mailing list, identical copies are delivered to everyone on the list.
Other advanced features: are carbon copies, high-priority e-mail, secret (encrypted) e-mail,
alternative recipients if the primary one is not available, and the ability for secretaries to handle
their boss’s e-mail.
Mail User Agent (MUA): A user agent is a software package (local program) that supports user
interface by allowing people to: read messages, send messages, compose messages by
providing command based, menu based or graphical method to interaction, reply to messages,
and forward received messages.
Thus, the user agent interacts with the user and essentially defines what the user can do. A user
agent also manages a message store (MS), called mailbox, which is used to store messages.
40
Message Transfer Agent or Mail Transport Agent (MTA): Move messages from the source to
the destination. It serves as the mail system’s interface with the network and runs in the
background to move E-mail through the system.
Email is based around the use of electronic mailboxes. When an email is sent, the message is
routed from server to server, all the way to the recipient's email server. More precisely, the
message is sent to the mail server tasked with transporting emails (called the MTA) to the
recipient's MTA. On the Internet, MTAs communicate with one another using the protocol
SMTP, and so are logically called SMTP servers (or sometimes outgoing mail servers).
The recipient's MTA then delivers the email to the incoming mail server (called the MDA, for
Mail Delivery Agent), which stores the email as it waits for the user to accept it. There are two
main protocols used for retrieving email on an MDA:
POP3 (Post Office Protocol), the older of the two, which is used for retrieving email and,
in certain cases, leaving a copy of it on the server.
IMAP (Internet Message Access Protocol), which is used for coordinating the status of
emails (read, deleted, moved) across multiple email clients. With IMAP, a copy of every
message is saved on the server, so that this synchronization task can be completed.
Fig.24.
41
To use a real-world analogy, MTAs act as the post office (the sorting area and mail carrier,
which handle message transportation), while MDAs act as mailboxes, which store messages (as
much as their volume will allow) until the recipients check the box.
To keep everyone from checking other users' emails, MDA is protected by a user name called a
login and by a password. 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 (such as
Mozilla Thunderbird, Microsoft Outlook, Eudora Mail, Incredimail, Lotus Notes or free e-mail
services like Hotmail or Yahoo use an e-mail client that appears in a Web page.). When it is a
web interface used for interacting with the incoming mail server, it is called webmail.
header - It contains information about the sender, the routing and the time of the
message. The header always contains a subject line. This is a very important part of
the message and you should always include a subject line. The subject line indicates the
purpose or content of the message
message body, where you write your message
signature, which identifies the sender. This part is optional and must be set up inside of
your email software Most email programs allow you to record a signature and it is
inserted automatically into all outgoing messages.
Although there are many header fields in an email message, to the average email user only the
following headers are probably the most important:
42
sender’s email the sender’s email
address. server.
To This specifies the One or email address(es). For emailing By the sender.
person who will multiple recipients, separate each email
receive the message address with a comma. Note there is no
comma after the last email address.
43
would work for you.
Thanks!
Jane A. Alverno
Student, Alverno College
Attachments
Attachments are optional and include any separate files that may be part of the message.
4. SUMMARY
1. Network administrators use devices to control and extend the usable size of a
network.These devices include repeaters, hubs, bridges, switches, routers, and gateways.
2. Repeaters work against attenuation by cleaning and repeating signals that they receive on
a network. Repeaters do not reduce network traffic or segment the network
3. Network segmentation is the process of isolating hosts onto smaller segments to reduce
the possibility of collisions.
4. Hubs are commonly used to connect segments of a LAN. A hub contains multiple ports.
When a packet arrives at one port, it is copied to the other ports so that all segments of
the LAN can see all packets.
5. A passive hub serves simply as a conduit for the data, enabling it to go from one device
(or segment) to another. So-called intelligent hubs include additional features that enables
an administrator to monitor the traffic passing through the hub and to configure each port
in the hub. Intelligent hubs are also called manageable hubs.
6. Bridges provide network segmentation by examining the address that is sent in the data
frame. A Bridge is a networking device which connects multiple LANs and forwards or
filters data packets between them based on their destination address.
7. Switch is similar to a hub, in that it provides a central connection between two or more
computers on a network, but with some intelligence. Whereas for a hub any message
received at the hub is broadcast to all the attached computers, with a switch it is sent only
44
to the destination computer and is not visible to other attached devices. This does not
prevent "broadcast" messages from being sent to all attached devices.
8. Routers provide filtering and network-traffic control on LANs and WANs. They can
connect multiple segments and networks. Routers use information from routing tables to
move packets from one network to another
9. Gateways are usually a combination of hardware and software. A Gateway is a
networking device which translates between two dissimilar protocols. A gateway links
and translates between local area networks with different protocols. It can function across
all layers of the OSI model but commonly does so at the application layer.
10. IPv4 and IPv6 are Internet addressing protocols that assign addresses in binary to
machines on the Internet. IPv6 is the successor of IPv4.
11. The Domain Name System (DNS) is a client-server application that identifies each host
on the Internet with a user-friendly name.
12. The domain name system maps user-friendly addresses to IP addresses.
13. E-mail, newsgroups, remote login, file transfer, world wide web are some of the
applications of the Internet.
14. E-mail is a most familiar and widely used network service. It is a system for sending
messages or files to other computer users based on mailbox addresses rather than a direct
host-to host exchange, and supports mail exchange between users on the same or
different computers.
15. An e-mail message consists of a header and the body of the message. The first part, the
header, contains the information about where the message has to be sent, as well as other
information like date, etc. The body is the actual message that is being sent.
16. E-mail architecture is defined in terms of two sub-systems: Mail User Agent ( or simply
User Agent) and Message Transfer Agent(MTA).
17. Mail User Agent (MUA) is a program installed on the user’s system and is called e-mail
client.
18. MTA is a software running on mail servers that communicate with user agents to accept
mails and moves the mail to the required destinations.
45
19. Microsoft Outlook, Mozilla Thunderbird, Outlook Express, Eudora, Incredimail, Lotus
Notes or Pegasus are well-known stand-alone e-mail clients. Free e-mail services like
Hotmail or Yahoo are web based e-mail clients.
20. E-mail client helps you to list, read, create, and send messages. It also helps to add
attachments to messages to be sent and save attachments from messages received.
21. An e-mail server saves messages for users in their accounts identified by their e-mail
addresses. An account represents a mailbox for a user.
22. An e-mail system supports features like composition, transfer, reporting, displaying,
disposition, forwarding, mailbox creation, carbon copies etc.
23. Nearly all e-mail clients including yahoo provide a GUI interface to the user for creating
email accounts and working with messages.
5. SUGGESTED READINGS
46
3. What is the importance of a transceiver and an NIC in a network?
4. Explain the different types of connectors used with different types of cables.
5. How is a Hub different from a switch? Illustrate the applications of hubs and
switches.
6. When do you think a bridge is more appropriate to use than a repeater?
7. Distinguish between a bridge and a switch.
8. What is a Router? Describe how routers connect networks thru an appropriate
diagram.
9. How is a gateway different from a router?
10. Compare different interconnecting devices used in LANs and WANs along with
their diagrams.
11. Describe t he addressing scheme follow ed in IPv4.
47
Post Graduate Diploma in Computer Science and Applications
Lesson No. : 12
1. INTRODUCTION
2. OBJECTIVE
3. CONTENTS
3.8.1 DIALUP
3.9 MODEMS
1
4. SUMMARY
5. SUGGESTED READINGS
6. SELF ASSESSMENT QUESTIONS
1. INTRODUCTION
Transferring files from one computer to another is another important task that can be performed
in an internetworking environment. File Transfer Protocol (FTP) is the standard protocol for
lets a user log on to a remote computer and acce ss any application program on that computer
using TELNET (Terminal Network). After logging on, a user can use the services available on
the remote computer and transfer the results back to the local computer.
The Internet provides a wealth of information on virtually any topic with the World Wide Web
service. One might think that the volume of information would make it difficult for users to find
specific information. To help users locate information, many Web sites provide search engines
that explore the Internet and maintain searchable records containing information about Web site
content. Web content is available on a number of Web servers. A Web server responds to client
requests by providing resources, such as HTML documents. Web servers and clients
communicate with each other via the platform-independent Hypertext Transfer Protocol (HTTP).
The Web allows users to view documents that contain text and graphics, and to follow
hypermedia links from one document to another. The identity of Web pages is done through
2
In order to access any service of the Internet, one must have an Internet connection. The common
ways to get connected to the Internet are Dial-up, DSL, and Leased line connections.
2. OBJECTIVE
Section 3.1 discusses file transfer application along with one popular protocol involved in
transferring files: the File Transfer Protocol (FTP). Section 3.2 focuses on TELNET, the standard
Section 3.3 gives an overview of the World Wide Web. Thereafter, some basic features of
Web browsers are software programs that allow users to access the Web’s rich multimedia
content. This lesson focuses on Web browsers in section 3.4 and then features some popular web
browsers.
Section 3.5 explains how search engines work and names some popular search engines. URLs
used to uniquely identify Web pages are discussed in section 3.6. Section 3.7 describes Web
The next part of the lesson is dedicated to Internet connections and modems. Section 3.8
describes various ways to acquire Internet connection. Section 3.8.1 discusses Dial-up service.
Section 3.8.2 is focused on DSL. Section 3.8.3 covers Leased line connection and section 3.9
describes modems. Finally, section 3.10 highlights the purpose of Internet Service Provider.
3
3. CONTENTS
File Transfer Protocol (FTP) is a standard network protocol used to copy a file from one host
to another over the Internet. FTP is built on client-server architecture and utilizes separate
control and data connections between the client and server applications. This facility is a method
of gaining limited access to another machine in the Internet, and obtaining files from it. You
need full Internet connectivity, to do ftp interactively. FTP has many advantages, for example,
it allows you to get new free software, or updated versions of old programs, as well as useful
data for your research. Files of any size can be transferred between machines based on any kind
The user interacts with FTP through an FTP user agent. The user first provides the hostname
of the remote host, which causes the FTP client process in the local host to establish a
connection with the FTP server process in the remote host. The user then provides the user
identification and password, which get sent over the connection as part of FTP commands.
Once the server has authorized the user, the user copies one or more files stored in the local
file system into the remote file system (or vice versa).
FTP uses two parallel connections to transfer a file, a control connection and a data
connection. The control connection is used for sending control information between the two
directory, and commands to "put" and "get" files. The data connection is used to actually send
a file.
4
Fig. 1. FTP Control and Data Connections
FTP Features
Interactive Access: FTP provides interactive interface that allows humans to easily interact with
remote servers. For example, a user can ask for a listing of all files in a directory on a remote
machine.
Format (representation) Specification: FTP allows the client to specify the type and format of
stored data. For example, the user can specify whether a file contains text or binary data and
anonymous user access. The most common way of using FTP is via anonymous FTP. When
you start an ftp connection, you will be asked for a user name and a password. If the machine
supports it, you can try "anonymous" as user name. This simply means that you are logged
without an identity; your e-mail address will be your password. You gain access to certain parts
of the hard disk of the other machine, unlike using ftp to a machine where you have an account.
In this last case, you have access to all the files in the machine, except for the standard
permissions protection.
5
3.2 REMOTE LOGIN USING TELNET
One example of a network virtual terminal protocol is Telnet. Telnet or TELecommunication
NETwork is a network protocol which is mostly used to connect to remote machines over a local
area network or the Internet. It is best understood in the context of a user with a simple terminal
using the local telnet program (known as the client program) to run a login session on a remote
computer where his communications needs are handled by a telnet server program. Using Telnet
Client and Server, you can create a remote command console session on a host. You can run
command line programs, shell commands, and scripts in a remote command console session just
as though you were locally logged on to the host and using a local command prompt window.
that lets a user access any application running on a remote host. A virtual terminal is a data
structure maintained by either the application software or a local terminal. Its contents represent
the state of the terminal. For example, they may include the current cursor position, reverse video
indicator, cursor shape, number of rows and columns, and color. Both the user and the
application can reference this structure. The application writes to the virtual terminal without
worrying about terminal-specific matters. Virtual terminal software, the Network Virtual
Terminal (NVT) in case of Telnet, does the required translation, and the data is displayed. When
a user enters data, the process works in reverse. Virtual terminal protocols define the format of
the data structure, software converts user input to a standard form, and the application then reads
To the user, a remote login appears to be no different than a login to a local computer. A user
works at a PC (or is connection to another computer) that runs protocols to connect to a network.
The protocols establish a connection over the network to a remote computer. There may be slight
6
delays between responses, especially if the remote computer is far away or network traffic is
heavy.
Telnet works in a client/server mode. That is, a PC (or other computer) runs Telnet (client)
locally and transmits data between the user and network protocols. It also can format and send
specific commands. The remote computer (server) also runs its version of Telnet. It performs
similar functions, exchanging data between network protocols and the operating system and
o telnet hostname: it will open a connection to the host you name. For example,
math.sunysb.edu.
Once connected, Telnet works in the background completely transparent to the user. However,
the user can escape from the remote login to give subsequent commands to Telnet. This is
normally done by entering a control sequence such as Ctrl-]. This returns the Telnet prompt to
The World Wide Web is an architectural framework for accessing linked documents spread out
over thousands of machines all over the Internet. It has a colorful graphical interface that is easy
for beginners to use, and it provides an enormous wealth of information on almost every
conceivable subject.
7
The Web (also known as WWW) began in 1989 at CERN, the European center for nuclear
research. The WWW, is a World Wide, Internet based, multimedia presentation system. It is a
system of cooperating Internet host computers that offer multimedia presentations, indexes, cross
references, and text-search capabilities so that users can find text documents across the globe.
The main vehicle for users to traverse the WWW are directories, which organize WWW sites by
topic and evaluate them, and search engines which scan WWW pages for keywords or phrases.
WWW is not owned by any body. People are responsible for the documents they create and
make available to the public. Via the Internet, hundreds of thousands of people generate
information that is accessible from homes, schools, and work places around the world.
Architectural Overview
Web is basically a client-server system. From the user’s point of view, the web consists of a vast,
worldwide collection of documents, usually just called pages for short. Each page may contain
links (pointers) to other, related pages, anywhere in the world. Users can follow a link (e.g., by
clicking on it), which then takes them to the page pointed to. This process can be repeated
indefinitely, possibly traversing hundreds of linked pages while doing so. Pages that point to
other pages are said to use hypertext or hypermedia. The suffix media is used to indicate that a
document can contain items other than text (e.g., graphics, images); The prefix hyper is used
because a document can contain selectable links that refer to other, related documents.
Two main building blocks are used to implement the Web on top of the global Internet. A Web
Browser and a Web Server. Browser is a program used to view web pages (Mosaic, Internet
explorer and Netscape are three popular ones). A Web browser consists of an application
program that a user invokes to access and display a Web page. A browser becomes a client that
contacts the appropriate Web server to obtain a copy of the specified page. The browser fetches
the page requested, interprets the text and formatting commands that it contains, and displays the
page, properly formatted, on the screen. An example is given in the figure 2 below. Like many
web pages, this one starts with a title, contains some information, and ends with the email
address of the page’s maintainer. Strings of text that are links to other pages, called hyperlinks,
are highlighted, either by underlying, displaying them in special color, or both. To follow a link,
the user places the cursor on the highlighted area (using the mouse or the arrow keys) and selects
8
it (by clicking a mouse button or hitting ENTER). Non-graphical browsers, such as Lynx exist,
but they are not as popular as graphical browsers. Voice-based browsers are also being
developed.
Users who are curious about the Department of Correspondence of Kurukshetra University can
learn more about it by clicking on its (underlined) name. The browser then fetches the page to
which the name is linked and displays it, as shown in fig 2(b).
.
W ELCOM E TO THE KURUKSHETRA UNIVERSITY OF INDIA
Campus Information
Admissions information
Campus map
Directions to campus
Academic Departments
Department of Computer Science and Applications
Department of Mathematics
(a)
Department of Botany
Department of Zoology
Department of Correspondence
(a)
[email protected]
(a)
(b)
Fig.2.(a) A Web page (b) The page reached by clicking on Department of Correspondence
9
WWW uses Uniform Resource Locator(URL) as identifier of a given information resource on
the Internet (URL is detailed in section 3.6).The server-name portion of the URL is resolved into
an IP address using the global, distributed Internet database known as the Domain Name System
(DNS). This IP address is necessary to contact the Web server. The browser then requests the
resource by sending an HTTP request to the Web server at that particular address.
Every web site has a server process listening for incoming connections from clients (normally
browsers). After a connection has been established, the client sends one request and the server
sends one reply. Then the connection is released. The protocol that defines the legal requests and
replies is called HTTP. Figure 3 shows how the various parts of the Web model fit together.
Here the browser is displaying a Web page on the client machine. When the user clicks on a line
of text that is linked to a page on the abc.com server, the browser follows the hyperlink by
sending a message to the abc.com server asking it for the page. When the page arrives, it is
displayed. I f this page contains a hyperlink to a page on the xyz.com server that is clicked on,
the browser then sends a request to that machine for the page, and so on indefinitely.
10
HTTP
The standard web transfer protocol is HTTP (Hyper Text Transfer Protocol). It is a protocol used
for communication between a browser and a Web server or between intermediate machines and
Web servers. Each interaction consists of one request, followed by one response.
Overview/Characteristics of HTTP
A client is often referred to as a user agent (UA). A web crawler (spider) is another example of a
common type of client or user agent.
Support for Caching and Intermediaries: To improve response time, a browser caches a copy
of each Web page it retrieves. If a user requests, a page again, HTTP allows the browser to
interrogate the server to determine whether the contents of the page has changed since the copy
was cached. Proxy servers are used by HTTP to cache Web pages and answer a browser’s
request from its cache.
HTTP Resource Identification: HTTP Resources are identified and located on the network by
Uniform Resource Locators (URLs)—using the http. URLs and the Hypertext Markup Language
(HTML), form a system of inter-linked resources, called hypertext documents, on the Internet.
Web Documents
The documents in the WWW can be grouped into three broad categories: static, dynamic, and
active. The category is based on the time at which the contents of the document are determined.
Static Web Documents: Static documents are fixed-content documents that are created and
stored in a server. The client can get only a copy of the document. In other words, the contents
11
of the file are determined when the file is created, not when it is used. Of course, the contents in
the server can be changed, but the user cannot change them. HTML is a famous language for
creating static Web documents.
Dynamic Web Documents: In the early days of the Web, all content was, in fact, static.
However, in recent years, more and more content has become dynamic, that is, generated on
demand, rather than stored on disk. Content generation can take place on the server side or on
the client side.
Server-Side Dynamic Web Page Generation: A dynamic document is created by a Web server
whenever a browser requests the document. When a request arrives, the Web server runs an
application program or a script that creates the dynamic document. The server returns the output
of the program or script as a response to the browser that requested the document. Because a
fresh document is created for each request, the contents of a dynamic document can vary from
one request to another. An example of server-side content generation is when a user fills in a
form and clicks on the submit button. A message is sent to the server indicating that it contains
the contents of a form, along with the fields the user filled in. Now what is needed is a program
or script to process it which may involve using the user-supplied information to look up a record
in a database on the server’s disk and generate a custom HTML page to send back to the client.
The traditional way to handle forms and other interactive Web pages is a system called the
Common Gateway Interface (CGI). The CGI is a technology that creates and handles dynamic
documents at the server side. CGI is a set of standards that define how a dynamic document is
written, how data are input to the program, and how the output result is used. CGI allows
programmers to use any of several languages such as C, C++, BOURNE Shell, Korn Shell, C
Shell, Tcl,or Perl. The problem with CGI technology is the inefficiency that results if part of the
dynamic document that is to be created is fixed and not changing from request to request. If we
use CGI, the program must create an entire document each time a request is made. The solution
is to create a file containing the fixed part of the document using HTML and embed a script, a
source code, that can run by the server to provide the varying availability. Some most common
scripting languages for dynamic documents build at the server-side of Web-based applications
are Hypertext Preprocessor (PHP), which uses the Perl language (good for handling forms and
is simpler than CGI); Java Server Pages (JSP), which uses Java language for scripting;
12
Active Server Pages (ASP), a Microsoft product which uses Visual Basic language for
scripting; ColdFusion, a tag-based, server-side technology from Macromedia designed to build
powerful database-intensive Web applications, and embeds SQL database queries in the HTML
document. Python is another cross-platform, object-oriented scripting language comparable to
Perl and PHP. VBScript is a scripting language developed by Microsoft and was the most
widely used language for writing Active Server Pages (ASP) prior to ASP.NET. .NET initiative
, announced by Microsoft in June 2000, is a framework/strategy that permits developers to create
.NET applications in any .NET compatible language(e.g.Jscript.NET, C#, Visual Basic.NET
Visual C++.NET and many others). ASP.NET supports over 25 programming languages,
including Visual Basic.NET, C# and Jscript.NET.
Active Documents (Client-Side Dynamic Web Page Generation) : CGI,PHP, JSP, and ASP
scripts solve the problem of handling forms and interaction with databases on the server, They
can all accept incoming information from forms, look up information in one or more databases,
and generate HTML pages with the result. But these languages cannot respond to mouse
movements or interact with users directly. For this purpose, it is necessary to have scripts
embedded in HTML pages that are executed on the client machine rather than the server
machine.
When an application needs a program or script to be run at the client site, we call it active
documents. For example if we want to run a program that creates animated graphics on the
screen or a program that interacts with the user. When a browser requests an active document,
the server sends a copy of the document or a script. The document is then run at the client
(browser) site. One way to create an active document is to use Java applets. A browser can run
an applet at the client site. Another way is to use JavaScript which is a very high level object-
based scripting language developed for creating active pages. It is a client-side scripting
language
A collection of technologies for generating web content is sometimes called Dynamic HTML.
Dynamic HTML includes XHTML, JavaScript, Cascading Style Sheets, the Dynamic HTML
object model and event model, and ActiveX controls. Dynamic HTML makes Web pages ‘come
alive’ by providing stunning multimedia effects that include animation, audio and video.
13
HTML does not provide any structure to Web pages. It also mixes the content with the
formatting. For applications such as e-commerce, there is a need for structuring Web pages and
separating the content from the formatting. XML (eXtensible Markup Language), that describe
Web content in a structured way, and XSL (eXtensible Style Language), that describes the
formatting independently of the content, are two new languages developed as an enhancement to
HTML.
Creating Web Graphics: The most successful Web pages use both text and graphics to enhance
the user’s experience. Adobe Photoshop is an easy-to-use graphics package which is used to
design images for Web pages. Macromedia Flash is another multimedia application that
developers use to produce interactive, animated movies. Flash can be used to create Web-based
banner advertisements, interactive Web sites, games and Web-based applications with stunning
graphics and multimedia effects. Macromedia’s Dreamweaver is a popular visual HTML editor
which is used to develop Web pages in visual environment. It can insert and edit text, as well as
insert images and links into Web pages.
The World Wide Web (WWW) is a large-scale, on-line repository of information that users can
search using an interactive application program called a browser.
A web browser is a software application for retrieving, presenting, and traversing information
resources on the World Wide Web. An information resource is identified by a Uniform Resource
Identifier (URI) and may be a web page, image, video, or other piece of content. Hyperlinks
present in resources enable users to easily navigate their browsers to related resources.
Features
Interface: Most browsers have a point and click interface-the browser displays information on
the computer’s screen and permit a user to navigate using the mouse. The information displayed
includes both text and graphics. Furthermore, some of the information on the display is
highlighted to indicate that an item is selectable. When the users places the cursor over a
14
selectable item and clicks a mouse button, the browser displays new information that
corresponds to the selected item.
Tabs: All major web browsers allow the user to open multiple information resources at the same
time, either in different browser windows or in different tabs of the same window. Major
browsers also include pop-up blockers to prevent unwanted windows from "popping up"
without the user's consent.
Buttons: Most browsers have numerous buttons and features to make it easier to navigate the
Web. Many have a button for going back to the previous page, a button for going forward to the
next page (only operative after the user has gone back from it), and a button for going straight to
the user’s own home page.
Bookmarks and web feed aggregator: Most browsers have a button or menu item to set a
bookmark on a given page and another one to display the list of bookmarks, making it possible
to revisit any of them with a single mouse click. Bookmarks are also called "Favorites" in
Internet Explorer.
Navigation: In addition to having ordinary text (not underlined) and hypertext (underlined), Web
pages can also contain icons, line drawing, maps, and photographs. Each of these can
(optionally) be linked to another page. Clicking on one of these elements causes the browser to
fetch the linked page and display it, the same as clicking on text. With images such as photos and
maps, which page is fetched next may depend on what part of the image was clicked on.
Display of Images: Many web pages contain large images, which take a long to load. Some
browsers deal with the slow loading of images by first fetching and displaying the text, then
getting the images. This strategy gives the user something to read while the images are coming
in.
Handling Forms and active maps: Some web pages contain forms that request the user to enter
information. Typical applications of these forms are searching a database for a user-supplied
item, ordering a product, or participating in a public opinion survey. Other web pages contain
maps that allow users to click on them to zoom in or get information about some geographical
15
area. Handling forms and active (clickable) maps requires more sophisticated processing than
just fetching a known page.
Caching: Some browsers use the local disk to cache pages that they have fetched. Before a page
is fetched, a check is made to see if it is in the local cache. If so, it is only necessary to check if
the page is still up to date. If so, the page need not be loaded again. As a result, clicking on the
BACK button to see the previous page is normally very fast.
Plug-ins: Furthermore, most browsers can be extended via plug-ins, downloadable components
that provide additional features.
Status bar: This is the box at the bottom of your browser window. The status bar displays all
sorts of information, depending on what you're doing at the time, but mostly it's for showing load
speed and the URL of whatever address your mouse is hovering over.
Address bar: This is the box at the top of your browser window that displays the entire URL, or
Web site address.
Title bar: The title bar is at the very top of your browser window; in both Firefox and Internet
Explorer it is the blue bar there at the top. You'll see the title of the Web page there; for example,
you should see "What Is A Web Browser?" at the top of your browser window right now.
Toolbar Icons: The toolbar and its icons are at the top of your browser window right underneath
the Title Bar. This is where you'll see the Back button, the Home button, the Refresh button, etc.
Display Window: The Display Window is just a fancy term for your browser work space; it's the
frame through which you see the website.
Scroll Bars: If you've ever been to a website that you had to "scroll down" to read something,
then you've used the scroll bars. They're just navigational/directional aids.
16
Popular Web Browsers
This is a table of personal computer web browsers by year of release of major version, in
chronological order.
1994 IBM WebExplorer, Netscape Navigator, SlipKnot 1.0, MacWeb, IBrowse, Agora (Argo),
Minuet
1995 Internet Explorer 1, Netscape Navigator 2.0, OmniWeb, UdiWWW, WebRouser, Internet
Explorer 2, Grail
1996 Arachne 1.0, Internet Explorer 3.0, Netscape Navigator 3.0, Opera 2.0,
PowerBrowser 1.5, Cyberdog, Amaya 0.9, AWeb, Voyager
1997 Internet Explorer 4.0, Netscape Navigator 4.0, Netscape Communicator 4.0, Opera 3.0,
Amaya 1.0
1998 Internet Explorer 5.0 Beta 1, iCab, Mozilla
2000 Konqueror, Netscape 6, Opera 4, Opera 5, K-Meleon 0.2, Amaya 3.0, Amaya 4.0
2002 Netscape 7, Mozilla 1.0, Phoenix 0.1, Links 2.0, Amaya 6.0, Amaya 7.0
17
2004 Firefox 1.0, Netscape Browser, OmniWeb 5.0
2005 Safari 2.0, Netscape Browser 8.0, Opera 8.., Epiphany 1.8, Amaya 9.0, AOL Explorer1.0,
Maxthon 1.0, Shiira 1.0
2006 SeaMonkey 1.0, K-Meleon 1.0, Galeon 2.0, Camino 1.0, Firefox 2.0, Avant 11, iCab 3,
Opera 9, Internet Explorer 7, Sputnik
2007 Maxthon 2.0, Netscape Navigator 9, NetSurf 1.0, Flock 1.0, Safari 3.0, Conkeror
2008 Konqueror 4, Safari 3.1, Opera 9.5, Firefox 3, Amaya 10.0, Flock 2, Chrome 1, Amaya
11.0
2009 Internet Explorer 8, Chrome 2, Safari 4, Opera 10, Chrome 3, SeaMonkey 2, Camino 2,
Firefox 3.5
2010 Firefox 3.6, Chrome 4, Opera 10.50, Chrome 5, Safari 5, Internet Explorer 9
A search engine is a sophisticated piece of software, accessed through a page on a website that
allows you to search the web by entering search queries into a search box. The search engine
then attempts to match your search query with the content of web pages that is has stored, or
A search engine acts as a way of retrieving information from a database, based on certain criteria
defined by the user. Modern search engines search databases that contain huge amounts of data,
collected from the World Wide Web, newsgroups, and directory projects.
1. Web crawling
2. Indexing
3. Searching
18
Web crawling: Web search engines work by storing information about many web pages, which
they retrieve from the html itself. These pages are retrieved by a Web crawler (sometimes also
known as a spider) — an automated Web browser which follows every link on the site.
Indexing: The contents of each page are analyzed to determine how it should be indexed (for
example, words are extracted from the titles, headings, or special fields called meta tags). Data
about web pages are stored in an index database for use in later queries. A query can be a single
Searching: When a user enters a query into a search engine (typically by using key words), the
engine examines its index and provides a listing of best-matching web pages according to its
criteria, usually with a short summary containing the document's title and sometimes parts of the
text.
The usefulness of a search engine depends on the relevance of the result set it gives back. While
there may be millions of web pages that include a particular word or phrase, some pages may be
more relevant, popular, or authoritative than others. Most search engines employ methods to rank
Search Indexes
There are two main types of search indexes we access when searching the web:
directories
Directories: Unlike search engines, which use special software to locate and index sites,
directories are compiled and maintained by humans. Directories often consist of a categorized
19
list of links to other sites to which you can add your own site. Editors sometimes review your site
Crawler-based search engines: Crawler-based search engines differ from directories in that
they are not compiled and maintained by humans. Instead, crawler-based search engines use
sophisticated pieces of software called spiders or robots to search and index web pages.
These spiders are constantly at work, crawling around the web, locating pages, and taking
Note: Some search systems are ‘hybrid’ systems as they combine both forms of index. Yahoo,
information in data repositories called databases that facilitate quick information retrieval.
engines, which do not maintain databases. Instead, they send the search criteria to other search
engines and aggregate the results. IE6 has a built-in metasearch engine that is accessed by
Bing Search: Microsoft's entry into the burgeoning search engine market.
20
Yahoo! Search: The 2nd largest search engine on the web (a report of September 2007).
Cuil: Cuil is a search engine website (pronounced as Cool) and claims to be world’s largest
search engine, indexing three times as many pages as Google and ten times that of MS.
Excite: Now an Internet portal, was once one of the most recognized brands on the Internet.
Go.com: The Walt Disney Group's search engine is now also an entire portal.
HotBot: Family-friendly! HotBot was one of the early Internet search engines
AllTheWeb: Search tool owned by Yahoo and using its database, but presenting results
differently.
Live Search: Microsoft's web search engine, designed to compete with Google and Yahoo!.
TEK : search engine is an email-based search engine developed at the Massachusetts Institute
of Technology. The search engine enables users to search the Web using only email. It is
Rediff: India - India's leading internet portal for news, mail, messenger, entertainment, business,
21
YouTube: Owned by Google, the web's largest media site. This search will search through the
Uniform Resource Locator (URL) is a Uniform Resource Identifier (URI) that specifies where
Web pages may contain pointers to other web pages. When the web was first created, it was
immediately apparent that having one page point to another web page required mechanisms for
naming and locating pages. In particular, there were three questions that had to be answered
The solution chosen identifies pages in a way that solves all three problems at once. Each page is
assigned a URL (Uniform Resource Locator) that effectively serves as the page’s worldwide
name.
A local name uniquely indicating the specific page (usually just a file name on the
22
For example, a URL can be: http:/www.cs.ku.in/welcome.html
This URL consists of three parts: The protocol (http); The DNS name of the host
(www.cs.ku.in); The file name (welcome.html) ; with certain punctuation separating the pieces.
The URLs have been designed to not only allow users to navigate the Web, but to deal with FTP,
Using URL’s
You can double click on a URL (link) and if your system is configured properly the
You can also copy the URL and paste it into the application which you use to get to the
resource.
– if all else fails you can try looking up the hierarchy by sequentially removing the file
A web server is a computer program that delivers (serves) content, such as web pages, using the
Hypertext Transfer Protocol (HTTP), over the World Wide Web. The term web server can also
refer to the computer or virtual machine running the program. In large commercial deployments,
23
a server computer running a web server can be rack-mounted with other servers to operate a web
farm.
Web servers are computers that deliver (serves up) Web pages. Every Web server has an IP
address and possibly a domain name. For example, if you enter the URL
whose domain name is pcwebopedia.com. The server then fetches the page named index.html
Any computer can be turned into a Web server by installing server software and connecting the
Most web servers have features that allow you to do the following:
Create one or more websites. (Set up the website in the web server, so that the website can be
Configure log file settings, including where the log files are saved, what data to include on the
log files etc. (Log files can be used to analyse traffic etc)
Configure website/directory security. For example, which user accounts are/aren't allowed to
view the website, which IP addresses are/aren't allowed to view the website etc.
Create an FTP site. An FTP site allows users to transfer files to and from the site.
24
Configure/nominate custom error pages. This allows you to build and display user friendly
error messages on your website. For example, you can specify which page is displayed when a
user tries to access a page that doesn't exist (i.e. a "404 error").
Specify default documents. Default documents are those that are displayed when no file name
is specified. You could nominate a default file. You can configure your web server so that any
Whenever you view a web page on the Internet, you are requesting that page from a web server.
Fig. 4.
The above diagram is a simplistic version of what occurs. Here's a more detailed version:
Your web browser first needs to know which IP address the website "www.quackit.com"
resolves to. If it doesn't already have this information stored in it's cache, it requests the
information from one or more DNS servers (via the Internet). The DNS server tells the
25
browser which IP address the website is located at. Note that the IP address was assigned
Now that the web browser knows which IP address the website is located at, it can
The web server responds by sending back the requested page. If the page doesn't exist (or
another error occurs), it will send back the appropriate error message.
When referring to web browsers and web servers in this manner, we usually refer to them as a
Multiple Websites
A web server can (and usually does) contain more than one website. In fact, many hosting
companies host hundreds, or even thousands of websites on a single web server. Each website is
usually assigned a unique IP address which distinguishes it from other websites on the same
machine. This IP address is also what the DNS server uses to resolve the domain name.
It is also possible to configure multiple websites without using different IP addresses using host
If the requested page isn't found, the web server sends the appropriate error code/message back
to the client.
SSL Certificates
You can apply SSL certificates (for security) against a website via the web server. First you need
to generate the certificate either by yourself (i.e. using a certificate generator), or by a Certificate
26
Authority (CA). Then, once it has been generated, you apply it to your website via your web
server.
Once you've applied an SSL certificate against a website, you can navigate it using HTTPS (as
opposed to HTTP). HTTPS encrypts any data that is transferred over the Internet. This reduces
the possibility of some malicious person being able to read your users' sensitive information.
Apache HTTP Server (also referred to as simply "Apache") has been the most popular web
server on the web since 1996. The software is produced under the Apache licence, which makes
it free and open source.
Apache is available for a range of operating systems, including Unix, Linux, Novell Netware,
Windows, Mac OS X, Solaris, and FreeBSD.
Based on the Sun One Web Server, the Sun Java System Web Server is designed for medium to
large business applications. Sun Java System Web Server is available for most operating
systems.
27
Web server components:
Web server: application that responds to HTTP requests by returning ‘web’ resources (html file,
Servelet engine: runtime shell that invokes servlets on behalf of clients, runs them and manages
In this world of globalization and information boom life could not be imagined without Internet
Connection . A computer alone is not enough to access the Internet. In addition to Web browser
software, the computer needs specific hardware and a connection to an Internet Service Provider
to view Web pages. First, a computer must have a modem or network card. A modem is
hardware that enables a computer to connect to a network. A network card, also called a LAN
card or network interface card (NIC), is hardware that allows a computer to connect to the
Internet through a network or a high-speed Internet connection, such as a local area network
After ensuring that a computer has a modem or a network card (most computers come with one
or both of these), the next step is to register with an Internet Service Provider (ISP).
Computers connect to an ISP using a modem and phone line, or via a NIC using a LAN (mostly
Ethernet), DSL or cable modem. The ISP connects computers to the Internet.
28
Different ISPs offer different types of high speed connections, called broadband connections,
which include DSL, cable modem, Integrated Services Digital Network (ISDN) and slower dial-
Broadband is a category of high-bandwidth Internet service that is most often provided to home
users by cable television and telephone companies. DSL is a broadband service that allows
computers to be connected at all times to the Internet over existing phone lines, without
interfering with telephone services. However, DSL requires a special modem provided by the
ISP. Like DSL, cable modems enable the computer to be connected to the Internet at all times.
Cable modems transmit data over the cables that bring television to homes and businesses.
Unlike DSL, the bandwidth is shared by many users. This sharing can reduce the bandwidth
available to each person when many use the system simultaneously. ISDN provides Internet
service over either digital or standard telephone lines. ISDN requires specialized hardware,
called a terminal adaptor (TA), which is usually obtained from the ISP. Dial-up service uses an
existing telephone line. If a computer is connected to the Internet, the user usually cannot receive
the voice calls during this time. If the voice calls do connect, the Internet connection is
interrupted.
Broadband Internet access, often shortened to just "broadband", is a high data rate connection to
the Internet— typically contrasted with dial-up access using a 56k modem.
Dial-up modems are limited to a bitrate of less than 56 kbit/s (kilobits per second) and require
the dedicated use of a telephone line — whereas broadband technologies supply more than
29
Data rates are defined in terms of maximum download because network and server conditions
significantly affect the maximum speeds that can be achieved and because common consumer
Access Networks
Company access, connecting end systems in a business or educational institution into the
network.
Wireless access, connecting end systems (that are often mobile) into the network.
Residential Access
Residential access refers to connecting a home end system (a PC or a home network) to an edge
Dial-up
ISDN
Company Access
On corporate and university campuses, a local area network (LAN) is typically used to connect
an end system to the edge router. There are many types of LAN technologies but Ethernet
technology is currently by far the most prevalent access technology in company networks. A
30
Wireless Access
Mobile phones and PDAs are overtaking wired computers as the dominant Internet access
devices throughout the world. There are two broad types of wireless Internet access:
Wireless LANs where users transmit/receive packets to/from a base station within a
radius of a few tens of meters. The base station is connected to the wired Internet and
thus serves to connect wireless users to the wired network. IEEE 802.11 (Wi-Fi) is a
access at high speeds (around 384 kbps). 3G systems provide high-speed access to the
Web and interactive video, and also voice quality that is better than that of an ordinary
wired telephone.
3.8.1 DIAL-UP
Dial-up Service is a form of Internet access that uses the facilities of the public switched
telephone network (PSTN) to establish a dialed connection to an Internet service provider (ISP)
Dial-up connections to the Internet require no infrastructure other than the telephone network.
31
Dial-up requires time to establish a usable telephone connection (up to several seconds,
depending on the location) and perform handshaking for protocol synchronization before data
transfers can take place. In locales with telephone connection charges, each connection incurs an
incremental cost. If calls are time-metered, the duration of the connection incurs costs.
Modern dial-up modems typically have a maximum theoretical transfer speed of 56 kbit/s ,
although in most cases 40–50 kbit/s is the norm. An increasing amount of Internet content such
Replacement by broadband
Broadband Internet access (cable and DSL) has been replacing dial-up access in many parts of
the world. Broadband connections typically offer speeds 700 kbit/s or higher for approximately
3.8.2 DSL
Faster Internet options include, most commonly, cable and DSL (Digital Subscriber Line or
Dedicated Service Line). DSL uses your standard telephone line for fast Internet access, but
differs from dial-up in that DSL uses a digital frequency. Dial-up transmits data across the
telephone line using the standard analog frequency, making it impossible to use your telephone
while online. With DSL service you can be online and use the telephone at the same time. Cable
differs from dial-up in that Internet access is provided via the same cable company that brings
32
Both cable and DSL provide a 24/7 Internet connection, allowing for subscribers to leave the
computer actively connected to the Internet 24 hours a day. These services are more than 30x
What is DSL?
DSL is a high-speed, often called “broadband,” Internet connection. DSL Internet service is
“always on” — there is no need for waiting for your modem to connect you to the Internet. DSL
is much faster than a typical 56K modem connection, and also exceeds speeds available from
ISDN service.
Digital Subscriber Line (DSL) is a family of technologies that provides digital data
transmission over the wires of a local telephone network. DSL originally stood for digital
subscriber loop. In telecommunications marketing, the term Digital Subscriber Line is widely
understood to mean Asymmetric Digital Subscriber Line (ADSL), the most commonly installed
technical variety of DSL. DSL service is delivered simultaneously with regular telephone on the
same telephone line. This is possible because DSL uses a higher frequency. These frequency
The data throughput of consumer DSL services typically ranges from 256 Kb/s to 24 Mbit/s in
the direction to the customer (downstream), depending on DSL technology, line conditions, and
service-level implementation. In ADSL, the data throughput in the upstream direction, (i.e. in the
direction to the service provider) is lower, hence the designation of asymmetric service. In
Symmetric Digital Subscriber Line (SDSL) service, the downstream and upstream data rates are
equal.
33
Voice and data
DSL uses a second, higher frequency band (greater than 25 kHz) above the low frequency
regime (5 kHz and below) used by voice communications. On the customer premises, a DSL
filter is installed on each outlet for telephone handsets to remove the high frequency band,
eliminating interference with the operation of the telephone set, and enabling simultaneous use.
Dialup vs DSL
Differences between dialup and DSL
Dialup DSL
Phone line is used for either voice service or internet Simultaneous transmission of data (DSL) and voice or
connection fax services
Unique IP address for each connection Static IP address (higher security risk)
Easy setup, no setup fee Self installation is usually free. A setup fee is
needed if installed by a technician.
Available to everyone with a phone line Not every phone line is equipped for DSL service.
May not be available in some remote / rural areas.
34
3.8.3 LEASED LINE
A leased line is a service contract between a provider and a customer, whereby the provider
Typically, leased lines are used by businesses to connect geographically distant offices. Unlike
dial-up connections, a leased line is always active. The fee for the connection is a fixed monthly
rate. The primary factors affecting the monthly fee are distance between end points and the speed
of the circuit. Because the connection doesn't carry anybody else's communications, the carrier
Increasingly, leased lines are being used by companies, and even individuals, for Internet access
because they afford faster data transfer rates and are cost-effective for heavy users of the
Internet.
3.9 MODEM
35
The goal is to produce a signal that can be transmitted easily and decoded to reproduce the
original digital data. The most familiar type is a voice band modem that turns the digital data of
a computer into modulated electrical signals in the voice frequency range of a telephone channel.
These signals can be transmitted over telephone lines and demodulated by another modem at the
receiver side to recover the digital data.
Modulation is changing the digital data from a computer to analog data (audio tones or sounds)
to be sent over telephone lines.
Demodulation is changing the analog data which is received over the telephone lines to digital
data to be used by the computer.
FSK modems modulate data by varying the frequency of a signal (Frequency Modulation). FSK
modems can transmit binary information by using different frequencies to represent bit patterns.
In a binary system, one frequency represents one binary value and a different frequency
represents the other. These frequencies lie within the bandwidth of the transmission channel.
The figure below is an example of a modulated frequency using FSK. The signal is represented
in binary as 0010110.
36
Fig. 6. Frequency Modulation
This varies the amplitude of a signal by modulating a higher frequency. Binary information can
be transmitted by assigning discrete amplitudes to bit patterns.
The graph below shows what Amplitude Shift Keying looks alike. The period is the same for the
entire signal and it is only the amplitude that varies. For amplitude 1 = binary 0 and amplitude 2
= binary 1, this signal can be represented as 0011010.
37
Phase Shift Keying (PSK)
Phase Modulation (PM) varies the phase of a signal. Information is contained within the change
of phase. Phase shift keying is a technique which shifts the period of a signal. As with FM,
binary information can be transmitted by assigning phases to bit patterns.
We can see from the above graph that by having 4 separate signals, four different binary values
could be applied to each, with each binary value signifying 2 bits (00,01,10,11). The applying of
bit values to each signal is the principle of phase shift keying.
A simple representation of the three modulation techniques can be represented through the
following figure:
Fig. 9.
38
Quadrature Amplitude Modulation
This method of modulation combines amplitude shift keying (ASK) and phase shift keying
(PSK) and is the technique most often used for modern modems. The idea is to 'pack' as many
bits as possible into a baud. 16-QAM uses four amplitudes and four phase shifts, allowing the
binary value to be represented four bits at a time. In this case, the baud rate will be a quarter of
the bit rate.
The example below shows a signal that is transmitting at 3600bps, or 3 bits per baud.
This means that we can represent 8 binary combinations of 3 bits. The amplitude can be either 1
or 2 and there are also 4 possible phase shifts (one quarter each). A table can be generated to
show which binary combinations correspond to each signal:
000 1 None
001 2 None
010 1 1/4
011 2 1/4
39
100 1 1/2
101 2 1/2
110 1 3/4
111 2 3/4
QAM is incorporated into modern high speed modems that operate at 56000bps.
Types of Modems
Modems are classified by the amount of data they can send in a given time, normally measured
in bits per second (bit/s, or bps). They are also classified by their connection method. Dial-up
modems were the usual kind in the 20th century, and DSL modems and Cable TV modems are
now more used.
Modems that connect to the computer by a cable are called external modems. Modems that go
inside the computer are internal modems. Some internal modems are part of the motherboard;
others are inserted into the computer on a PC card.
Many modems are used to connect to the Internet through telephone service or cable
television service. Slow telephone service is called dial-up (maximum 56,000 bits per second).
Faster telephone service is called DSL and is usually more than ten times faster. Cable modems
connect through cable television, and are similarly fast. Most DSL and cable modems are
internal.
An Internet service provider (ISP), also sometimes referred to as an Internet access provider
(IAP), is a company that offers its customers access to the Internet. The ISP connects to its
customers using a data transmission technology appropriate for delivering Internet Protocol
packets or frames, such as dial-up, DSL, cable modem, wireless or dedicated high-speed
interconnects.
40
ISPs may provide Internet e-mail accounts to users which allow them to communicate with one
another by sending and receiving electronic messages through their ISP's servers. ISPs may
provide services such as remotely storing data files on behalf of their customers, as well as other
services unique to each particular ISP.
Internet Infrastructure
The Internet backbone is made up of many large networks which interconnect with each other.
These large networks are known as Network Service Providers or NSPs. Some of the large NSPs
are IBM, BBN Planet, SprintNet, PSINet, as well as others. These networks peer with each other
to exchange packet traffic.
1. Through independent “Network Access Points” (NAP). These are commercial operations and
provide high bandwidth switching between networks. They are generally confined to a small
geographical area (e.g., a single building) and consist of high-speed networks such as gigabit
Ethernet that host routers belonging to the NSPs.
2. Through private “peering” arrangements. These are direct connections between routers
belonging to the NSPs.
41
Regional “Internet service providers” (ISP’s) cover a smaller geographical area than an NSP.
To provide a service, they must connect to an NSP. This may be either direct or through a NAP.
Local ISP’s connect end users to the Internet. This may be via dial-up, ADSL etc. (for many
private users) or leased line (for corporate users).
Here, is an example of the physical connection through the phone network to the Internet Service
Provider.
Fig.12. The physical connection through the phone network to the Internet Service
Provider.
The ISP maintains a pool of modems for their dial-in customers. This is managed by some form
of computer (usually a dedicated one) which controls data flow from the modem pool to a
backbone or dedicated line router. This setup may be referred to as a port server, as it 'serves'
access to the network. Billing and usage information is usually collected here as well.
After your packets traverse the phone network and your ISP's local equipment, they are routed
onto the ISP's backbone or a backbone the ISP buys bandwidth from. From here the packets will
usually journey through several routers and over several backbones, dedicated lines, and other
networks until they find their destination.
1. Backbone : The backbones carry Internet traffic around the world and meet at Network
Access Points (NAP’s).
42
2. Internet Service Providers: ISP’s connect either directly to a backbone, or they connect
to a larger ISP with a connection to a backbone.
4. SUMMARY
1. File Transfer Protocol (FTP) is a standard network protocol used to copy a file from one
host to another over the Internet.
2. Telnet or TELecommunication NETwork is a network protocol which is mostly used to
connect to remote machines over a local area network or the Internet.
3. A web server is a computer program that delivers (serves) content, such as web pages,
using the Hypertext Transfer Protocol (HTTP), over the World Wide Web.
4. The World Wide Web (WWW) is a large repository of information linked together from
points all over the world.
5. World Wide Web offers hypertext technology that links together a ‘web’ of documents so
that these can be navigated in any number of ways with the use of sophisticated Internet-
specific graphical user interface (GUI) software (for example, Mosaic, Netscape,
Explorer).
6. WWW may also provide information consisting of hypermedia in which contents may
include graphics video, voice, and/or music a part form text. Web server software now
also allows the delivery of live, real-time audio and video.
7. The WWW consists of hypermedia documents stored on a set of Web servers and
accessed by browsers.
8. A Web document can be classified as static, dynamic, or active.
9. Each Web document is assigned a URL that uniquely identifies it; the URL specifies the
protocol used to retrieve the document, the location of the server, and the path to the
document on that server.
10. A browser and server use the Hyper Text Transfer Protocol (HTTP), to communicate.
11. Uniform Resource Identifier (URI) is a string of characters used to identify a name or
a resource on the Internet. Uniform Resource Locator (URL) is a Uniform Resource
Identifier (URI) that specifies where an identified resource is available and the
mechanism for retrieving it.
43
12. Search engine is a program designed to help find information stored on a computer
system such as the World Wide Web, or a personal computer.
13. A modem (modulator-demodulator) is a device that modulates an analog carrier to
encode digital information and demodulates the signal to decode the transmitted
information.
14. An Internet service provider (ISP), also sometimes referred to as an Internet access
provider (IAP), is a company that offers its customers access to the Internet.
15. Different ISPs offer different types of high speed connections, called broadband
connections, which include DSL, cable modem, Integrated Services Digital Network
(ISDN) and slower dial-up connections, each of which have a different bandwidth and
cost to users.
16. Broadband is a category of high-bandwidth Internet service that is most often provided
to home users by cable television and telephone companies.
17. DSL is a high-speed, often called “broadband,” Internet connection. DSL Internet service
is “always on”.
18. A leased line is a service contract between a provider and a customer, whereby the
provider agrees to deliver a symmetric telecommunications line connecting two or more
locations in exchange for a monthly rent.
44
6. SELF ASSESSMENT QUESTIONS
2. What is anonymous FTP? What are FTP control and data connections?
11. What is the purpose of a search engine in the Internet? How search engines work?
13. What are the various options for having Internet connection?
19. Which Internet connection will you prefer in your home and why?
45