Computer Networks

Download as pdf or txt
Download as pdf or txt
You are on page 1of 452

Writer Dr.

Rajender Nath

Professor, DCSA, K.U.K.

Chapter 1
Computer Fundamentals
Structure

1.1 Introduction

1.2 Objective

1.3 Presentation of Contents

1.3.1 What is Computer

1.3.2 Concept of Bit & Byte

1.3.3 Classification of Computers

1.3.3.1 On the basis of input signals and working principles

1.3.3.2 On the basis of size, speed, memory etc.

1.3.3.3 Other Classification of Computers

1.3.4 Input-Output (I/O) Devices

1.3.4.1 Input Devices

1.3.4.2 Output Devices

1.3.5 Input/Output Devices or Secondary Storage Devices

1.3.5.1 Hard Disk Drive

1.3.5.2 Optical Storage Devices

1.3.5.2.1 Compact Disk (CD)

1.3.5.2.2 Compact Disk-Recordable (CD-R)

1.3.5.2.3 Compact Disk-ReWritable (CD-RW)

1.3.5.2.4 Digital Versatile Disk (DVD)


1
1.3.5.2.5 Blu-Ray Optical Disk

1.3.5.2.6 High Density DVD

1.3.5.2.7 Magneto Optical Disk

1.3.5.2.8 Ultra Density Optical (UDO) Disk

1.3.5.2.9 Optical Jukebox

1.3.5.3 Flash Drive/Pen Drive

1.3.5.3.1 Internal Parts of Flash drive

1.3.5.3.2 Construction and working of Flash Memory

1.4 Summary

1.5 Suggested Readings/Reference Material

1.6 Self-assessment Questions

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.

1.3 Presentation of Contents

1.3.1 What is a Computer?

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

function units as shown in Figure 1.1:

a) Input Unit (IU)

b) Memory Unit (MU)

c) Arithmetic and Logic Unit (ALU)

d) Control Unit (CU)

e) Output Unit (OU)

3
Arit hmet ic &
Logic Unit

Program + Dat a Memory Unit


Input Unit Result
Output Unit

Cont rol Unit

Figure 1.1 Block Diagram of a Digital Computer

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.

Central Processing Unit is the main unit inside the computer.

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

Reader (OCR), Bar Code Reader, Optical Mark Reader etc.

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

above functionality. It provides space for storing data and instructions.

The storage unit performs the following major functions:

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

• Intermediate results of processing are also stored here.

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

the power supply detects abnormal conditions.

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

output is also stored inside the computer for further processing.

1.3.3 Classification of Computers

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.

1.3.3.1 On the basis of input signals and working principles

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

example, analog computers are used in space research.

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,

depending on, the data they receive from the user.

c) Hybrid Computer (Analog + Digital): A combination of computers those are capable of

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

components and for storage, digital memories are used.

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

execute many programs concurrently.

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

distinction between small minicomputers and workstations. But in general, a minicomputer is a

multiprocessing system capable of supporting from 4 to about 200 users simultaneously.

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.

d) Microcomputer: When entire CPU is fabricated onto a single chip, it is called as

microprocessor. When a computer is built around a microprocessor, it is called as microcomputer.

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

phones and notebook etc., which are discussed below.

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

some of the PC manufacturers.

f) Laptop Computer: It is a portable microcomputer complete with an integrated screen and

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

in the desktop computer.

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

reader/writer, which increases the functionality of the Simputer including possibility of

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

new kind of Palmtops such as Akash Tablet.

1.3.3.3 Other classification of Computers

There are some more classes of computers, which are prevalent among users:

a) Workstation: A terminal or desktop computer in a network is referred as workstation. Generally,

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

found in a personal computer.

1.3.4 Input-Output (I/O) Device

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

divided into the following three categories:

a) Input Device

b) Output Device

c) Input/output Device

1.2.4.1 Input Devices

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

 Magnetic Ink Card Reader(MICR)

 Optical Character Reader(OCR)

 Bar Code Reader

 Optical Mark Reader

(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

1.1 gives different types of keys on a keyboard.

Figure 1.2 Keyboard

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.

It is used to enter numeric data or cursor movement. Generally, it consists of a set


Numeric
2 of 17 keys that are laid out in the same configuration used by most adding
Keypad
machine and calculators.

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,

Control(Ctrl), Alternate(Alt), Escape(Esc).

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.

Table 1.1 Different Keys of a Keyboard

(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 is very popular.

Figure 1.3 Mouse

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.

The lower spherical ball moves in a socket.

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.

Figure 1.5 Bar Code Reader

(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.

Figure 1.6 Light Pen

(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.

Figure 1.8 Flatbed Scanner

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

and documents, and 3D scanners, for producing three-dimensional models of objects.

(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

microphones today use electromagnetic induction (dynamic microphone), capacitance change

(condenser microphone), piezoelectric generation, or light modulation to produce an electrical

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.

Figure 1.9 Microphone

(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

standard in the United States, Canada, United Kingdom etc,


20
MICR characters are printed on a document in either of the MICR fonts. The ink used in 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

they have been overprinted or obscured by other marks.

(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

the text on the system memory.

(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

etc. It may be a hand held scanner or may be embedded in a stationary scanner.

Bar Code Reader scans a bar code image, converts it into an alphanumeric value which is then fed

to the computer to which bar code reader is connected.

(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.

1.2.4.2 Output Devices

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

 Voice Output Devices

 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

screen looks sharper on the same resolution.

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

as compared to interlaced technology.

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

monitor (640 X 350). It supports 4 colors.

EGA: It stands for Enhanced Graphics Adapter. EGA is a video display standard that has a

resolution of 640 by 350 pixels and supports 16 colors. EGA supports previous display modes and

requires a new monitor.

VGA: VGA stands for Video Graphics Array. This is a video display standard that provides medium

to high resolution. In a text mode, the resolution of this board is 720 by 400 pixels. It supports 16

colors with a higher resolution of 640 by 480 pixels and 256 colors with 320 X 200 pixels.

Super VGA: This is a very high resolution standard that displays up to 65,536 colors. Super VGA

can support a 16.8 million colors at 800 by 600 pixels and 256 colors at 1024 by 768 pixels. A high-

priced super VGA allows 1280 by 1024 pixels. Larger monitors (17" or 21" and larger) with a high

resolution of 1600 by 1280 pixels are available. VESA (Video Electronics Standards Association)

has set a standard for super VGA.

23
Flat Panel Displays are more compact and consume less power than CRTs. Portable computers use

several kinds of flat panel screens.

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

EL display type of flat panel is better than LCD.

Gas Plasma Displays: This is also called a gas panel or a plasma panel and is another flat screen

technology. A plasma panel contains a grid of electrodes in a flat, gas filled panel. The image can

persist for a long time without refreshing in this panel. The disadvantages of the gas plasma

displays are that they must use AC power and cannot show sharp contrast.

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

inexpensive and slow.

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

the examples of impact printers. They are noisy.

Nonimpact Printers: They do not have the hammer and do not hit. Examples of such printers are

ink-jet printer, laser printer, thermal printer etc.

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

Bit-Mapped Printers: Images are formed from groups of dots and can be placed anywhere on the

page. They have many printing options and good printing quality. They use PostScript as a standard

language for instructing a microcomputer.

Character-based Printers: Printer print characters into the lines and columns of a page. These

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

reliable and can speed up to 3000 lines per minute.

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

paper. A heat source is usually applied to make the images adhere.

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.

There are two main types of plotters:

Drum Plotter: This is a plotter that has a drum. A paper wraps the drum that rotates to produce plots.

Pens in a drum plotter move across the paper while the drum is turning. A drum plotter is usually

used to produce smaller drawings.

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

for producing large drawings.

(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

output is becoming common in voice messaging systems.

(e) Modem: Another form of the output device is a modem. A modem is short for "MOdulator-

DEModulator”. Modulation is the process of converting from digital to analog. Demodulation is

the process of converting from analog to digital. The modem enables digital microcomputers to

send output through analog telephone lines. Both voice and data can be carried over through the

modem. The modem is not only an output device but also an input device that receives data and

voice through a communication channel.

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.

1.3.5.1 Hard Disk Drive (HDD)

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

a direct-access (combination of sequential and random access) manner, meaning

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

heads are the most popular in the today’s hard disks.

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

moved over the surface of the respective platter.

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

system. All modern hard disks use Voice Coil actuators.

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

SCSI, Fibre Channel or Serial Attached SCSI.

Information Organization: Information on the hard disk is organized in the form of sectors, tracks

and cylinders as shown in Figure 1.10 and explained below.

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

to 150 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

and transfer time, which are explained below.

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

the order of 8-10 milliseconds, which is considerably large.

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

with 10,000 RPM is 3 milliseconds.

Transfer Time: It is the time required to transfer one sector of data from RAM to disk or vice-

versa. Transfer time is constant and is a function rotational speed.

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,

500GB, 640GB, 750GB, 1TB, and 2TB.

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

are slower than that of an internally mounted hard drives.

1.3.5.2 Optical Storage Devices

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

focus control servo system and lasers.

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

unaltered spaces between pits are called "lands."

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

material, usually lacquer.

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

distance between tracks is of the order of 1.6 µm.

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)

 Compact Disk Recordable (CD-R)

 Compact Disc Re-Writable (CD-RW)

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

Disk Read Only Memory).

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

software, system software, games, music, electronic books etc.

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

no change indicates a series of zeros.

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

specification document in the Orange Book.

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

permanently transformed by exposure to a specific frequency of light. Some CD-Rs have an

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.

1.3.5.2.3 Compact Disc Re-Writable (CD-RW)

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

more sensitive device for playback.

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

cooled. After heating to a higher temperature it becomes amorphous when it is cooled. By

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

way as one can save it to a floppy disk.

1.3.5.3.4 Digital Versatile Disc (DVD)

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

to existing technologies, they can play CD and CD-ROM discs.

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.

1.3.5.2.5 Blu-Ray Optical Discs

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

video data, compared to single-sided DVD's 133 minutes.

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.

It is available in a Write-Once format (BD-R), which stores data in a non-rewritable, non-erasable

format and useful for archival-type data storage applications requiring protection against deliberate

or accidental modification or destruction of data. Blu-ray media is also available in a re-writeable

format, known as BD-RE, allows deletions of data and the ability to re-claim storage capacity on

the disc.

Advantages of Blu-Ray Disc: Following are the advantages of Blu-Ray discs:

 It can instantly skip to any part of the disc.

 It can record HDTV without any quality loss.

42
 It can perform multi-tasking.

 It can automatically search for an empty space.

 It offers better data seek times due to higher density.

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

current CD and DVD players.

1.3.5.2.6 HD (High Density) DVD

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 smaller file size.

1.3.5.2.7 Magneto-Optical Disk

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.

Benefits of MO: Following are the advantages of these disks:

 It is useful to back up files on a personal computer.

 It provides high reliability

 It gives low cost per megabyte of storage.

 It is rugged, stable, and durable.

 It provides permanent storage and shelf life in excess of 30 years.

 It can access data in seconds (significantly faster than tape).


44
 Lower paper storage costs

Limitations of MO: There are some limitations of these discs as well.

 MO drives are slower than hard disk drives but usually faster than conventional 3.5-inch

diskette drives.

1.3.5.2.8 Ultra Density Optical (UDO) Disk

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

Read Many), Re-Writable and Compliant WORM.

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,

dynamically reallocating disc capacity.

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

level and operates only on Compliant Write Once media.

UDO Advantages: There are following advantages of UDO discs:

 It can record high definition television (HDTV) without any quality loss.

 It can instantly skip to any spot on the disc.

 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.

 It complies with industry regulations for record authenticity.

 It provides unmatched media longevity.

 It supports scalable, high capacity configurations.

 It delivers rapid access to archived data.

 There is a specially designed shred operation in Compliant Write Once media where

individual records can be destroyed once their retention period expires.

1.3.5.2.9 Optical Jukebox

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.

1.3.5.3 USB Flash Drive/Pen Drive

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

a pen drive. A typical pen-drive is shown in Figure 1.12.

Figure 1.12 Flash Drive/Per Drive

These days, pen drives are available in different storage capacities such as 4 GB, 8 GB, 16 GB, 32

GB, 64 GB, 128 GB etc.

1.3.5.3.1 Internal Parts of Flash Drive/ Pen Drive

47
Figure 1.13 shows internal parts of a pen drive, which are explained in brief below.

Figure 1.13 Internal Parts of Flash Drive

(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-

chip ROM and RAM.

(iii) Test points: It is for testing during the flash drive's manufacturing or loading code into the

microprocessor.

(iv) Flash memory chip: It stores data

(v) Crystal oscillator: It produces the device's main 12 MHz clock signal and controls the

device's data output through a phase-locked loop.

(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.

1.3.5.3.2 Construction and Working of Flash Memory

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

group conducts if the selected bit has not been programmed.

Table below gives the comparison between NOR flash and NAND flash memories.

Characteristics NAND Gate Flash NOR Gate Flash

Density High Low

Timing difference Higher program and erase speed Slow speed

Interface Access through command Random access

sequence

Applications Suitable for storing large data Suitable for storing boot or

like digital camera, MP3 players application code

Advantages of Flash Memory

 Due to their small size and these are highly portable

 These are highly durable and scratch resistant

 These are inexpensiveas compared to hard disk and other mass storage devices

 These are faster in speed as compared to optical storage devices

 These consume lesser power than hard disk and other drives

 These can be secured by using password

Disadvantages of Flash Memory

 Life of flash memory are limited

 Most USB flash memories do not include a write-protect mechanism.

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

finally returns the results to the user in the desired format.

 Analog computers represent variables by physical quantities.

 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 terminal or desktop computer in a network is referred as workstation.

 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

archival or backup purposes.

 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 a plug and play portable storage device.

1.5 Suggested Readings/Reference Material

1. M. Morris Mano, Digital Logic and Computer Design, PHI, 2000

2. V. Rajaraman, T. Radhakrishnan, An Introduction to Digital Computer Design, PHI,

2002

3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth Edition,

MGH, 2002

4. John D. Carpinelli, Computer System Organization and Architecture, Pearson Education,

2009

5. John P. Hayes, Computer Architecture and Organization, MGH,1998

1.6 Self-Assessment Questions

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?

Explain each class of computers in brief.

4. Distinguish between analog and digital computers.

5. How do you classify computers on the basis of size, speed, memory etc.? Explain each

class of computers in brief.

6. Distinguish between super computer and main frame computers.

7. Distinguish between desktop and laptop computers.

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.

12. What is laser printer? Explain its working.

13. What is dot matrix printer? Explain its working.

14. What are line printers? Explain their working.

15. Differentiate among character printer, line printer and page printer.

16. What is drum printer? Explain its working.

17. What is chain printer? Explain its working.

18. What is daisy wheel printer? Explain its working.

19. What is plotter? How is it different from a printer?

20. What are different types of plotters? Explain the working of each type of plotter.

21. What is ink jet printer? Explain its working.

22. What is modem? Explain its function.

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,

seek time, latency time and transfer time.

25. What is hard disk? Explain its construction and working.

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.

28. What is compact disk? Explain its working.

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?

31. What is DVD? Explain its working. Compare it with CD-RW.

32. What is Blu-Ray Disk? Explain its working. What are its advantages and disadvantages?

33. What is HD-DVD? Compare it with DVD.

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.

37. Explain the construction and working of a flash drive.

38. Distinguish between NOR and NAND flash memories.

39. What are advantages and disadvantages of flash memory?

54
Writer Dr. Rajender Nath

Professor, DCSA, K.U.K.

Chapter 2
Number Systems
Structure

2.1 Introduction

2.2 Objective

2.3 Presentation of Contents

2.3.1 Concept of a Number System

2.3.2 Concept of Bit & Byte

2.3.3 Converting A Number From Any Base To Decimal

2.3.3.1 Converting Binary to Decimal

2.3.3.2 Converting Ternary to Decimal

2.3.3.3 Converting Quinary to Decimal

2.3.3.4 Converting Octal to Decimal

2.3.3.5 Converting Duo Decimal to Decimal

2.3.3.6 Converting Hexadecimal to Decimal

2.3.4 Converting a Number from Decimal to Any Base

2.3.4.1 Converting Decimal to Binary

2.3.4.2 Converting Decimal to Ternary

2.3.4.3 Converting Decimal to Quinary

2.3.4.4 Converting Decimal to Octal

2.3.4.5 Converting Decimal to Duo Decimal

2.3.4.6 Converting Decimal to Hexadecimal

1
2.3.5 Converting Binary into Octal and Hexadecimal or Vice Versa

2.3.5.1 Direct Conversion from Octal to Binary and Vice Versa

2.3.5.2 Direct Conversion from Hexadecimal to Binary and Vice Versa

2.3.5.3 Direct Conversion from Hexadecimal to Octal via Binary &Vice Versa

2.4 Summary

2.5 Suggested Readings/References

2.6 Self Assessment Questions

2.1 Introduction

A number system is the set of symbols used to express quantities as the basis for counting,

determining order, comparing amounts, performing calculations, and representing value. It is

the set of characters and mathematical rules that are used to represent a number. A number

system can be positional or non-positional. In a positional number system, a weight is

attached to each digit while in a non-positional number system; no weight is attached to the

digits of a number. Example, of non-positional number system is Roman number system. In

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

system into another.

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

into another number system.

2.3 Presentation of Contents

2.3.1Concept of a Number System

A number system is a set of symbols used to express quantities as the basis for counting,

determining order, comparing amounts, performing calculations, and representing values. It is

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

libraries. Ideally, a numeral system:

 Represents a useful set of numbers (e.g. all whole numbers, integers, or real numbers)

 Gives every number a unique representation (or at least a standard representation)

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

today throughout the world.

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

numbers i.e. having fractional part as shown below.

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 ...

Decimal example weight 1000 100 10 1 0.1 0.01 ...

Decimal example digit 4 3 2 7 6 5 ...

Table 2.1: Associated Weights in Number System

4
Table 2.1 shows the weight associated with the position in a number system with base b. It

also gives an example of decimal number system i.e. 4327.65...

There are different types of positional number systems. Some of them are given in the Table

2.2 along with their bases and names.

Base Number System Base Number System


2 Binary 11 Undecimal
3 Ternary 12 Duodecimal
4 Quaternary 13 Tridecimal
5 Quinary 14 Tetradecimal
6 Senary 15 Pentadecimal
7 Septenary 16 Hexadecimal
8 Octal 20 Vicesimal
9 Nonary 60 Sexagecimal
10 Decimal

Table 2.2: Positional Number System

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

digits or simply hex digits.

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

the number as subscript as shown below. For example,

110110011.11012 binary number

10211.21223 ternary number

52756.10248 octal number

9A56.B7C16 hexadecimal number

2.3.2Concept of Bit & Byte

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

combinations. Further, 2 10 = 1024 is commonly referred to as a "K" (Kilo). It is

approximately equal to one thousand. Thus, 1 Kilobyte (KB) is equal to 1024 bytes.

Likewise, 1024K is referred to as a “M” (Mega). It is approximately equal to a million. 1

Mega Byte (MB) is 1024*1024=1,048,576 bytes. Similarly, 1024M is referred to as a “G”

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

(TB) is 1024*1024*1024*1024 bytes. Next, 1024T is referred to as a “P” (Peta). It is

approximately equal to a Quadrillion. 1 Peta Byte (PB) is 1024*1024*1024*1024*1024 bytes

and so on.

2.3.3 Converting a Number from Any Base to Decimal System

Let a number in base b is expressed as (anan-1…a1a0.c1c2c3…)b. It can be converted into

decimal system by using the following expression:

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

be discussed with examples.

2.3.3.1 Converting Binary to Decimal

Let's consider the number 110.11 2 in binary system. Table 2.3 shows the bits of the

number and its corresponding weight.

Fours Twos Ones Halves Fourths

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

them as shown in Table 2.3(a):

1*2 2 = 1*4 = 4.

1*2 1 = 1*2 = 2.

0*2 0 = 0*1 = 0.

1*2 -1 = 1*.5 = 0.5

1*2 -2 = 1*.25 = + 0.25

6.75

Table 2.3(a)

Therefore, 110.112 in binary is equivalent to 6.7510 in decimal.

2.3.3.2 Converting Ternary to Decimal

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

Table 2.4: Digits and their corresponding Weights

To convert this into decimal, multiply each digit by its corresponding weight and sum

them as shown in Table 2.5:

8
2*32 = 2*9 = 18.

1*31 = 1*3 = 3.

0*30 = 0*1 = 0.

2*3-1 = 2/3 = 0.66…

1*3-2 = 1/9 = + 0.11…

21.77…

Table 2.5: Converting into Decimal

Therefore, 210.213 in ternary is equivalent to 21.77…10 in decimal. Also note that

number is non-terminating and has recurring group i.e. 7. A recurring number can be

expressed by putting a bar over the recurring group.

2.3.3.3 Converting Quinary to Decimal

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

its corresponding weight.

Weights 52 51 50 5-1 5 -2

Digits 1 3 4 . 0 2

Table 2.6: Digits and their Corresponding Weights

To convert this into decimal, multiply each digit by its corresponding weight and sum

them as shown in Table 2.7.

9
1*52 = 1*25 = 25.

3*51 = 3*5 = 15.

4*50 = 4*1 = 4.

0*5-1 = 0/5 = 0.0

2*5-2 = 2/25 = + 0.08

44.08

Table 2.7: Converting Quinary Into Decimal

Therefore, 134.025 in quinary is equivalent to 44.0810 in decimal.

2.3.3.4 Converting Octal to Decimal

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

its corresponding weight.

Weights 82 81 80 8 -1 8-2

Digits 7 2 6 . 5 2

Table 2.8: Digits And their Corresponding Weights

To convert this into decimal, multiply each digit by its corresponding weight and sum

them as shown in Table 2.9: Therefore, 726.528 in octal is equivalent to 470.937510 in

decimal.

10
7*8 2 = 7*64 = 448.

2*8 1 = 2*8 = 16.

6*8 0 = 6*1 = 6.

5*8 -1 = 5/8 = 0.625

2*8 -2 = 2/64 = + 0.3125

470.9375

Table 2.9: Converting Octal into Decimal

2.3.3.5 Converting Duo decimal to Decimal

Let's consider the number 29B.8A12 in duo decimal system. Recall that, base in duo

decimal system is twelve and digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B. Here numerical

value of A is 10 and for B is 11. Table 2.10 shows the digits of the number and its

corresponding weight.

Weights 122 121 12 0 12 -1 12-2

Digits 2 9 B . 8 A

Table 2.10: Digits and their Corresponding Weights

To convert this into decimal, multiply each digit by its corresponding weight and sum

them as shown in Table 2.11.

11
2*12 2 = 2*144 = 288.

9*12 1 = 9*12 = 108.

B*120 = 11*1 = 11.

8*12 -1 = 8/12 = 0.666…

A*12-2 = 10/144 = + 0.06944…

407.73544…

Table 2.11: Converting Duo Decimal To Decimal

Therefore, 29B.8A12 in duo decimal is equivalent to 407.73544…10 in decimal.

2.3.3.6 Converting Hexadecimal to Decimal

Let's consider the number 29F.8A in Hexadecimal system. Recall that, base in

Hexadecimal system is twelve and digits are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E,

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.

Weights 162 161 16 0 16 -1 16-2

Digits 2 9 F . 8 A

Table 2.12: Digits and corresponding Weights

To convert this into decimal, multiply each digit by its corresponding weight and sum them

as shown in Table 2.13. Therefore, 29F.8A16 in hexadecimal is equivalent to 71.5390625 10 in

decimal.

12
2*162 = 2*256 = 512.

9*161 = 9*16 = 144.

F*16 0 = 15*1 = 15.

8*16-1 = 8/16 = 0.5

A*16-2 = 10/256 = + 0.0390625

671.5390625

Table 2.13: Converting Hexadecimal to Decimal

2.3.4 Converting a Number from Decimal to Any Base

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

Therefore, the number 102030410 is equivalent to 114464357

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

above mentioned algorithm.

0.25 × 7 = 1.75

0.75 × 7 = 5.25

0.25 × 7 = 1.75

0.75 × 7 = 5.25

Therefore, (.25)10 is equivalent to (.1515)7. Note this conversion is non-terminating and


having a repeating group.

2.3.4.1 Converting Decimal to Binary

In order to convert a decimal number (integral part) to its binary equivalent, we

repeatedly divide the decimal number by 2. Division by 2 either gives a remainder of

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
_________________________________

Number Quotient Remainder

_________________________________

1341/2 = 670 1 Least Significant Bit ( LSB)

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

1/2 = 0 1 Most Significant Bit (MSB)

(Stop as the quotient has become 0)

Therefore, 1341 10 is equivalent to 1 0 1 0 0 1 1 1 1 0 1 2.

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

that would be the binary equivalent of the decimal fraction.

0.8125 × 2 = 1.6250

0.6250 × 2 = 1.2500

0.2500 × 2 = 0.5000

0.5000 × 2 = 1.0000

(Stop as fractional part has become zero)

15
Therefore, .812510 is equivalent to .1 1 0 12. Now, combining integral and fractional part of

the given number we get 1341.8125 10 is equivalent to 1 0 1 0 0 1 1 1 1 0 1.1 1 0 12.

2.3.4.2 Converting Decimal to Ternary

In order to convert a decimal number (integral part) to its ternary equivalent, we

repeatedly divide the decimal number by 3 i.e. the base of the ternary system.

Division by 3 either gives a remainder of 0, 1 or 2. Collecting the remainders from our

repeated divisions gives us the ternary answer. For example: let's convert a decimal

number (78.25)10 into ternary equivalent.

First, convert integral part of the given decimal number into ternary.

___________________________________________________

Number Quotient Remainder

___________________________________________________

78/3 = 26 0 Least Significant Digit (LSD)

26/3 = 8 2

8/3 = 2 2

2/3 = 0 2 Most Significant Digit (MSD)

(Stop as the quotient has become 0)

___________________________________________________

Therefore, 78 10 is equivalent to 22203.

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

that would be the ternary equivalent of the decimal fraction.

0.25 × 3 = 0.75

0.75 × 3 = 2.25

0.25 × 3 = 0.75

0.75 × 3 = 2.25

(Stop as we get repeating group 02)

Therefore, (.25)10 is equivalent to (.02)3. Now, combining integral and fractional part of the

given number we get (78.25)10 is equivalent to (2220.02)3.

2.3.4.3 Converting Decimal to Quinary

In order to convert a decimal number (integral part) to its quinary equivalent, we

repeatedly divide the decimal number by 5 i.e. the base of the quinary system.

Division by 5 either gives a remainder of 0, 1, 2, 3 or 4. Collecting the remainders

from our repeated divisions will give us the quinary answer.

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
_________________________________

Number Quotient Remainder

_________________________________

78/5 = 15 3 Least Significant Digit (LSD)

15/5 = 3 0

3/5 = 0 3 Most Significant Digit (MSD)

(Stop as the quotient has become 0)

_________________________________

Therefore, (78)10 is equivalent to (303)5.

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

that would be the quinary equivalent of the decimal fraction.

0.25 × 5 = 1.25

0.25 × 5 = 1.25

(Stop as we get repeating group 11)

Therefore, (.25)10 is equivalent to (.11)5. Now, combining integral and fractional part of the

given number we get (78.25)10 is equivalent to (303.11)5.

2.3.4.4 Converting Decimal to Octal

In order to convert a decimal number (integral part) to its octal equivalent, we

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.

_________________________________________________

Number Quotient Remainder

__________________________________________________

278/8 = 34 6 Least Significant Digit (LSD)

34/8 = 4 2

4/8 = 0 4 Most Significant Digit (MSD)

(Stop as the quotient has become 0)

___________________________________________________

Therefore, (278)10 is equivalent to (426)8.

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

that would be the octal equivalent of the decimal fraction.

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

(Stop as we get repeating group 6314)

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

number we get (78.25)10 is equivalent to (1026.26314)8.

2.3.4.5 Converting Decimal to Duodecimal

In order to convert a decimal number (integral part) to its duodecimal equivalent, we

repeatedly divide the decimal number by 12 i.e. the base of the duodecimal system.

Division by 12 either gives a remainder of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 (i.e. A) or 11

(i.e. B), which are duodecimal digits. Collecting the remainders from our repeated

divisions will give us the duodecimal answer.

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.

_________________________________________________

Number Quotient Remainder

__________________________________________________

9147/12 = 762 3 Least Significant Digit (LSD)

762/12 = 63 6

63/12 = 5 3

5/12 = 0 5 Most Significant Digit (MSD)

(Stop as the quotient has become 0)

___________________________________________________

Therefore, (9147)10 is equivalent to (5363)12.

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

products that would be the duodecimal equivalent of the decimal fraction.

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

of the given number we get (9147.725)10 is equivalent to (5363.884972)12.

2.3.4.6 Converting Decimal to Hexadecimal

In order to convert a decimal number (integral part) to its hexadecimal equivalent, we

will repeatedly divide the decimal number by 16 i.e. the base of the hexadecimal

system. Division by 16 will either give a remainder of 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

(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

the hexadecimal answer.

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
_________________________________________________

Number Quotient Remainder

__________________________________________________

9147/16 = 571 11 i.e. B (LSD)

571/16 = 35 11 i.e. B

35/16 = 2 3

2/16 = 0 2 (MSD)

(Stop as the quotient has become 0)

___________________________________________________

Therefore, (9147)10 is equivalent to (23BB)16.

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

products that would be the hexadecimal equivalent of the decimal fraction.

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

the given number we get (9147.725)10 is equivalent to (23BB.B99)16.

2.3.5 Converting Binary into Octal and Hexadecimal or Vice Versa

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

binary numbers are too easily made.

Decimal Hexadecimal 4-bit Binary Octal 3-bit Binary

Number Digit Equivalent Digit equivalent

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

Table 2.14: Base Conversion Table

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

and vice versa.

2.3.5.1 Direct Conversion from Octal to Binary and Vice Versa

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

Binary 101 111 100 101 . 000 011 010 equivalent

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

binary point are incomplete as shown in table 2.15.

1 100 101 110 . 010 110 11


Given binary number

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.

001 100 101 110 . 010 110 110


Given binary number
1 4 5 6 2 6 6
Octal equivalent

Table 2.17

Hence, 1100101110.010110112 is equivalent to 1456266 8.

2.3.5.2 Direct Conversion from Hexadecimal to Binary and Vice Versa

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

Table) as shown in Table 2.18.

Hexadecimal number 9 A 7 C . 6 B E

Binary equivalent 1001 1010 0111 1100 . 0110 1011 1110

Table 2.18

Now, let us convert 10101010110110.01111101101 in binary into hexadecimal directly. This

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.

10 1010 1011 0110 . 0111 1101 101


Given Binary Number

Table 2.19

Make 4-bit pair complete, by putting extra zeros on either side as shown in Table 2.20.

0010 1010 1011 0110 . 0111 1101 1010


Given binary number

Table 2.20

Now, write hex digit corresponding to each 4-bit pair as shown in Table 2.21.

0010 1010 1011 0110 . 0111 1101 1010


Given binary number
2 A B 6 . 7 D A
Hexadecimal equivalent

Table 2.21

2.3.5.3 Direct Conversion from Hexadecimal to Octal via Binary and Vice Versa

Let us convert A7C.6B in hexadecimal into octal directly. Step-by-step procedure is

explained below:

Step 1: Write the given hexadecimal number as shown in Table 2.22

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

Binary equivalent 1010 0111 1100 . 0110 1011

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

Binary equivalent 1010 0111 1100 . 0110 1011

3-bit Pair 101 001 111 100 . 011 010 110

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

Binary equivalent 1010 0111 1100 . 0110 1011

3-bit Pair 101 001 111 100 . 011 010 110

Octal equivalent 5 1 7 4 . 3 2 6

Table 2.25

Let us convert 2705.623 in octal into hexadecimal directly. Step-by-step procedure is

explained below:

Step 1: Write the given octal number as shown in Table 2.26

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

Binary equivalent 010 111 000 101 . 110 010 011

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

4-bit pairs 0101 1100 0101 . 1100 1001 1000

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

counting, determining order, comparing amounts, performing calculations, and

28
representing values. It is the set of characters and mathematical rules that are used to

represent a number.

 A number system can be positional or non-positional. In a positional number

system, a weight is attached to each digit while in a non-positional number system;

no weight is attached to the digits of a number, for example, Roman number system.

 A base or radix of a number system is a number of different symbols used in that

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,

duo-decimal and hexadecimal.

 We can change a number from one base to another e.g. binary to decimal, octal to

hexadecimal, decimal to ternary etc.

2.5 Suggested Readings/Reference Material

1. M. Morris Mano, Digital Logic and Computer Design, PHI, 2000

2. V. Rajaraman, T. Radhakrishnan, An Introduction to Digital Computer Design,

PHI, 2002

3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth

Edition, MGH, 2002

4. John D. Carpinelli, Computer System Organization and Architecture, Pearson

Education, 2009

5. John P. Hayes, Computer Architecture and Organization, MGH,1998

29
2.6 Self Assessment Questions

1. Define base or radix of a number system.

2. Convert the following numbers in decimal to binary, ternary, octal, duo decimal and

hexadecimal.

(i) 193.23 (ii) 765.125 (iii) 87.8125 (iv) 142.2

3. Convert the following numbers in binary to decimal, ternary, octal, duo decimal and

hexadecimal.

(i) 10111010.11011 (ii) 100011.000111001

(iii) 11110101000.1100101

4. Convert the following numbers in quinary to decimal, binary, ternary, octal, duo

decimal and hexadecimal.

(i) 143.23 (ii) 2034.12 (iii) 3201.00125

5. Convert the following numbers in hexadecimal to binary, octal and decimal.

(i) F9B3.2E3 (ii) 7C60.1D (iii) A87.1F (iv) CFD.AB

6. Convert the following numbers in octal to binary, ternary, quinary, decimal, duo

decimal and hexadecimal.

(i) 625.237 (ii) 765.125 (iii) 257.25 (iv) 142.2

30
Writer Dr. Rajender Nath

Professor, DCSA, K.U.K.

Chapter 3
BCD & Character Codes
Structure

3.1 Introduction

3.2 Objective

3.3 Presentation of Contents

3.3.1 BCD Codes

3.3.1.1 Weighted BCD Codes

3.3.1.2 Self-Complementing BCD Codes

3.3.1.3 Grey Codes

3.3.2 Error Detecting Codes

3.3.3 Error Correcting Codes

3.3.4 Character Codes

3.3.4.1 ASCII Codes

3.3.4.2 EBCDIC Codes

3.3.4.3 Unicode

3.4 Summary

3.5 Suggested Readings/References

3.6 Self Assessment Questions

1
3.1 Introduction

In computers, we need to represent different types of information such as digits, numbers,

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

BCD codes which are widely used.

When information is transferred from one place (source) to another place (destination) in a

computer system or over a communication channel then there is a possibility of introduction of

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.

Another important information to be represented in a computer system is characters. A character

set consists of numerals, alphabets, space and some special symbols. All these characters should

be assigned a unique binary code. Number of characters to be represented in a character set

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

codes will be discussed in this chapter.

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.

3.3 Presentation of Contents

3.3.1 BCD Codes

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.

Following are the broad categories of BCD codes:

 Weighted BCD Codes

 Self-complementing BCD Codes

 Cyclic Codes/Gray Codes/ Reflected Codes

3.3.1.1 Weighted BCD Codes

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

the decimal digit d can be expressed as

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

and in 842’1’ BCD code, weight 2’ and 1’ represent negative weights.

4
Decimal Digit 8421 2421 4221 842’1’
0 0000 0000 0000 0000

1 0001 0001 0001 0111

2 0010 0010 0010 0110

3 0011 0011 0011 0101

4 0100 0100 0110 0100

5 0101 1011 1001 1011

6 0110 1100 1100 1010

7 0111 1101 1101 1001

8 1000 1110 1110 1000

9 1001 1111 1111 1111

Table 3.1: Weighted BCD Codes

3.3.1.2 Self-Complementing BCD Codes

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

1 0100 0001 0001 0111

2 0101 0010 0010 0110

3 0110 0011 0011 0101

4 0111 0100 0110 0100

5 1000 1011 1001 1011

6 1001 1100 1100 1010

7 1010 1101 1101 1001

8 1011 1110 1110 1000

9 1100 1111 1111 1111

Table 3.2: Self-Complementing BCD Codes

3.3.1.3 Cyclic Codes/Gray Codes/Reflected Codes

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

codes (including first and last code) is one.

Decimal Digit Cyclic Code Cyclic Code


0 0000 0100

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

Table 3.3: Cyclic BCD Code

3.3.2 Error Detecting Codes

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

used called parity bits. Parity bit can be of two types:

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.

Decimal Digit Excess-3 Odd Parity Bit P


0 0011 1

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

Table 3.4: Odd Parity for Excess-3 Codes

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

even parity is detected in a similar way as for odd parity.

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

Table 3.5: Even Parity Bit for Cyclic BCD Code

3.3.3 Error Correcting Codes

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

columns as shown in Table 3.6 below.

Row No. 4-bit Code Odd Parity for Rows

1 1100 1

2 1101 0

3 1110 0

4 1111 1

Odd Parity for Columns 5 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

automatically and hence the error is corrected automatically.

Row No. 4-bit Code Odd Parity for Rows

1 1100 1

2 1101 0

3 1100 0

4 1111 1

Odd Parity for Columns 5 1111 1

Table 3.7: Erroneous bit shown as bold

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

distance L then the following inequality holds:

(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

of C can be 1 and value of D can be 2.

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

distance between any two codes should be 3.

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

Table 3.8: Positions of Information and Parity Bits

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

correcting hamming code for excess-3 BCD codes.

Let us now discuss how error is detected and corrected automatically. When the code is received

at the destination, the following procedure is used to detect the error.

 Check odd parity for bit positions 1, 3, 5, 7. If it passes then C1 = 0 else C1 = 1.

 Check odd parity for bit positions 2, 3, 6, 7. If it passes then C2 = 0 else C2 = 1.

 Check odd parity for bit positions 4, 5, 6, 7. If it passes then C4 = 0 else C4 = 1.

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

transferred from the source to the destination then it becomes as 0 1 0 1 0 0 1.

The bit shown in bold has become erroneous. Apply the procedure mentioned above to detect the

error as explained below:

 Check odd parity for bit positions 1, 3, 5, 7. It passes so C1 = 0.

 Check odd parity for bit positions 2, 3, 6, 7. It fails so C2 = 1.

 Check odd parity for bit positions 4, 5, 6, 7. It fails so C4 = 1.

Decimal equivalent of C4C2C1 (110) is 6. It implies that the 6th bit in the destination code is

erroneous and is corrected automatically by complementing the erroneous bit.

3.3.4 Character Codes

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

allows at most 256 different characters being represented.

A character repertoire specifies a collection of characters. It is usually defined by specifying

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

distinct, such as Latin uppercase A and Cyrillic uppercase A.

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

character Z might be presented as a boldface Z or as an italic Z, and it would still be a

presentation of the same character.

There are many character codes available. The widely used character codes in computer systems

are the following:

 ASCII Code

 EBCDIC

 Unicode

18
3.3.4.1 ASCII Codes

The name ASCII is an abbreviation for "American Standard Code for Information Interchange".

ASCII is pronounced as æski, or ASS-kee and is a character-encoding scheme based on the

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

recent update during 1986.

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{|}~

Table 3.11: List of Printable Characters

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

usage varies a lot.

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

3.12 shows the complete list of ASCII codes.

DEC OCT HEX BIN Symbol Description


0 000 00 00000000 NUL Null char
1 001 01 00000001 SOH Start of Heading
2 002 02 00000010 STX Start of Text
3 003 03 00000011 ETX End of Text
4 004 04 00000100 EOT End of Transmission
5 005 05 00000101 ENQ Enquiry
6 006 06 00000110 ACK Acknowledgment
7 007 07 00000111 BEL Bell
8 010 08 00001000 BS Back Space
9 011 09 00001001 HT Horizontal Tab
10 012 0A 00001010 LF Line Feed
11 013 0B 00001011 VT Vertical Tab
12 014 0C 00001100 FF Form Feed

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

DEC OCT HEX Binary Symbol Description

32 040 20 00100000 Space

33 041 21 00100001 ! Exclamation mark

34 042 22 00100010 " Double quotes

35 043 23 00100011 # Number

36 044 24 00100100 $ Dollar

21
37 045 25 00100101 % Procenttecken

38 046 26 00100110 & Ampersand

39 047 27 00100111 ' Single quote

Open parenthesis (or open


40 050 28 00101000 (
bracket)

41 051 29 00101001 ) Close parenthesis

42 052 2A 00101010 * Asterisk

43 053 2B 00101011 + Plus

44 054 2C 00101100 , Comma

45 055 2D 00101101 - Hyphen

46 056 2E 00101110 . Period, dot or full stop

47 057 2F 00101111 / Slash or divide

48 060 30 00110000 0 Zero

49 061 31 00110001 1 One

50 062 32 00110010 2 Two

51 063 33 00110011 3 Three

52 064 34 00110100 4 Four

53 065 35 00110101 5 Five

54 066 36 00110110 6 Six

55 067 37 00110111 7 Seven

56 070 38 00111000 8 Eight

57 071 39 00111001 9 Nine

58 072 3A 00111010 : Colon

59 073 3B 00111011 ; Semicolon

22
60 074 3C 00111100 < Less than

61 075 3D 00111101 = Equals

62 076 3E 00111110 > Greater than

63 077 3F 00111111 ? Question mark

64 100 40 01000000 @ At symbol

65 101 41 01000001 A Uppercase A

66 102 42 01000010 B Uppercase B

67 103 43 01000011 C Uppercase C

68 104 44 01000100 D Uppercase D

69 105 45 01000101 E Uppercase E

70 106 46 01000110 F Uppercase F

71 107 47 01000111 G Uppercase G

72 110 48 01001000 H Uppercase H

73 111 49 01001001 I Uppercase I

74 112 4A 01001010 J Uppercase J

75 113 4B 01001011 K Uppercase K

76 114 4C 01001100 L Uppercase L

77 115 4D 01001101 M Uppercase M

78 116 4E 01001110 N Uppercase N

79 117 4F 01001111 O Uppercase O

80 120 50 01010000 P Uppercase P

81 121 51 01010001 Q Uppercase Q

82 122 52 01010010 R Uppercase R

23
83 123 53 01010011 S Uppercase S

84 124 54 01010100 T Uppercase T

85 125 55 01010101 U Uppercase U

86 126 56 01010110 V Uppercase V

87 127 57 01010111 W Uppercase W

88 130 58 01011000 X Uppercase X

89 131 59 01011001 Y Uppercase Y

90 132 5A 01011010 Z Uppercase Z

91 133 5B 01011011 [ Opening bracket

92 134 5C 01011100 \ Backslash

93 135 5D 01011101 ] Closing bracket

94 136 5E 01011110 ^ Caret - circumflex

95 137 5F 01011111 _ Underscore

96 140 60 01100000 ` Grave accent

97 141 61 01100001 a Lowercase a

98 142 62 01100010 b Lowercase b

99 143 63 01100011 c Lowercase c

100 144 64 01100100 d Lowercase d

101 145 65 01100101 e Lowercase e

102 146 66 01100110 f Lowercase f

103 147 67 01100111 g Lowercase g

104 150 68 01101000 h Lowercase h

105 151 69 01101001 i Lowercase i

24
106 152 6A 01101010 j Lowercase j

107 153 6B 01101011 k Lowercase k

108 154 6C 01101100 l Lowercase l

109 155 6D 01101101 m Lowercase m

110 156 6E 01101110 n Lowercase n

111 157 6F 01101111 o Lowercase o

112 160 70 01110000 p Lowercase p

113 161 71 01110001 q Lowercase q

114 162 72 01110010 r Lowercase r

115 163 73 01110011 s Lowercase s

116 164 74 01110100 t Lowercase t

117 165 75 01110101 u Lowercase u

118 166 76 01110110 v Lowercase v

119 167 77 01110111 w Lowercase w

120 170 78 01111000 x Lowercase x

121 171 79 01111001 y Lowercase y

122 172 7A 01111010 z Lowercase z

123 173 7B 01111011 { Opening brace

124 174 7C 01111100 | Vertical bar

125 175 7D 01111101 } Closing brace

126 176 7E 01111110 ~ Equivalency sign - tilde

127 177 7F 01111111 Delete

Table 3.12 of ASCII Codes

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.

3.3.4.2 EBCDIC Codes

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

EBCDIC code is given Table 3.13.

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

modern operating systems such as Windows, Macintosh, Linux/Unix.

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

7 07 DEL 39 27 ESC 71 47 103 67

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 _

14 0E SO 46 2E ACK 78 4E + 110 6E >

15 0F SI 47 2F BEL 79 4F |! 111 6F ?

16 10 DLE 48 30 80 50 & 112 70

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 1D IGS 61 3D NAK 93 5D ) 125 7D ‘


Dec Hex Code Dec Hex Code Dec Hex Code Dec Hex Code

128 80 160 A0 192 C0 { 224 E0 \

129 81 a 161 A1 ~ 193 C1 A 225 E1

130 82 b 162 A2 s 194 C2 B 226 E2 S

131 83 c 163 A3 t 195 C3 C 227 E3 T

132 84 d 164 A4 u 196 C4 D 228 E4 U

133 85 e 165 A5 v 197 C5 E 229 E5 V

134 86 f 166 A6 w 198 C6 F 230 E6 W

135 87 g 167 A7 x 199 C7 G 231 E7 X

136 88 h 168 A8 y 200 C8 H 232 E8 Y

137 89 i 169 A9 z 201 C9 I 233 E9 Z

138 8A 170 AA 202 CA 234 EA

139 8B 171 AB 203 CB 235 EB

140 8C 172 AC 204 CC 236 EC

141 8D 173 AD 205 CD 237 ED

142 8E 174 AE 206 CE 238 EE

143 8F 175 AF 207 CF 239 EF

144 90 176 B0 208 D0 } 240 F0 0

145 91 j 177 B1 209 D1 J 241 F1 1

146 92 k 178 B2 210 D2 K 242 F2 2

147 93 l 179 B3 211 D3 L 243 F3 3

148 94 m 180 B4 212 D4 M 244 F4 4

149 95 n 181 B5 213 D5 N 245 F5 5

150 96 182 B6 214 D6 O 246 F6 6

151 97 p 183 B7 215 D7 P 247 F7 7

29
152 98 q 184 B8 216 D8 Q 248 F8 8

153 99 r 185 B9 217 D9 R 249 F9 9

154 9A 186 BA 218 DA 250 FA

155 9B 187 BB 219 DB 251 FB

156 9C 188 BC 220 DC 252 FC

157 9D 189 BD 221 DD 253 FD

158 9E 190 BE 222 DE 254 FE

159 9F 191 BF 223 DF 255 FF

Table 3.13 EDCDIC Code

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-

bit text data.

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

characters in the supplementary planes.

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

Roman alphabet and one other script was possible.

(b) It allows text files from any computer in any language to be exchanged without special

encoding-translation algorithms.

(c) It allows font support to be standardized and universalized.

(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

assign each unique combination to 10 decimal digits.

31
 The BCD codes can be classified as Weighted BCD Codes, Self-complementing BCD

Codes and Cyclic Codes/Gray Codes/ Reflected Codes

 In weighted BCD code, each bit is assigned some weights. Then the sum of products of

bit and its corresponding weight gives the digit.

 A BCD code is self-complementing if it has the feature that if you take the complement

(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.

 A BCD code is cyclic BCD code, if the hamming distance between any two consecutive

codes (including first and last code) is constant.

 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.

 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.

 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

to 2P >= I + P + 1, where I is number of information bit.

 Fundamentally, computers just deal with numbers. They store letters and other characters

by assigning a number for each one.

 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

collection of characters that might be used by multiple languages. A coded character

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.

 A glyph is a visual appearance of a character. It is important to distinguish the character

concept from the glyph concept. A glyph is a presentation of a particular shape which a

character may have when rendered or displayed.

 There are many character codes available. The widely used character codes in computer

systems are ASCII Code, EBCDIC and Unicode.

 ASCII code is 7-bit or 8-bit, EBCDIC is 8-bit and Unicode is, 8-bit, 16-bit and 32-bit

code.

3.5 Suggested Readings/References

1. M. Morris Mano, Digital Logic and Computer Design, PHI, 2000

2. V. Rajaraman, T. Radhakrishnan, An Introduction to Digital Computer Design, PHI,

2002

3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth Edition,

MGH, 2002

4. John D. Carpinelli, Computer System Organization and Architecture, Pearson

Education, 2009

5. John P. Hayes, Computer Architecture and Organization, MGH,1998

3.6 Self Assessment Questions

1. What are BCD codes? How do you classify them?

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-

complementing BCD codes.

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.

6. What is the principle of error detection and error correction?

7. What are parity bits? Define odd and even parity.

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,

excess-3 and cyclic BCD codes.

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.

14. Write short note on:

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

Professor, DCSA, KUK

Chapter 4

Number Representations and Arithmetic Operations


Structure

4.1 Introduction

4.2 Objective

4.3 Presentation of Contents

4.3.1 Number Representation

4.3.1.1 Integer Representation

4.3.1.1.1 Sign-Magnitude Representation

4.3.1.1.2 1’s Complement Representation

4.3.1.1.3 2’s Complement Representation

4.3.1.1.4 BCD Representation

4.3.1.2 Floating Point Representation

4.3.1.2.1 IEEE 754 Standard

4.3.2 Binary Arithmetic Operations

4.3.2.1 Binary Addition

4.3.2.1.1 Addition & Subtraction in Sign-Magnitude Representation

4.3.2.1.2 Addition & Subtraction in 1’s Complement Representation

-1-
4.3.2.1.3 Addition & Subtraction in 2’s Complement Representation

4.3.2.2 Binary Multiplication

4.3.2.2.1 Booth’s Multiplication Algorithm

4.3.2.3 Binary Division

4.3.3 Arithmetic Operations on Floating Point Numbers

4.4 Summary

4.5 Suggested Readings/References

4.6 Self Assessment Questions

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

worldwide. Addition, subtraction, multiplication and division operations can be performed on

-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

all these arithmetic operations on different representations of integers. Booth’s multiplication

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 –

on floating point numbers are presented along with examples.

4.3 Presentation of Contents

4.3.1 Number Representation

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.

4.3.1.1 Integer Representation

An integer can be negative, zero or positive. In a computer system, an integer is stored in a

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.

Following are the different ways to represent integers:

 Sign-Magnitude Representation

 1’s Complement Representation

 2’s Complement Representation

 BCD Representation

Let us discuss these representations of integers one by one in detail.

-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

memory location/register store the magnitude of the integer.

Consider the memory location/register size of 16 bits. Assume first bit is sign bit and remaining

15 bits store the magnitude of the integer as shown in Figure 4.1

Sign bit Magnitude

1 bit 15 bits

Figure 4.1 Sign-magnitude Representation

Let us represent, +29 in this format. Since sign is ‘+’ so sign bit is ‘0’ and magnitude is binary

equivalent of 29 in 15 bits as shown in Figure 4.2:

0 0 0 0 0 0 0 0 0 0 0 1 1 1 0 1

Figure 4.2

In sign magnitude representation, -29 is represented as follows in figure 1.3 :

-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

unsigned integers represented in sign-magnitude form.

-6-
4-bit Binary Number Decimal equivalent Decimal equivalent

Represented in sign-magnitude Signed integer Unsigned integer

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

is also equivalent to subtracting each bit from 1.

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

representations for zero i.e. +0 and -0 as shown in Figure 4.7 :

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.

4-bit Binary Number Decimal equivalent Decimal equivalent

Represented in 1’s complement Signed integer Unsigned integer

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

unsigned integers represented in 1’s complement form.

4.3.1.1.3 2’s Complement Representation

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

encountered and after that changing 1 to 0 and 0 to 1.

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

one representation for zero i.e. +0 as shown in Figure 4.10:

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

in 2’s complement form.

4-bit Binary Number Decimal equivalent Decimal equivalent

Represented in 2’s complement Signed integer Unsigned integer

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

4.3.1.1.4 BCD Representation

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

as shown in Figure 4.12:

- 12 -
Sign Number in Decimal Number in

Bit 1 9 6 3 BCD Code

0 0001 1001 0110 0011 8421 →Represents +1963

0 0100 1100 1001 0110 Excess-3 →Represents +1963

0 0001 1000 1010 0010 Cyclic →Represents +1963

1 0001 1001 0110 0011 8421 →Represents -1963

1 0100 1100 1001 0110 Excess-3 →Represents -1963

1 0001 1000 1010 0010 Cyclic →Represents -1963

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

has to be converted into BCD representation before the display.

4.3.1.2 Floating Point Representation

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

maximum number of significant digits. In normalized floating point representation, mantissa is

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.

Normalized floating-point representation solves a number of representation problems. Fixed-

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

divided or two small numbers are multiplied.

- 14 -
In the similar way, a binary number can be represented in the normalized floating point form. For

example, 100110.11101 can be written as .10011011101× 2110 and .0000011110111 can be

written as .11110111× 10-101.

4.3.1.2.1 IEEE 754 Standard

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

most significant bit.

Sign Exponent Fraction Bias


Single Precision 1 [31] 8 [30-23] 23 [22-00] 127
Double Precision 1 [63] 11 [62-52] 52 [51-00] 1023

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

precision, the exponent field is of 11 bits, and has a bias of 1023.

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

effectively 24 bits of resolution, by way of 23 fraction bits.

The range of numbers represented by single and double precision numbers in IEEE 754 standard

is shown in Table 4.4 below.

Denormalized Normalized Approximate Decimal

Single Precision ± 2-149 to (1-2-23)×2-126 ± 2-126 to (2-2-23)×2127 ± ~10-44.85 to ~1038.53

Double Precision ± 2-1074 to (1-2-52)×2-1022 ± 2-1022 to (2-2-52)×21023 ± ~10-323.3 to ~10308.3

Table 4.4

There are five distinct numerical ranges that single-precision floating-point numbers are not able

to represent:

 Negative numbers less than -(2-2-23) × 2127 (negative overflow)

 Negative numbers greater than -2-149 (negative underflow)

- 16 -
 Zero

 Positive numbers less than 2-149 (positive underflow)

 Positive numbers greater than (2-2-23) × 2127 (positive overflow)

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

values in the floating-point scheme.

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

+0 are distinct values, though they both compare as equal.

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

SNaN's denote invalid operations.

- 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 .

Float Values (b = bias)


Sign Exponent (e) Fraction (f) Value
0 00..00 00..00 +0
00..01
Positive Denormalized Real
0 00..00 :
0.f × 2(-b+1)
11..11
00..01
Positive Normalized Real
0 : XX..XX
1.f × 2(e-b)
11..10
0 11..11 00..00 +Infinity
00..01
0 11..11 : SNaN
01..11
10..00
0 11..11 : QNaN
11..11
1 00..00 00..00 -0
00..01
Negative Denormalized Real
1 00..00 :
-0.f × 2(-b+1)
11..11
00..01
Negative Normalized Real
1 : XX..XX
-1.f × 2(e-b)
11..10
1 11..11 00..00 -Infinity
00..01
1 11..11 : SNaN
01..11
10..00
1 11..11 : QNaN
11.11
Table 4.6

- 19 -
The Table 4.6 above summarizes the IEEE 754 floating-point representation of numbers.

4.3.2 Binary Arithmetic Operations

On binary integers, the arithmetic operations such as addition, subtraction, multiplication,

division etc. can be performed. In this section, we will discuss addition and subtraction

operations on binary integers represented in sign-magnitude, 1’s complement and 2’s

complement form. We will also discuss the Booth’s multiplication algorithm to multiply two

integers represented in 2’s complement form.

4.3.2.1 Binary Addition and Subtraction

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

and b designates the borrow 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

format will be used in all examples.

4.3.2.1.1 Addition and Subtraction in Sign-Magnitude Representation

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.

Conditions Rule1 Rule2 Rule3 Rule4 Rule5 Rule6

Is s(x)=s(y)? No No No Yes Yes Yes

Operation? Sub Add Add Sub Sub Add

Is m(x)≥m(y)? - No Yes No Yes -

Actions

Sign of result = s(x) s(y) s(x) s(y)’ s(x) s(x)

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.

8 s(y)’ represents the complement of s(y).

4.3.2.1.2 Addition and Subtraction in 1’s Complement Representation

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:

First Operand: A = 9 = 01001 and Second Operand: B = 5 = 00101

- 22 -
Let us perform A + B = (+A) + (+B). In 1’s complement, the two operands will be represented as

+A = 01001 and +B = 00101. The operation is shown in Table 4.9 below:

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

-A = 10110 and -B = 11010. The operation is shown in Table 4.10 below:

Carry 1110

First Operand (-A) 10110 -9

Second Operand (-B) 11010 -5

110000

End around carry 1

Result 10001 -14

In 1’s complement it is -14

Table 4.10

Let us perform A - B = (+A) + (-B). In 1’s complement, the two operands will be represented as

+A = 01001 and -B = 11010. The operation is shown in Table 4.11 below:

- 23 -
Carry 11000

First Operand (+A) 0 1 0 0 1 +9

Second Operand (-B) 1 1 0 1 0 -5

Adding 100011

End around carry 1

Result 00100 +4

Table 4.11

Let us perform -A + B = (-A) + (+B). In 1’s complement, the two operands will be represented as

-A = 10110 and +B = 00101. The operation is shown in Table 4.12 below:

Carry 0 10 0

First Operand (-A) 1 0 1 1 0 -9

Second Operand (+B) 0 0 1 0 1 +5

Result 1 1 0 1 1 -4

In 1’s complement it is -4

` Table 4.12

4.3.2.1.3 Addition and Subtraction in 2’s Complement Representation

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:

First Operand: A = 9 = 01001 and Second Operand: B = 5 = 00101

Let us perform A + B = (+A) + (+B). In 2’s complement, the two operands will be represented as

+A = 01001 and +B = 00101. The operation is shown in Table 4.13 below:

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

-A = 10110 and -B = 11010. The operation is shown in Table 4.14 below:

- 25 -
Carry 11111

First Operand (-A) 10111 -9

Second Operand (-B) 11011 -5

110010

End around carry

Which is discarded

Result 10010 -14

In 2’s complement it is -14

Table 4.14

Let us perform A - B = (+A) + (-B). In 2’s complement, the two operands will be represented as

+A = 01001 and -B =11011. The operation is shown in Table 4.15 below:

Carry 11011

First Operand (+A) 01001 +9

Second Operand (-B) 11011 -5

100100

End around carry

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

-A = 10111 and +B = 00101. The operation is shown in Table 4.16 below:

Carry 0111

First Operand (-A) 1 0 1 1 1 -9

Second Operand (+B) 0 0 1 0 1 +5

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

representations. When we compare the arithmetic operations in complement representations, we

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.

4.3.2.2 Binary Multiplication

Binary multiplication can be performed in a similar way to that of decimal multiplication. It is

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

remember the following:

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

by 1, which produces 101 as shown in figure 2.4 below.

101

x11

101

1010

1111 ← which is 15 and is correct

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

2k+1 – 2m = 27 – 23 = 128 – 8 = 120. If M is multiplicand, then M X 01111000 can be written 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

can be represented as – 26 + 23 – 21 = - 64 + 8 -2 = -58. This can be summarized as - examine

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

process till you reach the left-most bit.

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

indicates a flip-flop which is initialized to 0. Multiplicand is stored in BR register. Multiplier is

stored in QR register. SC stores n. AC is initialized with 0. When we multiply two binary

numbers of n bits each, we get the product of 2n bits. At the end of multiplication process, the

product would be available in AC & QR.

- 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

Figure 4.15 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

partial product remains unchanged.

- 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

Flowchart for Booth multiplication

Figure 4.16 Flowchart for Booth multiplication

- 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

negative values represented in signed 2's complement.

 For subtraction, the multiplicand is complemented and added 1 to it to obtain in 2’s

complement.

QnQn+1 Process AC QR Qn+1 SC

Initial 00000 10010 0 101

00 ashr 00000 01001 0 100

10 Subtract BR 01011

01011 01001 0

ashr 00101 10100 1 011

01 Add BR 10101

11010 10100 1

ashr 11101 01010 0 010

00 ashr 11110 10101 0 001

10 Subtract BR 01011

01001 10101

ashr 00100 11010 1 000

Table 4.17

- 32 -
Example of Booth multiplication: Let us multiply -11 by -14. So, BR = 10101 and QR = 10010.

2’s complement of BR = 01011. Here value of n is 5.

The result is in AC&QR i.e. 0010011010, which is 154 (-11 X -14).

4.3.2.3 Binary Division

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

so the full calculation in decimal is 910 ÷ 310 = 310 which is correct.

4.3.3 Arithmetic Operations on Floating Point Numbers

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

precision (which may result in representation error due to truncation of less

significant digits)

- 33 -
 Denormalize the smaller of the numbers if an addition or subtraction is being

performed (which may again result in representation error due to the de

normalization)

 Perform the operation (which again may result in representation error due to the

finite precision of the floating point processor)

 Finally, renormalize the result.

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

division operations, which are discussed one by one below:

Addition: For our first example, let us consider the sum: 122 + 12.

We first normalize these numbers as

.122 X 10 3 and .12 X 10 2.

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

same as shown below

Augend .122 X 10 3

Addend .012 X 10 3

Sum .134 X 10 3 (which is already normalized)

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 +

14. In our hypothetical computer, these numbers are normalized as

.122 X 10 4 and .14 X 10 2

But when we denormalize the smaller number before adding, the fact that we have only 3

decimal digits of precision causes a truncation error:

.14 X 10 2 becomes .001 X 10 4

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:

.14 X 10 1 becomes .000 X 10 4

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

have finite representations in decimal; i.e., 1/5 = .2).

Subtraction: For our first example, let us consider the difference: 122 – 12 which are written in

normalized form as .122 X 10 3 and .12 X 10 2.

Before, we subtract first we have to make lower exponent equal to higher exponent by

denormalizing it as

.12 X 10 2 becomes .012 X 10 3.

For subtraction subtrahend mantissa is subtracted from minuend mantissa and exponent part

remain same as shown below:

Minuend .122 X 10 3

Subtrahend .012 X 10 3

Difference .110 X 10 3 (which is already normalized)

Multiplication: Let us consider the product 125 * 21. This product is represented in normalized

form as .125 X 10 3 * .21 X 10 2

- 36 -
For floating point multiplication of two numbers, multiplicand mantissa and multiplier mantissa

are multiplied and exponents of multiplicand and multiplier are added as

.125 X 10 3 * .21 X 10 2 = (.125 * .21) X 10 3+2 = .02625 X 10 5

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

.125 X 10 3 % .21 X 10 2 = (.125 % .21) X 10 3-2 = .5952380… X 10 1

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

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.

- 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.

 Sign-magnitude representation has two representations for zero and complicated

algorithms for arithmetic operations and hence not suitable for computers.

 1’s complement representation also has two representations for zero but simpler

algorithms for arithmetic operations.

 2’s complement representation has only one representation for zero and very simple

algorithms for arithmetic operations and hence it is widely used in computers.

 BCD representation is generally used in digital appliances such as watch, voltmeter,

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

closely approximated by zero.

- 38 -
4.5 Suggested Readings/References

1. M. Morris Mano, Digital Logic and Computer Design, PHI, 2000

2. V. Rajaraman, T. Radhakrishnan, An Introduction to Digital Computer Design, PHI,

2002

3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth Edition,

MGH, 2002

4. John D. Carpinelli, Computer System Organization and Architecture, Pearson

Education, 2009

5. John P. Hayes, Computer Architecture and Organization, MGH,1998

4.6 Self Assessment Questions

1. How are integers represented in a computer system? Explain with examples.

2. What are radix-minus-one and radix complement representations of numbers?

3. Why 2’s complement is preferred over other representations of numbers in a computer

system?

4. Represent 23 and -19 in sign-magnitude, 1’s complement and 2’s complement

representations. Assume register size of 6 bits.

5. Compare sign-magnitude, 1’s complement and 2’s complement representations.

6. Find the range of integers that can be represented in a 16-bit register when an integer is

represented by sign-magnitude, 1’s complement and 2’s complement representations.

7. Represent 2397 in 8421, excess-3, 2421, 84-2-1 and cyclic BCD codes.

8. What is normalized floating point representation of numbers?

- 39 -
9. Explain IEEE 754 standard for representing real numbers in a computer system. Also give

special values represented in this standard.

10. Represent 0, 123.2 and -76.125 in IEEE 754 single precision format.

11. What is NaN in IEEE-754 standard? Explain.

12. If A = 25, B = 17, perform the following calculations assuming 6-bit registers

A+B, A-B, -A+B, -A-B

In (i) sign-magnitude, (ii) 1’s complement and (iii) 2’s complement representations and also

verify your answers.

13. What are overflow and underflow conditions?

14. Divide 1101001 by 101 and verify your answer.

15. Multiply 1001 by 110 and verify your answer.

16. Explain Booth algorithm for multiplication.

17. Multiply -17 by 23 and -19 by -21 using Booth’s multiplication algorithm. Show all the steps

and verify your answer.

- 40 -
Writer Dr. Rajender Nath

Professor, DCSA, KUK

Chapter 5

Boolean Algebra & Simplifications

of Boolean Expressions
Structure

5.1 Introduction

5.2 Objective

5.3 Presentation of Contents

5.3.1 Boolean Algebra

5.3.1.1 Postulates of Boolean algebra

5.3.1.2 Principle of Duality

5.3.1.3 Basic Boolean Theorems

5.3.1.4 Switching Algebra

5.3.1.5 Logic Operations

5.3.1.6 Universal Gates

5.3.1.7 Alternate Logic

5.3.1.8 DeMorgan’s Theorem

5.3.1.9 Boolean Functions & Their Canonical Representations

-1-
5.3.1.9.1 Converting Non-Canonical or Nonstandard Representation into

Canonical Representation

5.3.1.10 Simplification of Boolean Expressions

5.3.1.10.1 Simplification of Boolean Expressions by Using Boolean algebra

5.3.1.10.2 Simplification of Boolean Expressions by Using Karnaugh Maps

5.3.1.10.3 Don’t care Conditions

5.3.1.11 Simplification of Boolean Expressions by Using Quine-McCluskey

Procedure (Tabulation Method)

5.4Summary

5.5Suggested Readings/References

5.6 Self Assessment Questions

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

power and the amount of space required by those gates.

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

representation, of Boolean functions, Boolean function simplification etc.

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.

5.3 Presentation of Contents

5.3.1 Boolean Algebra

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

the ensuing paragraphs.

5.3.1.1 Postulates of Boolean Algebra

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

taken as self-evident or assumed without proof as a basis for reasoning:

1(a). Closure with respect to the operator +.

z = x + y, where z belongs to S for each value of x and y belonging to S

(b). Closure with respect to the operator •

z = x • y, where z belongs to S for each value of x and y belonging to S

2(a). An identity element with respect to +

x + 0 = 0 + x = x , for each value of x belonging to S

(b)An identity element with respect to •

x • 1 = 1 • x = x , for each value of x and y belonging to S

3(a) Commutative w.r.t the operator +.

x + y = y + x for each value of x and y belonging to S

(b) Commutative w.r.t the operator •.

-4-
x • y = y • x , for each value of x and y belonging to S

4(a) • is distributive over +.

x• (y + z) = (x • y) + (x • z), for each value of x, y and z belonging to S

(b) + is distributive over •.

x+ (y • z) = (x + y) • (x+ z), for each value of x, y and z belonging to S

5. For every element x in S there exists an inverse element (called complement, x` in S) such that

(a) x + x` = 1, for each value of x belonging to S

(b) x•x` = 0, for each value of x belonging to S

6. There exists at least two elements x, y in S.

Now, this is left as an exercise for you to compare Boolean algebra and ordinary algebra.

5.3.1.2 Principle of Duality

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

automatically stand proved by the principle of duality.

5.3.1.3 Basic Boolean Theorems

Theorem 1: Property of 0 in Boolean algebra postulates

0·x=0 (multiplication law)

0+x=x (addition law)

Theorem 2: Property of 1 in Boolean algebra postulates

x+1=1 (addition law)

-5-
Proof:

x + 1 = 1.(x + 1) by postulate 2(b)

= (x + x’).(x + 1) by postulate 5(a)

= x + x’.1 by postulate 4(b)

= x + x’ by postulate 2(b)

=1 by postulate 5(a)

Dual part of this theorem is

x. 1 = x (multiplication law)

Theorem 3: Identity Law in Boolean algebra postulates

x·x=x (multiplication law)

Proof:

x.x = x.x + 0 by postulate 2(a)

= x.x + x.x’ by postulate 5(b)

= x.(x + x’) by postulate 4(a)

= x.1 by postulate 5(a)

=x by postulate 2(b)

The dual part of this theorem is

x+x=x (addition law)

Theorem 4: Redundancy Law in Boolean algebra postulates

x + (x · y) = x (Redundancy Law)

Proof:

x + (x . y) = x.1 + x.y by postulate 2(b)

-6-
= x.(1 + y) by postulate 4(a)

= x. (y + 1) by postulate 3(a)

= x.1 by postulate 2(a)

=x by postulate 2(b)

The dual theorem of this is

x · (x + y) = x

Theorem 5: A + (A’ . B) = A +B

Proof:

A+(A’.B) =(A+A’) . (A+B) by using postulate 4(b)

=1.(A+B) by using postulate 5(a)

= (A+B) by using postulate 2(b)

The dual theorem of this is

A .(A’ + B) = A.B

5.3.1.4 Switching Algebra

In 1938, C.E. Shannon introduced a two-valued Boolean algebra, which is known as switching

algebra. In a Two-Valued Boolean algebra S = {0, 1}. In this algebra, + is called as OR

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.

OR Operation: In OR operation, the output X is 1 when either A or B is 1 or both A and B are

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.

Figure 5.1 Symbol of OR Gate Table 5.1 Truth Table of OR Gate

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

Table 5.2 Table of OR Gate with 3 inputs

AND Operation: The AND operation produces a result of 1 only when all inputs are 1 otherwise

output is 0. The expression X = A • B reads as "X equals A AND B".

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

Table 5.3 Table 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.

Figure 5.4 symbol of AND Gate with 3 inputs

- 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

circle indicates inversion.

- 11 -
Figure 5.5 Symbol of NOT Gate

Table 5.5 Truth Table of NOT Gate

1' = 0 because NOT 1 is 0

0' = 1 because NOT 0 is 1

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

the implementation of Boolean postulates and basic theorems.

- 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

the two-input NOR gate is:

X = (A + B )'

- 13 -
Figure 5.7 Symbol of NOR Gate

Table 5.7 Truth Table 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

expression of the two-input NAND gate is: X = ( A.B )'

- 14 -
Figure 5.8 Symbol of NAND Gate

Table 5.8 Truth Table 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

Table 5.9 (a) Truth Table of XOR Gate

- 15 -
The Boolean expression for XOR is Q = A`B + AB`. Table 5.9(b) shows the truth table of XOR.

Output is 1 only when two inputs are different.

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

Table 5.9 (b) Truth Table of XOR Gate

The symbol and realization of XOR gate is as shown below in Figure 5.9 (c) .

Figure 5.9 (c) symbol and realization of XOR gate

NXOR Operation or XNOR operation or Equivalence Operation: NXOR means NOT XOR

and XNOR means Exclusive NOR. It is also called as Equivalence gate.

- 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

Table 5.10(a) Truth Table of XNOR Gate

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

shown below in Table 5.10(a):

- 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

Table 5.10 (b)Truth Table of XNOR Gate

5.3.1.6 Universal Gates

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

gates are called as universal gates.

Figure 5.11 Symbol of Universal Gate

- 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

5.3.1.7 Alternate Logic

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

bubbles that are already there.

- 19 -
 Change the operation symbol from AND to OR, or from OR to AND. (In the special case

of the INVERTER, the operation symbol is not changed.)

Figure 5.13

5.3.1.8. DeMorgan's Theorems

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:

(a) (x+y)' = x' • y' (NAND)

(b) (x•y)' = x' + y' (NOR)

- 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

individually and then ORing them.

These theorems can be proved by using truth tables. The truth table below shows the proof of

theorem (a) in Table 5.14:

1 2 3 4 5 6 7

A B A+B (A+B)’ A’ B’ A’.B’

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.

Example: Demonstrative example of DeMorgan’s theorem

x = ((a'+c) • (b+d'))'

- 21 -
= (a'+c)' + (b+d')' by using theorem (a)

= (a''•c') + (b'.d'') by using theorem (b)

= a.c' + b'.d double complements cancel each other

Three Variables DeMorgan's Theorems state as under:

(a) (x+y+z)' = x' • y' • z'

(b) (x•y•z)' = x' + y' + z'

These theorems can be extended to n variables and can be proved by using truth tables.

5.3.1.9 Boolean Functions & their Canonical Representations

A Boolean function is composed of standard logical operators and Boolean variables. For

instance, X = A’.B+C.B’. In this X is dependent Boolean variable and A, B, C are independent

Boolean variables. It means value of X will depend upon values of A, B, C. So, variable X is a

function of A, B, C. it can be expressed as X = F(A, B, C) where A, B, C are called literals by

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

simplification of these functions, which is of great importance in the minimization of digital

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

the n variables appears once (either complemented, or uncomplemented) is called a minterm.

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

Boolean function of the three variables a, b and c.

Minterms represented Minterms represented Minterms represented

In variables decimal In brief notation

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

Table 5.15 representation of Minterms

- 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

Table 5.16 truth table of a Function F(A,B)

Observing that the rows that have an output of 1 are the first and third, so we can write F(A,B) as

a sum of minterms in the following three different forms.

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

are maxterms: a+b'+c, a'+b+c

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

be in the form of itself or its complement.

The complement of a minterm is the respective maxterm. This can be easily verified by using de

Morgan's law. For example

m1' = M1

(a'b)' = a+b'

Maxterms represented Maxterms represented Maxterms represented

In variables decimal In brief notation

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

Table 5.17 Representation of Maxterms

- 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.

Both canonical forms are complement to each other.

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

of product and product of 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:

F(a, b, c) = a + a.b’ + a’.b.c’

The function has three product terms of one, two, and three literals each, respectively. These

product terms are connected by OR operation.

- 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

of a function expressed in product of sums is:

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’)

It is neither in sum of product nor in product of sums form.

5.3.1.9.1 Converting Non-Canonical or Nonstandard Representation into Canonical

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

below. The function has three variables x, y, z.

- 27 -
The first terms x is missing two variables viz. y and z. Therefore, by using x.1 = x & x+x’ = 1

and distributive law, we get:

x = x.1 = x.( y + y’ ) = x.y + x.y’

This is still missing one variable viz. z. by applying same rules we get:

x = x.y. (z+z’) + x.y’.(z + z’)

= x.y.z + x.y.z’ + x.y’.z + x.y’.z’

The second terms y’z is missing one variable viz. x. so, we get:

y’.z = y’.z .( x + x’) = x.y’.z + x’.y’.z

Combining all terms, we get

F = x + y’.z = x.y.z + x.y.z’ + x.y’.z + x.y’.z’ +x.y’.z + x’.y’.z

But x.y’.z appears twice, and according to theorem (a + a = a) , so one of the term can be

removed. Finally, we get:

F = x’.y’.z + x.y’.z’+ x.y’.z + x.y.z’+ x.y.z

= m1 + m4 + m5 + m6 + m7

= ∑(1,4,5,6,7)

Converting Noncanonical form into POS form: In the similar way, a noncanonical form can

be converted into POS form.

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

= (a.b +a’).(a.b+c) applying distributive law

= (a+a’).(b+a’).(a+c).(b+c) using a+a’=1 & a.1=a

- 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

a’+b = a’+b + 0 = a’+b+cc’ = (a’+b+c)(a’+b+c’)

The second term is missing b. so second term can be written as

a+c = a+c+0 = a+c+b.b’= (a+b+c).(a+b’+c)

The third term is missing a. so third term can be written as

b+c = b+c+0 = b+c+a.a’= (a+b+c)(a’+b+c)

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)

5.3.1.10 Simplification of Boolean Expressions

There are three different ways to simplify the Boolean functions/expressions:

 By using Boolean algebra

 By using Karnaugh map

 By using Quine-McCluskey Procedure

5.3.1.10.1 Simplification of Boolean Expressions by Using Boolean algebra

Earlier, Boolean postulates and theorem have been presented, which can be used to simplify any

Boolean expression or function. Below, we present some examples of Boolean algebra

- 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

used commercially for simplification.

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

5.3.1.10.2 Simplification of Boolean Expressions by Using Karnaugh Maps (K-Maps)

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

even six variables can be simplified.

The Figure5.19 below illustrates the correspondence between the Karnaugh map and the

truth table for the general case of a two variable problem.

Figure 5.19 Truth Table And K-map

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.

Figure 5.20 Truth Table and K-map

The Karnaugh map uses the following rules for the simplification of expressions by grouping

together adjacent cells containing ones:

- 31 -
 Groups must not include any cell containing a zero

 Groups may be horizontal or vertical, but not diagonal.

 Groups must contain 1, 2, 4, 8, or in general 2n cells.

 That is if n = 1, a group will contain two 1's since 21 = 2.

 If n = 2, a group will contain four 1's since 22 = 4 and so on

 Each group should be as large as possible.

 Each cell containing a one must be in at least one group.

 Groups may overlap.

 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

blocks 2 and 3 (corresponding to minterms m2 and m3) of a three-variable K-map: m2

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

property can be used in the simplification of Boolean functions.

Simplification of Three-Variable Boolean Function with K-Map: K-map of three-variable

Boolean function is as shown below:

Example: Consider the following Boolean function of three-variable: F(A, B, C) = ∑2, 3, 4, 6, 7

Fill the entries in the map as 1 for the minterms given in the F as shown in Table 5.21. Rest of

the entries is assumed 0 in the map (not shown).

Table 5.21 K-map with 3 inputs

- 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

viz. C. So, the simplified value of the function we get is as follows

F(A, B, C) = C + A’.B

Simplification of Four-Variable Boolean Function with K-Map: Consider the following K-

map for a four-variable function:

Figure 5.22 Four variable K-map

Blocks 8 and 12 are adjacent.

m8 = 1000 = AB'C'D'

m12= 1100 =ABC'D'

Also,

AB'C'D' +ABC'D' = AC'D '(B' + B)

=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

changes in value between these two blocks.

Figure 5.23 Grouping in Four variable K-map

Similarly, the grouping of m9 and m13 yields AC'D and grouping m5 and m13 yields BC'D.

If we combine AC'D' with AC'D,

AC'D'+ AC'D =AC' (D + D') = AC'. (1) =AC'

This in effect is equivalent to grouping all four 1s in the top right corner of the K-map, as shown

in Figure 5.24 here:

- 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

eliminate n literals. Hence, in simplifying functions it is advantageous to form as large a group of

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

following general rules:

 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

the product term.

 A variable that has a value of 1 in all blocks of the group should appear uncomplemented

in the product term.

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)

Figure 5.25 (a),(b),(c),(d)K-map with 4 inputs

Figures (a), (b), (c) & (d) above shows the sequence of forming groups. From Figure (d) the

simplified form of the given function is as given below:

F(A, B, C, D) = B.D + A’.B’.C + A’.B.C’ + A’.B.D’

- 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:

 It does not matter whether the output is 0 or 1;

 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

them in a group if it simplifies the logic.

Example: F(x,y,z,w) = ∑(1,3,7,11,15) + dc(0,2,5) where dc(0,2,5) represent don’t care

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

as shown in Figure 5.26 below.

- 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:

F(x,y,z,w) = y.z + w’.x’

5.3.1.11 Simplification of Boolean Functions by using Quine-McCluskey Procedure

(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-

McCluskey method. The tabular method of simplification consist of two parts:

 Determination of Prime Implicants.

 Selection of Essential Prime Implicants.

Let us illustrate determination of prime implicants and essential prime implicants with the help

of an example.

Consider the function f(A, B, C, D) = ∑ (0,1,2,3,5,7,8,10,12,13,15) in decimal form

∑ (0000,0001,0010,0011,0101,0111,1000,1010,1100,1101,1111) in binary form.

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 prime implicants are: + + D + BD + A + AB

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.

Figure 5.28 Selecting essential Prime Implicants

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

can be either BD, ,( or D), (A or AB ).

5.4 Summary

 In 1904, E.V. Huntington formalized postulates of Boolean algebra. There are six

postulates in Boolean algebra.

- 42 -
 In 1938, C.E. Shannon introduced a two-valued Boolean algebra, which is known as

switching algebra. Two values are 0 and 1.

 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 XOR gate output is 1 only when either of the input is 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 Boolean function is composed of standard logical operators and Boolean variables.

 A maxterm is a logical expression of n variables consisting of only the + operator and

the complement operator.

 For a Boolean function of n variables x1,...xn, a product term in which each of

the n variables appears once (either complemented, or uncomplemented) is called

a minterm.

 There are three different ways to simplify the Boolean functions/expressions: by using

Boolean algebra, by using Karnaugh map, by using Quine-McCluskey Procedure

 Functions that have unspecified output for some input combinations are called

incompletely specified functions.

- 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

conditions are represented by X in the K-Map.

 Don’t care conditions play a central role in the specification and optimization of logic

circuits as they represent the degrees of freedom of transforming a network into a

functionally equivalent one.

5.5 Suggested Readings/References

1. M. Morris Mano, Digital Logic and Computer Design, PHI, 2000

2. V. Rajaraman, T. Radhakrishnan, An Introduction to Digital Computer Design, PHI,

2002

3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth Edition,

MGH, 2002

4. John D. Carpinelli, Computer System Organization and Architecture, Pearson

Education, 2009

5. John P. Hayes, Computer Architecture and Organization, MGH,1998

5.6 Self Assessment Questions

1 State postulates of Boolean algebra.

2 What is principle of duality? What is its importance?

3 What is switching algebra? How is it different from ordinary algebra?

4 Prove x+1 = 1 by using Boolean postulates.

- 44 -
5 Prove x.x = x by using Boolean postulates.

6 Prove x+(x.y) = x by using Boolean postulates.

7 Prove x+(x’.y) = x+y by using Boolean postulates.

8 Define AND, OR and NOT operations.

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

and NOR gate.

13 State and prove two-variable and three-variable DeMorgan’s laws.

14 What do you mean by canonical representations of Boolean functions?

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:

(i) X.Y + X’.Z

(ii) X’Z + X’XY’ + W(X’Y+XY’)

(iii) AB’ + C’D’

(iv) D.(A’+B’) + B’.D

(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

(iii) w’x’yz + w’xyz + w’x’yz’ + w’xyz’

(iv) (A+C)(AD+AD)+AC+C

(v) A’B’C+AB’C’+AB’C+ABC’+ABC

19 Simplify the following Boolean functions using K-Map:

(i) F(A,B,C,D) = ∑(1,4,6,7,8,9,10,11,15)

(ii) F(A,B,C,D) = ∑(0,1,3,7,8,9)+∑ф(5,6,11,15)

(iii) F(A,B,C,D) = ∑(0,1,2,8,10,11,14,15)

(iv) F(A,B,C,D) = ∑(0,1,2,3,8,9,10,11,12)

(v) F(A,B,C,D) = ∑(1,3,5,8,9,11,15)+∑ф(2,13)

(vi) F(A,B,C,D) = ∑(2,3,6,7,14,15)

(vii) F(A,B,C,D) = ∑(0,2,6,7,10,12,14,15)

20 What are don’t care conditions? Discuss their roles in simplifications of Boolean functions.

21 Simplify the following Boolean functions using Quine-McCluskey procedure:

(i) F(A,B,C,D) = ∑(1,4,6,7,8,9,10,11,15)

(ii) F(A,B,C,D) = ∑(0,1,3,7,8,9)+∑ф(5,6,11,15)

(iii) F(A,B,C,D) = ∑(0,1,2,8,10,11,14,15)

(iv) F(A,B,C,D) = ∑(0,1,2,3,8,9,10,11,12)

(v) F(A,B,C,D) = ∑(1,3,5,8,9,11,15)+∑ф(2,13)

(vi) F(A,B,C,D) = ∑(2,3,6,7,14,15)

(vii) F(A,B,C,D) = ∑(0,2,6,7,10,12,14,15)

- 46 -
Writer Dr. Rajender Nath

Chapter 6

Combinational Circuit I
Structure

6.1 Introduction

6.2 Objective

6.3 Presentation of Contents

6.3.1 Combinational Circuits

6.3.1.1 Adders/Subtractors

6.3.1.1.1 Half Adder

6.3.1.1.2 Full Adder

6.3.1.1.3 Half Subtractor

6.3.1.1.4 Full Subtractor

6.3.1.1.5 Parallel Binary Adder

6.3.1.1.6 BCD Adder

6.4 Summary

6.5 Suggested Readings/References

6.6 Self Assessment Questions

- - 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

chapter; you will be able to design these types of combinational circuits.

- - 2
6.3 Presentation of Contents

6.3.1 Combinational Circuits

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,

decoders, encoders, comparators etc. are examples of combinational circuits.

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

physically as a binary signal that represents logic 1 or logic 0.

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

variables as shown in figure below.

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

outputs, and assign a letter symbol to each.

 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.

 Draw the logic diagram.

 Verify the correctness of the design.

- - 4
6.3.1.1 Adders/Subtractors

Adders/subtractors are combinational circuits used for adding/subtracting binary digits. In this

chapter we will discuss following types of adders/subtractors:

 Half Adder

 Full Adder

 Half Subtractor

 Full Subtractor

 Parallel Adder

 BCD Adder

6.3.1.1.1 Half 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).

Truth table of half adder is as shown in Table 6.1 below:

A B SUM (S) CARRY (C)


0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1

Table 6.1: Truth Table of Half Adder

- - 5
Now, the above truth table can be expressed as canonical Boolean functions as:

S(A, B) = ∑1, 2 = A’B + AB’= A B

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

shown in Figure 6.2 below.

Figure 6.2: Logic diagram of Half Adder

The symbol of half adder is shown in Figure 6.3 below:

HA

Figure 6.3: Symbol of half adder

- - 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

Table 6.2: Truth table of Full Adder

Now, the truth table shown in Table 6.2 can be expressed as canonical Boolean functions as:

S(A, B, C) = ∑1, 2, 4, 7 = A’B’C + A’BC’ + AB’C’+ABC

= A’B’C +ABC+ A’BC’ + AB’C’

= (A’B’ +AB)C+ (A’B + AB’)C’

- - 7
(now, let H = A’B + AB’ then H’ = A’B’ +AB)

= H’C + HC’

Hence, S can be implemented by two half adders.

Z(A, B, C) = ∑3, 5, 6, 7 = A’BC + AB’C + ABC’ +ABC

= (A’B + AB’)C + AB(C’ + C)

= HC + AB

Hence, Z can be implemented by using one OR gate as shown in Figure 6.4 below.

Figure 6.4: Logic Circuit diagram of Full Adder

- - 8
Figure 6.5 gives the symbol of full adder.

FA

Figure 6.5: Symbol of Full Adder

6.3.1.1.3 Half Subtractor

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:

X Y Difference (D) Borrow (B)


0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0

Table 6.3: Truth Table of Half Subtractor

Now, the above truth table can be expressed as canonical Boolean functions as:

D(X, Y) = ∑1, 2 = X’Y + XY’

B(X, Y) = ∑2 = X’Y

- - 9
The half subtractor can be implemented as shown in Figure 6.6 below.

Figure 6.6: Logic diagram of Half Subtractor

The symbol of half subtractor is shown in Figure 6.7 below:

HA

Figure 6.7: Symbol of half subtractor

6.3.1.1.4 Full Subtractor

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

Table 6.4: Truth table of Full Subtractor

Now, the above truth table can be expressed as canonical Boolean functions as:

D(A, B, C) = ∑1, 2, 4, 7 = A’B’C + A’BC’ + AB’C’+ABC

= A’B’C +ABC+ A’BC’ + AB’C’

= (A’B’ +AB)C+ (A’B + AB’)C’

(now, let H = A’B + AB’ then H’ = A’B’ +AB)

= H’C + HC’

- - 11
Hence, D can be implemented by two half subtractors.

Z(A, B) = ∑1,2,3,7 = A’B’C + A’BC’ + A’BC +ABC

= A’B’C +ABC+ A’BC’ + A’BC

= (A’B’ +AB)C+ A’B(C’ + C)

= H’C + A’B

Hence, Z can be implemented using by one OR gate as shown in Figure 6.8 below.

Figure 6.8: Logic Circuit diagram of Full Subtractor

Figure 6.9 gives the symbol of full subtractor.

FS

Figure 6.9: Symbol of Full Subtractor

- - 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

full adders and one half adder.

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.

Where Cout is carry out.

X2X1X0 augends

Y2Y1Y0 addend

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

CoutZ2 Z1Z0 sum

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

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

Figure 6.11: 3-bit Parallel Binary Adder Using 3 Full Adders

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

6.3.1.1.6 BCD 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

examine the approaches for constructing BCD arithmetic -elements.

For example, let's consider the addition of the two BCD digits 5 and 3:

Now consider the sum of 5 and 8:

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

exceeds 9. Let's examine the following cases:

In both cases, by adding six we obtain the correct answer in BCD. Using this logic, now, we

design a BCD adder.

- - 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

can be realized by the following Boolean expression:

K+Z3Z2+Z3 Z1

Sum in Decimal Carry Binary Sum Carry Out BCD Sum

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

Table 6.5: BCD Sum

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

circuit diagram of BCD adder.

- - 18
Figure 5.13: BCD Adder

By cascading such BCD adders, we can design parallel BCD adders. Parallel BCD adders are

beyond the scope of this chapter.

6.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.

 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

consists of three inputs and two outputs.

- - 19
 Half subtractor is a combinational circuit, which performs the subtraction of two bits. It

has two inputs and two outputs.

 A full subtractor is a combinational circuit that forms the arithmetic difference of three

input bits. It consists of three inputs and two outputs.

 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

using carry look-ahead adders.

 A BCD adder is a circuit that adds two BCD digits in parallel and produces a sum digit

also in BCD.

6.5 Suggested Readings/References

1. M. Morris Mano, Digital Logic and Computer Design, PHI, 2000

2. V. Rajaraman, T. Radhakrishnan, An Introduction to Digital Computer Design, PHI,

2002

3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth Edition,

MGH, 2002

4. John D. Carpinelli, Computer System Organization and Architecture, Pearson

Education, 2009

5. John P. Hayes, Computer Architecture and Organization, MGH,1998

- - 20
6.6 Self Assessment Questions

1. What is combinational/combinatorial circuit?

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

and one OR gate.

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

subtractors and one OR gate.

8. What is parallel binary adder? Draw a logic circuit diagram for a 4-bit parallel binary

adder.

9. What is BCD adder? Design a BCD adder.

10. What is carry look-ahead parallel adder? Draw its logic diagram and explain its working.

- - 21
Writer Dr. Rajender Nath

Professor, DCSA, KUK

Chapter 7

Combinational Circuit II
Structure

7.1 Introduction

7.2 Objective

7.3 Presentation of Contents

7.3.1 Combinational Circuits

7.3.1.1 Code Converter

7.3.1.2 Decoder

7.3.1.2.1 2-to-4 Line Decoder

7.3.1.2.2 3-to-8 Line Decoder

7.3.1.2.3 4-to-16 Line Decoder

7.3.1.2.4 4-to-10 Line Decoder (BCD Decoder)

7.3.1.3 Encoder

7.3.1.4 Multiplexer

7.3.1.4.1 4-to1 Line Multiplexer

7.3.1.5 Demultiplexer

7.4 Summary

1
7.5 Suggested Readings/References

7.6 Self Assessment Questions

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,

decoders, encoders, multiplexer, demultiplexer etc.

7.2 Objective

At the end of this chapter, you would be able to design code converters, decoders,

encoders, multiplexers and demultiplexers etc.

7.3 Presentation of Contents

7.3.1 Combinational Circuits

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.

7.3.1.1 Code Converter

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)

Y(A, B, C, D) = ∑( 0, 3, 4, 7, 8 ) + don’t care conditions ∑ (10, 11, 12, 13, 14)

Z(A, B, C, D) = ∑( 0, 2, 4, 6, 8) + don’t care conditions ∑ (10, 11, 12, 13, 14)

Input (BCD) Output(Excess 3)

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

Table.7.1 BCD to Excess-3 Code Converter

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

as data multiplexing, 7-segment display and memory address decoding.

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:

 2-to-4 Line Decoder

 3-to-8 Line Decoder (Binary-to-Octal Decoder)

 4-to-16 Line Decoder

 4-to-10 Line Decoder (BCD decoder)

7.3.1.2.1 2-to-4 Line Decoder

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

Table 7.2 Truth Table for 2-to-4 Line Decoder

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

be drawn as shown Figure 7.1.

Figure 7.1 2-to-4 Line Decoder Circuit Diagram

7.3.1.2.2 3-to-8 Line Decoder (Binary-to-Octal Decoder)

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

truth table of the decoder is as shown in Table 7.3.

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

Table.7.3 Truth table for 3-to-8-line decoder

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

can be drawn as shown in Figure 7.3.

9
Applications of 3-to-8 Line Decoder: Now we enumerate few applications of the 3 to 8

line decoder.

 Any n-variable logic function, in canonical sum-of-minterms form can be

implemented using a single n-to-2n decoder to generate the minterms, and an OR

gate to form the sum.

 The output lines of the decoder corresponding to the minterms of the function are

used as inputs to the OR gate.

 Any combinational circuit with n inputs and m outputs can be implemented with

an n-to-2n decoder with m OR gates.

For example, you can convert 3-to-8 Line Decoder into full adder by using two OR gates.

Truth table of the full adder is as shown in Table 7.4.

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

Table 7.4 Truth table for full adder

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).

Figure 7.4: Full-Adder implementation by using 3-to-8-line decoder

In the similar way, you can implement full subtractor by using 3-to-8 Line Decoder. This

is left as an exercise to the reader.

11
7.3.1.2.3 The 4-to-16 Line Decoder

A0 A1 A2 A3 D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15

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

Table 7.5 Truth Table for 4-to-16-Line Decoder

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

decoder as given in Table 7.5.

From the above truth table the following Boolean functions are obtained:

D0(A0, A1, A2, A3) = ∑0

D1(A0, A1, A2, A3) = ∑1

D2(A0, A1, A2, A3) = ∑2

D3(A0, A1, A2, A3) = ∑3

D4(A0, A1, A2, A3) = ∑4

D5(A0, A1, A2, A3) = ∑5

D6(A0, A1, A2, A3) = ∑6

D7(A0, A1, A2, A3) = ∑7

D8(A0, A1, A2, A3) = ∑8

D9(A0, A1, A2, A3) = ∑9

D10(A0, A1, A2, A3) = ∑10

D11(A0, A1, A2, A3) = ∑11

D12(A0, A1, A2, A3) = ∑12

13
D13(A0, A1, A2, A3) = ∑13

D14(A0, A1, A2, A3) = ∑14

D15(A0, A1, A2, A3) = ∑15

Now, using these sixteen Boolean functions, the circuit diagram for 4-to-16 Line Decoder

can be drawn in a similar way to the 3-to-8-line decoder.

7.3.1.2.4 The 4-to-10 Line Decoder (BCD 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

Table 7.6 Truth Table for 4-to-10-Line Decoder

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

that of a decoder. Keyboard in a computer acts as an encoder. We press a key and it

generates binary code for that code.

7.3.1.3.1 Octal to Binary Encoder

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

Table 7.7 Truth Table of Octal to Binary Encoder

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

Octal to Binary encoder is shown in Table 7.7.

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.

Figure 7.6 Octal to Binary Encoder Circuit Diagram

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

simultaneously, the output produces undefined combination.

 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

geared to the output line.

The 2-to-1 Line Multiplexer

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

selected input is geared to the output line.

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

table (by using 3-variable K-Map) can be obtained as given below.

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

Table 7.8 Truth table for 2-to-1 line multiplexer

It can be realized with two 2-input AND gates, one 2-input OR gate and one NOT gate as

shown in Figure 7.7.

Figure 7.7: 2-to-1 line multiplexer

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.

S0 S1 Input Line Selected

0 0 I0

0 1 I1

1 0 I2

1 1 I3

Table 7.9 Relationships between Control Signals and Input Lines

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.

If S0 = 0 & S1 = 1 then line I1 is selected and connected to output line F. If S0 = 1 & S1 =

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

be same as I0 when S0 = 0 & S1 = 0 or F will be same as I1 when S0 = 0 & S1 = 1 or F will

be same as I2 when S0 = 1 & S1 = 0 or F will be same as I3 when S0 = 1 & S1 = 1.

21
Figure 7.9: 4-to1 Line Multiplexer

22
7.3.1.5 Demultiplexer

Demultiplexer has a reverse function to that of a multiplexer circuit. 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

to the selected output line.

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

between control lines values and selection of output line.

S0 S1 Output Line Selected

0 0 F0

0 1 F1

1 0 F2

1 1 F3

Table 7.10 Relationships between Control Signals and Output Lines

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

Figure 7.10. Input I0 is geared to the selected output line.

Figure 7.10: 1-to-4 line Demultiplexer

7.3.1.6 Magnitude Comparator

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

input A is greater than, smaller than or equal to input B etc.

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

particular condition is satisfied.

7.3.1.6.1 1-Bit Comparator Circuit

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

are represented by C, D and E. Output at C indicates that A < B, Output at D indicates

that A = B, and the output at E indicates that A > B. Truth table of the 1-bit comparator

circuit is shown below:

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

Truth Table for 1-bit Comparator

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:

Figure 7.11: 1-Bit Comparator Circuit

By extending this notion, we can design 2-bit comparator, 3-bit comparator and n-bit

comparator circuits.

7.3.1.6.2 4-Bit Comparator Circuit

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

circuit is discussed below:

Consider two numbers, A and B, with four bits each:

A  A3 A2 A1 A0

B  B3 B2 B1B0

xi 1 if A  B  0 or A  B  1i.e. all bits of A equals all bits of B.

xi  Ai Bi  Ai ' Bi ' for i  0, 1, 2, 3 (This is XNOR operation or equivalence

operation)

For equality to exist, all xi variables must be equal to 1:

(A  B)  x3 x2 x1x0 AND operation)

To determine if A is greater than or less than B, we inspect the relative magnitudes of

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

sequential comparison can be expressed by:


' ' ' '
( A  B)  A3 B3  x3 A2 B2  x3 x2 A1B1  x3 x2 x1A0 B0

' ' ' '


( A  B)  A3 B3  x3 A2 B2  x3 x2 A1 B1  x3x2 x1 A0 B0

Compare: A  1010 and B  0101  ( A  B)  1

A  0101 and B 1010  ( A  B) 1

27
Now, the circuit diagram of 4-bit comparator circuit can be designed as shown in Figure

7.12 below.

Figure 7.12: 4-Bit Magnitude Comparator

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

is usually called an encoder. e.g. 2n-to-n, priority encoders.

 A binary decoder has n inputs and 2n outputs. Only one output is active at any one

time, corresponding to the input value. Figure below shows a representation of

Binary n-to-2n decoder

 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

is geared to the output line.

 Demultiplexer has reverse function to that of multiplexer circuit. Demultiplexer is

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

connected to the selected output line.

 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.

 Comparator circuit can compare the magnitude of given two numbers.

7.5 Suggested Readings/References

1. M. Morris Mano, Digital Logic and Computer Design, PHI, 2000

2. V. Rajaraman, T. Radhakrishnan, An Introduction to Digital Computer Design,

PHI, 2002

3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth

Edition, MGH, 2002

29
4. John D. Carpinelli, Computer System Organization and Architecture, Pearson

Education, 2009

5. John P. Hayes, Computer Architecture and Organization, MGH,1998

7.6 Self Assessment Questions

1. What is decoder? Design 2X4 line decoder.

2. Design 3X8 line decoder and convert this into full adder.

3. Design 3X8 line decoder and convert this into full subtractor.

4. Design 4X16 line decoder.

5. What is BCD decoder? Design it.

6. Design 4X10 line decoder.

7. What is code converter? Design a BCD to Excess-3 code converter.

8. What is code converter? Design a Excess-3 to BCD code converter.

9. What is code converter? Design a BCD to Gray code converter.

10. What is encoder? Design an octal to binary encoder. Also discuss the applications

of encoders.

11. What is multiplexer? Design a 4X1 line multiplexer.

12. What is demultiplexer? Design a 1X4 line demultiplexer.

13. What is a comparator circuit? Design 1-bit comparator circuit.

14. What is a comparator circuit? Design 2-bit comparator circuit.

15. What is a comparator circuit? Design 3-bit comparator circuit.

16. What is a comparator circuit? Design 4-bit comparator circuit.

30
Writer Dr. Rajender Nath

Professor, DCSA, KUK

Chapter 8

Sequential Circuit I
Structure

8.1 Introduction

8.2 Objective

8.3 Presentation of Contents

8.3.1 Sequential Logic Circuits

8.3.2 Flip-flops

8.3.2.1 SR Flip Flop/RS Flip Flop/Basic Latch

8.3.2.2 Clocked RS Flip flop

8.3.2.3 Clocked D Flip flop

8.3.2.4 JK Flip Flop

8.3.2.5 T Flip Flop

8.3.2.6 Master-Slave Flip Flops

8.3.2.7 Triggering of Flip Flops

8.3.2.8 Edge-triggered D Flip Flop

8.3.2.9 Direct inputs to Flip Flops

8.4 Summary
8.5 Suggested Readings/References

8.6 Self Assessment Questions

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.

In order to build sophisticated digital logic circuits, including computers, we need

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

memory, it must have three characteristics:

 the device must have two stable states

 there must be a way to read the state of the device

 there must be a way to set the state at least once

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

circuit memory. These circuits are called as sequential circuits.


A sequential circuit is a combinational logic with some feedback to maintain its

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

of external inputs and present state. A sequential circuit is specified by a time

sequence of inputs, outputs, and internal states.

There are two types of sequential circuits. Their classification depends on the timing

of their signals:

 Synchronous sequential circuits

 Asynchronous sequential circuit

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

apply direct input to flip flops.


8.3 Presentation of Contents

8.3.1 Sequential Logic Circuit

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

function of current inputs as well as previous outputs.

 Sequential logic has storage or memory elements.

 It consists of a combinational circuit to which memory elements are connected to

form a feedback path.

Sequential circuits can be Synchronous or Asynchronous as discussed below.

Synchronous Sequential Circuit: A synchronous sequential circuit has the following

characteristics:

 It is a system whose behavior can be defined from the knowledge of its signals at

discrete instants of time.

 In this circuit, synchronization is achieved by a timing device called a master

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

elements are called clocked sequential circuits.

 The memory elements used in clocked sequential circuits are usually clocked flip

flops.

Asynchronous Sequential Circuit: An asynchronous sequential circuit has the

following characteristics:

 It is a sequential circuit whose behavior depends only on the order in which its

input signals change and can be affected at any instant of time.

 Memory elements are either latches or time delay elements.

 These are difficult to design and verify or test.

 These may also be regarded as combinational circuits with feedback.

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,

Master-Slave flip flop.

8.3.2.1 SR Flip Flop/RS Flip Flop/Basic Latch

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

Table 8.1 Characteristic Table

 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

at first NOR gate Q is 1. Since Q is 1, so flip flop is said to be in set state.

 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

present state that is Q remains unchanged.

 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

at second NOR gate is 1. Since Q is 0, so flip flop is said to be in reset state.

 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

present state that is Q remains unchanged.


 The fifth input condition S=1 and R=1 forces the outputs of the both the NOR gates

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.

Figure 8.2 SR Flip Flop using NAND gate

Table 8.2 Characteristics Table

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

present state that is Q remains unchanged.

 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

present state that is Q remains unchanged.

 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.

8.3.2.2 Clocked RS Flip-flop

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.

Figure 8.3 Clocked RS Flip Flop

Table 8.3 Characteristics Table of Clocked RS Flip Flop

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.

8.3.2.3 Clocked D flip flop

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:

 It has only one input designated as D.

 The D input goes directly to the S input, and its complement, is applied to the R input

of the basic flip flop.

 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

of inputs from two to one.

Figure 8.4 Clocked D Flip Flop


Table 8.4 Characteristics Table of clocked D Flip Flop

The block diagram of this flip flop is shown in Figure 8.5.

Figure 8.5 Symbol of Clocked D Flip Flop

8.3.2.4 JK Flip Flop

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

back into the second AND gate.


Figure 8.6 JK Flip Flop

 JK flip flop is a refinement of the RS flip flop in that the indeterminate state of the RS

type is defined in the JK type.

 In a JK flip flop, J and K inputs behave like S and R in clocked RS flip flop to set and

clear the flip flop.

 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.

Table 8.5 Characteristics Table of JK Flip Flop

The graphical symbol of JK flip flop is shown in Figure 8.7.


Figure 8.7 Symbol of JK Flip Flop

Race-around problem in JK flip flop: Although JK Flip flop is an improvement on the

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

Master-Slave JK Flip-flop, which is discussed in section 7.3.2.6.

8.3.2.5 T Flip Flop

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

flip-flop "toggles" with each clock pulse.

Table 8.6 shows the characteristics table for the T flip flop. It is clear from the table that

whenever input at T is one; flip flop complements its previous output.


Figure 8.8 T Flip Flop

Table 8.6 Characteristics Table of T Flip Flop

The symbol of T flip flop is shown in Figure 8.9.

Figure 8.9 Symbol of T Flip Flop

8.3.2.6 Master-Slave Flip Flops

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

goes to the same state as the master flip-flop.

Figure 8.10 Master Slave RS Flip Flop

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

inverter between the CP terminal and the input of the master.

Figure 8.11 Timing relationships in a master slave flip-flop


Master-Slave JK Flip Flop: There is a problem in JK flip flop called as race around

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

race around condition. It can be rectified using Master-Slave flip flop.

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

input gives the characteristic toggle of the JK flip-flop as shown below.

Figure 8.12 Master Slave JK flip flop

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

flop as shown in Table 8.5.

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.

8.3.2.7 Triggering of Flip Flops

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

are triggered by pulses.

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

negative transition as the negative edge.

Figure 8.13. Positive and Negative Clock Pulse Transition

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

entire pulse duration, then the multiple-transition problem can be eliminated.

8.3.2.8 Edge-triggered D Flip Flop

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

(positive-edge-triggered), and others on the negative edge of the pulse (negative-edge-

triggered).

The logic diagram of a D-type positive-edge-triggered flip-flop is shown in Figure 8.14.

Figure 8.14. D-type positive-edge triggered flip-flop


The circuit of edge-triggered D flip flop consists of 3 set-reset latches. The latch on the

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

negative edge or the positive edge of the clock pulse.

7.3.2.9. Direct Inputs to Flip Flops

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

an active-low clear is shown in Figure 8.15.


Figure 7.15. Graphic Symbol

Table 8.7 shows the characteristics table of JK flip flop with direct clear.

Table 8.7 Characteristics Table of JK Flip Flop with Direct Clear

8.3 Summary

 A sequential circuit is a combinational logic with some feedback to maintain its

current value, like a memory cell.

 Sequential circuits can be synchronous and asynchronous.

 A flip flop is a bi-stable sequential circuit that has two stable states – output is

either 0 or 1.

 SR flip flop has limitations that are removed by JK flip flop.

 SR flip flop cannot be converted into T flip flop.

 JK flip flop can be converted into T flip flop.

 SR flip flop can be converted into D flip flop.


 Edge triggered flip flop are sensitive to the edge of clock pulse ( leading edge or

trailing edge). They are sensitive to the duration of clock pulse.

8.4 Suggested Readings/References

1. M. Morris Mano, Digital Logic and Computer Design, PHI, 2000

2. V. Rajaraman, T. Radhakrishnan, An Introduction to Digital Computer Design,

PHI, 2002

3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth

Edition, MGH, 2002

4. John D. Carpinelli, Computer System Organization and Architecture, Pearson

Education, 2009

5. John P. Hayes, Computer Architecture and Organization, MGH,1998

8.5 Self Assessment Questions

1. What is sequential circuit? How is it different from combinational circuit?

2. What are synchronous and asynchronous sequential circuits?

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

and explain its working.

5. What is SR flip flop? Draw the logic diagram of SR flip flop using NAND gates

and explain its working.


6. What is clocked SR flip flop? Draw its logic diagram and explain its working with

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

of its characteristics table.

8. What is JK flip flop? Draw its logic diagram and explain its working with the help

of its characteristics table.

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

of its characteristics table.

11. What is master-slave JK flip flop? Draw its logic diagram and explain its working

with the help of its characteristics table.

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

Professor, DCSA, KUK

Chapter 9

Sequential Circuit II
Structure

9.1 Introduction

9.2 Objective

9.3 Presentation of Contents

9.3.1 Registers

9.3.1.1 Shift Registers

9.3.1.1.1 Serial-In-Serial-Out (SISO) Shift Register

9.3.1.1.2 Serial-In-Parallel-Out (SIPO) Shift Register

9.3.1.1.3 Parallel-In-Serial-Out (PISO) Shift Register

9.3.1.1.4 Parallel-In-Parallel-Out (PIPO) Shift Register

9.3.1.1.5 Bidirectional Shift register

9.3.2 Counters

9.3.2.1 Asynchronous and Synchronous Counter

9.3.2.1.1 Asynchronous Binary Counter

9.3.2.1.1.1 A 4-bit Asynchronous Binary Counter

9.3.2.1.1.2A 4-bit Up/Down Ripple Counter

1
9.3.2.2.2 Synchronous Binary Counters

9.3.2.2.2.1 A 4-bit Synchronous Binary (Up) Counter

9.3.2.2.2.2 A 4-bit Synchronous Binary (Down) Counter

9.3.2.2.2.3 A 4-Bit Up/Down Synchronous Binary Counter

9.3.2.2 Modulo-N Counters

9.3.2.2.1 A 3-bit Synchronous Binary Mod-6 Counter

9.3.2.2.2 Binary Coded Decimal (BCD) Counters/Mod-10 Counter

9.3.2.3 Ring Counter

9.3.2.4 Johnson Counter

9.4 Summary

9.5 Suggested Readings/References

9.6 Self Assessment Questions

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

number of registers etc.

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

registers are categorized as Serial-In-Serial-Out (SISO) Shift Register, Parallel-In-Serial-

Out (PISO) Shift Register, Serial-In-Parallel-Out (SIPO) Shift Register, Parallel-In-

Parallel-Out (PIPO) Shift Register. We will also discuss bidirectional shift register and

universal shift register.

We will explain synchronous and asynchronous counters and their pros and cons. In

asynchronous counters, various types of ripple counters will be discussed. In synchronous

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

sequential counter to count any sequence.

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

a register are all of the same type.

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

can be following types.

Figure 9.1 Basic Data Movements in Shift Registers

 Serial-In-Serial-Out (SISO) Shift Register (Figure 9.1 (a & b))

 Parallel-In-Serial-Out (PISO) Shift Register (Figure 9.1 (c))

 Serial-In-Parallel-Out (SIPO) Shift Register (Figure 9.1 (d))

 Parallel-In-Parallel-Out (PIPO) Shift Register (Figure 9.1 (e))

5
 Rotate Right Shift Register (Figure 9.1 (d)) (Ring Counter)

 Rotate Left Shift Register (Figure 9.1 (d)) (Ring Counter)

9.3.1.1.1 Serial-In-Serial-Out (SISO) Shift Register

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

through the register from FF0 to FF2

Figure 9.(a) SISO Shift register

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

input of this flip-flop.

Figure 9.2(b) SISO Shift register

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

a serial-in, parallel-out shift register.

Figure 9.3 Timing Diagram for SISO Shift register

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.

8.3.1.1.2 Serial-In-Parallel-Output (SIPO) Shift Register

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

simultaneously. The construction of a four-bit SIPO register is shown in Figure 9.4.

Figure 9.4 SIPO Shift register

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).

8.3.1.1.3 Parallel-In-Serial-Out (PISO) 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

is also called as parallel to serial data format changer.

Figure 9.5 PISO 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.

Figure 9.6 PISO Shift register

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

SI to DA , QA to DB , QB to DC , QC to SO. Clock pulses will cause data to be right shifted

out to SO on successive pulses.

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

parallel loading of the data by the clock.

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

the clock as shown in Figure 9.8.

Figure 9.8 Timing Diagram for PISO Shift register

Some commercially available PISO shift registers are 8-bit 74HC165N, 8-bit 74LV165,

8-bit 4014 etc.

9.3.1.1.4 Parallel-In-Parallel-Out (PIPO) Shift Register

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.

Figure 9.9 PIPO Shift register

Some commercially available PIPO shift registers are 4-bit SN74LS395A, 8-bit

SN74ALS299 etc.

9.3.1.1.5 Bidirectional Shift Register

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

or left as selected by the LEFT/RIGHT control line.

Figure 9.10 Bi-directional 4-bit Shift Register

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

can be used in either serial-to-serial, left shifting, right shifting, serial-to-parallel,

parallel-to-serial, and as a parallel-to-parallel multifunction data register, hence the name

"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

and reset the device.

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

that the state table has 16 rows.

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

means; the counter wraps around.

o3 o2 o1 o0 | o3' o2' o1' o0'


-----------------------------
0 0 0 0| 0 0 0 1
0 0 0 1| 0 0 1 0
0 0 1 0| 0 0 1 1
0 0 1 1| 0 1 0 0
0 1 0 0| 0 1 0 1
0 1 0 1| 0 1 1 0
0 1 1 0| 0 1 1 1
0 1 1 1| 1 0 0 0
1 0 0 0| 1 0 0 1
1 0 0 1| 1 0 1 0
1 0 1 0| 1 0 1 1
1 0 1 1| 1 1 0 0
1 1 0 0| 1 1 0 1
1 1 0 1| 1 1 1 0
1 1 1 0| 1 1 1 1
1 1 1 1| 0 0 0 0

Table 9.11 State Table of a 4-bit Counter

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,

but nevertheless important. Important variations include:

 The ability to count up or down according to the value of an additional input

 The ability to clear the contents of the counter if some additional input is 1

 The ability to act as a register as well, so that a predetermined value is loaded

when some additional input is 1

16
 The ability to count using a different representation of numbers from the normal

(such as Gray-codes, escess-3 code, self-complementing codes, etc)

 The ability to count with different increments than 1

In the following subsections we will discuss different types of counters such as

asynchronous binary counter/ripple counter, synchronous binary counter, modulo-N

counters, up/down counters, ring counter etc.

9.3.2.1 Asynchronous and Synchronous Counters

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

with this internal clock.

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:

 Asynchronous counter requires lesser circuitry than a synchronous counter as no

logic gates are used.

 Asynchronous counter is easier to construct as compared to synchronous counter.

 Asynchronous counter is slow as compared to the synchronous counter.

 In a synchronous counter, all the flip-flops will change states simultaneously

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

asynchronous counter, the slower it will be.

9.3.2.1.1 Asynchronous Binary Counter

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.

9.3.2.1.1.1 A 4-bit Asynchronous Binary Counter/Ripple Counter

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

evident in the "oscillations" of the bits between 0 and 1.

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

count sequence i.e. at the transition between 7 (0111) and 8 (1000).

If we want to design a digital circuit to "count" in four-bit binary, all we have to do is

design a series of frequency divider circuits, each circuit dividing the frequency of a

square-wave pulse by a factor of 2 as shown in Figure 9.13.

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

(T flip-flops). We use flip-flops with negative-edge triggering (bubble symbols on the

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.

Figure 9.13 Frequency Divisions by 2

Figure 9.14 A 4-bit Ripple Counter (Negative-Edge Triggered)

20
This circuit would yield the output waveforms as shown in Figure 9.15 when "clocked"

by a repetitive source of pulses from an oscillator.

Figure 9.15 Outputs Waveforms of 4-bit Ripple Counter

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

generate an "up" count sequence.

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

high-to-low transition on the Q output will be accompanied by a low-to-high transition on

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.

Figure 9.16 4-bit Ripple Counter (Positive-Edge Triggered)

9.3.2.1.1.2 A 4-bit Up/Down Ripple Counter

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

sequence, while the Q outputs generate an up-counting sequence.

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

Figure 9.18 Waveforms for Simultaneous 4-bit Ripple Up Counter

23
Figure 9.19 Waveforms for Simultaneous 4-bit Ripple Down Counter

9.3.2.2.2 Synchronous Binary Counters

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

(Down) counter – are discussed in the next following paragraphs.

9.3.2.2.2.1 A 4-bit Synchronous Binary (Up) Counter

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

time that is what we mean by synchronous.

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

AND of outputs of first, second and third flip-flops.

Q3Q2Q1Q0

Table 9.20 Binary Counting Sequence

25
After having analyzed the bit patterns change, a circuit diagram of a 4-bit binary

synchronous binary counter can be drawn as shown in Figure 9.21.

Figure 9.21 A 4-bit Synchronous Binary (Up) Counter

9.3.2.2.2.2 A 4-bit Synchronous Binary (Down) Counter

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

bits are "low" prior to a toggle.

26
Q3Q2Q1Q0

Table 9.22 Binary Counting Sequence

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

can be drawn as given in Figure 9.23.

27
Figure 9.23 A 4-bit Synchronous Binary Down Counter

9.3.2.2.2.3 A 4-Bit Up/Down Synchronous Binary 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

the J and K inputs of each succeeding flip-flop as shown in Figure 9.24.

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.

9.3.2.2 Modulo-N Counters

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

methods is to use the CLEAR input on the flip-flops.

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

count. Types of flip-flops used are JK.

Figure 9.25 A 3-bit Synchronous Binary MOD-6 Counter

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.

9.3.2.2.2 Binary Coded Decimal (BCD) Counter (Mod-10 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

Mod-10 counter. This is left as an exercise to the readers.

9.3.2.3 Ring Counters

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

reset to 0. FF0 is preset to 1 instead.

Figure 9.26 A 4-bit Ring Counter

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.

Table 9.27 State Table of Ring Counter

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

long as clock pulses are applied as shown in Table 9.27.

9.3.2.4 Johnson Counters

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.

Only eight of the sixteen states are being used.

33
Figure 9.28 A 4-bit Johnson Counter

Table 9.29 State Sequence of 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

number of states. Otherwise, the ideal sequence will not be followed.

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

than a binary counter.

34
9.4 Summary

 A register is a sequential circuit used to store binary word. It consists 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.

 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

by a common clock, and all are set or reset simultaneously.

 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.

 A counter is a sequential circuit that goes through a prescribed sequence of states

upon the application of input pulses.

 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.

 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.

 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.

35
 A Mod-10 counter has 10 possible states, in other words it counts from 0 to 9 and

rolls over.

9.5 Suggested Readings/References

1. M. Morris Mano, Digital Logic and Computer Design, PHI, 2000

2. V. Rajaraman, T. Radhakrishnan, An Introduction to Digital Computer Design,

PHI, 2002

3. Carl Hamacher, Zvonko Vranesic, Safwat Zaky, Computer Organization, Fifth

Edition, MGH, 2002

4. John D. Carpinelli, Computer System Organization and Architecture, Pearson

Education, 2009

5. John P. Hayes, Computer Architecture and Organization, MGH,1998

9.6.2 Self Assessment Questions

1. What is register? Discuss its applications in computer system.

2. What are shift registers? How do you classify them?

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.

5. Design a 4-bit SIPO shift register.

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.

8. Design a 4-bit bi-directional shift register and explain its working.

9. What is counter? Explain its applications in computers.

10. Distinguish between asynchronous and synchronous counters.

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

13. Design a 4-bit synchronous (Up) binary counter.

14. Design a 4-bit synchronous (Down) binary counter.

15. Design a 4-bit synchronous Up/Down binary counter.

16. What is modulo-n counter? Design a 3-bit synchronous binary Mod-6 counter.

17. What is BCD counter? Design a 4-bit BCD counter.

18. Design a modulo-10 counter using JK flip-flops.

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

applications of Johnson counter in computers.

21. Compare ring and Johnson counters.

37
Post Graduate Diploma in Computer Science and Applications
COMPUTER ORGANIZATION & NETWORKING FUNDAMENTALS

Paper : CS-DE-11 Written by – Dr. Shuchita Upadhyaya

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 Computer Network may specifically be defined as “an interconnected collection of


autonomous computers”. Two computers are said to be interconnected if they are able to
exchange information. The connections may be thru copper wires, optical fibers, and wireless
electromagnetic or optical media. ‘Autonomous’ means that there is no master/slave relationship
between the connected devices. Each device in a network serves a specific purpose for one or
more individuals. For example, a PC can provide access to information or software. On the other
hand another PC may be a file server devoted to managing a disk drive containing shared files. A
network may cover a small geographic area connecting devices in a single building or group of
buildings. Such a network is a Local area network (LAN). A network that covers a large area
such as a state, country or the world is called a Wide area network (WAN). In a computer
1
network data communication occurs which is the exchange of data between two devices via
some form of transmission medium. Data is in the form of 0’s and 1’s.

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

A Network is a set of devices connected by communication links. Devices can be referred to as


nodes. A node can be a computer, printer, terminal, or any other special network-related device
such as communication servers, repeaters, bridges, switches, routers etc. which are capable of
sending and/or receiving data sent by other nodes in the network (devices will be discussed in
detail in the following lessons). As network devices, computers are called hosts (or servers) or
workstations (also called desktops or clients). The communication links in a network are the
medium thru which data transmission takes place. Network media come in two broad categories:
cable and wireless. Examples of cable include twisted-pair, coaxial, and fiber-optic cable.
Examples of wireless include radio waves, microwaves, and infrared waves. Thus hardware and
software resources are shared in a computer network. The sharing of data and other resources is
accomplished when all the nodes in the network follow some common rules of communication
which are known as protocols. Protocols facilitate understanding of a communication by
providing members with a common language. Thus, a network communication protocol is an
accepted or established set of procedures, rules, or formal specifications governing data
communication.

USES OF COMPUTER NETWORKS


Computer Networks may be used by companies (business) or by individuals (personal and home
applications).

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.

Sharing of information like customer records, inventories, accounts receivable, financial


statements, tax information etc. is another important advantage of computer networks. Where
employees are scattered over large number of offices and plants in the country, access to such
type of information from different offices become easier. A company’s information system may
consist of one or more databases and some number of employees who need to access them
remotely. In such cases an arrangement known as client-server model is used where the data are
stored on powerful computers called servers. Normally these servers are located at some central
office and maintained by a system administrator. On the other side are the employees having
simpler machines, called clients thru which they can access remote data. The client and server
machines are connected by a network. The client and server machines can be in the same
building or can be in remote locations. Such a client-server model is also used by individuals
sitting at home and accessing remote information.

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.

Person-to-person communication: The second broad category of network use is person-to-


person interaction. Electronic-mail (email) is widely used by millions of people to send mails

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.

3.2 TYPES OF COMPUTER NETWORKS AND THEIR TOPOLOGIES

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

3.2.1 Classification by Transmission Technology


Topology describes the basic design of a network. It details how key network components such
as nodes and links are interconnected. The interconnection structure of the components define
the transmission technology that may be used to communicate data from one point to the other.
There are two types of transmission technologies identified according to the architecture and
techniques they use for transmission.
1. Broadcast/Multipoint networks

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 :

- Local Area Networks (LANs)

- Metropolitan Area Networks (MANs)

- Wide Area Networks (WANs)

The connection of two or more networks is called an internetwork.

The worldwide Internet is a well-known example of an internetwork. Distance is important as a


classification metric because different techniques are used at different scales.

Local Area Networks


Local area networks, generally called LANs, are privately - owned networks within a single
office single building or campus of upto a few kilometers in size. They are widely used to
connect personal computers and workstations in company offices and factories to share resources
(e.g., printers) and exchange information. LANs with their emphasis on low cost and simplicity
have been based on the broadcast approach. LANs are distinguished from other kinds of
networks by three characteristics: (1) their size, (2) their transmission technology. (3) their
topology.

1. Size: LANs are restricted in size and may exist in a room, a building or a small campus.

2. Transmission Technology: LANs often use broadcast transmission technology consisting of


a single cable to which all the machines are attached. Traditional LANs run at speeds of 10 to
100 Mbps, have low delay (tens of microseconds), and make very few errors. Newer LANs may
operate at higher speeds, up to hundreds of megabits sec.

1 megabit = 1,000,000 bits = 106 bits

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

Fig 3. Bus topology

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

Fig. 4: Ring Topology


A ring is relatively easy to install and reconfigure. Each device is linked only to its immediate
neighbors. To add or delete a device requires moving only two connections. The only
constraints are media access control and traffic consideration. In addition, fault isolation is
simplified. Generally in a ring a signal is circulating at all times. If one device does not receive a
signal within a specified period, it can issue an alarm. The alarm alerts the network operator to
the problem and its location. Cutting any link causes complete failure and so double or braided
loops are used where reliability is important. Power failure at a station causes loop failure
unless the interface is designed to bypass a station or some form of redundancy is included.

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

Control Switch or hub

Fig 5. Star Topology


A star topology does not allow direct traffic between devices. The controller acts as an exchange:
If one device wants to send data to another, it sends to the controller, which then relays the data
to the other connected devices.

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.

Fig. 6. Tree topology

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

Micro co mp ut er Int erexchange


channels
Mo dem
Lo cal
Loo p Sw it ching

Telep ho ne co mpan y Ho st co mput er


Cent ral o ffice o r Server

Fig. 8 . A Wide Area Netwo rk Exa mp le

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.

Fig. 9: Fully Connected mesh topology


Another advantage is privacy or security. When every message sent travels along a dedicated
line, only the intended recipient sees it. Physical boundaries prevent other users from gaining
access to messages.

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.

Partial mesh (irregular):

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.

Fig. 10: Partial Mesh

18
Star and Tree:

(a) Star (b) 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

Fig. 12. Hybrid

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.

Transmission media can be divided into two broad categories or types:

 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

from point-to-point. By interconnecting wires at various repeaters or switching points, wired

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

reused only in a sufficiently distant geographical area.

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 Transmission Media(Wired Media)

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,

repeaters are required every 2 or 3 km.

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.

Twisted-pair cable comes in two forms:

 Unshielded

 Shielded

Unshielded Twisted-pair cable (UTP)

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

pairs in a larger bundle.

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.

Fig.14. Cable with 5 unshielded twisted pairs of wires.

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

others. Category 6 and 7 are not EIA standards.

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,

and token ring 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.

Enhanced Category 5(developing nonstandard cabling): Same as Cat 5 but manufacturing

process is refined. Data rates of 1000Mbps. Suitable for Ethernet, Fast Ethernet, Gigabit

Ethernet, token ring, and ATM. Also known as Cat 5E.

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

performance that is more reliable over long distances.

Category 6 (Class E): Similar to Cat6 and is proposed international standard.

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.

Fig. 15. Shielded twisted-pair cable

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

100 KHz to 500 MHz.

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).

Fig.16. Coaxial Cable

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.

Two kinds of coaxial cables are widely used:

 Base band- 50-0hm cable, commonly used for digital transmission.

 Broad band- 75-0hm cable, commonly used for analog transmission.

(Base band means digital and broadband means analog)

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

meters with same characteristics of 10Base 5.

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

handle only 30 machines per cable segment.

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:

The most important applications of coaxial cable are:

 Cable Television distribution & Cable Modem

 Long-distance telephone transmission

 Short-run computer system links

 Local Area Networks & Ethernet LANS

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

a tree-and-branch topology as shown in fig..

Fig.18. Tree-and-Branch topology of conventional cable TV systems.

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

introduction of unidirectional split-band amplifiers that allow information to flow in both

directions.

Fig19. Topology of hybrid fiber-coaxial systems

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

carry over 10,000 voice channels simultaneously.

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-

speed I/O channels on computer systems.

Local Area Networks & Ethernet LANs: Usage of 10Base 5 and 10Base 2 coaxial cables in

LAN’s have already been discussed earlier.

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

or plastic and transmits signals in the form of light.

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

and are also immune to interference and cross talk.

Physical Description:

Optical transmission system has three components:

 The light source

 The transmission medium

 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,

the cladding and the jacket. (Fig.20)

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

vacuum: 300,000 kilometers/second (approximately 186,000 miles/sec). The speed of light

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).

Air/ silica boundary

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

boundary at different angles.

(b) Light trapped by total internal reflection

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

this property is called a multimode fiber.

32
Reflected path

Direct
path

(a) M ultimode fiber: multiple rays follow different paths

(b) Single mode: only direct path propagates in fiber

Fig 22. Multi-mode and Single-mode Optical fiber

Applications:

The following characteristics distinguish optical fiber from twisted pair or coaxial cable:

 Greater capacity (higher bandwidth).

 Smaller size and lighter weight.

 Lower attenuation.

 Electro magnetic isolation (not affected by power surges, electromagnetic interference or

power failures or corrosive chemicals).

 Difficult to Tap, do not leak light

 Greater repeater spacing.

 Lower installation cost.

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.

Wireless Communication (Unguided Media)

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,

swamps etc.) wireless may be preferable.

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

frequency, f, and is measured in Hz.

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

communication is based on this principle.

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

possible to focus it into a directional beam.

Electromagnetic transmission in air can be radio or microwave transmission depending on the

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

receiver do not have to be carefully aligned physically.

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

other electrical equipment.

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

antennas must be accurately aligned with each other.

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

necessary for two-way communication such as a telephone conversation. One frequency is

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

serve both frequencies and functions.

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

transmittable form and relayed to the next antenna (fig. 23)

Fig 23. Terrestrial Microwave

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

surface, on narrow, covering an area only hundreds of kilometers in distance.

Fig.24. Satellite Communication

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

degrees from another in geosynchronous orbit around the equator.

Fig. 25. Satellites in geosynchronous orbit

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

traffic between VSATs, as shown in Fig. 26.

Fig 26. VSATs using a hub

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

stations, which then distribute the programs to individual viewers.

 Long distance Telephone Transmission: Satellite transmission is also used for point-to-point

trunks between telephone exchange offices in public telephone networks.

 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

subscribers as well as relay messages between subscribers.

Infrared and Millimeter Waves

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

an infrared system, in contrast to radio systems.

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

the infrared as in the visible spectrum.

4. SUMMARY

1. A computer network is an interconnected collection of autonomous systems. The


interconnections are used for communication of data and information.
2. Computer networks can be used for numerous services, both for companies and for
individuals. Resource sharing, load sharing, high reliability, cost effectiveness,
scalability and powerful communication are some of the goals that motivated the
development of networks. Access to remote information, e-mail, e-commerce,
entertainment are some of the applications of computer networks for individuals.
3. A line configuration defines the relationship of communication devices to a
communications pathway. In a point-to-point configuration, two and only two devices
are connected by a dedicated link. In a multipoint (broadcast) line configuration many
devices may share a link.

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

conductor (shield) and a plastic cover.

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,

low attenuation and high bandwidth capabilities.

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

a satellite in geo-synchronous orbit to relay signals.

5. SUGGESTED READINGS

1. Michael A. Gallo, “Computer Communications and Networking Technologies”,


Cengage Learning.
2. Andrew S. Tanenbaun, “Computer Networks”, Pearson Education.
3. Behrouz A. Forouzan, “Data Communications and Networking”, Tata McGraw Hill.
4. William Stallings, “Data and Computer Communications”, PHI.
5. William A. Shay, “Understanding Data Communications & Networks”, Thomson
Learning, Vikas Publications.
6. Douglas E. Comer, “Computer Networks and Internets”, Pearson Education.

6. SELF ASSESSMENT QUESTIONS

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

guided and unguided media used for communication.

11. Describe the components of a fiber optic cable.

12. Distinguish between fiber optics and microwave transmission.

13. Give advantages and disadvantages of using fiber optic cable over copper cables.

14. How is a microwave communication different from a radio communication?

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

application areas of each.

17. Explain the purpose of satellites in communication.

44
Post Graduate Diploma in Computer Science and Applications
COMPUTER ORGANIZATION & NETWORKING FUNDAMENTALS

Paper : CS-DE-11 Written by – Dr. Shuchita Upadhyaya

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.

As a complex system of interlinked networks, the Internet supports millions of ‘servers’


computers housing large volumes of all sorts of information. The Internet is where millions of
friends and strangers can chat. It lets people browse through thousands of on –line libraries, play
new games, and trade software. Another feature of the Internet is that it has no geographic
bounds. Users are logging on from India to the US, India to Australia etc.

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

3.1 NETWORK HARDWARE COMPONENTS

A basic network is made up of following primary components.

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;

(b) Connect cable segments.

(c) Connector linking a transceiver and a cable

(d) Terminate a segment.

3
The type of connector used is usually a function of cable type. For example, eight-pin modular
connectors are used with UTP cable.

Coaxial Cable Connectors

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.

Fig.1. N-Series connector

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

Fig.2. Different views of BNC connectors and their connections

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.

Fig.3. BNC-T connectors attached to NIC

<>

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.

Fig.4. 10Base5 (thicknet) Connections

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.

Fig. 5. Different views of RJ-45 connector and its pins

Fiber optic Connectors

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

Transceivers & Media Converters

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 and Hubs

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:

Fig.10. Maximum expansion of a LAN using repeaters

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).

Fig.11. 10BaseT Ethernet in star topology using Hub

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).

Network Interface Cards & PC Cards

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.

• Media Access Control (MAC)


address (Physical Address)
– Each MAC address is 12
character (48-bits, 6-bytes)
hardware or physical
address number attached
directly to a NIC (Network
Card)
– MAC addresses are unique
(their cannot be two of the
same numbers)
– MAC addresses are called MAC address printed on
physical addresses surface of chip – it’s
(permanent numbers) burned inside the chip.

Fig. 12. NIC and its MAC address

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

Fig.13. Bridges connecting two LAN 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.

Fig.14. Interconnecting PCs thru a Switch in a LAN.

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:

 Switches have more ports than bridges.


 Switches are meant to replace hubs and improve network performance by creating a
separate collision domain per port.
 Bridges switch in software whereas switches switch in hardware (integrated circuits).
 Switches offer more variance in speed; an individual port can be assigned 10 Mb/s, 100
Mb/s, 1 Gb/s or even more.

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.

Fig.15 . Connecting LANs to Internet using Router

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:

Fig.16. A network having router, switch and hub connections

Gateways

A gateway is like a super-intelligent router. Gateways are designed to connect radically


different networks. Although slower than a bridge or router, a gateway has its own processor
and memory to perform complex functions such as interpreting between computers that speak
different languages through both protocol and bandwidth conversion. A gateway can convert a
TCP/IP(protocol architecture used on Internet) packet to a NetWare IPX packet and vice versa.

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

Fig.17 . Some pieces of the Internet

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.

Who uses the Internet

 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.

3.3 CONCEPTS OF INTERNET AND INTRANET

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.

Time: Intranets allow organizations to distribute information to employees on an as-needed


basis; Employees may link to relevant information at their convenience, rather than being
distracted indiscriminately by electronic mail.

Communication: Intranets can serve as powerful tools for communication within an


organization. The type of information that can easily be conveyed is the purpose of the initiative
and what the initiative is aiming to achieve, who is driving the initiative, results achieved to date,
and who to speak to for more information. By providing this information on the intranet, staff
has the opportunity to keep up-to-date with the strategic focus of the organization. Web
publishing allows cumbersome corporate knowledge to be maintained and easily accessed
throughout the company using hypermedia and Web technologies. Examples include: employee
manuals, benefits documents, company policies, business standards, newsfeeds, and even
training, can be accessed using common Internet standards.

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.

Cross-platform Capability: Standards-compliant web browsers are available for Windows,


Mac, and UNIX.

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!").

Immediate Updates: When dealing with the public in any capacity,


laws/specifications/parameters can change. With an Intranet and providing your audience with
"live" changes, they are never out of date, which can limit a company's liability.

Supports a distributed computing architecture: The intranet can also be linked to a


company’s management information system, for example a time keeping system.

3.4 INTERNET SERVICES

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.

Magazines, specs, documents, advertisements, technical information etc., of interest to business


people are available on servers on the Internet.

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

E-mail is an important communications service available on the Internet. 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. Unlike other client-server applications, E-mail allows users to send anything from
short notes to extensive files without worrying about the current availability of the receiving
host. Some e-mail uses are as follows:

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

Name Topics covered


Comp Computers, computer science, and the computer industry

Sci The physical sciences and engineering

28
Humanities Literature and the humanities

News Discussion of the USENET itself

Rec Recreational activities, including sports and music

Misc Everything that does not fit in somewhere else

Soc Socializing and social issues

Talk Diatribes, polemics, debates and arguments galore

Alt Alternative tree covering virtually everything

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

Fig. 18 . Internet address


Classes To accommodate the vast numbers of addresses required for global interconnectivity, the
class type fields vary in length. There are currently five different field length patterns in use,
30
each defining a class of address. The different classes are designed to cover the needs of different
types of organizations. For example, class A addresses are numerically the lowest. They use only
one byte to identify class type and netid, and leave three bytes available for hostid numbers. This
division means that class A networks can accommodate far more hosts than can class B or class
C networks, which provide two- and one-byte fields, respectively. Currently both class A and
class B are full. Addresses are available in class C only.

Class D is reserved for multicast addresses. Multicasting allows copies of a datagram to be


passed to a selected group of hosts rather than to an individual host. Class E addresses are
reserved for future use. Figure 19 shows the structure of each class of lP address.

Fig. 19. Internet classes

10000000 00001011 00000011 00011111

Fig. 20. Class ranges of Internet addresses

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 versus Dynamic Addressing

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:

 Ensuring every node has it's own unique address


 Running out of available IP addresses
Dynamic IP Addresses: A dynamic IP address is one that is assigned automatically by a DHCP
server to each node when it connects to the network. This method greatly simplifies the process
of assigning IP addresses and helps to make more efficient use of available IP addresses.

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.

Next Generation Internet Protocol (IPv6)

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.

The only limitations are:

 a domain-style name cannot exceed 255 characters


 each part of the name cannot exceed 63 characters

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.

Domain Name Space

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:

Fig. 22. Structure of Domain Name Space

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'.

Domain name formulation

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

COM EDU GOV US

UNIV X UNIV_ KU UNIV Z

DEPT_CHM DEPT_CS DEPT_PHY

Host_A Host_B Host_C

-----
Host_B . DEPT_ CS. UNIV_ KU. EDU

Fig. 23. Domain Name Formulation

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.

Distribution of Name Space

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

Electronic Mail is a method of sending a message from a user at a computer to a recipient on


another computer. 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.
An e-mail address has the form [email protected], e.g. [email protected]
Electronic mail is different from other message transfer services provided by the Internet in the
sense that it provides a mechanism called spooling, which allows a user to send mail even if a
network is currently disconnected or the receiving machine is not operational.

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.

Architecture & Services

An E-mail system support five basic functions or services:

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:

Forwarding: This is an advanced feature in which an e-mail may be automatically forwarded to


other user in case a recipient is away for some period of time.

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.

Architecture: An E-mail system consists of two sub systems:

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.

How email works

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.

Parts of E-Mail Text

An email message is made up of several parts. They include:

 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:

Header Description What it contains Provided by


field

From This specifies Sender’s email address Automatically by

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.

Date/Time Indicates when the Date and time. Automatically by


message was sent. the email server

Subject This specifies the Email subject The sender


subject of the email.

Size This specifies the Email message size Automatically by


size of the email the email server
message.

The parts to an email look something like this:

Subject: When can we meet?


Date: Mon, 6 Aug 2001 10:04:11 –0500
From: [email protected]
To: [email protected]

When can we get together to work on our


project? I am available any time this week after
5:00 PM. But I do have some other appointments
next week. I would like to meet before we have
our next class so email me and let me know what

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

1. Andrew S. Tanenbaun, “Computer Networks”, Pearson Education.


2. Michael A. Gallo, William M. Hancock, “ Computer Communications and Networking
Technologies”, Cengage Learning.
3. Behrouz A. Forouzan, “Data Communications and Networking”, Tata McGraw Hill.
4. James F. Kurose, Keith W. Ross, “ Computer Networking, A top-Down Approach
Featuring the Internet”, third edition, Pearson Education.
5. William Stallings, “Data and Computer Communications”, PHI.
6. Douglas E. Comer, “Computer Networks and Internets”, Pearson Education.
7. David Groth, Jim McBee, “ CABLING: The Complete Guide to Network Wiring”, BPB.

6. SELF ASSESSMENT QUESTIONS


1. Recognize the following media connectors and/or describe their uses:
- RJ-11 (Registered Jack) and RJ-45 (Registered Jack)
- ST (Straight Tip) and SC (Standard Connector)
- F-Type and BNC
- LC (Local Connector) and MTRJ (Mechanical Transfer Registered Jack)
2. Compare and contrast repeaters and hubs. How many ports do these two have?

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.

12. Compare t he addressing of IPv6 w it h IPv4.


13. Why do w e need a DNS syst em w hen w e can direct ly use an IP address?
14. How is domain Name Space organized?
15. Describe t he services provided by t he Int ernet .
16. What is an e-mail? Describe t he archit ect ure of e-mail syst em.
17. What services or funct ions are support ed by an e-mail syst em?
18. How does an e-mail syst em w ork?
19. How is an e-mail organized? What are t he part s of e-mail t ext ?

47
Post Graduate Diploma in Computer Science and Applications

COMPUTER ORGANIZATION & NETWORKING FUNDAMENTALS


Paper : CS-DE-11 Written by – Dr. Shuchita Upadhyaya

Lesson No. : 12

1. INTRODUCTION

2. OBJECTIVE

3. CONTENTS

3.1 FILE TRANSFER AND FTP

3.2 REMOTE LOGIN USING TELNET

3.3 WORLD WIDE WEB AND HTTP

3.4 WEB BROWSERS

3.5 SEARCH ENGINES

3.6 UNIFORM RESOURCE LOCATOR

3.7 WEB SERVERS

3.8 INTERNET CONNECTIONS

3.8.1 DIALUP

3.8.2 LEASED LINE

3.8.3 DSL SERVICE

3.9 MODEMS

3.10 INTERNET SERVICE PROVIDER

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

copying a file from one host to another.

Another important application of Internet is remote logging based on client/server paradigm. It

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

unique identifiers known as Uniform Resource Locators (URLs).

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

TCP/IP protocol for virtual terminal service/ remote login.

Section 3.3 gives an overview of the World Wide Web. Thereafter, some basic features of

WWW are presented. Thereafter, an insight to HTTP is given.

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

servers and their functionality.

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

3.1 FILE TRANSFER AND FTP

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

of operating system like Linux or SUN-OS

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

hosts -- information such as user identification, password, commands to change remote

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

whether text files use the ASCII or EBCDIC character sets.

Authentication Control: FTP is used with user-based password authentication or with

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.

Telnet is an application that allows remote logins. It is a general-purpose client-server program

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

the standard screen.

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

interpreting user-transmitted commands.

The commands for telnet are:

o telnet hostname: it will open a connection to the host you name. For example,

"telnet math.sunysb.edu" will connect you to the machine named

math.sunysb.edu.

o telnet "address": it opens a connection to the host at "address".

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 user but does not break the remote connection.

3.4 WORLD WIDE WEB AND HTTP

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)

THE DEPARTM ENT OF CORRESPONDENCE

 Information of Courses run by the Department


 Personnel
 Faculty members
 Nonacademic staff
 Our most popular Courses(b)
 M aster of Computer Applications
 M aster of Computer Science(Softw are)
 Post Graduate Diploma in Computer Applications
 Full list of Courses

(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.

The Web Model

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.

Figure 3: The parts of the Web model.

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

Request/Response: HTTP functions as a request-response protocol in the client-server


computing model. In HTTP, a web browser, for example, acts as a client, while an application
running on a computer hosting a web site functions as a server. The client submits an HTTP
request message to the server. The server, which stores content, or provides resources, such as
HTML files and images, returns a response message to the client. A response contains
completion status information about the request and may contain any content requested by the
client in its message body.

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.

3.4 WEB BROWSERS

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.

Parts of a Web Browser

The parts of a browser include:

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.

Table 3: Notable Web browsers

Year Web Browsers

1991 World Wide Web (Nexus)

1992 Viola WWW, Erwise, Midas WWW, MacWWW (Samba)

1993 Mosaic, Cello, Lynx 2.0, Arena, AMosaic 1.0

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

1999 Amaya 2.0, Mozilla M3, Internet Explorer 5.0

2000 Konqueror, Netscape 6, Opera 4, Opera 5, K-Meleon 0.2, Amaya 3.0, Amaya 4.0

2001 Internet Explorer 6, Galeon 1.0, Opera 6, Amaya 5.0

2002 Netscape 7, Mozilla 1.0, Phoenix 0.1, Links 2.0, Amaya 6.0, Amaya 7.0

2003 Opera 7, Safari 1.0, Epiphany 1.0, Amaya 8.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

3.5 SEARCH ENGINES

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

cached, and indexed on its powerful servers in advance of your search.

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.

How web search engines work?

A search engine operates, in the following order

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

word. The purpose of an index is to allow information to be found as quickly as possible.

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

the results to provide the "best" results first.

Search Indexes

There are two main types of search indexes we access when searching the web:

 directories

 crawler-based search engines

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

to see if it is fit for inclusion in the directory.

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

snapshots of those pages to be cached or stored on the search engine’s servers.

Google is a prominent example of a crawler-based search engine.

Note: Some search systems are ‘hybrid’ systems as they combine both forms of index. Yahoo,

for example, features both directories and search engines.

Search engines such as Google (www.google.com), Yahoo! (www.yahoo.com), AlltheWeb

(www.alltheweb.com), AltaVista (www.altavista.com) and Lycos (www.lycos.com) store

information in data repositories called databases that facilitate quick information retrieval.

Sites such as MSN (www.msn.com) and MetaCrawler (www.metacrawler.com) use metasearch

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

clicking the Search button in the toolbar.

Popular Search Engines

Google - The world's most popular search engine.

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).

AltaVista: Launched in 1995, built by researchers at Digital Equipment Corporation's

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.

Galaxy: More of a directory than a search engine.

Search.aol: Now powered by Google.

Live Search: Microsoft's web search engine, designed to compete with Google and Yahoo!.

Included as part of the Internet Explorer web browser.

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

intended to be used by people with low Internet connectivity.

Rediff: India - India's leading internet portal for news, mail, messenger, entertainment, business,

mobile, ecommerce, shopping, auctions, search, sports and more.

21
YouTube: Owned by Google, the web's largest media site. This search will search through the

videos of YouTube only.

3.6 UNIFORM RESOURCE LOCATOR

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.

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

before a selected page could be displayed:

 What is the page called?

 Where is the page located?

 How can the page be accessed?

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.

URLs have three parts:

 The protocol (also called a scheme).

 The DNS name of the machine/host on which the page is located.

 A local name uniquely indicating the specific page (usually just a file name on the

machine where it resides).

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,

news, Gopher, email, and telnet as well.

Using URL’s

 You can double click on a URL (link) and if your system is configured properly the

appropriate application will be launched to obtain the resource.

 You can also copy the URL and paste it into the application which you use to get to the

resource.

Reasons for not being able to access URLs:

– the remote machine refuses the connection

– the site is very busy (e.g. peak hours of use)

– you have misspelled the URL

– the file was moved

– if all else fails you can try looking up the hierarchy by sequentially removing the file

name first, and then the last directory in the path

3.7 WEB SERVERS

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

http://www.pcwebopedia.com/index.html in your browser, this sends a request to the Web server

whose domain name is pcwebopedia.com. The server then fetches the page named index.html

and sends it to your browser.

Any computer can be turned into a Web server by installing server software and connecting the

machine to the Internet.

Web Servers - Features

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

viewed via HTTP)

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.

Create virtual directories, and map them to physical directories

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

file name can be the default document.

How Web Servers Work

Whenever you view a web page on the Internet, you are requesting that page from a web server.

When you type a URL into your browser (for example,

"http://www.quackit.com/html/tutorial/index.cfm"), your browser requests the page from the web

server and the web server sends the page back:

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

when the website was first created on the web server.

 Now that the web browser knows which IP address the website is located at, it can

request the full URL from the web server.

 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.

 Your web browser receives the page and renders it as required.

When referring to web browsers and web servers in this manner, we usually refer to them as a

client (web browser) and a server (web server).

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

headers and/or different ports.

Page Not Found

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.

Web Servers - Examples

Three of the most popular web servers on the web are:

Apache HTTP Server

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.

Apache HTTP Server website: http://httpd.apache.org

Microsoft Internet Information Services (IIS)

IIS is the second most popular web server on the web.

IIS comes as an optional component of most Windows operating systems.

Microsoft IIS website: http://www.microsoft.com/iis

Sun Java System Web Server

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:

There are basically two components:

Web server: application that responds to HTTP requests by returning ‘web’ resources (html file,

images, CGI output) over Internet. e.g. APACHE

Servelet engine: runtime shell that invokes servlets on behalf of clients, runs them and manages

them through their lifecycle. E.g. TOMCAT

3.8 INTERNET CONNECTIONS

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

(LAN), cable modem or a Digital Subscriber Line (DSL).

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-

up connections, each of which have a different bandwidth and cost to users.

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

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

double this rate and generally without disrupting telephone use.

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

broadband technologies such as ADSL are "asymmetric"—supporting much lower maximum

upload data rate than download.

Access Networks

Access networks can be classified as:

 Residential access, connecting home end system into the network.

 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

router. Residential access can be of the following forms:

 Dial-up

 Broadband – DSL, Cable television

 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

leased line access is also utilized by corporate offices.

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

popular wireless LAN technology currently having wide deployment in university

departments, business offices, cafes, and homes.

 Wide-area wireless access networks have base station managed by a

telecommunications provider and serves users within a radius of tens of kilometers.

Telecommunications companies are currently making enormous investments in Third

Generation (3-G) wireless, which provides packet-switched wide-area wireless Internet

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)

via telephone lines.

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

as streaming media will not work at dial-up speeds.

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

the same price as dial-up.

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

cable television into the home.

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

faster than dial-up, however, they are also more expensive.

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

bands are subsequently separated by filtering.

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

Occupy a phone line Phone line is not affected by internet connection

Phone line is used for either voice service or internet Simultaneous transmission of data (DSL) and voice or
connection fax services

Connection speed: < 56 Kbps 256 Kbps to 20 Mbps

Have to dial an access number to connect to the Always on


internet

Connected using a computer modem Connected through a DSL modem

Unique IP address for each connection Static IP address (higher security risk)

Low monthly fee Higher monthly fee

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

agrees to deliver a symmetric telecommunications line connecting two or more locations in

exchange for a monthly rent (hence the term lease).

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

can assure a given level of quality.

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.

Fig. 5. Leased line Access

3.9 MODEM

A modem (modulator-demodulator) is a device that modulates an analog carrier signal to


encode digital information and demodulates the signal to decode the transmitted information.

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.

Methods of modulating digital data

There are 4 techniques a modem may employ:

 Frequency Shift Keying (FSK)


 Amplitude Shift Keying (ASK)
 Phase Shift Keying (PSK)
 Quadrature Amplitude Modulation (QAM)

Frequency Shift Keying (FSK)

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

Amplitude Shift Keying (ASK)

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.

Fig. 7. Amplitude Modulation

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.

Fig. 8. Phase Modulation

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.

Fig. 10. Quadrature Amplitude Modulation

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:

Bit value Amplitude Phase shift

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.

3.10 INTERNET SERVICE PROVIDER

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.

Fig. 11.: High-level Internet structure.

NSP’s connect with each other in two ways:

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.

Internet Backbone & ISP’s:

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.

5. SUGGESTED READINGS AND REFERENCES

1. Michael A. Gallo, William M. Hancock, “Computer Communications and Networking

Technologies”, Cengage Learning.

2. James F. Kurose, Keith W. Ross, “Computer Networking, A top-Down Approach

Featuring the Internet”, third edition, Pearson Education.

3. Douglas E. Comer, “Internetworking with TCP/IP Volume – I; Principles, Protocols, and

Architectures”, Fourth Edition, Pearson Education.

4. Various Web sites

44
6. SELF ASSESSMENT QUESTIONS

1. What is FTP? What are its features?

2. What is anonymous FTP? What are FTP control and data connections?

3. What is the purpose of TELNET? Name any one command of TELNET.

4. What is a web server? Name some popular web servers.

5. What is the purpose of a URL? What is its syntax?

6. What is the importance of WWW in Internet? How is HTTP related to WWW?

7. What is a Web document? What are its three types?

8. Describe the web model and HTTP .

9. What is a Web browser? Describe its features and components.

10. Name some popular Web browsers .

11. What is the purpose of a search engine in the Internet? How search engines work?

12. Name some popular search engines.

13. What are the various options for having Internet connection?

14. When is the leased line connection used?

15. What is a dial-up Internet connection? What are its disadvantages?

16. What is DSL?

17. How is dial-up access different from DSL?

18. What is the function of a modem?

19. Which Internet connection will you prefer in your home and why?

45

You might also like