Com 111
Com 111
Information Technology
Preface xxv
1. Computer Basics
1.1 Introduction
1.4.1 Microcomputers
1.4.2 Minicomputers
1.4.3 Mainframes
1.4.4 Supercomputers
Let Us Summarize
Exercises
Answers
2.1 Introduction
2.2.2 Registers
2.2.3 Control Unit
2.7.2 Motherboard
2.7.8 Processors
Let Us Summarize
Exercises
Answers
3. Computer Memory and Storage
3.1 Introduction
Let Us Summarize
Exercises
Answers
4.1 Introduction
4.2.1 Keyboard
4.2.5 Webcam
4.2.6 Scanners
4.3.2 Plotters
4.3.4 Monitor
4.3.6 Projector
Let Us Summarize
Exercises
Answers
5. Operating System
5.1 Introduction
Let Us Summarize
Exercises
Answers
6. Multimedia Essentials
6.1 Introduction
6.3.1 Text
6.3.2 Graphics
6.3.3 Audio
6.3.4 Video
6.3.5 Animation
Let Us Summarize
Exercises
Answers
7.1 Introduction
7.2 Algorithm
7.3 Flowchart
7.3.1 Flowchart Symbols
7.5 Pseudocode
Let Us Summarize
Exercises
Answers
8. Computer Software
8.1 Introduction
Let Us Summarize
Exercises
Answers
9.1 Introduction
9.7.1 Pictures
Let Us Summarize
Exercises
Answers
10.1 Introduction
10.5.1 Functions
10.7 Sorting
Let Us Summarize
Exercises
Answers
11.1 Introduction
Let Us Summarize
Exercises
Answers
12.1 Introduction
12.4 Modulation
12.5 Multiplexing
12.5.1 Multiplexers
12.6 Switching
Let Us Summarize
Exercises
Answers
13.1 Introduction
13.5.3 Telnet
Let Us Summarize
Exercises
Answers
14.1 Introduction
14.4.6 Netiquette
Let Us Summarize
Exercises
Answers
15.1 Introduction
15.3.1 Virus
15.4 Cryptography
15.6 Firewall
15.6.1 How Firewall Works?
15.9.1 Awareness
Let Us Summarize
Exercises
Answers
16.1 Introduction
16.3.1 Entity
16.3.2 Attribute
16.3.3 Relationship
16.8 Normalization
Let Us Summarize
Exercises
Answers
17.1 Introduction
Let Us Summarize
Exercises
Answers
18.1 Introduction
18.7 Blogging
18.10.2 Napkin PC
18.10.4 B-membrane PC
Let Us Summarize
Exercises
Answers
Index
CHAPTER 1
Computer Basics
Computer Applications
Entertainment Communication
CHAPTER OBJECTIVES
1.1 INTRODUCTION
In the beginning of the civilization, people used fingers and pebbles for computing purposes.
In fact, the word digitus in Latin actually means finger and calculus means pebble. This gives
a clue into the origin of early computing concepts. With the development of civilization, the
computing needs also grew. The need for a mechanism to perform lengthy calculations led to
the invention of, first, calculator and then computers.
The term computer is derived from the word compute, which means to calculate. A
computer is an electronic machine devised for performing calculations and controlling
operations that can be expressed either in logical or in numerical terms. In simple words, a
computer is an electronic device that performs diverse operations with the help of instructions
to process the data in order to achieve desired results. Although the application domain of
a computer depends totally on human creativity and imagination, it covers a huge area of
applications including education, industries, government, medicine, scientific research, law,
and even music and arts.
Computers are one of the most influential forces available in modern times. Harnessing
the power of computers enables relatively limited and fallible human capacities for memory,
logical decision making, reaction and perfection to be extended to almost infinite levels.
Millions of complex calculations can be done in a mere fraction of time; difficult decisions
can be made with unerring accuracy for comparatively little cost. Computers are widely seen
as instruments for future progress and as tools to achieve sustainability by way of improved
access to information with the help of video-conferencing and e-mail. Indeed, computers have
left such an impression on modern civilization that we call this era as the “information age”.
the world’s infrastructure runs on computers and it has profoundly changed our lives,
mostly for the better. Let us discuss some of the characteristics of computers, which make
them an essential part of every emerging technology and such a desirable tool in human
development.
Speed: The computers process data at an extremely fast rate, at millions or billions
of instructions per second. A computer can perform a huge task in a few seconds that
otherwise a normal human being may take days or even years to complete. The speed
of a computer is calculated in MHz (megahertz), that is, one million instructions per
second. At present, a powerful computer can perform billions of operations in just
one second.
Accuracy: Besides the efficiency, the computers are also very accurate. The level of
accuracy depends on the instructions and the type of machines being used. Since the
computer is capable of doing only what it is instructed to do, faulty instructions for
data processing may lead to faulty results. This is known as Garbage In Garbage Out
(GIGO).
Diligence: Computer, being a machine, does not suffer from the human traits of
tiredness and lack of concentration. If four million calculations have to be performed,
then the computer will perform the last four-millionth calculation with the same
accuracy and speed as the first calculation.
Reliability: Generally, reliability is the measurement of the performance of a
computer, which is measured against some predetermined standard for operation
without any failure. The major reason behind the reliability of the computers is that,
at hardware level, it does not require any human intervention between its processing
operations. Moreover, computers have built-in diagnostic capabilities, which help in
the continuous monitoring of the system.
Storage Capability: Computers can store large amounts of data and can recall the
required information almost instantaneously. The main memory of the computer is
relatively small and it can hold only a certain amount of data; therefore, the data are
stored on secondary storage devices such as magnetic tape or disks. Small sections
of data can be accessed very quickly from these storage devices and brought into the
main memory, as and when required, for processing.
Versatility: Computers are quite versatile in nature. It can perform multiple tasks
simultaneously with equal ease. For example, at one moment it can be used to draft
a letter, another moment it can be used to play music and in between, one can print
a document as well. All this work is possible by changing the program (computer
instructions).
Resource Sharing: In the initial stages of development, computers used to be isolated
machines. With the tremendous growth in computer technologies, computers today
have the capability to connect with each other. This has made the sharing of costly
resources like printers possible. Apart from device sharing, data and information can
also be shared among groups of computers, thus creating a large information and
knowledge base.
Although processing has become less tedious with the development of computers, it is
still a time-consuming and expensive job. Sometimes, a program works properly for some
FACT FILE
lacked mechanical precision in its construc- IBM (International Business Machines).
tion and was not very reliable. IBM developed numerous mainframes and
The real beginning of computers as operating systems, many of which are still in
we know them today, however, lay with use today. For example, IBM co-developed
an English mathematics professor, Charles OS/2 with Microsoft, which laid the foundation
Babbage. In 1822, he proposed a machine for Windows operating systems.
to perform differential equations, called a
Difference Engine. Powered by steam and as large as a locomotive, the machine would
have a stored program and could perform calculations and print the results automatically.
However, Babbage never quite made a fully functional difference engine and in 1833 he
quitted working on this machine to concentrate on the Analytical Engine. The basic design
of this engine included input devices in the form of perforated cards containing operating
instructions and a “store” for memory of 1,000 numbers of up to 50 decimal digits long. It
also contained a control unit to allow processing instructions in any sequence and output
devices to produce printed results. Babbage borrowed the idea of punch cards to encode the
machine’s instructions from Joseph-Marie Jacquard’s loom. Although the analytical engine
was never constructed, it outlined the basic elements of a modern computer.
In 1889, Herman Hollerith, who worked for the US Census Bureau, also applied Jacquard’s
loom concept to computing. Unlike Babbage’s idea of using perforated cards to instruct the
machine, Hollerith’s method used cards to store the data, which he fed into a machine that
compiled the results mechanically (Figure 1.3).
The start of World War II produced a substantial need for computer capacity, especially
for military purposes. One early success was the Mark I, which was built as a partnership
between Harvard Aiken and IBM in 1944. This electronic calculating machine used relays and
electromagnetic components to replace mechanical components. In 1946, John Eckert and John
Mauchly of the Moore School of Engineering
at the University of Pennsylvania developed the
Electronic Numerical Integrator and Calculator
(ENIAC). This computer used electronic vacuum
tubes to make the internal parts of the computer. It
embodied almost all the components and concepts
of today’s high-speed, electronic computers.
Later on, Eckert and Mauchly also proposed the
development of the Electronic Discrete Variable
Automatic Computer (EDVAC). It was the first
electronic computer to use the stored program
concept introduced by John Von Neumann. It
also had the capability of conditional transfer
of control, that is, the computer could stop any
time and then resume operations. In 1949, at the Figure 1.3 Hollerith’s Tabulator
Cambridge University, a team headed by Maurice Wilkes developed the Electronic Delay Storage
Automatic Calculator (EDSAC), which was also based on John Von Neumann’s stored program
concept. This machine used mercury delay lines for memory and vacuum tubes for logic. The
Eckert–Mauchly Corporation manufactured the Universal Automatic Computer (UNIVAC) in
1951 and its implementation marked the real beginning of the computer era.
In the 1960s, efforts to design and develop the fastest possible computer with the greatest
capacity reached a turning point with the Livermore Advanced Research Computer (LARC),
which had access time of less than 1 μs (pronounced as microsecond) and the total capacity
of 100,000,000 words. During this period, the major computer manufacturers began to offer
a range of capabilities and prices, as well as accessories such as card feeders, page printers
and cathode ray tube displays. During the 1970s, the trend shifted towards a larger range of
applications for cheaper computer systems. During this period, many business organizations
adopted computers for their offices. The vacuum deposition of transistors became the norm
and entire computer assemblies became available on tiny “chips”.
In the 1980s, Very Large Scale Integration (VLSI) design, in which hundreds of thousands
of transistors were placed on a single chip, became increasingly common. The “shrinking”
trend continued with the introduction of personal computers (PCs), which are programmable
machines small enough and inexpensive enough to be purchased and used by individuals.
Microprocessors equipped with the read-only memory (ROM), which stores constantly used
and unchanging programs, performed an increased number of functions. By the late 1980s, some
PCs were run by microprocessors that were capable of handling 32 bits of data at a time and
processing about 4,000,000 instructions per second. By the 1990s, PCs became part of everyday
life. This transformation was the result of the invention of the microprocessor, a processor
on a single integrated circuit (IC) chip. The trend continued leading to the development of
smaller and smaller microprocessors with a proportionate increase in processing powers. The
computer technology continues to experience huge growth. Computer networking, electronic
mail and electronic publishing are just a few applications that have grown in recent years.
Advances in technologies continue to produce cheaper and more powerful computers, offering
the promise that in the near future, computers or terminals will reside in most, if not all, homes,
offices and schools.
One of the major developments of this generation includes the progress from machine
language to assembly language. Assembly language uses mnemonics (abbreviations) for
instructions rather than numbers, for example, ADD for addition and MULT for multiplication.
As a result, programming became less cumbersome. Early high-level programming languages
such as COBOL and FORTRAN also came into existence in this period.
Examples: PDP-8, IBM 1401 and IBM 7090.
Characteristics of Second-generation Computers
These machines were based on transistor technology.
These were smaller as compared to the first-generation computers.
The computational time of these computers was reduced to microseconds from
milliseconds.
These were more reliable and less prone to hardware failure. Hence, they required
less frequent maintenance.
These were more portable and generated less amount of heat.
Assembly language was used to program computers. Hence, programming became
more time-efficient and less cumbersome.
Second-generation computers still required air conditioning.
Manual assembly of individual components into a functioning unit was still required.
These were easily portable and more reliable than the second-generation computers.
These devices consumed less power and generated less heat. In some cases, air
conditioning was still required.
The size of these computers was smaller as compared to previous-generation
computers.
Since hardware rarely failed, the maintenance cost was quite low.
Extensive use of high-level languages became possible.
Manual assembling of individual components was not required, so it reduced the
large requirement of labour and cost. However, highly sophisticated technologies
were required for the manufacturing of IC chips.
Commercial production became easier and cheaper.
Classification of
Computers
1.4.1 Microcomputers
A microcomputer is a small, low-cost digital computer, which usually consists of a
microprocessor, a storage unit, an input channel and an output channel, all of which may
be on one chip inserted into one or several PC boards. The addition of power supply and
connecting cables, appropriate peripherals (keyboard, monitor, printer, disk drives and others),
an operating system and other software programs can provide a complete microcomputer
system. The micro-computer is generally the smallest of the computer family. Originally,
these were designed for individual users only, but nowadays they have become powerful
tools for many businesses that, when networked together, can serve more than one user. IBM-
PC Pentium 100, IBM-PC Pentium 200 and Apple Macintosh are some of the examples of
microcomputers. Microcomputers include desktop, laptop and hand-held models such as
Personal Digital Assistants (PDAs).
1.4.2 Minicomputers
In the early 1960s, Digital Equipment Corporation (DEC) started shipping its PDP series
computer, which the press described and referred to as minicomputers. A minicomputer is a
small digital computer, which normally is able to process and store less data than a mainframe
but more than a microcomputer, while doing so less rapidly than a mainframe but more rapidly
than a microcomputer. It is about the size of a two-drawer filing cabinet. Generally, these
computers are used as desktop devices that are often connected to a mainframe in order to
perform the auxiliary operations (Figure 1.12).
A minicomputer (sometimes called a mid-range computer) is designed to meet the
computing needs of several people simultaneously in a small- to medium-sized business
environment. It is capable of supporting from four to about 200 simultaneous users. It
to this feature, supercomputers help in many applications including information retrieval and
computer-aided designing (Figure 1.14).
A supercomputer can process a great deal of data and make extensive calculations very
quickly. It can resolve complex mathematical equations in a few hours, which would have taken
many years when performed using a paper
India’s Super Achievement and pencil or using a hand calculator. It is the
fastest, costliest and most powerful computer
In 2003, India developed the PARAM Padma available today. Typically, supercomputers
FACT FILE
Memory
Unit
Registers
Input Output
Unit Unit
Control Arithmetic /
Unit Logic Unit
or logical operation is to be performed, the required data are transferred from the
memory unit to the ALU, the operation is performed and the result is returned to
the memory unit. Before the completion of the processing, data may need to be
transferred back and forth several times between these two sections.
Control Unit: This unit checks the correctness of the sequence of operations. It
fetches the program instructions from the memory unit, interprets them and ensures
correct execution of the program. It also controls the I/O devices and directs the
overall functioning of the other units of the computer.
Registers: These are the special-purpose, high-speed temporary memory units
that can hold varied information such as data, instructions, addresses and
intermediate results of calculations. Essentially, they hold the information that
the CPU is currently working on. The registers can be considered as the CPU’s
working memory, an additional storage location that provides the advantage of
speed.
Note: The circuits necessary to create a CPU for a PC are fabricated on a microprocessor.
Input, Output and Storage Unit: The user must enter instructions and data into the
computer system before any operation can be performed on the given data. Similarly, after
processing the data, the information must go out from the computer system to the user. For
this, every computer system incorporates the I/O unit that serves as a communication medium
between the computer system and the user.
An input unit accepts instructions and data from the user with the help of input devices
such as keyboard, mouse, light pen, etc. Since the data and instructions entered through
different input devices will be in different form, the input unit converts them into the form that
the computer can understand. After this, the input unit supplies the converted instructions and
data to the computer for further processing.
The output unit performs just opposite to that of input unit. It accepts the output
(which is in machine-coded form) produced by the computer, converts them into the user-
understandable form and supplies the converted results to the user with the help of an output
device such as printer, monitor and plotter.
Besides, a computer system incorporates a storage unit to store the input entered through
the input unit before processing starts and to store the results produced by the computer before
supplying them to the output unit. The storage unit of a computer comprises two types of
memory/storage: primary and secondary. The primary memory, also called the main memory,
is the part of a computer that holds the instructions and data currently being processed by the
CPU, the intermediate results produced during the course of calculations and the recently
processed data. While the instructions and data remain in the main memory, the CPU can
access them directly and quickly. However, the primary memory is quite expensive and has a
limited storage capacity.
Due to the limited size of the primary memory, a computer employs the secondary memory,
which is extensively used for storing data and instructions. It supplies the stored information
to the other units of the computer as and when required. It is less expensive and has higher
storage capacity than the primary memory. Some commonly used secondary storage devices
are floppy disks, hard disks and tape drives (Figure 1.16).
Speaker
Monitor
RAM
Mouse
DVD
Processor Hard Disk Keyboard
Joystick
Storage
Processing Output
Input
Computer Applications
Entertainment Communication
Let Us sUmmarize
1. Computer is an electronic device that performs diverse operations with the help of
instructions to process the data in order to achieve desired results. Speed, accuracy,
reliability, versatility, diligence, storage capability and resource sharing characterize the
computers.
2. Many devices, which humans developed for their computing requirements, preceded
computers. Some of those devices were Sand Tables, Abacus, Napier Bones, Slide Rule,
Pascaline, Stepped Reckoner, Difference Engine, Analytical Engine and Hollerith’s
Tabulator.
3. Computer development is divided into five main generations. With every generation,
computer technology has fundamentally changed, resulting in an increasingly smaller,
cheaper, more powerful, more efficient and reliable devices.
4. First-generation computers were vacuum tube based machines. These computers were
very large, required a lot of space for installation, generated a large amount of heat
were non-portable and have very slow equipments. In addition, these machines were
unreliable and prone to frequent hardware failures.
5. Second-generation computers used transistors in place of vacuum tubes. Since
a transistor is a small device, the physical size of computers was greatly reduced.
Computers became smaller, faster, cheaper, energy-efficient and more reliable than
their predecessors.
6. Third-generation computers were IC-based machines. The IC replaced several individually
wired transistors, making computers smaller in size, reliable and efficient.
exercises
Multiple-choice Questions
1. The development of computers can be divided into ......................... generations.
(a) 3 (b) 4
(c) 5 (d) 6
2. Choose the odd one out.
(a) Microcomputer (b) Minicomputer
(c) Supercomputer (d) Digital computer
3. ......................... is a very small computer that can be held in the palm of the hand.
(a) PDA (b) PC
(c) Laptop (d) Minicomputer
4. Analytical engine was developed by .........................
(a) Gottfried Wilhem Von Leibriz (b) Charles Babbage
(c) Herman Hollerith (d) Joseph-Marie Jacquard
5. The main distinguishing feature of fifth-generation computers will be .........................
(a) Liberal use of microprocessors (b) Artificial Intelligence
(c) Extremely low cost (d) Versatility
6. The computer that is not considered as a portable computer is .........................
(a) Laptop (b) PDA
(c) Minicomputer (d) None of these
Descriptive Questions
1. Discuss the characteristics of computers.
2. What are the advantages of transistors over vacuum tubes?
3. Discuss various types of computers in detail.
4. List out various applications of computers.
5. Discuss various computer generations along with the key characteristics of the computers
of each generation.
6. Discuss the basic organization of a computer system and explain the functions of various
units of a computer system.
ANSWERS
Multiple-choice Questions
1. (c) 2. (d) 3. (a) 4. (b) 5. (b) 6. (c) 7. (b) 8. (a)
9. (a) 10. (d)
Computer Organization
and Architecture
DMA
CPU CPU
Controller
CHAPTER OBJECTIVES
2.1 INTRODUCTION
Just as a tall building has different levels of detail, including the number of storeys, the size
of rooms, door and window placement, etc., each computer has a visible structure, which is
referred to as its architecture. One can look at a computer’s architecture at similar levels of
hardware elements, which in turn depends on the type of the computer (personal computer,
supercomputer, etc.) required. Therefore, when we talk about architecture in terms of a
computer, it is defined as the science of selecting and interconnecting hardware components to
create computers that meet functional, performance and cost goals.
Extending the concept of the architecture and making these hardware components work in
a harmonized manner to achieve a common objective in an environment is known as computer
organization. Computer organization is like a group of people who work together to achieve a
common goal, for example, a football team where different members of the team play specific
roles in the game. The role of the goalkeeper is to safeguard the goal. Similarly, other members
of the team (striker, mid-fielder and defender) have their respective roles to perform. However,
the ultimate objective of the team as a whole is to defeat the opponent by scoring more goals
than the opponent. Hence, the study of computer organization focuses more on the collective
contribution from the hardware peripherals than individual electronic components.
Secondary Storage
Makes
Sends Data to
Central Processing Unit Processed
the Central
Information
Processing Unit Control Arithmetic/ Available
Unit Logic Unit
Input Output
Registers
Processing
only on binary data, that is, data composed of 1s and 0s. In addition, it also controls the
usage of the main memory to store data and instructions, and controls the sequence of
operations (Figure 2.1).
The CPU consists of three main subsystems, the Arithmetic/Logic Unit (ALU), the Control
Unit (CU) and the registers. The three subsystems work together to provide operational
capabilities to a computer.
Less-than Condition: To test this condition, the ALU compares values to determine
if one is less than the other; for example, if a person purchases less than two tickets,
then no discount rate is given.
Greater-than Condition: In this type of comparison, the computer determines if one
value is greater than the other; for example, if a person purchases greater than two
tickets, then the discount rate is 5 per cent.
2.2.2 Registers
The registers are special-purpose, high-speed temporary memory units. These are
temporary storage areas for holding various types of information, such as data, instructions,
addresses and intermediate results of calculations. Essentially, they hold the information
that the CPU is currently working on. The registers can be thought of as the CPU’s
working memory, a special additional storage location that offers the advantage of speed.
The registers work under the direction of the CU to accept, hold, and transfer instructions
or data, and perform arithmetic or logical comparisons at high speed. The CU uses a
data-storage register in the similar way a store owner uses a cash register as a temporary,
convenient place to store the transactions. As soon as a particular instruction or piece of
data is processed, the next instruction immediately replaces it, and the information that
results from the processing is returned to the main memory. Figure 2.2 reveals the types
of registers present inside the CPU.
Arithmetic
Logic Unit
Accumulator
Controller
Sequencer
Program
Counter
Instruction
Decoder
Address
Register Data
Register
CPU
RAM
Address Data
Bus Bus
I/O
Accumulator (ACC) The ACC is a general-purpose register used for storing temporary
results and results produced by the ALU
Data Register (DR) The DR is used for storing the operands and other data
Instruction addresses are normally stored in consecutive registers and are executed
sequentially. The CU reads an instruction from the memory by a specific address in the
register and executes it. The next
instruction is then fetched from the Logical Condition
THINGS TO REMEMBER
sequence and executed, and so on.
A computer can test for more than one condition.
This type of instruction sequencing is
These are listed below:
possible only if there is a counter to
calculate the address of the instruction Equal to =
that has been executed. This counter Less than <
is one of the registers, which stores Greater than >
intermediate data used during the
Less than or equal to <=
execution of the instructions after they
are read from the memory. Table 2.1 Greater than or equal to >=
lists some of the important registers Not equal to !=
used in the CPU.
The size or length of each register is determined by its function; for example, the MAR,
which holds the address of the next location in the memory to be accessed, must have the
same number of bits as the memory address. The IR holds the next instruction to be executed
and, therefore, should be of the same number of bits as the instruction.
The CU controls the I/O devices and transfer of data to and from the primary storage. The
CU itself is controlled by individual instructions in programs located in the primary storage.
Instructions are retrieved from the primary storage, one at a time. For this, the CU uses the IR
for holding the current instruction and an instruction pointer to hold the address of the next
instruction. Each instruction is interpreted (decoded) so that it can be executed. Based on the
instructions, the CU controls how other parts of the CPU and, in turn, the rest of the computer
system should work so that the instructions are executed in a correct manner. An analogy can
be considered between the CU and the traffic police; the control unit decides which action will
occur just as the traffic police takes decisions on which lanes the traffic will move or stop.
Figure 2.3 illustrates how the CU instructs other parts of the CPU (ALU and registers)
and the I/O devices on what to do and when to do. It also determines what data are needed,
where they are stored and where to store the results of the operation, as well as sends the
control signals to the devices involved in the execution of the instructions. It administers
the movement of a large amount of instructions and data used by the computer. In order
to maintain the proper sequence of events required for any processing task, the CU uses
clock inputs.
THE PROCESSOR
CONTROL UNIT
Interprets stored instructions
in sequence
Issues commands to all elements
of the computer
ARITHMETIC
LOGIC UNIT
Performs arithmetic
and logic operations
REGISTERS
PC, IR, MAR,
MBR, ACC
INPUT OUTPUT
Data and The resutls
Instructions of processing
MAIN MEMORY
(MAIN STORAGE)
Data / Instruction Flow
Holds data, instuctions and
Command / Signal Flow results of processing
Shared
Bus
over a bus, eight lines are required. In addition, some other lines are needed to control this
transfer. A bus can be unidirectional (transmission of data can be in only one direction)
or bi-directional (transmission of data can be in both directions). In a shared bus, only
one source can transmit data at one time, while one or more than one can receive that
signal. A bus that connects to all three components (CPU, memory, I/O devices) is called a
system bus (see Figure 2.4). A system bus consists of 50–100 separate lines. These lines are
broadly categorized into three functional groups.
Data Lines: Data lines provide a path for moving data between the system modules. Data
lines are collectively known as a data bus. Normally, a data bus consists of 8, 16 or 32 separate
lines. The number of lines present in a data bus is called the width of the data bus. Data bus
width limits the maximum number of bits, which can be transferred simultaneously between
two modules. The width of a data bus helps in determining the overall performance of a
computer system.
Address Lines: Address lines are used to designate the source of data for a data bus. As
the memory may be divided into a linear array of bytes or words, for reading or writing any
information on to the memory, the CPU needs to specify the address of a particular location.
This address is supplied by the address bus (address lines are collectively called an address
bus). Thus, the width of the address bus specifies the maximum possible memory supported by
a system; for example, if a system has a 16-bit-wide address bus, it can support memory size
of equal to 216 (or 65,536) bytes.
Control Lines: Control lines are used to control the access to data and the address bus;
this is required as a bus is a shared medium. The control lines are collectively called a
control bus (see Figure 2.5). These lines are used for transmission of commands and timing
signals (which validate data and addresses) between the system modules. Timing signals
indicate whether data and address information is valid, whereas command signals specify
which operations are to be performed. Some of the control lines of a bus are required to
System
Bus
provide clock signals to synchronize operations and reset signals to initialize the modules.
Control lines are also required for reading/writing to I/O devices or the memory. Control
lines if used as a bus request indicate that a module needs to gain control of the bus. The
bus grant control line is used to indicate whether the requesting module has been granted
control of the bus.
Note: Physically, a bus is a number of parallel electrical conductors. These circuits are normally
imprinted on printed circuit boards. The bus normally extends across most of the system components,
which can be tapped into the bus lines.
Let us consider an example of a library system for a better understanding of the cache
concept. When a person comes into the library and asks for a book, the librarian searches for
the requested book in the bookshelves, retrieves the book and delivers it to the person. After the
person reads the book, it is returned to the library. At the same time, if any other person comes
in requesting the same book, which is still placed on the librarian’s desk, the librarian does not
have to go through the process of searching the book in the bookshelves. This results in saving
of precious time in retrieving the requested book and thus improving the efficiency of the work.
The above analogy can be related to the computer’s cache system. The computer uses
logic to determine which data are the most-frequently accessed and keeps them in the cache.
A cache is a piece of very fast memory made from a high-speed static RAM that reduces the
access time of the data. It is very expensive and generally incorporated in the processor, where
valuable data and program segments are kept. The cache memory can be categorized into three
levels: L1 cache, L2 cache and L3 cache (see Figure 2.6).
L1 Cache: This cache is closest to the processor and hence is termed as the primary or
L1 cache. Each time the processor requests information from the memory, the cache controller
on the chip uses special circuitry to first check if the requested data are already in the cache. If
they are present, then the system is spared from time-consuming access to the main memory.
In a typical CPU, the primary cache ranges in size from 8 to 64 KB, with larger amounts on
the newer processors. This type of cache memory is very fast because it runs at the speed of
the processor since it is integrated into it. There are two different ways that the processor can
organize its primary cache: first, some processors have a single cache to handle both command
instructions and program data (called a unified cache), while others have a separate data and
instruction cache called split cache. However, the overall performance difference between
integrated and separate primary cache is not significant.
RAM
L1 Cache
CPU
L2 Cache
L3 Cache
L2 Cache: The L2 cache is larger but slower in speed than L1 cache. It is used to see recent
accesses that is not picked by the L1 cache and is usually 64 to 2 MB in size. The L2 cache is
also found on the CPU. If the L1 and L2 cache are used together, then the missing information
that is not present in the L1 cache can be retrieved quickly from the L2 cache.
L3 Cache: The L3 cache memory is an enhanced form of memory present on the motherboard
of the computer. It is an extra cache built into the motherboard between the processor and main
memory to speed up the processing operations. It reduces the time gap between the request
and retrieval of the data and instructions, thereby accessing data much more quickly than the
main memory. The L3 cache is being used with processors nowadays having more than 3 MB
of storage in it.
2.3 COMMUNICATION AMONG VARIOUS UNITS
All units in a computer system work in conjunction with each other to formulate a functional
computer system. To have proper coordination among these units (processor, memory and
I/O devices), a reliable and robust means of communication is required. Let us discuss one
of the most important functions in the computer system, that is, the communication between
these units.
2.3.1 Processor to Memory Communication
The whole process of communication between the processor and memory can be divided into
two steps, namely, information transfer from the memory to processor and writing information
in the memory. The following sequence of events takes place when information is transferred
from the memory to the processor (see Figure 2.7 also):
1. The processor places the address in the MAR
through the address bus.
Main 2. The processor issues a READ command
Memory through the control bus.
3. The memory places required data on the data
Data bus, which are then transferred to the processor.
Address Based on the read time of the memory, a specific
number of processor clock intervals are allotted for
Instruction
and Data
DMA
CPU CPU
Controller
controller increases the speed of I/O operations by taking over buses and thus eliminating
the CPU’s intervention.
Execute
Fetch/Execute Cycle
Memory
Fetch CPU
PC MAR
CU MEMORY
IR MBR
Data
Line
Execution Cycle: Once an instruction has been loaded into the IR and the CU has examined
and decoded the fetched instruction and determined the required course of action to take, the
execution cycle can commence. Unlike the fetch cycle and the interrupt cycle, both of which
have a set of instruction sequences, the execution cycle can contain some complex operations.
The actions within the execution cycle can be categorized into the following four groups:
1. CPU to Memory: Data may be transferred from the memory to the CPU or from the
CPU to the memory.
2. CPU to I/O: Data may be transferred from the I/O module to the CPU and vice versa.
3. Data Processing: The CPU may perform some arithmetic or logic operation on the
data via the ALU.
4. Control: An instruction may specify that the sequence of operation may be altered;
for example, the PC may be updated with a new memory address to reflect that the
next instruction fetched should be read from this new location.
For simplicity, the example [LOAD ACC, memory] (illustrated in Figure 2.12) deals
with one operation that can occur. The example [LOAD ACC, memory] can be classified as a
memory-reference instruction. Instructions that can be executed without leaving the CPU are
referred to as non-memory reference instructions.
This operation loads the accumulator with data that is stored in the memory location
specified in the instruction. The operation starts by transferring the address portion of the
instruction from the IR to the MAR. The CPU then transfers the instruction located at the
address stored in the MAR to the MBR via the data lines connecting the CPU to the memory.
This transfer from the memory to the CPU is coordinated by the CU. To finish the cycle, the
newly fetched data is transferred to the ACC.
The illustrated LOAD operation (see Figure 2.12) can be summarized in the following points:
1. IR [adderess portion] =>MAR
2. MAR =>MEMORY =>MBR
3. MBR =>ACC
After the execution cycle completes, the next instruction is fetched and the process starts again.
Address
Line
CPU
IR MAR
CU MEMORY
ACC MBR
Data
Line
Advantages of the CISC Architecture: The advantages of the CISC architecture are
as follows:
At the time of their initial development, CISC machines used available technologies
to optimize computer performance.
CISC architecture uses general-purpose hardware to carry out commands. Therefore,
a new command can be added into the chip without changing the structure of the
instruction set.
Microprogramming is as easy as an assembly language to implement and much less
expensive than hardwiring the CU.
As each instruction became more capable, fewer instructions could be used
to implement a given task. This makes efficient use of the relatively slow main
memory.
As microprogram instruction sets can be written to match the constructs of high-level
languages, the compiler does not have to be very complex.
Disadvantages of the CISC Architecture: The disadvantages of CISC architecture
are as follows:
Processors of early generation of computers were contained as a subset in succeeding
versions, so the instruction set and chip hardware became complex with each
generation of computers.
Different instructions take different amount of clock time to execute and thus slow
down the overall performance of the machine.
CISC architecture requires continuous reprogramming of the on-chip hardware.
CISC design includes the complexity of the hardware needed to perform many
functions and the complexity of the on-chip software needed to make the hardware
do the right thing.
Advantages of the RISC Architecture: The advantages of the RISC architecture are
as follows:
A simplified instruction set allows for a pipelined, superscalar design RISC processor
to often achieve two to four times the performance of a CISC processor using
comparable semiconductor technology and the same clock rates.
As the instruction set of a RISC processor is simple, it uses less chip space. Extra
functions such as memory management units or floating point arithmetic units can
also be placed on the same chip. Smaller chips allow a semiconductor manufacturer
to place more parts on a single silicon wafer, which can lower the per-chip cost
significantly.
Since the RISC architecture is simpler than the CISC architecture, it can be designed
more quickly and can take advantage of other technological developments faster than
the corresponding CISC designs, leading to greater leaps in performance between
generations.
Disadvantages of the RISC Architecture: The disadvantages of RISC architecture
are as follows:
The performance of a RISC processor depends largely on the code that it is executing.
If the compiler does a poor job of instruction scheduling, the processor can spend
time waiting for the result of one instruction before it can proceed with subsequent
instructions.
Instruction scheduling makes the debugging process difficult. If scheduling (and
other optimisations) is turned off, the machine-language instructions show a clear
connection with their corresponding lines of source. However, once instruction
scheduling is turned on, the machine language instructions for one line of source may
appear in the middle of the instructions for another line of source code.
RISC machines require very fast memory systems to feed instructions. RISC-based
systems typically contain large memory cache usually on the chip itself.
CISC CPU
5 multiplications in 20 ticks
First Multiplication Second Multiplication Third Multiplication
Read 1st Read 2nd Write Read 1st Read 2nd Write Read 1st Read 2nd
Multiply Multiply
Number Number Result Number Number Result Number Number
>>>>TIME >>>>>>>>>
RISC CPU
5 multiplications in 8 ticks
>>>>TIME >>>>>>>>>
Power Supply
Extra Bays
Tape Drive
Access CD-ROM
Slots
3 ” Floppy Drive
Hard Disk Drive
Motherboard
Peripheral Card
The system case encloses all the components, which are essential in running the computer
system. These components include the motherboard, processors, memory, power supply,
expansion slots, cables, removable drives, etc.
2.7.2 Motherboard
The motherboard, also known as the system board, is a large multilayered printed circuit board
inside a computer. The motherboard contains the CPU, the BIOS ROM chip and the CMOS
Setup information. It has expansion slots for installing different adapter cards like the video
card, sound card, network interface card and modem. The circuit board provides a connector
for the keyboard as well as housing to the keyboard controller chip. It possesses RAM slots
for the system’s RAM chips, and enables the system’s chipset, controllers and underlying
circuitry (bus system) to tie everything together. In a typical motherboard, the circuitry is
imprinted on the surface of a firm planar surface and is usually manufactured in a single
piece. The most common design of the motherboard in today’s desktop computers is the ATX
design. In ATX designs, the computer components included are processor, co-processors
(optionally), memory, BIOS, expansion slot and interconnecting circuitry. Additional
components can be added to a motherboard through its expansion slot. Nowadays, they are
designed to put peripherals as integrated chips directly onto the motherboard. Initially, this
was confined to audio and video chips, but in recent times, the peripherals integrated in this
way include SCSI, local area network (LAN) and RAID controllers. Though, there is cost
benefit to this approach, the biggest downside is the restriction of future upgrade options.
Figure 2.16 provides an insight into various components on motherboards.
BIOS: The BIOS comprises a set of several routines and start-up instructions inside the
ROM. This gives two advantages to the computer. First, the code and data in the ROM BIOS
need not be reloaded each time the computer is started. Secondly, they cannot be corrupted
by wayward applications that are accidentally written into the wrong part of the memory.
Integrated
Joystick 25-pin Parallel Port Connector
AGP Slot Audio Port plus 29-pin Serial Port Connector
ISA and PCI Chipset
Slots Mouse and
Keyboard
Connectors
USB
Connector
Intel 440BX
Chipset Slot 1
Connector
DIMM
Flash Sockets
BIOS
ATX Power
Supply
Lithium
Backup
Battery
SCSI Chipset SCSI UltraDMA EIDE Floppy
Connector Connectors Drive
Connector
As the machine is switched on, the control is transferred to the bootstrap procedure of the
BIOS. This procedure inspects the computer to determine what hardware is fitted and then
conducts a simple test (power-on self test) for normal functionality. If all the tests are passed,
the ROM then determines the drive to boot the machine. Most computers have the BIOS
set to check for the presence of an operating system in the primary hard disk drive. Once
the machine is booted, the BIOS serves a different purpose by presenting the DOS with a
standardized Application Program Interface (API) for the computer hardware.
CMOS: The motherboard includes a separate block of memory called the complementary
metal oxide silicon (CMOS) chip that consumes very low power. This chip is kept alive by
a battery even when the computer’s power is off. The function of the CMOS chip is to store
basic information about the computer’s configuration, such as the type of hard disks and floppy
drives, memory capacity, etc. The other important data, which is kept in the CMOS memory,
is the system time and date. The clock, CMOS chip and batteries are usually all integrated into
a single chip.
USB Port
Serial Port
PS2 Port
SCSI Port
Parallel Port
stored on the computer is called a sound card. It contains special circuits for
operating the computer's sound and allows playback and recording of sound from
the CD-ROM.
Video Cards: A video card, also called the display adapter, is used for enhancing
graphics images that are seen on the computer’s monitor. The card converts the images
created in the computer to electronic signals required by the monitor. Generally, a
good card with a graphics accelerator is preferred for editing digital videos. There are
different video cards with varying capabilities related to the size of the monitor and
total number of displayable colours.
Network Interface Card: A network interface card is a computer circuit board that
is installed in a computer so that it can be connected to other computers in a network.
Personal computers and workstations on a LAN contain a network interface card
specifically designed for transmitting data across LANs. Network interface cards
provide a dedicated, full-time connection to a network.
Modem: Modem is an expansion card that allows two computers to communicate
over ordinary phone lines. It converts digital data from computers into analog data,
transmits over the telephone lines and also converts incoming analog signals back to
digital signals for the receiving computer. Modems do not provide high bandwidth
for the data communication and as a result, they do not support high-speed Internet
access as current modems can run up to 56 KBps.
PC Card: A PC card is a removable device, approximately the size of a credit card,
which is designed to plug into a Personal Computer Memory Card International
Association (PCMCIA) slot. It is a standard formulated by the PCMCIA for providing
expansion capabilities to computers. The PCMCIA standard supports input-output
devices, memory, fax/modem, SCSI and networking products. The card fits into a
notebook or laptop computer.
2.7.5 Ribbon Cables
Ribbon cables are wide, flat and insulated
cables, which are flexible enough to fit into
areas with little space. These cables are
made up of numerous tiny wires (traces and
electronic pathways) called the bunch, where
one bunch carries data/information around to
different components on the motherboard and
another bunch connects these components to
the various devices attached to the computer.
These cables connect the hard drive, floppy
drive and CD-ROM drive to the connectors
on the motherboard and control the drives by
Figure 2.19 Ribbon Cables getting and sending data from and to them.
These cables connect different external
devices, peripherals, expansion slots, I/O ports and drive connections to the rest of the
computer (see Figure 2.19).
These drives are high-storage devices, which enable the user to store large amount of data.
Out of these drives, the hard disk drive provides the largest storage space for saving. All
the vital applications ranging from the operating system to word processor are stored in
the hard disk drive. The hard disk drive is costly and not robust enough to transfer data
physically; therefore, CD-ROMs and floppy disks are used as an alternative means to
transfer data physically.
2.7.8 Processors
Processor, often called the CPU, is the central component of the computer. It is referred to as
the brain of a computer responsible for carrying out operations in an efficient and effective
manner. A processor holds the key for carrying out all the processing and computational work.
Every work that is done by the user on the computer is performed either directly or indirectly
by the processor. The following factors should be considered while choosing a processor of a
computer system:
Performance: The processor’s capabilities dictate the maximum performance of a
system. It is the most important single determinant of system performance (in terms
of speed and accuracy) in the computer.
Speed: The speed of a processor defines how fast it can perform operations. There
are many ways to indicate speed, but the most obvious way to measure is through
the internal clock speed of the CPU. The faster the speed of the internal clock of
the processor, the faster the CPU will work and, therefore, hardware will be more
expensive.
Software Support: New and faster processors support resource-consuming
software in a better manner. For example, new processors such as the Pentium
4 enable the use of specialized software, which were not supported on earlier
machines.
Reliability and Stability: The reliability of the computer system directly depends on
the type and quality of the processor.
Energy Consumption and Cooling: Although processors consume relatively little
power compared to other system devices, a newer processor consumes a great deal
of power resulting in the impact on everything from the cooling method selection to
overall system reliability.
Motherboard Support: The type of processor used in the system is a major
determining factor of the chipset used on the motherboards. The motherboard, in
turn, dictates many facets of the system’s capabilities and performance.
To count large numbers, man soon started to count in groups and various number systems
were formed.
As manual counting had a limited role for carrying out a simple computing task,
computation that was more complex made humans to depend on the machines to perform
the computing task efficiently and accurately. With the advancement of machines, different
number systems were formed to make the task simple, accurate and fast. These number
systems worked on the principle of a digital logic design present in the modern-day computer
system and opened a gateway to overcome complex computation barriers. In a precise manner,
a number system defines a set of values used to represent “quantity”. Generally, one talks about
a number of students attending a class and a number of modules taken by each student as well
as uses numbers to represent grades achieved by students in tests. Quantifying values and
items in relation to each other is helpful for us to make sense of our environment. The number
system can be categorized into two broad categories:
Non-Positional Number Systems: In ancient times, people used to count with their
fingers. When fingers became insufficient for counting, stones and pebbles were used
to indicate the values. This method of counting is called the non-positional number
system. It was very difficult to perform arithmetic operations with such a number
system, as it had no symbol for zero. The most common non-positional number system
is the Roman number system. These systems are often clumsy and it is very difficult to
do calculations for large numbers.
Positional Number Systems: A positional number system is any system that
requires a finite number of symbols/digits of the system to represent arbitrarily
large numbers. When using these systems, the execution of numerical calculations
becomes simplified because a finite set of digits are used. The value of each digit in
a number is defined not only by the symbol, but also by the symbol’s position. The
most popular positional number system being used today is the decimal number
system.
Base (or Radix) of System: The word base (or radix) means the quantity of admissible
marks used in a given number system. The admissible marks are the characters such as Arabic
numerals, Latin letters or other recognisable marks, which are used to present the numerical
magnitude of a “quantity.” The decimal number system originated in India. This number
system has 10 as the base and is indicated by a subscript 10 (decimal number) following the
value of the number. For example, (7592)10 represents a number (7592) in the base 10 number
system. Similarly, we have number systems with base other than 10. For example, (214)8
represents a number (214) in the base 8 number system.
For a computer, everything is in the digital form (binary form) whether it is a number,
alphabet, punctuation mark or instruction (Table 2.2). Let us illustrate this with the help of
an example. Consider the word “INDIA” that appears on the computer screen as a series of
alphabetic characters. However, for the computer, it is a combination of numbers. On the basis
of the American Standard Code for Information Interchange (ASCII) value (discussed later in
this chapter) of each character, it appears to the computer as follows:
01001001 01001110 01000100 01001001 01000001
I N D I A
Binary Number System: The digital computer provides accurate solutions to the
problems by performing arithmetic computations. The numbers are not expressed as
decimal numbers within the computer because it is not suitable for machine processes.
Computers are not only powered by electricity, but also compute with electricity. They
shift voltage pulses around internally. When numbers are represented in a computer’s
memory by means of small electrical circuits, a number system with only two symbols
is used. These symbols are ON or OFF state of the circuit. This system of representing
numbers is known as the binary number system. Circuits allow electricity to flow or
to be blocked depending on the type of the circuit. A computer circuit is made up of
transistors, which have only two states, ON and OFF. ON is interpreted as 1, while
OFF as 0. Similar to the decimal system, the position of a digit in a number indicates
its value. Instead of ones, tens, hundreds, thousands, etc., as in the decimal system,
the columns in the binary system contain ones, twos, fours, eights, etc. Each column
represents a number in powers of 2; starting with 20 for the leftmost column, the power
is incremented by 1 for each additional column to the right. In other words, each place in
the number represents two times (2×’s) the place to its right. Table 2.3 represents the first
10 decimal numbers in binary.
Binary Numbers
Decimal Numbers 24
2 3
22 21 20
16 8 4 2 1
0 0
1 1
2 1 0
3 1 1
4 1 0 0
5 1 0 1
6 1 1 0
7 1 1 1
8 1 0 0 0
9 1 0 0 1
Octal Number System: The octal number system is a base 8 system, having eight admissible
marks: 0, 1, 2, 3, 4, 5, 6 and 7 with no 8 or 9 in the system. This system is a positional notation
number system. The octal number system uses powers of 8 to determine the number (see Table 2.4).
Table 2.4 Representing Binary and Decimal in Octal
Hexadecimal Number System: The hexadecimal number system uses 0–9 and A–F to
represent a number, where A is equivalent to decimal 10 and the largest hexadecimal digit F is
equivalent to decimal 15. The base for a hexadecimal number is 16 (see Table 2.5).
Binary Number 1 1 0 1 0
Weight of Each Bit 24
2 3
2 2
2 1
20
Weighted Value 24 × 1 23 × 1 22 × 1 21 × 1 20 × 0
Solved Multiplication 16 8 0 2 0
Sum of weight of all bits = 16 + 8 + 0 + 2 + 0 = 26. Thus, the decimal equivalent of (11010)2
is (26)10.
Binary Number 1 1 0 1 0
Weight of Each Bit 24
2 3
2 2
2 1
20
Weighted Value 24 × 1 23 × 1 22 × 1 21 × 1 20 × 0
Solved Multiplication 16 8 0 2 0
Sum of weight of all bits = 256 + 40 + 6 = 302. Thus, the decimal equivalent of (456)8 is
(302)10.
Hexadecimal Number B = 11 1 4
Weight of Each Bit 162 161 160
Weighted Value 162 × 11 161 × 1 160 × 4
Solved Multiplication 2816 16 4
Sum of weight of all bits = 2816 + 16 + 4 = 2836. Thus, the decimal equivalent of (B14)16 is
(2836)10.
Octal Number 2 3 1
Binary Value 010 011 001
Thus, the binary equivalent of (231)8 is (010011001)2.
Example 4: Determine the binary equivalent of (5AF)16.
Hexadecimal Number 5 A F
Binary Value 0101 1010 1111
Thus, the binary equivalent of (5AF)16 is (010110101111)2.
Converting Between Octal and Hexadecimal: The method used for the conversion
of an octal number to hexadecimal number is accomplished by the following steps:
1. Convert each octal digit to 3-bit binary form.
2. Combine all the 3-bit binary numbers.
3. Segregate the binary numbers into the 4-bit binary form by starting the first number
from the right bit (LSB) towards the number on the left bit (MSB).
4. Finally, convert these 4-bit blocks into their respective hexadecimal symbols.
Octal Number 2 3 2 7
Binary Value 010 011 010 111
Combining the 3-bit binary blocks, we have 010011010111. Separating the group of
binary numbers (from the left side) into the 4-bit binary number and by converting these
blocks into their respective hexadecimal symbols, we have
0100 1101 0111
4 D 7
Thus, the hexadecimal equivalent of (2327)8 is (4D7)16.
The method used for the conversion of a hexadecimal number to octal number is the same as
that used for the octal to hexadecimal conversion, except that each hexadecimal digit is converted
into 4-bit binary form and then after grouping of all the 4-bit binary blocks, it is converted into
the 3-bit binary form. Finally, these 3-bit binary forms are converted into octal symbols.
Hexadecimal Number 2 B 6
Binary Value 0010 1011 0110
Combining all the 4-bit binary blocks, we have 001010110110. Separating the group of binary
numbers into the 3-bit binary blocks and by converting these blocks into octal symbols, we have
001 010 110 110
1 2 6 6
Thus, the octal equivalent of (2B6)16 is (1266)8.
2.9 CODING SCHEMES
In today’s technology, the binary number system is used by the computer system to represent
the data in the computer understandable format. Numeric data (0, 1, 2,…, 9) is not the only
form of data, which is handled by the computer. The alphanumeric data (it is a string of
symbols of the letters A, B, C,..., Z or the digits 0, 1, 2,..., 9) and some special characters
such as =, –, +, *, /, (,) , etc., are also processed by the computer. There are a lot of ways to
represent the numeric, alphabetic and special characters in the computer’s internal storage area.
In computers, the code is made up of fixed-size groups of binary positions. Each binary position
in a group is assigned a specific value, for example, 8, 4, 2 or 1. In this way, every character can
be represented by a combination of bits that is unique. Moreover, data can also be arranged in a
way that is very simple and easy to decode or transmitted with varying degrees of redundancy
for error detection and correction. There are many coding schemes available for representing
characters. The most commonly used coding systems are ASCII code and Unicode.
American Standard Code for Information Interchange Code: The standard
binary code for the alphanumeric characters is the ASCII. This code was originally designed as
a 7-bit code. Several computer manufacturers cooperated to develop this code for transmitting
and processing data. They made use of all eight bits providing 256 symbols. Nevertheless,
IBM had not changed the original set of 128 codes so that the original instructions and data
could still work with the new character set. The ASCII is commonly used in the transmission
of data through data communication and is used almost exclusively to represent the data
internally in the microcomputers. In the ASCII, the upper-case letters are assigned codes
beginning with the hexadecimal value 41 and continuing sequentially through the hexadecimal
value 5A and lower-case letters are assigned hexadecimal values of 61 through 7A. The
decimal values 1–9 are assigned the zone code 0011 in the ASCII. Table 2.6 of the ASCII
coding chart shows upper-case and lower-case alphabetic characters and numeric digits 0–9.
The standard ASCII code defines 128-character codes (0–127) of which the first 32 are control
codes (non-printable) and other 96 are representable characters.
Unicode: Before the invention of the Unicode, hundreds of different encoding systems were
used. No single encoding system was large enough to represent vast number of characters.
Even for a simple language like English, no single encoding system was adequate for all the
letters, punctuation and technical symbols in common use. Moreover, these encoding systems
also conflicted with one another. Therefore, to overcome these issues, the Unicode encoding
system was developed.
Dec Hex Char Dec Hex Char Dec Hex Char Dec Hex Char
0 00 Null 32 20 Space 64 40 @ 96 60 `
1 01 Start of heading 33 21 ! 65 41 A 97 61 a
2 02 Start of text 34 22 “ 66 42 B 98 62 b
3 03 End of text 35 23 # 67 43 C 99 63 c
4 04 End of transmit 36 24 $ 68 44 D 100 64 d
5 05 Enquiry 37 25 % 69 45 E 101 65 e
6 06 Acknowledge 38 26 & 70 46 F 102 66 f
7 07 Audible bell 39 27 ‘ 71 47 G 103 67 g
8 08 Backspace 40 28 ( 72 48 H 104 68 h
9 09 Horizontal tab 41 29 ) 73 49 I 105 69 i
10 0A Line feed 42 2A * 74 4A J 106 6A j
11 0B Vertical tab 43 2B + 75 4B K 107 6B k
12 0C Form feed 44 2C , 76 4C L 108 6C l
13 0D Carriage return 45 2D - 77 4D M 109 6D m
14 0E Shift out 46 2E . 78 4E N 110 6E n
15 0F Shift in 47 2F / 79 4F 0 111 6F o
16 10 Data link escape 48 30 0 80 50 P 112 70 p
17 11 Device control 1 49 31 1 81 51 Q 113 71 q
18 12 Device control 2 50 32 2 82 52 R 114 72 r
19 13 Device control 3 51 33 3 83 53 S 115 73 s
20 14 Device control 4 52 34 4 84 54 T 116 74 t
21 15 Neg acknowledge 53 35 5 85 55 U 117 75 u
22 16 Synchronous idle 54 36 6 86 56 V 118 76 v
23 17 End trans. block 55 37 7 87 57 W 119 77 w
24 18 Cancel 56 38 8 88 58 X 120 78 x
25 19 End of medium 57 39 9 89 59 Y 121 79 y
26 1A Substitution 58 3A : 90 5A Z 122 7A z
27 1B Escape 59 3B ; 91 5B [ 123 7B {
28 1C File separator 60 3C < 92 5C \ 124 7C |
29 1D Group separator 61 3D = 93 5D ] 125 7D }
30 1E Record separator 62 3E > 94 5E ^ 126 7E ~
31 1F Unit separator 63 3F ? 95 5F − 127 7F □
The Unicode is a universal character-encoding standard for the interpretation of text for
computer processing. It offers a constant way of encoding multilingual plain text. The standard
provides the capacity to encode all the
UTF Formats characters used in different languages
around the world. To keep character
Unicode characters are divided into two basic coding simple and proficient, the Unicode
THINGS TO REMEMBER
Let Us sUmmarize
1. The CPU or the processor is a chip inside the system plugged onto the motherboard
and controls all internal and external devices as well as performs arithmetic and logic
operations. The unit consists of three main subsystems, the CU, the ALU and the registers.
2. The functions of a processor include carrying out arithmetic and logic functions,
controlling the use of the main memory to store data and instructions, and controlling the
sequence of operations and all the parts of the computer system.
3. The set of wires used for interconnection of various units is known as the system bus. The
system bus is divided into three logical units, namely the address bus, the data bus and the
control bus.
4. The registers are special-purpose, high-speed temporary memory units. They hold various
types of information pertaining to data, instructions, addresses and the intermediate
results of calculations. Some of the important registers within the CPU are the PC, IR,
MAR, MBR, ACC and DR.
5. The ALU carries out arithmetic and logical operations on the data made available to it. The
ALU contains the circuitry that is responsible for performing the actual computing and
carrying out the arithmetic calculations. On the other hand, the importance of the ALU is
to facilitate the CPU to make logical operations based on the instructions provided to it.
6. The CU controls the I/O devices and transfers data to and from the primary storage. It
repeats a set of four basic operations: fetching, decoding, executing and storing.
7. The main memory unit is a collection of registers, logically integrated to the processor
but physically separate from the processor. It is implemented by two types of memory
technologies, namely RAM and ROM.
8. A cache memory, sometimes called a cache store, is a portion of the memory made up
of the high-speed static RAM (SRAM) instead of the slower and comparatively cheaper
dynamic RAM (DRAM) used for the main memory. It is very expensive and generally
incorporated in the processor, where valuable data and program segments are kept.
9. In the processor to memory communication, the whole process can be divided into
two steps, namely information transfer from the memory to the processor and writing
information in the memory.
10. In the processor to I/O devices communication, the I/O units are connected to the
computer through the system bus. In addition, it buffers the flow of data from the device
to the processor and vice versa.
11. The instruction cycle is sequence of well-defined instructions in the form of programs,
which consist of the following steps: fetch cycle (fetching the instruction from the memory),
decode cycle (decoding the instruction), execute cycle (executing the instruction) and
store cycle (storing the result back to the memory).
12. The instruction set of a processor is a limited set of basic operations built into the processor.
Based upon the instruction sets, there are two common types of architectures: CISC and RISC.
13. A system case or cabinet is a metal and plastic box that houses the main components of the
computer. It protects all the vital electronic components against heat, light and temperature.
14. A power supply or SMPS is a transformer and voltage control device in the computer that
furnishes power to all the electronic components by converting incoming AC supply into
the low-voltage DC supply. When a computer is turned on, the power supply allows the
converted electricity to travel to other components inside the computer.
15. A motherboard is a large multilayered printed circuit board inside a computer. It contains
the CPU, BIOS ROM chip, CMOS setup information and is equipped with expansion
slots for installing different adapter cards, the connector for the keyboard, slots for the
system’s RAM, etc.
16. Ports and interfaces are a generic name for the various sockets, found at the back of the
computer, using which external devices are connected to the computer’s motherboard.
17. An expansion card is a circuit board that provides additional capabilities to the computer
system. These cards are made up of large-scale integrated circuit components installed on
it. The cards are plugged into the expansion sockets present in the computer’s motherboard
to give the computer an added functionality.
18. Ribbon cables are wide, flat and insulated cables, which are flexible to fit into areas with little
space. These cables connect the hard drive, floppy drive and CD-ROM drive to the connectors
on the motherboard and control the drives by getting and sending data from and to them.
19. A number system defines a set of values used to represent a “quantity”. These are of two
types: non-positional and positional number systems.
20. In a non-positional number system, special symbols or characters are used to indicate the
values. It is very difficult to perform arithmetic operations with such a number system, as
it has no symbol for zero.
21. In a positional number system, the value of each digit in a number is not only defined by
the symbols, but also defined by the symbol’s position. These symbols are called digits.
22. The positional number system, which is being used nowadays, is called as the decimal number
system. Apart from this number system, there are some other positional number systems,
such as the binary number system, octal number system and hexadecimal number system.
23. The base or radix of the number system tells about the number of symbols or digits used
in the system. The base of the decimal number system is 10, of binary number system is 2,
of octal number system is 8 and of hexadecimal number system is 16.
24. In computers, the coding scheme is made up of fixed-size groups of binary positions,
where each binary position in a group is assigned a specific value. Some of the most
commonly used coding systems are the ASCII code and Unicode.
exercises
Multiple-choice Questions
1. The processor is a ......................... chip plugged onto the motherboard in a computer system.
(a) LSI (b) VLSI
(c) ULSI (d) XLSI
2. The set of wires, which carry information in a controlled manner, is called .........................
(a) System bus (b) Public bus
(c) Private bus (d) None of these
3. The ALU works on the instructions and data held in the .........................
(a) Notebook (b) Registers
(c) Copy Pad (d) I/O devices
4. A register that keeps track of the next instruction to be executed is called a .........................
(a) Program Counter (b) Instruction register
(c) Accumulator (d) Data register
5. The fastest memory in a computer system is .........................
(a) ROM (b) RAM
(c) Cache (d) None of these
6. In the sequence of events that takes place in an instruction cycle, the first cycle is .........................
(a) Store cycle (b) Execute cycle
(c) Fetch cycle (d) Decode cycle
7. ......................... is a type of the processor architecture that utilizes a small, highly
optimized set of instructions.
(a) CISC (b) RISC
(c) VISC (d) LISC
8. RISC processors are ideal for embedded applications, such as mobile phones and PDAs,
because .........................
(a) They are smaller in size and consume less power.
(b) They are large in size and consume less power.
(c) They are smaller in size and consume more power.
(d) They are larger in size and consume large amount of power.
9. The concept of the CISC architecture is to accomplish the task in .........................
(a) As longer lines of code as possible (b) As few lines of code as possible
(c) Both (a) and (b) (d) None of these
10. An expansion card that allows the computer to output sound through connected speakers
is .........................
(a) Video Card (b) Network Interface Card
(c) PC Card (d) Sound Card
Descriptive Questions
1. What do you understand by the CPU? Describe in details the various units of the CPU.
2. What are registers in a CPU? Name five registers with their functions.
3. Write a detailed note on the instruction cycle describing the various steps involved.
4. Compare the RISC and CISC architecture briefly. Also, discuss their advantages and
disadvantages.
5. What is a system bus? Name the various units of the system bus.
6. With an appropriate example, explain the conversion of:
(a) Binary to octal and vice versa
(b) Binary to hexadecimal and vice versa
(c) Octal to hexadecimal and vice versa
7. What are expansion cards? How many types of expansion cards can be used in a computer
system?
8. Write short notes on:
(a) Motherboard (b) Power supply
(c) Ports (d) Ribbon cables
9. Perform the following conversions:
(a) Convert binary 00011011 to decimal
(b) Convert decimal 278 to binary
(c) Convert decimal 0.625 to binary
10. What is a radix or base of the system? With the help of this system, brief the various types
of number systems.
ANSWERS
Multiple-choice Questions
1. (b) 2. (a) 3. (b) 4. (a) 5. (c) 6. (c) 7. (b) 8. (a)
9. (b) 10. (d)
Computer Memory
and Storage
CHAPTER OBJECTIVES
3.1 INTRODUCTION
Computers are used to perform various tasks in science, engineering, business, education,
entertainment and many other fields. They work at high speed, can handle large volumes
of data with great accuracy and have the ability to carry out a specified sequence of
operations without human intervention. The CPU handles the processing of data and
after processing, presents the results with the help of output devices. However, the CPU
requires memory to process the data, hold the intermediate results and to store the output.
Computer memory refers to the electronic holding place for instructions and data where
the processor can reach quickly. It can be classified into two broad categories: primary
memory (to process the data and hold the intermediate results) and secondary memory
(to store the output).
The primary memory allows the computer to store data for immediate manipulation
and to keep track of what is currently being processed. The major limitation of this type of
memory is that it is volatile. It means that when the power is turned off, the contents of primary
memory are lost forever. Hence, to store the data permanently, a computer requires some non-
volatile storage medium like a hard disk. This kind of storage is known as secondary memory.
Note: When we talk about memory, we generally refer to the primary memory only, and when we
talk about storage, we refer to secondary memory.
Such memories store all the data (files) and instructions (computer programs) even after the
power is turned off. The secondary storage devices have a larger storage capacity; they are less
expensive as compared to primary storage devices, but slow in comparison.
3.1.1 Memory Representation
All quantities, physical or otherwise, are measured in units. For example, length is measured
in metres and mass in grams. Likewise, for measuring computer memory, a standard unit is
required. Digital computers work on only two states: ON (1) and OFF (0). These two values
are represented by two different voltages within the circuit. For example, 0 volt represents a
false value (0), and +5 volt represents a true value (1). Each of these values (either 0 or 1) is
called a binary digit or bit and can be considered a symbol for a piece of information. Although
the smallest unit of data that a computer can deal with is a bit, computers generally do not deal
with a single bit. Instead, they deal with a group of eight bits, which is referred to as a byte. A
byte can have 256 different bit patterns, and thus can represent 256 different symbols. Various
units used to measure computer memory are as follows:
Bit: It is the smallest unit of data on a machine and a single bit can hold only one of
two values: 0 or 1. Bit is represented by a lower case b.
Byte: A unit of eight bits is known as a byte. Hence, a byte is able to contain any
binary number between 00000000 and 11111111. It is represented by an upper case B.
Kilobyte: In a decimal system, kilo stands for 1000, but in a binary system, kilo refers
to 1024. Therefore, a kilobyte is equal to 1024 bytes. It is usually represented as KB.
Megabyte: It comprises 1024 kilobytes, or 1,048,576 bytes. However, since this
number is hard to remember, a megabyte can be thought of as a million bytes.
Megabyte is the standard unit of measurement for RAM and is represented as MB.
Gigabyte: It consists of 1024 megabytes (1,073,741,824 bytes). It is the standard unit
of measurement for hard disks and is often represented as GB.
Terabyte: It refers to 1024 gigabytes. Often represented as TB, terabyte memory is
usually associated with super computers only.
Note: In modern computers, groupings of bytes (usually 2 or 4), called computer words can
represent larger “chunks” of information.
Primary Memory: Random access memory (RAM) and read only memory
(ROM) fall under the category of the primary memory, also known as main
memory. Every computer comes with a small amount of ROM, which contains
the boot firmware (called BIOS). This holds enough information to enable the
computer to check its hardware and load its operating system into its RAM at the
time of system booting. RAM is the place where the computer temporarily stores
its operating system, application programs and current data so that the computer’s
processor can reach them quickly and easily. It is volatile in nature, that is, when
the power is switched off, the data in this memory are lost. Unlike RAM, ROM is
non-volatile. Even when the computer is switched off, the contents of the ROM
remain available.
Secondary Memory: Also known as auxiliary memory, secondary memory provides
backup storage for instructions (computer programs) and data. The most commonly
used secondary storage devices are magnetic disk and magnetic tapes. These are the
least expensive and also have much larger storage capacity than the primary memory.
The instructions and data stored on secondary storage devices are permanent in
nature. They can only be removed if the user wants it so or if the device is destroyed.
Secondary memory can also be used as overflow memory (also known as virtual
memory), when the capacity of the main memory is surpassed. Note that unlike
processor memory and main memory, secondary memory is not directly accessible to
the processor. Firstly, the data and instructions from the secondary memory have to
be shifted to the main memory and then to the processor.
Figure 3.1 illustrates the memory hierarchy. The CPU accesses memory according to a
distinct hierarchy. When the data come from permanent storage (for example, hard disk), they
first go in RAM. The reason behind it is that if the CPU has to access the hard disk constantly
to retrieve every piece of required data, it would operate very slowly. When the data are kept
in primary memory, the CPU can access them more quickly. Subsequently, the CPU stores the
required pieces of data and instructions in processor memory (cache and registers) to process
the data.
is done by placing the memory on a refresh circuit that rewrites the data several
hundred times per second. DRAM is used for most system memory because it is
inexpensive and small.
The primary difference between SRAM and DRAM is the life of the data they store. SRAM
retains its contents as long as electrical power is supplied to the chip. If the power is turned off,
its contents are lost. On the other hand, DRAM must be continuously refreshed after about every
15 microseconds. This is true even when power is supplied constantly. SRAM chips are not as
dense as DRAM chips, that is, the total number of cells in the SRAM chip is less than that on
DRAM chip. SRAM is beneficial because it is fast, has low latency (the time lag between a request
and the action being performed), and does not need to be refreshed. However, it is large and
expensive, requires more power to operate, and produces a lot of heat. DRAM is simple, small,
and space efficient. It may be slower and may have a longer latency than SRAM, but it is still
very useful. Typical access time of SRAM is 25 nanoseconds while of DRAM 60 nanoseconds.
SRAM is useful for low amount of memory. Anything over 4 MB is very bulky. SRAM
is good for internal memory in processors, and cache, but DRAM is best for the system’s main
memory. DRAM is used where its small size and power efficiency outweigh its slowness as
compared to SRAM. SRAM is less dense than DRAM (fewer bits per unit area) and is, therefore,
not suitable for high-capacity, low-cost-per-megabyte applications. The power consumption of
SRAM varies widely depending on its speed. Fast SRAM is much more power-hungry than
DRAM and some ICs can consume power of
RAM and ROM the order of a watt at full speed. Slow SRAM
FACT FILE
for the hardware, that is, I/O devices, memory and operating system in the memory. These
programs deal with low-level machine functions and are alternate for additional hardware
requirement. ROM performs the necessary BIOS (basic input output system) function to start
the system and then transfers the control over to the operating system.
ROM can have data and instructions written into it only one time. Once a ROM chip is
programmed, it cannot be reprogrammed or rewritten. If it is erroneous, or the data need to be
reorganized, one has to replace it with the new chip. Thus, the programming of ROM chips
should be perfect, having all the required data at the time of its manufacturing. Note that in some
instances, ROM can be changed using certain tools. For example, flash ROM (a type of ROM)
is non-volatile memory that occasionally can be changed, such as when a BIOS chip must be
updated. The ROM chips consume very little power, are extremely reliable, and in the case of
most small electronic devices, contain all the necessary programming to control the device.
3.4.1 Types of ROM
Memories in the ROM family are distinguished by the methods used to write data on them and
the number of times they can be rewritten. This classification reflects the evolution of ROM
devices from “hard-wired” to programmable to erasable-and-programmable. One common
feature of all these devices is their ability to retain data and programs even during a power
failure. ROMs come in following varieties:
Masked ROM: The very first ROMs, known as masked ROMs, were hard-wired
devices that contained a pre-programmed set of data or instructions. The contents of
such ROMs had to be specified before chip production so the actual data could be
used to arrange the transistors inside the chip.
Programmable ROM (PROM): Creating a ROM chip from scratch is a time-
consuming and an expensive process. For this reason, developers created a type of
ROM known as programmable read only memory (PROM), which can be programmed.
Blank PROM chips can be bought economically and coded by the users with the help
of a special device known as PROM-programmer. However, once a PROM has been
programmed, its contents can never be changed. As a result, PROM is also known as
one-time programmable (OTP) device. Like other ROMs, PROM is also non-volatile.
However, it is more fragile than other ROMs as a jolt of static electricity can easily
cause the fuses in the PROM to burn out, thus changing the bit pattern from 1 to 0.
Nevertheless, blank PROMs are economical and are great for prototyping the data for
a ROM before committing to the costly ROM fabrication process.
Erasable Programmable ROM (EPROM): An EPROM is programmed in exactly
the same manner as a PROM. However, unlike PROM, an EPROM can be erased and
reprogrammed repeatedly. It can be erased by simply exposing the device to a strong
source of ultraviolet light for a certain amount of time. Note that an EPROM eraser is
not selective; it will erase the entire EPROM. Although EPROM is more expensive
than PROM, its ability to be reprogrammed makes it more useful.
Electrically Erasable Programmable ROM (EEPROM): This type of ROM can
be erased by an electrical charge and then written to by using slightly higher-than-
normal voltage. EEPROM can be erased one byte at a time, rather than erasing the
entire chip with ultraviolet light. Hence, the process of reprogramming is flexible,
but slow. Also, changing the contents does not require any additional committed
equipment. As these chips can be changed without opening a casing, they are often
used to store programmable instructions in devices like printers.
Flash ROM: A flash ROM also called flash BIOS or flash memory, is a type of
constantly powered non-volatile memory that can be erased and reprogrammed in
blocks. It is a variation of EEPROM, which, unlike flash memory, is erased and
rewritten at the byte level. Flash memory is often used to hold the control code such
as the BIOS in a personal computer. When BIOS needs to be changed or rewritten,
the flash memory can be written in block (rather than byte) sizes, thus making it
easier to update. Flash memory gets its name because the microchip is organized so
that a section of memory cells are erased in a single action or “flash”. Flash memory
is used in digital cellular phones, digital cameras and other devices.
data storage and may result in data loss. The tape now has a limited role because disk has
proved to be a superior storage medium. Today, the primary role of the tape drive is limited
to backing up or duplicating the data stored on the hard disk to protect the system against
loss of data during power failures or computer malfunctions.
with magnetic oxide layer. On a disk, data are represented as magnetized spots. A magnetized
spot represents 1 and the absence of a magnetized spot represents 0. To read the data, the
magnetized spots on the disk are converted into electrical impulses, which are then transferred
to the processor. Writing data onto the disk is accomplished by converting the electrical
impulses received from the processor into magnetized spots on the disk. The data in a magnetic
disk can be erased and reused virtually infinitely. The disk is designed to reside in a protective
case or cartridge to shield it from the dust and other external interference.
3.8.1 Storage Organization of a Magnetic Disk
The surface of a disk is divided into imaginary tracks and
sectors as illustrated in Figure 3.9. Tracks are concentric
circles where the data are stored, and are numbered from the
outermost to the innermost ring, starting with zero. Sectors
refer to the number of fixed-size areas (imaginary pie slices)
that can be accessed by one of the disk drive’s read/write
heads, in one rotation of the disk, without the head having to
change its position. An intersection of a track and a disk sector
is known as track sector. Generally, a disk has eight or more
disk sectors per track. However, different types of magnetic Figure 3.9 Organization
disks may have a different number of tracks. Today disks are of Disk Surface
marked (tracks and sectors) on both surfaces, hence they are
also known as double-sided disks. Each sector is uniquely
assigned a disk address before a disk drive can access a
piece of data. The disk address comprises sector number,
track number and surface number (if double-sided disks are
used). The track sectors are grouped into a collection known
as cluster. It refers to the basic allocation unit for storage on
a disk, consisting of one or more track sectors. It is also the
minimum amount of disk space used by a single file.
Frequently, multiple disks (platters) are maintained
and used together to create a large disk-storage system.
Typically, two or more platters are stacked on top of each
other with a common spindle, which rotates them. There is a
gap between the platters, making room for the magnetic read/
write head. There is a read/write head for each side of each
platter and all the heads are attached to a single assembly
called a disk arm assembly, which can move them towards
Figure 3.10 Disk Pack
the central spindle or towards the edge (see Figure 3.10).
and Cylinder
All the read/write heads are on an equal diameter track on the
different platters at one time. The tracks of equal diameter on different platters form a cylinder.
can be in multiple numbers to access the adjacent tracks simultaneously and making a disk
faster. The access arm assembly can be positioned in both inward and outward directions so
that the read/write head can move on the horizontal surfaces of the disk. In case of multiple
disk packs, each disk surface has its own read/write head, which works in harmony with
other heads to record the data. Therefore, information is stored on the tracks, constituting a
cylindrical shape through a disk pack. The process of accessing data comprises three steps:
1. Seek: As soon as the disk unit receives the read/write command, the read/write
heads are positioned on the specific track on the disk platter. The time taken in doing
so is known as seek time. It is the average time required to move the heads to the
desired track on the disk. Seek times of modern disks may range between 2 and
15 milliseconds but the seek time of most common disks is 9 milliseconds.
2. Rotate: Once the heads are positioned on the desired track, the head of the specific
platter is activated. Since the disk is rotated constantly, the head has to wait for the
required sector or cluster (desired data) to come under it. This waiting time is known
as rotational delay time or latency of the disk. The rotational latency of a disk with
7200 rpm is 4.17 milliseconds.
3. Data Transfer: Once the read/write head is positioned over the desired sector, the
data can be transferred to or from the disk to primary memory. The rate at which the
data is read from or written to the disk is known as data transfer rate. It is measured
in kilobits per second (kbps). The data transfer rate depends upon the rotational speed
of the disk. If the disk has a rotational speed of 6000 rpm (rotations per minute),
having 125 sectors and 512 bytes/sector, the data transfer rate per rotation will be
125 × 512 = 64,000 bytes. Hence, the total transfer rate per second will be 64,000 ×
6000/60 = 6,400,000 bytes/second or 6.4 MB/second (see Table 3.1).
Table 3.1 Accessing Data
Step Measured As Illustration
Seek Seek Time
The combined time (seek time, latency and data transfer time) is known as the access
time of the magnetic disk. Generally, the access time can be described as the period of
time that elapses between a request for data from disk or memory and the desired data
arriving at the requesting device. Memory access time refers to the time it takes to transfer
a character from memory to or from the processor, while disk access time refers to the time
it takes to place the read/write heads over the requested data. RAM may have an access
time of 9–70 nanoseconds, while hard disk access time could be 10–40 milliseconds.
Read/Write Operation of a Floppy Disk: To read and write data onto a floppy
disk, FDD is used. The drive (see Figure 3.11) is made up of a box with a slot (having
a drive gate) into which a user inserts the disk. When the user inserts a disk into the
FDD, the drive grabs the disk and spins it inside its plastic jacket. Also, the drive has
multiple levers that get attached to the disk. One lever opens the metal plate, or shutter, to
expose the data access area. Other levers and gears move two read/write heads until they
almost touch the diskette on both sides. The drive’s circuit board receives instructions for
reading/writing the data from/to disk through the floppy drive controller. If the data are
to be written onto the disk, the circuit board first verifies that no light is visible through a
small window in the floppy disk. If the photo sensor on the opposite side of the floppy disk
detects a beam of light, the floppy drive detects the disk to be write-protected and does not
allow recording of data.
The circuit board translates the instructions into signals that control the movement of the
disk and the read/write heads. A motor located beneath the disk spins a shaft that engages a
notch on the hub of the disk, causing the disk to spin. When the heads are in the correct position,
electrical impulses create a magnetic field in one of the heads to write data to either the top
or bottom surface of the disk. Similarly, on reading the data, electrical signals are sent to the
computer from the corresponding magnetic field generated by the metallic particle on the disk.
Since the floppy disk head touches the diskette, both media and head wear out quickly. To
reduce wear and tear, personal computers retract the heads and stop the rotation when a drive is
not reading or writing. Consequently, when the next read or write command is given, there is a
delay of about half a second while the
motor gathers maximum speed.
(fixed) and can hold a large amount of data. The capacity, that is, the amount of information
that a hard disk can store, is measured in bytes. A typical computer today comes with 80–320
GB of hard disk. The storage capacity of hard disk has increased dramatically since the
day it was introduced. The hard disk speed is measured in terms of access time (typically
in milliseconds). A hard disk with lower access time is faster than a hard disk with higher
access time; the lower the access time, the faster the hard disk.
Read/Write Operation of a Hard Disk: A hard disk uses round, flat disks (platters)
made up of glass or metals which are coated on both sides with a special material designed to
store information in the form of magnetic patterns. Each platter has its information recorded
in tracks, which are further broken down into smaller sectors. Making a hole in the centre of
platters and stacking them onto a spindle mount the platters. The platters rotate at high speed,
driven by a special motor connected to the spindle. Special electromagnetic read/write heads
are mounted onto sliders and are used to either record data onto the disk or read data from
it. The sliders are mounted onto arms, all of which are mechanically connected into a single
assembly and positioned over the surface of the disk by a device called actuator. Each platter
has two heads, one on the top of the platter and one on the bottom, so a hard disk with three
platters would have six surfaces and six heads.
Data are recorded onto the magnetic surface of the disk in exactly the same way
as they are on floppies. However, a disk controller is attached to the hard disk drive
that handles the read/write commands issued by the operating system. Each read/write
command specifies a disk address that comprises the surface number, track number
and sector number. With this information, the read/write head moves to the desired
sector that data can be read from or written to. Usually, the next set of data to be read is
sequentially located on the disk.
Note that unlike floppy
drives, in which the read/write
heads actually touch the surface
of the material, the heads in
most hard disks float slightly off
the surface. Nevertheless, the
distance between the head and
the disk surface is much less
compared to the thickness of a
human hair (see Figure 3.13).
When the heads accidentally
touch the media, either because
the drive is dropped or bumped
hard or because of an electrical Figure 3.13 Distance between Head
malfunction, the surface becomes and Disk Surface
scratched. Any data stored where
the head has touched the disk is lost. This is called a head crash. To help reduce the possibility
of a head crash, most disk controllers park the heads over an unused track on the disk when the
drive is not being used by the CPU.
Read/Write Operation of a Zip Disk: A zip disk looks quite similar to a floppy disk.
Both are about the same size but vary in their storage capacity. The magnetic-coated Mylar zip
disk, which is also called a cookie, is encased in a hard plastic material having a metal plate
cover that slides open to provide read/write access to the cookie. When a zip disk is inserted
into the zip drive, the metal plate slides to expose the small portion of the cookie. The metal
hub that is attached to the centre of the cookie spins at 3000 rpm (rotations per minute) along
with the motor. The two heads on either side of the cookie touch the surface of the disk to
perform read/write operations. In a zip drive, the read/write heads are about one-tenth the size
of a floppy drive head resulting in a higher data recording density. The small size of the zip
drive heads allows writing 2118 tracks per inch. Zip drives, like a hard disk, use zone recording
so that the same recording density is used throughout the disk. In contrast, the conventional
floppy is divided into sectors radially in which the outermost tracks use up more surface area
than the innermost tracks, and thus waste the recording surface.
Due to low cost and high data recording densities, cost per bit in magnetic disks is
minimum.
The storage capacity of magnetic disks is virtually unlimited as numbers of such
disks can be added to store data.
Magnetic disks are less prone to corruption of data as they can withstand temperature
and humidity change much better as compared to magnetic tapes.
rotation speed of the disk varies inversely with the radius of the disk. The disk moves slowly
when data are being read near the edges and moves fast when close to the centre.
Since read/write operations are performed through laser beams, no access arm movement
is required that is used in the case of the magnetic disk. Hence, many people assume that
the data access time is even faster than the magnetic disk. However, this is not true because
compared to the magnetic disks,
where the tracks are arranged in
the form of concentric circles, in an
optical disk the tracks are organized
in a spiral fashion. This results in the
slower random access time than in
the concentric circles. Generally, the
access time for an optical disk ranges
from 10 to 40 milliseconds which
(a) Track Pattern of a Magnetic Disk (b) Track Pattern of an Optical Disk
is very low as compared to a floppy
disk that has an access time of several
Figure 3.15 Comparing Track Patterns hundred milliseconds.
3.10.2 Access Mechanism of Optical Disk
The laser beam technology used for reading/writing of data on the disk surface of the optical
disk uses two laser beam sources of different intensities. The greater intensity laser beam is
used to write on the recording surface by turning it ON and OFF at a varying rate so that tiny
pits are burnt into the metal coating of the disk. The lesser intensity beam is used to read that
stored data, which is strongly reflected by the coated surface called land and weakly reflected
by the burnt surface called pit. The changes in pattern are detected by a photo sensor and
converted into digital signals (see Figure 3.16).
FACT FILE
(in the form of digital audio) and can record and a protective outer layer. In a CD-R, a
about 80 minutes of uninterrupted playing layer of organic polymer dye between the
time. A CD is capable of being used as a data polycarbonate and metal layers serves as
storage device along with storing of digital the recording medium. The laser creates
marks (burns) in the dye layer that mimic
audio.
A CD is a shiny, silver colour metal disk the reflective properties of the pits and lands
of 12 cm diameter. A typical optical disk is (lower and higher areas) of the CD. Due to
made up of three layers: a polycarbonate this, CD writing is also known as CD Burning.
base through which light can pass, a layer
of aluminium, and a protective layer of acrylic on top of that. The pits of CD are typically
0.5 microns wide, 0.83 to 3 microns long, and 0.15 microns deep. A CD has one track that
spirals from the centre to the outside edge. If one could remove the track from a standard
12 cm CD, it would stretch for 3.5 miles. The single track is divided into sectors of equal
length and density. Files are stored on these particular contiguous sectors.
Compact disks are available in various formats: CD-ROM (compact disk-read only
memory), CD-R (compact disk-recordable), and CD-RW (compact disk-rewritable) disks. A
CD-ROM disk comes with pre-recorded data by the manufactures and can be read but cannot
be altered. CD-R is a type of WORM (write once-read many) disk that allows you to record
your own data. Once written, the data on the CD-R can be read but cannot be altered. A CD-
RW disk is rewritable version of CD-R that means, it allows writing, erasing and rewriting of
data several times. The data recorded on all CD formats can be read using the CD-ROM drive;
however, to write data on CD-R and CD-RW disks, one needs a special peripheral device
known as CD-writer (or CD-burner).
CD-ROM drives are characterized by the spin rate. The spin rate is the rotation speed of
the disk and it influences the information retrieval speed (access time). Currently quad, hex
and octal-speed CD-ROM drives are available where quad means 4x, hex means 6x and octal
means 8x. Thus, octal-speed drive is the fastest and, as a result, the most expensive.
starting from the centre of the disk and moving to the outer edge, as shown in Figure 3.17. A light
is beamed from a semiconductor laser through the bottom of the polycarbonate layer, and the
aluminium coating monitors the light being
reflected. Since the CD is read through the
bottom of the disk, each pit appears as an
elevated bump to the reading light beam.
Light striking the land areas (the areas
without bumps) is reflected normally and
detected by a photodiode. As the disk rotates
at speeds between 200 and 500 rpm, the light
bounces off the pits causing the frequency of
the light to change. The reflected light then
passes through a prism and onto a photo
sensor. Light reflected from a pit is 180° out
of phase with the light from the lands, and
the differences in intensity are measured by
the photoelectric cells, which converts into
Figure 3.17 Reading Data from CD-ROM a corresponding electrical pulse.
Writing Data to a CD: On a new
CD-R disk, the entire surface of the disk
is reflective; the laser can shine through
the dye and reflect off the gold layer.
Hence, for a CD-R disk to work, there
must be a way for a laser to create a non-
reflective area on the disk. A CD-R disk,
therefore, has an extra layer that the laser
can modify. This extra layer is a greenish
dye. When you write data to a CD-R,
the writing laser (which is much more
powerful than the reading laser) heats up
the dye layer and changes its transparency
(see Figure 3.18). The change in the dye
creates the equivalent of a non-reflective
Figure 3.18 Writing Data to a CD-R
bump. The decomposition of the dye
in the pit area through the heat of the laser is irreversible (permanent). Therefore, once a
section of a CD-R is written, it cannot be erased or rewritten. However, both CD and CD-R
drives can read the modified dye as a bump later on.
In contrast to CD-R disk, CD-RW disk is erasable and rewritable because it uses phase-
changing material on its recording layer, usually an alloy of silver, tellurium, indium and
antimony metals. Phase-changing material changes its state when heated to a high temperature
(above its melting point) and can be converted back to its original state when heated at a
temperature slightly below its melting point.
In CD-RW disk, the recording layer has a polycrystalline structure initially. While writing
to the disk, the laser heats up the selected areas to a very high temperature (above the melting
point), which melts the crystals into a non-crystalline amorphous phase. These areas have lower
reflectance than the remaining crystalline areas. This difference in reflectance helps in reading
the recorded data as in the case of CD-R disk.
To erase data on a CD-RW disk, a process called annealing is used. During this process,
the area on the layer that has been changed to the amorphous phase (during writing) is converted
back to its original crystalline state by heating it to a temperature slightly below the melting
point of the phase-changing material.
3.11.2 Digital Versatile Disk
DVD, initially called Digital Video Disk, is a high-capacity data storage medium. At first glance,
a DVD can easily be mistaken for a CD as both are plastic disks 120 mm in diameter and 1.2 mm
thick, and both rely on lasers to read data. However, the DVD’s seven-fold increase in data
capacity over the CD has been largely achieved by tightening up the tolerances throughout the
predecessor system. In DVD, the tracks are placed closer together, thereby allowing more tracks
per disk. The DVD’s track pitch (the distance between each) is reduced to 0.74 micron, less than
half of CD’s 1.6 micron. The pits, in
which the data is stored, are also a
lot smaller, thus allowing more pits
per track. The minimum pit length
of a single layer DVD is 0.4 micron
as compared to 0.834 micron for a
CD. With the number of pits having
a direct bearing on capacity levels,
DVD’s reduced track pitch and pit
size, as shown in Figure 3.19, alone
give DVDs four times the storage
capacity of CDs. Figure 3.19 Comparing Track Pitch and Pit Length
Note: Like CDs, DVDs are also available in different formats: DVD-ROM, DVD-R, and DVD-RW.
The packing of as many pits as possible onto a disk is, however, the simple part; the real
technological breakthrough of DVDs was with its laser. Smaller pits mean that the laser has to
produce a smaller spot, and DVD achieves this by reducing the laser’s wavelength from the
780 nm (nanometres) infrared light of a standard CD, to 635 nm or 650 nm. Secondly, the DVD
specification allows information to be scanned from more than one layer of a DVD simply by
changing the focus of the read laser. Instead of using an opaque reflective layer, it is possible to use
a translucent layer with an opaque reflective layer behind carrying more data. This does not double
the capacity because the second layer cannot be quite as dense as the single layer, but it does enable
a single disk to deliver 8.5 GB of data without having to be removed from the drive and turned over.
An interesting feature of DVD is that the disk’s second data layer can be read from the
inside of the disk out, as well as from the outside in. In standard density CDs, the information
is always stored first near the hub of the disk. The same is true for single-layer and dual-layer
DVD, but the second layer of each disk can contain data recorded “backwards”, or in a reverse
spiral track. With this feature, it takes only an instant to refocus a lens from one reflective layer
to another. On the other hand, a single-layer CD that stores all data in a single spiral track takes
longer to relocate the optical pickup to another location or file on the same surface.
0.6 mm
Figure 3.20). To facilitate
the focusing of the laser
Single-sided, double layer (8.5 GB) Double-sided, double layer (17 GB) on the smaller pits,
manufacturers used a
0.6 mm
thinner plastic substrate
thereby reducing the depth
of the plastic layer that the
Figure 3.20 Different Types of DVDs laser has to travel through
to reach the pits. This reduction resulted in disks that were 0.6 mm thick—half the thickness of
a CD. However, since these thinner disks were too thin to remain flat and withstand handling,
manufacturers bonded two disks back-to-back, resulting in disks that are 1.2 mm thick. This
bonding doubles the potential storage capacity of a disk. Note that single-sided disks still have
two substrates, even though one is not capable of holding data.
3.11.3 Blu-ray Disk
Blu-ray disk is an optical storage device, which is used
to record and playback high definition video and audio
as well as store images and other data (Figure 3.21). It is
developed by Blu-ray Disk Association (BDA), which is
a group of world’s leading consumer electronics, personal
computers and media manufacturers including Thomson,
Apple, Panasonic, Sony and Samsung. It uses blue-violet
Figure 3.21 A Blu-ray Disk laser having shorter wavelength (405 nm) than a red laser
(650 nm) used by DVDs. Due to this shorter wavelength, the laser can be focused more
precisely on the small spot thereby resulting in storage capacity 10 times that of DVD. Like
CDs and DVDs, Blu-ray disks are also available in different formats:
BD-ROM: It comes with pre-
recorded content that can only be read.
DVD and Blu-ray Disk BD-R: It is a WORM type of disk on
which you can record data only once.
The organization of both Blu-ray disk and DVD
BD-RW: It is similar to BD-R
is similar; however, the way the data are stored
disk but the difference is that it is
on them differs. In DVDs, the data reside
rewritable. This means data can be
FACT FILE
storage capacity of the disk differs. For instance, the storage capacity of standard disk with
single layer is 25 GB and with dual layer is 50 GB. On the other hand, the storage capacity of
mini disk with single layer is 7.8 GB and with dual layer is 15.6 GB.
Blu-ray disk allows not only recording of programs but the programs can be manipulated
also. One can edit the programs recorded on the disk or change their order. The user can
also create playlists of the programs stored on disks so that they can be randomly accessed.
Moreover, it facilitates recording one program while simultaneously watching another
program.
3.11.4 Advantages of Optical Disks
Optical disks possess large capacity to store data/information in the form of
multimedia, graphics and video files. They can store more data in less amount of
space as compared to magnetic tapes and floppy or zip disks.
The life span for data storage in optical disks is considered to be more, about
10–20 years as compared to magnetic disks, which have a comparatively lesser
life span.
Optical disks hold more data-recording density as compared to other storage media;
therefore, they have low cost per bit of storage.
Optical disk is not affected by magnetic field.
An optical disk is tougher than tapes/floppy disks. It is physically harder to break or melt.
Due to their small size and lightweight, these disks are easily portable and stored.
3.11.5 Disadvantages of Optical Disks
Optical disk is not as easy to write as a floppy disk. One needs to use both software
and hardware for writing optical disks.
They possess slow data access speed as compared to the magnetic disks.
The drive mechanism of an optical disk is more complicated than the magnetic and
floppy disks.
3.12 M AG N E TO - O P T I C A L
STORAGE DEVICES
The magneto-optical (MO) systems
include basic principles of both
magnetic and optical storage systems.
This system writes magnetically (with
thermal assist) and reads optically.
Magnetic optical disk is a plastic or
a glass disk coated with a compound
(often a ternary alloy of terbium
ferric cobalt, or TbFeCo) with special
properties (see Figure 3.22). Since
such materials are easily oxidized,
dielectric barrier layers are used Figure 3.22 Magneto-Optical Disk Structure
to protect the MO layer from oxidation. At the same time, the barriers together with the
reflector coating act as an optical signal enhancement. MO disks function along opto-thermic
magnetic principles. The thin film structure that gives the format its unlimited rewritability
is based on a MO alloy layer enveloped by a barrier layer on each side.
Presently, MO disks are available in two formats: 5¼-inch and 3½-inch. The larger form-
factor MO disks are capable of holding data about as much as the standard CD-ROM. Under
pressure from the inexpensive and relatively fast CD-R and CD-RW, MO drives seem to be
losing ground. On the other hand, some of the principles of the MO technology (thermally-
assisted magnetic recording) may find their way into the most advanced magnetic storage
devices of the future. Thus, the existence of the erasable optical disks has been made feasible
due to this technology.
These features of external hard disk make it suitable to be used for taking backup. Using an
external hard disk drive as a means of backup for important (or sensitive) data is advantageous.
This is because you can unplug the external hard drive when not in use to protect your data
from being compromised by online or offline activities.
Memory Stick Micro (M2): It is a light and compact storage media which comes in
the dimension of 15 mm × 12.5 mm × 1.2 mm. It has mainly been developed to meet
the demands of the mobile devices market. It offers large storage capacity ranging
from 16 MB to 32 GB and transfer speed of 160 Mb/s.
Let Us sUmmarize
1. Computer memory refers to the electronic holding place for instructions and data where
the processor can reach quickly.
2. Various units that are used to measure computer memory are bit, byte, kilobyte, megabyte,
gigabyte and terabyte.
3. A computer’s memory can be categorized into three fundamental types: internal processor
memory, primary memory and secondary memory.
4. Internal processor memory is placed within the CPU (processor) and usually includes
cache memory and special registers, both of which can be directly accessed by the
processor. This memory is used for temporary storage of data and instructions on which
the CPU is currently working.
5. Primary memory consists of RAM, which is volatile in nature, and ROM, which is non-
volatile in nature.
6. RAM, also called main memory, allows the computer to store data for immediate
manipulation and to keep track of what is currently being processed. It is the place in a
computer where the operating system, application programs and data in current use are
kept so that they can be accessed quickly by the computer’s processor.
7. SRAM stands for static random access memory. It retains its contents as long as power is
being supplied and does not require constant periodic refreshing. It is often used as cache
memory due to its high speed.
8. DRAM stands for dynamic random access memory. The data on DRAM continues to
move in and out of the memory as long as power is available, and thus DRAM must be
continually refreshed in order to maintain the data. DRAM is slower and less expensive
than SRAM.
9. The non-volatile memory chip, where the start-up instructions (special boot program) are
stored is called ROM. These chips are programmed by burning appropriate fuses to form
patterns of binary information.
10. Secondary memory is used to provide backup storage for instructions and data. It has
much larger capacity than primary memory. It includes devices like hard disk, floppy
disk, CD-ROM and tape drives. These devices are classified into two types according to
data access, that is, sequential access and direct access.
11. Magnetic tape is like a plastic tape with a magnetic coating on it. The data is stored in
the form of tiny segments of magnetized and demagnetized portions on the surface of
the material. The tapes are an inexpensive and a reliable storage medium for organizing
archives and taking backup.
12. Magnetic tape is divided into vertical columns (frames) and horizontal rows (channels
or tracks). The data is stored in a string of frames with one character per frame and each
frame spans multiple tracks. Thus, a single bit is stored in each track, that is, one byte per
frame. A magnetic tape can typically have seven to nine tracks.
13. The length of tape between the BOT (beginning of tape) and EOT (end of tape) is referred
to as the usable recording (reading/writing) surface. BOT/EOT markers are usually made
up of short silver strips of reflective type.
14. Magnetic disks are the most widely used and popular medium for direct access secondary
storage. They offer high storage capacity and reliability, and have the capability to access
the stored data directly.
15. A magnetic disk consists of a plastic/metal circular plate/platter, which is coated with a
magnetic oxide layer. Data are represented as magnetized spots on a disk. A magnetized
spot represents 1 and the absence of a magnetized spot represents 0.
16. Tracks are concentric circles where the data are stored, and are numbered from the
outermost to the innermost ring, starting with zero.
17. Sectors refer to the number of fixed-size areas (imaginary pie slices) that can be accessed
by one of the disk drive’s read/write heads, in one rotation of the disk, without the head
having to change its position. An intersection of a track and a disk sector is known as
track sector.
18. A floppy disk is a round, flat piece of Mylar plastic, coated with ferric oxide, and encased
in a protective plastic. It is a removable disk and is read and written by a floppy disk
drive. A floppy disk drive is a device that performs the basic operation on a disk, including
rotating the disk and reading and writing data onto it.
19. The hard disk is the primary storage unit of the computer. It consists of a stack of disk
platters that are made up of aluminium alloy or glass substrate coated with a magnetic
material and protective layers. It plays a significant role in: performance, storage capacity,
software support and reliability.
20. Zip disk is a removable storage device having a capacity to store 250–700 MB of data.
Zip disk’s drive unit is measured as 18 × 13 × 4 cm and weighs about half a kilogram.
It has rubber feet to stabilize the unit in either vertical or horizontal positions. The
substrate for the disk is made up of plastic material on which magnetic oxide particles
are coated.
21. An optical disk is a flat, circular, plastic disk coated with material on which bits may be
stored in the form of highly reflective areas and significantly less reflective areas, from
which the stored data may be read when illuminated with a narrow beam of laser diode.
These disks are capable of storing enormously high amounts of data in a limited amount
of space.
22. Memory Stick, also known as Memory Card is a digital storage device, which is designed
to be used with portable electronic devices such as mobile phones, digital cameras, PDAs,
iPod, etc.
23. Magneto-optical (MO) systems include the basic principles of both magnetic and
optical storage systems. This system writes magnetically (with thermal assist) and
reads optically.
24. USB, developed by Intel, is a set of connectivity specification that establishes commu-
nication between personal computers and devices such as mouse, keyboard, pen drive,
external hard disk drives, etc.
25. In order to achieve a vast amount of storage capacity in a computer system, multiple units
of similar kinds of storage media are associated together to form a chain of mass storage
devices. These storage media include multiple arrays of magnetic disks or CD-ROMs as
a secondary storage device.
exercises
5. The two types of data access methods available with secondary storage devices are
....................... and .......................
6. An intersection of a track and a disk sector is known as ..........................
7. The time required to position the read/write head over the desired track is called
..........................
8. WORM stands for ..........................
9. .......................... is a hybrid of magnetic and optical technologies.
10. The multiple association of a disk array box used for obtaining high performance, large
capacity and reliability is called ..........................
Multiple-choice Questions
1. Which of the following is the largest memory size?
(a) Terabyte (b) Gigabyte
(c) Kilobyte (d) Megabyte
2. The access time refers to
(a) Time required to locate and retrieve stored data
(b) Time required to locate the lost data
(c) Time required to delete specific data on a certain memory location
(d) None of these
3. The type of memory that can be erased by simply exposing the device to a strong source
of ultraviolet light for a certain amount of time is
(a) PROM (b) Flash Memory
(c) EPROM (d) EEPROM
4. The storage device that has high cost per bit of storage is
(a) SRAM (b) Cache Memory
(c) ROM (d) Hard Disk
5. The secondary storage device that follows the sequential mode of access is
(a) Optical Disk (b) Magnetic Disk
(c) Magnetic Tape (d) None of these
6. RAID stands for
(a) Reproduce Array of Intelligent Disks
(b) Reproduce Array of Inexpensive Disks
(c) Redundant Array of Inexpensive Drives
(d) Redundant Array of Inexpensive Disks
7. DVD stands for
(a) Decoded Video Disk (b) Digital Versatile Disk
(c) Digital Virtual Disk (d) None of these
8. In which kind of disk does the read/write head physically touch the surface?
(a) Hard Disk (b) Compact Disk
(c) Floppy Disk (d) None of these
Descriptive Questions
1. What are the types of memories available in the computer system? How are they organized
in a hierarchy?
2. What is ROM? Differentiate between EPROM and EEPROM.
3. With the help of diagrams, explain how RAM, ROM and CPU interact with each other.
4. Explain the working of a magnetic tape. What are its advantages and disadvantages?
5. What are mass storage devices? How are they useful in storing large amounts of data?
6. Explain how read/write operation is carried out in an optical disk.
7. Discuss advantages and disadvantages of
(a) Magnetic disks
(b) Optical disks
8. Distinguish between the following:
(a) Sequential mode and Random mode
(b) Static RAM and Dynamic RAM
(c) Magnetic tape and Magnetic disk
ANSWERS
Multiple-choice Questions
1. (a) 2. (a) 3. (c) 4. (b) 5. (c) 6. (d) 7. (b) 8. (c)
9. (c) 10. (b)
Input via
Input Device
Output via
Output Device
CPU and
Memory
CHAPTER OBJECTIVES
Input devices play a major role in the processing of any data via the computer system
because the output of the computer is always based on the given input. Generally, data that is
given to the input devices is raw. Therefore, it is the function of the input devices to manipulate
the raw data and then send them for further processing. The preparation of the computerized
input is the initial step in the creation of useful output. This output must be supplied to the
outside world, which is done through output devices.
4.2 TYPES OF INPUT DEVICES
Computer accepts input in two ways, either manually or directly. In case of manual data entry,
the user enters the data into computer by hand, for example, by using keyboard and mouse.
A user can also enter data directly by transferring information automatically from a source
document (like from a cheque using MICR) into the computer. The user does not need to
enter information manually. Direct data entry is accomplished by using special direct data
entry devices like a barcode reader. Some of the commonly used input devices are keyboard,
pointing devices like mouse and joystick, speech recognition, digital camera and scanners.
4.2.1 Keyboard
A keyboard is the most common data Qwerty Query
entry device. Using a keyboard, the The layout of a keyboard comes in various
user can type text and commands. The styles, such as QWERTY, AZERTY and
FACT FILE
keyboard is designed to resemble a regular DVORAK. QWERTY is the most common
typewriter with a few additional keys layout in English language computer
(see Figure 4.2). Data is entered into the keyboards. It takes its name from the first six
computer by simply pressing keys. The letters shown on the keyboard’s top row of
layout of the keyboard has changed very letters. Similarly, French language keyboards
little since it was introduced. In fact, the use A and Z in place of Q and W and are
most common change in its technology has known as AZERTY keyboards.
simply been the natural evolution of adding
more keys that provide additional functionality. The number of keys on a typical keyboard
varies from 84 to 104.
Portable computers such as laptops quite often have custom keyboards that have
slightly different key arrangements than a standard keyboard. In addition, many system
manufacturers add special buttons to the standard layout. A keyboard is the easiest input
device, as it does not require any special skill. Usually, it is supplied with a computer so no
additional cost is incurred. The maintenance and operational cost of a keyboard is also less.
However, using a keyboard for data entry may be a slow process because the user has to
manually type all the text. In addition, it can be difficult for people suffering from muscular
disorders.
How does the keyboard work? A
keyboard is a series of switches connected
to a small keyboard microprocessor that
monitors the state of each switch and initiates
a specific response to a change in state. When
the user presses a key, it causes a change in the
amount of current flowing through the circuit
associated specifically with that key. The
keyboard microprocessor detects this change
in current flow. By doing this, the processor can
tell when a key has been pressed and when it is
being released. Depending upon which key’s
Figure 4.3 Working of a Keyboard circuit carries a signal to the microprocessor,
the processor generates the associative code,
known as scan code, of the key and sends it to the operating system (see Figure 4.3). A copy of
this code is also stored in the keyboard’s memory. When the operating system reads the scan
code, it informs the same to the keyboard and the scan code stored in keyboard’s memory is
then erased.
Initially, the processor filters all the tiny current fluctuations out of the signal and treats it
as a single key press. If the user continues to hold down a key, the processor determines that
the user wishes to send that character repeatedly to the computer. In this process, the delay
between each instance of character can normally be set in the operating system, typically
ranging from 2–30 characters/second (cps).
FACT FILE
or an optical mouse, based on the technology technologies, namely, Bluetooth, infrared,
it uses. A mechanical mouse uses a rubber or radio frequency. The wireless keyboard
ball at the bottom surface, which rotates as requires three AA batteries and the wireless
the mouse is moved along a flat surface, mouse requires two AA lithium batteries to
to move the cursor. It is the most common operate. They also have a power switch on
and least expensive pointing device. An the bottom to turn them ON or OFF. The use
optical mouse uses a light beam instead of of wireless devices helps in eliminating the
a rotating ball to detect movement across a wiring tangles around the PC and provides
specially patterned mouse pad. As the user mobility and flexibility to the user to position
rolls the mouse on a flat surface, the cursor him/her self relative to the computer.
on the screen also moves in the direction of
the mouse’s movement. It is pricier than their mechanical counterparts
but are accurate and often do not need a mouse pad.
A mouse allows us to create graphic elements on the screen such
as lines, curves and freehand shapes. Since it is an intuitive device, it
is easier and convenient to work as compared to the keyboard. Like a
keyboard, it is also supplied with a computer; therefore, no additional
cost is incurred. However, it needs a flat space close to the computer.
The mouse cannot easily be used with laptop (notebook) or palmtop
computers. These types of computers need a trackball or a touch Figure 4.4 Mouse
sensitive pad called a touchpad.
roller measures how fast the ball is turning horizontally, and the other measures how fast it is
turning vertically. When the ball rolls, it turns these two rollers. The rollers are connected to
axles, and the axles are connected to a small sensor that measures how fast the axle is turning.
Both sets of information are passed to the electronics inside the mouse. This little processor,
usually consisting of little more than a single chip, uses the information to determine how fast
the mouse itself is moving, and in what direction. This information is passed to the computer
via a mouse cord, where the operating system then moves the pointer accordingly.
The optical mouse uses an infrared light and special mouse pads with fine grid lines
to measure the rotation of the axle. The axle in optical mouse is connected to a little photo-
interrupter wheel with a number of tiny holes in it. In front of this wheel is a light source and
on the other side of the wheel is a light metre. As the wheel turns, the light flashes through the
holes in the wheel. By measuring how often these flashes occur, the light sensor can measure
how fast the wheel is turning and sends the corresponding coordinates to the computer. The
computer moves the cursor on the screen based on the coordinates received from the mouse.
This happens hundreds of times each second, making the cursor appear to move very smoothly.
Trackball: A Trackball is another pointing device that resembles
a ball nestled in a square cradle and serves as an alternative to a
mouse. In general, a trackball is as if a mouse is turned upside
down (see Figure 4.6). It has a ball, which can be rotated by fingers
in any direction, the cursor moves accordingly. The size of the ball
in the trackball varies from as large as a cue ball, to as small as a
marble. Since it is a static device, instead of rolling the mouse on
the top of the table the ball on the top is moved by using fingers,
thumbs and palms. This pointing device comes in various shapes
Figure 4.6 Trackball and forms but with the same functions. The three shapes, which
are commonly used are a ball, button and square.
Like the mouse, a trackball is also used to control cursor movements and the actions on
a computer screen. The cursor is activated when buttons on the device are pressed. However,
the trackball remains stationary on the surface, only the ball is moved with the fingers or palm
of the hand. By moving just the fingers and not the entire arm, the user can get more precision
and accuracy, which is why many graphic designers and gamers choose to use trackball instead
of mouse. In addition, since the whole device is not moved for moving the graphic cursor,
a trackball requires less space than a mouse for operation. A trackball, generally, tends to
have more buttons. A lot of computer game enthusiasts and graphic designers also tend to
choose to have more buttons to cut down on keyboard use. These extra buttons can also be
re-programmed to suit whatever functions they require. Trackballs are not supplied normally
so an additional cost is always charged. Moreover, before using them, a user has to learn how
to use them.
How does a trackball work? A trackball works in the same way as a mouse, with the
ball turning rollers, the rollers turning axles, which are in turn connected to either mechanical
or optical sensors that measure their rotation. As shown in Figure 4.7, a trackball consists of
a number of components. As one moves the trackball, it starts a chain of events inside the
box that results in the pointer moving on the computer screen. In a normal trackball, on one
How does a trackpad work? A trackpad consists of several layers: the top layer is the
rubber layer on which you move the finger, beneath this layer are two more layers consisting
of horizontal and vertical rows of electrodes. The rows of electrodes do not touch each other;
rather they are separated by a non-conductive, dialectic material. The layers of electrodes
are charged (one with a positive electrical charge and the other with a negative charge) by
alternating current (AC), and as a result an electric field is created between them. The strength
of mutual capacitance of the electric field is sampled by the integrated circuits to which the
layers of electrodes are connected.
As a finger approaches the top layer of the trackpad, its presence causes the change in
capacitances where the electrodes cross over. The capacitance is most affected at the closest
intersection point of electrodes under the position where the centre of the finger is touching.
By reading the capacitances of closest intersections, the trackpad identifies the cursor position
on the screen. These capacitances are measured about 100 times per second. As the finger is
moved, the changes in measurements are translated into movement of the cursor on the screen.
4.2.3 Speech Recognition
Speech recognition is one of the most interactive systems to communicate with the computer.
The user can simply instruct the computer, with the help of a microphone (along with a speech
recognition software), to perform a task (Figure 4.15). It is the technology by which sounds,
words or phrases spoken by humans are converted into digital signals, and these signals are
transformed into computer-generated text or commands. Most speech recognition systems are
speaker-dependent so they must be separately trained for each individual user. The speech
recognition system “learns” the voice of the user, who speaks isolated words repeatedly. Then,
these voiced words are recognizable in the future.
SPEECH
RECOGNITION ON USER’S
USER MICROPHONE SOUND CARD SOFTWARE SCREEN
Figure 4.17 Digital How does a digital camera work? The key
Camera difference between a digital camera and a film-based
camera is that the digital camera does not have a film;
instead, it has a sensor that converts light into electrical
charges. The image sensor employed by most digital cameras is a charge-coupled device (CCD).
Some low-end cameras use complementary metal oxide semiconductor (CMOS) technology.
The CCD is a collection of tiny
light-sensitive diodes, which
convert photons (light) into
electrons (electrical charge).
These diodes are called photosites.
Concisely, each photosite is
sensitive to light. The brighter the
light that hits a single photosite,
the greater the electrical charge
that will accumulate at that site. In
order to digitize the information,
the signal must be passed through
Figure 4.18 Working of a Digital Camera an analog-to-digital converter
(ADC). The ADC converts that
information to binary form and sends it to a digital signal processor (DSP). The DSP adjusts
the image details, compresses the information and sends it to the camera’s storage medium
from where it is transferred to the computer’s storage through a cable (Figure 4.18).
4.2.5 Webcam
A webcam (short form of web camera) is a portable video camera, which captures live video or
images that may be viewed in real time over a network or the Internet. It is just a small digital
camera that is either built in your computer (in most laptops) or can be connected through a
USB port (see Figure 4.19). It is normally placed on top of the PC monitor or laptop to capture
images of the user while he/she is working on the computer.
Nowadays, a wide variety of webcams are available, and according to their varied
capabilities and features, they are classified into two categories, namely, streaming and
snapshot. A streaming webcam captures moving images (about 30 images per second),
thus creating a streaming video—a web video that plays on the computer immediately as
THINGS TO REMEMBER
Live Messenger where you can share Webcam vs. Digital Camera
your videos while instant messaging A digital camera contains a memory card to store
with somebody. It is also being used the images while a webcam does not have any
in educational institutions to conduct in-built memory; it just captures the images and
distance-learning activities; one can sends them over the network immediately. Also,
attend the classes sitting at home only. a webcam is designed to capture low-resolution
Webcams are cheap, compact images (about 10 times less than a digital
and are easy to install and use. They camera) so that they can be transmitted through
are affordable because of their low the network easily and quickly.
manufacturing cost. However, a major
drawback of using webcams is that
they produce only real-time images and cannot be used unless attached with the PC. Some
webcams also comprise advanced features such as automatic lightning controls, automatic
face tracking and autofocus, which increase their cost.
4.2.6 Scanners
There are a number of situations when some information (picture or text) is available
on paper and is needed on the computer for further manipulation. A scanner is an input
device that converts a document into an electronic format that can be stored on the disk.
The electronic image can be edited, manipulated, combined and printed by using the image
editing software. Scanners are also called optical scanners as they use a light beam to scan
the input data.
Note that most scanners come with a utility program that allow them to communicate
with the computer and save the scanned images as a graphic files on the computer. Moreover,
they can store images in both greyscale and colour mode. The two most common types of
scanners are hand-held scanners and flatbed scanners.
Hand-held Scanner: A hand-held scanner consists
of LEDs, which are placed over the document to be scanned
(Figure 4.20). This scanner performs the scanning of the
document very slowly from the top to the bottom with its light
on. In this process, all the documents are converted and then
stored as images. While working, the scanner is dragged very
steadily and carefully over the document at a constant speed
without stopping or jerking in order to obtain best results.
Hand-held scanners are widely used where high accuracy is
not of much importance. The size of the hand-held scanners is
Figure 4.20 Hand-held
small. They come in various resolutions, up to about 800 dpi
Scanner
(dots per inch) and are available in either greyscale or colour.
Furthermore, they are used when the volume of the documents to be scanned is low. These
devices read the data on price tags, shipping labels, inventory part numbers, book ISBNs
and so on.
How does a hand-held scanner
work? When a hand-held scanner’s
scan button is pressed, an LED illuminates
the document underneath it. An inverted
angled mirror directly over the scanner’s
window reflects the image onto the
scanner’s lens, which is located at the
back of the scanner. The lens focuses a
single line of the image onto a Charged
Coupled Device (CCD), which contains a
row of light detectors. As the light shines
Figure 4.21 Inside a Hand-held Scanner through these detectors, each of them
records the amount of light as a voltage
that corresponds to white, black and grey or to a colour. These
voltages are sent to a specialized analog chip, which corrects any
colour detection error. After that, a single line image is passed to
an Analog to Digital Converter (ADC), which converts the analog
signals into binary forms that can be sent to the computer (see
Figure 4.21). The converter clears itself of the data so that it can
receive the next line of the image.
it moves horizontally from left to right. After scanning one line, the light beam moves in order
to scan the next line and the procedure is repeated until all the lines are scanned. Scanning
an A4 size document takes about 20 seconds. These scanners can scan black and white as
well as colour images. Flatbed scanners are larger in size and more expensive than hand-held
scanners. However, they usually produce better quality images because they employ better
scanning technology.
How does a flatbed scanner work? To scan a document, it is placed on the glass
plate and the cover is closed. A lamp is used to illuminate the document. The scan head (mirrors,
lens, filter and CCD array constitutes a scan head) is moved slowly across the document by
a belt that is attached to a stepper motor.
The head is attached to a stabilizer bar to
ensure that there is no wobble or deviation
in the pass. In scanning terms, a pass
means that the scan head has completed
a single complete scan of the document.
The image of the document is reflected
by an angled mirror to another mirror.
Each mirror is slightly curved to focus the
image it reflects onto a smaller surface.
The last mirror reflects the image onto a
lens. The lens focuses the image through
a filter on the CCD array (Figure 4.23).
Some scanners use a three-pass
scanning method. Each pass uses a Figure 4.23 Working of a Flatbed Scanner
different colour filter (red, green or blue)
between the lens and CCD array. After the three passes are completed, the scanner software
assembles the three filtered images into a single full-colour image. Nowadays, most scanners
use the single-pass method. The lens splits the image into three smaller versions of the original
image. Each smaller version passes through a colour filter (either red, green or blue) onto a
discrete section of the CCD array. The scanner combines the data from the three parts of the
CCD array into a single full-colour image, which is then sent to the computer.
document formatting is lost during text scanning. The output from a finished text scan will be
a single column editable text file. This text file will always require spell checking and proof
reading as well as re-formatting to get the desired final layout.
How does an OCR work? All
OCR systems include a scanner
Paper
for reading text and sophisticated
Document software for converting the text into
machine-readable form (Figure 4.24).
User
Machine
During OCR processing, the text is
analysed for light and dark areas in
Scanned text is converted order to identify each alphabetic letter
Paper fed into
into computer file using or numeric digit. When a character
OCR software
the scanner is recognized, it is converted into
an ASCII code. There are two basic
methods used for OCR: matrix
matching and feature extraction. The
Scanner matrix matching technique compares
what the OCR scanner sees as a
Figure 4.24 An OCR System character with a library of character
matrices or templates. When an image matches one of these prescribed matrices of dots within
a given level of similarity, the computer labels that image as the corresponding ASCII character.
Feature extraction OCR does not require strict matching to prescribed templates. This method
varies depending on how much “computer intelligence” is applied by the manufacturer. The
computer looks for general features such as open areas, closed shapes, diagonal lines and line
intersections. This method is much more versatile than matrix matching. At the end of the
OCR processing, the final information can be saved in a number of different formats—text or
rich text format (RTF).
The banking industry prefers MICR to OCR as MICR gives extra security against forgeries
such as colour copies of payroll cheques or hand-altered characters on a cheque. If a document
has been forged, say a counterfeit check produced using a colour photocopying machine, the
magnetic-ink line will either not respond to magnetic fields, or will produce an incorrect code
when scanned using a device designed to recover the information in the magnetic characters.
The reading speed of the MICR is also higher. This method is very efficient and time saving
for data processing.
4.2.10 Bar Code Reader
Bar code is a machine-readable code in the form
of a pattern of parallel vertical lines of varying
widths. It is commonly used for labelling
goods that are available in super markets and
numbering books in libraries. This code is sensed
and read by a bar code reader using reflective
light (Figure 4.27). The information recorded in
the bar code reader is then fed into the computer,
which recognizes the information from the
thickness and spacing of bars. Bar code readers
Figure 4.27 Bar Code Reader are either hand-held or fixed-mount. Hand-held
scanners are used to read bar codes on stationary
items. With fixed-mount scanners, items having a bar code are passed by the scanner by hand, as
in retail scanning applications or by conveyor belts in many industrial applications.
Bar code data correction systems
Bar Code Data provide enormous benefits for just about
every business with a bar code data-collection
The bar code data is just reference numbers,
solution; capturing data is faster and more
which the computer use to look up associated
accurate. A bar code scanner can record data
record file(s), which contain descriptive
five to seven times faster than a skilled typist.
FACT FILE
from the bar code, and converts light energy into electrical energy. The result is an electrical
signal that can be converted into alphanumeric data. The pen in the bar code unit reads the
information stored in the bar code and converts it into a series of ASCII characters by which
the operating system gets the information stored in the bar code.
4.3.1 Printers
Ever since the dawn of computer age, producing printed output on paper has been one of the
computer’s principal functions. A printer prints information and data from the computer onto
paper. Generally, the printer prints 80 or l32 columns of characters in each line, and prints
either on single sheets or on a continuous roll of paper, depending upon the printer itself. The
quality of a printer is determined by the clarity of a print it can produce, that is, its resolution.
Resolution is used to describe the sharpness and clarity of an image. The higher the resolution,
the better the image. For printers, the resolution is measured in dpi (dots per inch). The more
the dpi, the better will be the quality of image. The dots are so small and close together that
they project the image as a solid one. If a printer has a resolution of 600 dpi, it means that the
printer is capable of printing 360,000 dots per square inch.
Printers are divided into two basic categories: impact printers and non-impact printers.
As their names specify, impact printers work by physically striking a head or needle against an
ink ribbon to make a mark on the paper. This includes dot matrix printers, daisy wheel printers
and drum printers. In contrast, ink-jet and laser printers are non-impact printers. They use
techniques other than physically striking the page to transfer ink onto the page.
Dot Matrix Printer: Dot matrix printer (also known as
the wire matrix printer) uses the oldest printing technology
and it prints one character at a time (Figure 4.28). It prints
characters and images as pattern of dots. The speed of dot
matrix printers is measured in characters per second (cps).
Most dot matrix printers offer different speeds depending
on the quality of print desired. The speed can vary from
about 200 to over 500 cps. The print quality is determined
by the number of pins (the mechanisms that print the dots),
Figure 4.28 Dot Matrix which can vary from 9 to 24. The more pins per inch, the
Printer higher the print resolution. The best dot matrix printers
(24 pins) can produce near letter-quality-type image. Most
dot matrix printers have a resolution ranging from 72 to 360 dpi.
Dot matrix printers are inexpensive and have low operating costs. These printers are able
to use different types of fonts, different line densities and different types of paper. Many dot
matrix printers are bi-directional, that is, they can print the characters from either direction—
left or right. The major limitation of the dot matrix printer is that it prints only in black and
white. In addition, as compared to printers like laser printers, they produce low to medium
quality printing. The image printing ability is also very limited. These printers may not be
able to print graphic objects adequately but can handle applications such as accounting,
personnel and payroll very well. Dot matrix printers are commonly used in low-cost, low-
quality applications like cash registers. These printers are limited to situations where carbon
copies are needed and the quality is not too important.
How does a dot matrix printer work? The
technology behind dot matrix printing is quite simple
as shown in Figure 4.29. The paper is pressed against
a rubber-coated cylinder and is pulled forward as
printing progresses. The printer consists of an electro-
magnetically driven print head, which is made up
of numerous print wires (pins). The characters are
formed by moving the electro-magnetically driven print
head across the paper, which strikes the printer ribbon
situated between the paper and print head pin. As the
head stamps onto the paper through the inked ribbon,
a character is produced that is made up of these dots.
Figure 4.29 Working of Dot These dots seem to be very small for the normal vision
Matrix Printer and appear like solid human-readable characters.
Daisy Wheel Printer: The major drawback of the dot matrix printer is that the pattern of dots
that make up each character is visible on the print produced by it, making it look unprofessional. If
you need a printer that can produce professional letter quality documents, you need a daisy wheel
heavy printing applications. For example, in businesses where enormous amounts of materials
are printed, the low-speed character printers are very slow; therefore, the users need high-speed
line printers. Although, drum printers have high speed of printing, they are very expensive and
their character fonts cannot be changed. Moreover, the strike of the hammer should be precise.
A single mistimed strike of the hammer may lead to wavy and slightly blurred printing.
How does a drum printer
works? The basics of a line printer,
like the drum printer, are similar to those
of a serial printer except that multiple
hammers strike multiple type elements
against the paper almost simultaneously,
so that an entire line is printed in one
operation. A typical arrangement of a
drum printer involves a large rotating
drum mounted horizontally and
positioned in front of a very wide inked
Figure 4.33 Working of Drum Printer ribbon, which, in turn, is positioned in
front of the paper itself (see Figure 4.33).
The drum contains characters moulded onto its surface in columns around its circumference;
each column contains a complete set of characters (letters, digits, etc.) running around the
circumference of the drum. The drum spins continuously at high speed when the printer is
operating. In order to print a line, hammers positioned behind the paper ram the paper against
the ribbon and against the drum beyond it at exactly the right instant, such that the appropriate
character is printed in each column as it spins past on the drum. Once every column has been
printed, the paper is advanced upward so that the next line can be printed.
Ink-jet Printer: The most common type of printer
found in homes today is the ink-jet printer (see Figure 4.34).
An ink-jet printer is a printer that places extremely small
droplets of ink onto paper to create an image. Being a non-
impact printer, it does not touch the paper while creating
an image. Instead, it uses a series of nozzles to spray drops
of ink directly onto the paper. Inkjets were originally
manufactured to print in monochrome (black and white)
only. However, the print head has now been expanded and
the nozzles increased to accommodate cyan (C), magenta
(M), yellow (Y) and black (K). This combination of colours
is called CMYK. It allows for printing images with nearly
Figure 4.34 Ink-jet Printer the same quality as a photo development lab using certain
types of coated paper.
Ink-jet printers are costlier than dot matrix printers and the quality is much better. These
printers can print any shape of character, which a user can specify, as they produce printed
output as patterns of tiny dots. This allows the printer to print many special characters, different
sizes of prints, and enables it to print graphics such as charts and graphs. Ink-jet printers
typically print with a resolution of 600 dpi or more. Due to the high resolution, these printers
produce high quality graphics and text printouts. They are also affordable, which appeals to
small businesses and home offices. These printers print documents at a medium pace but slow
down if printing a document with multi-colours. These printers can print about six pages a
minute and can be programmed to print symbols such as Japanese or Chinese characters.
How does an ink-jet printer work? An ink-jet printer places extremely small droplets
of ink onto the paper to create a character or an image. It has a print cartridge with a small series
of electrically heated chambers. These chambers are attached to the print head with a series of
small nozzles that spray ink onto the surface of the paper. As the print head moves back and forth
across the page, the software gives instructions regarding the type and the quantity of colours.
It also tells the position where the dots of ink should be “sprayed”. There are two main ways
to drop the ink droplets, namely, the bubble-jet and piezoelectric technology (see Figure 4.35).
Bubble-jet printers use heat to fire ink onto the paper. There are three main stages with this
method. The squirt is initiated by heating the ink to create a bubble until the pressure forces it to
burst and hit the paper. The bubble then collapses as the element cools, and the resulting vacuum
draws ink from the reservoir to replace the ink that was ejected. Piezoelectric technology uses
a piezo crystal at the back of the ink reservoir. It flexes when an electric current flows through
it. Therefore, whenever a dot is required, a current is applied to the piezo element, the element
contracts and in doing so forces a drop of ink out of the nozzle.
Laser Printer: A laser printer provides the highest
quality text and images for personal computers today
(see Figure 4.36). It is a very fast printer, which operates on
the same principle as that of a photocopy machine. Most laser
printers can print text and graphics with a very high quality
resolution. They are also known as page printers because
they process and store the entire page before they actually
print it. They produce sharp, crisp images of both text and
graphics, providing resolutions from 300 to 2400 dpi. Today,
the resolution of most printers is 600 dpi. They are quiet and Figure 4.36 Laser Printer
fast, are able to print 4–32 text-only pages per minute for individual microcomputers and up
to 200 pages per minute for mainframes. Laser printers can print in excess of 2000 lines per
minute. Furthermore, they can print in different fonts, that is, type styles and sizes. Laser
printers are often faster than ink-jet printers but are more expensive to buy and maintain than
the other printers. The cost of these printers depends on a combination of costs of paper,
toner replacement, and drum replacement. These printers are useful for volume printing
because of their speed.
How does a laser printer work? The core component of laser printing system is the
photoconductive drum. A rotating mirror inside the printer causes a beam of laser to sweep
across the photoconductive drum. Initially, the beam of laser charges the photoconductive drum
positively. When the charged photoconductor is exposed to an optical image through a beam
of light to discharge, a latent or invisible image is formed. At the point where the laser strikes
the surface of the drum, it creates a dot of positive charge. These points are represented by
black dots, which will be printed on the paper. After this, the printer coats the drum with a
container, which contains a black powder called toner. This toner is negatively charged, and
so it clings to the positive areas of the drum surface. When the powder pattern gets fixed, the
drum is rotated and the paper is fed into the drum surface via a pressure roller. This pressure
roller transfers the black toner onto the paper. Since the paper is moving at the same speed as
the drum, the paper picks up the image pattern precisely. Finally, the printer passes the paper
through the fuser, a pair of heated rollers. As the paper passes through these rollers, the loose
toner powder gets melted and fuses with the fibres in the paper. The paper is then brought out
of the printer (see Figure 4.37).
Paper Exit
THINGS TO REMEMBER
making vector graphics, that is, images a different colour to make an entire image.
created by a series of many straight Vector graphics, on the other hand, are not
lines. It is used to draw high-resolution constricted to a grid format. Such graphics are
charts, graphs, blueprints, maps, given instructions by the computer about how the
circuit diagrams and other line-based objects should be shaped and their relative size,
diagrams. It is similar to a printer, but making them resolution-independent. Hence,
it draws lines using a pen. As a result, it they are readily scaleable without distortion.
can produce continuous lines, whereas Vector images are used for charts and graphs,
a printer can only simulate lines by and other graphics that must have sharp lines
printing a closely spaced series of dots. when scaled to various sizes. Raster images are
Multicolour plotter uses different- used for creating subtle gradations of shades
coloured pens to draw different colours. and colour such as in a photograph.
Colour plots can be made by using four
pens (cyan, magenta, yellow and black) and need no human intervention to change them.
Being vector-based, a plotter tends to draw much crisper lines and graphics. The lines drawn
by these devices are continuous and very accurate. However, the plotter is considered a very
slow output device because it requires excessive mechanical movement to plot. Furthermore,
How does a plotter work? The heart of the plotter is the printer head assembly,
consisting of a horizontal bar and the pen in use, attached to the head assembly holding
(see Figure 4.40). The pen can be positioned horizontally by moving the pen assembly
along the bar. Vertical positioning is achieved by either moving the bar (flatbed plotter) or
the paper (drum plotter). Combinations of horizontal and vertical movement are used to
draw arbitrary lines and curves in a single action, in contrast to printers, which usually scan
horizontally across the page. Plotters create plots by moving a pen under computer control
over a drafting paper. The instructions that a plotter receives from a computer consist of
a colour and beginning and end coordinates for a line. When an image is to be drawn, a
specially designed holder picks up a pen and takes it over to the start position. The pen is
pushed down onto the paper and dragged over the surface to produce straight or curved
lines. If the product is to be in colour, the pen is then replaced with a new pen. The process
continues until the image is complete.
Magnetic
Tape
Microfilm
Reader
Tape
Drive
COM
Recorder
Roll
Fiche
Film
Processor
4.3.4 Monitor
The monitor is the most frequently used
output device for producing soft-copy
output. A computer monitor is a TV-
like display attached to the computer
on which the output can be displayed
and viewed. The computer monitor can
either be a monochrome display or a
colour display. A monochrome screen
uses only one colour (usually white, Figure 4.43 Aspect Ratio and Screen Size
green, amber or black) to display text
on contrasting background. Colour screens commonly display 256 colours at one time from
a selection of over 256,000 choices. Monitors are available in various sizes like 14, 15,
17, 19 and 21 inches. The size of the display is described based on two parameters: aspect
ratio and screen size (see Figure 4.43). Aspect ratio is the ratio of the width of the display
screen to the height, that is, the ratio of vertical points to the horizontal points necessary to
produce equal-length lines in both directions on the screen. Generally, computer displays
have an aspect ratio of 4:3. Like televisions, screen sizes are normally measured diagonally
(in inches), the distance from one corner to the opposite corner.
Sometimes, while watching television, you may notice that the picture looks a bit
blurred. The reason behind this is that the displayed image is not solid but is created by the
configurations of dots. These dots are known as picture elements, pels, or simply pixels. The
golden rule of a sharp image is that the more the pixels, the sharper the picture. The screen
clarity depends on three basic qualities:
Resolution: It refers to the number of pixels in the horizontal and vertical directions
on the screen. In medium-resolution graphics, pixels are large, whereas in high-
resolution graphics, pixels are small. The average CRT display is currently 800 × 600
or 1024 × 768. The more dots, or pixels, available to create the image, the sharper
it will be. Therefore, a resolution of 1024 × 768 will produce sharper images (for
example, smaller icons and more information) than one of 640 × 480.
Dot Pitch: It is the measurement of the
diagonal distance between two like-coloured
(red, green or blue) pixels on a display
screen. It is measured in millimetres and
common dot pitches are .51 mm, .31 mm,
.28 mm, .27 mm, .26 mm and .25 mm. The
smaller the dot pitch, the sharper will be
the image when displayed on the monitor.
Generally, a dot pitch of less than .31 mm
provides clear images. Multimedia and
Figure 4.44 Dot Pitch desktop-publishing users typically use
.25 mm dot-pitch monitors (see Figure 4.44).
Refresh Rate: It is the number of times per second the pixels are recharged so that
their glow remains bright. Normally, screen pixels are made from phosphor. An
electron beam strikes the phosphor and causes it to emit light, resulting in the display
of the image. However, it needs to be refreshed periodically because the phosphors
hold their glow for just a fraction of a second. The refresh rate for a monitor is
measured in Hertz (Hz) and varies from 60 to 75 Hz. A refresh rate of 60 Hz means
image is redrawn 60 times a second. The higher the refresh rate, the more solid the
image looks on the screen, that is, it does not flicker.
Colour Depth: Colour depth, also referred to as bit depth, refers to the number of bits
assigned to each pixel in the image and the number of colours that can be created from those
bits. In simple words, it refers to the number of colours that a monitor can display. Different
colour depths depend on the amount of display memory dedicated to each pixel. One byte is
used to represent 256 colours for each pixel, 16 bits (or 2 bytes) per pixel allows up to 65535
colours, and 24-bit (or 3 bytes) colour can display 16.8 million different colours per pixel.
8-bit colour is better known as pseudo colour, 16-bit mode as high colour, and 24-bit mode
is called true colour. A video display unit consists of a video card or adapter that is fitted
into an expansion slot and a compatible visual display, which is compatible with the video
adapter. The combination of the display modes supported by the graphics adapter and the
colour capability of the monitor determine how many colours can be displayed.
Cathode Ray Tube Monitors: Nowadays, most computer monitors are based on
cathode ray ube (CRT ) technology. The basic operation of these tubes is similar to that in
television sets. Figure 4.45 illustrates the basic components of a CRT.
A beam of electrons (cathode rays) emitted by an electron gun passes through focusing
and deflection systems that direct the beam toward specified positions on the phosphor-coated
screen. The phosphor then emits a small spot of light at each position contacted by the beam.
When the electron beam strikes the phosphors, the light is emitted for a short period of time,
this condition is known as persistence. Technically, persistence is defined as the time it takes for
the emitted light from the screen to decay to 1/10 of its original intensity. Graphics monitors are
usually constructed with persistence in the range of 10–60 microseconds. Since the light emitted
by the phosphor fades very rapidly, some method is needed for maintaining the screen picture.
One way to keep the phosphor glowing is to redraw the picture repeatedly by quickly directing
the electron beam back over the same points. This type of display is called a refresh CRT.
The primary components of an electron gun in a CRT are the heated metal cathode and a
control grid. Heat is supplied to the cathode by directing a current through a coil of wire, called
the filament, inside the cylindrical cathode structure. This causes electrons to be “boiled off ”
the hot cathode surface. In the vacuum inside the CRT envelope, the free, negatively charged
electrons are then accelerated toward the phosphor coating by a highly positive voltage. The
accelerating voltage can be generated with a positively charged metal coating on the inside
of the CRT envelope near the phosphor screen, or an accelerating anode can be used, as in
Figure 4.45. Note that sometimes the electron gun is built to contain the accelerating anode
and focusing system within the same unit.
Before reaching the phosphor-coated screen, the electrons have to be passed through the
monitor’s focusing system. The focusing system is initially set up to focus the electron flow
into a very thin beam and then in a specific direction. Focusing can be accomplished either by
electric or by magnetic fields.
When the electrons in the beams collide with the phosphor coating, their kinetic energy is
absorbed by the phosphor. Some of this energy is converted into heat while rest of the energy
causes the electrons in the phosphors to move up to the higher energy levels. After this, when
these electrons begin to return to the ground state, they emit light at certain frequencies. These
frequencies are proportionate to the energy difference between the higher state and the ground
state. As a result, the image, which we see on the screen, is the combination of all the electron
light emissions.
Displaying Graphics on a CRT: Nowadays, two classes of computer graphic display
are used: raster scan and random scan display.
Raster Scan Display: In this system, the electron beam is swept across the screen one
row at a time from top to bottom. As the electron beam moves across each row, the beam
intensity is turned ON and OFF to create a pattern of illuminated spots. The picture
definition is stored in a memory area called the refresh buffer or frame buffer, which
holds the set of intensity values for all the screen points. These values are then retrieved
from the refresh buffer and “painted” on the screen one row (scan line) at a time. At the
end of each scan line, the electron beam returns to the left side of the screen to begin
displaying the next scan line. The return to the left of the screen, after refreshing each
scan line, is called the horizontal retrace of the electron beam. At the end of each frame,
the electron beam returns to the top left corner of the screen to begin the next frame.
This is known as vertical retrace (see Figure 4.46). On some raster-scan systems, each
frame is displayed in two passes using an interlaced refresh procedure. In the first pass,
the beam sweeps across every other scan line from top to bottom. Then after the vertical
retrace, the beam sweeps out the remaining scan lines. Interlacing of the scan lines in this
way allows us to see the entire screen displayed in half the time it would have taken to
sweep across all the lines at once from top to bottom. This is an effective technique for
avoiding flicker, provided that adjacent scan lines contain similar display information.
Random Scan Display: In this system, a CRT has the electron beam directed only
to the parts of the screen where a picture is to be drawn. Random scan monitors
draw a picture one line at a time, and for this reason are referred to as vector, stroke-
writing, or calligraphic displays. The component lines of a picture can be drawn and
refreshed by a random scan system in any specified order. Refresh rate on a random
scan system depends on the number of lines to be displayed. Picture definition is
stored as a set of line-drawing commands in an area of memory referred to as the
refresh display file. To display a specified picture, the system cycles through the set
of commands in the display file, drawing each component line in turn. After all line
drawing commands have been processed, the system cycles back to the first line
command in the list. Random scan systems are designed for line drawing applications.
They cannot display realistic shaded scenes.
Colour display on a CRT A CRT monitor displays colour pictures by using a
combination of phosphors that emit different coloured light. By combining the emitted light
from the different phosphors, a range of colours can be generated. The two basic techniques
for producing colour displays with a CRT are:
Beam Penetration: The beam-penetration method for displaying colour pictures is
commonly used with random scan displays. In this system, two layers of phosphor
(usually red and green) are coated on the inner side of the CRT screen. The displayed
colour depends on how far the electron beam penetrates into the phosphor layers. A beam
of slow electrons excites only the outer red layer while a beam of very fast electrons
penetrates through the red layer and excites the inner green layer. At intermediate beam
speeds, combinations of red and green light are emitted to show two additional colours—
orange and yellow. The speed of the electrons, and hence the screen colour at any point,
is controlled by the beam-acceleration voltage. Beam penetration is an inexpensive
way to produce colour in random scan monitors. However, with this method, only four
colours are possible, and the quality of pictures is not as good as other methods.
Shadow Masking: Shadow-mask method is commonly used in raster scan systems
because it produces a much wider range of colours than the beam-penetration method.
A shadow-mask CRT has three
phosphor colour dots at each pixel
position. One phosphor dot emits
a red light, another emits a green
light and the third emits a blue light.
This type of CRT has three electron
guns, one for each colour dot, and
a shadow-mask grid just behind
the phosphor-coated screen. Three
electron beams are deflected and
focused as a group onto the shadow
mask, which contains a series of
holes aligned with the phosphor-dot
patterns. When the three beams pass Figure 4.47 Shadow Masking
through a hole in the shadow mask,
they activate a dot triangle, which appears as a small colour spot on the screen. The
phosphor dots in the triangles are arranged so that each electron beam can activate only
its corresponding colour dot when it passes through the shadow mask (see Figure 4.47).
Colour variations in a shadow-mask CRT can be obtained by varying the intensity levels
of the three electron beams. For example, a white (or grey) area is the result of activating all
three dots with equal intensity. Yellow is produced with the green and red dots only, magenta is
produced with the blue and red dots, and cyan is displayed when blue and green are activated
equally.
Liquid Crystal Display Monitors: In the previous section, we discussed the most
popular CRT monitors that are used as display devices. With the widespread use of smaller
computers like PDAs and laptops, a new type of display, Liquid Crystal Display (LCD), has
made a big impact on the computer market. LCD screens have been used for long on notebook
computers but are also becoming popular as desktop monitors.
The term liquid crystal sounds like a contradiction. We generally conceive a crystal as a
solid material like quartz and a liquid as water-like fluid. However, some substances can exist in
an odd state that is semi-liquid and semi-solid. When they are in this state, their molecules tend to
maintain their orientation like the molecules in a solid, but also move around to different positions
like the molecules in a liquid.
Thus, liquid crystals are neither a
solid nor a liquid. Manufacturers
use this amazing ability of liquid
crystals to display images.
An LCD screen is a collection
of multiple layers as shown in
Figure 4.48. A fluorescent light
source, known as the backlight,
makes up the rearmost layer. Light
passes through the first of two
polarizing filters. The polarized
light then passes through a layer
that contains thousands of liquid
crystal blobs aligned in tiny
containers called cells. These cells
are aligned in rows across the
Figure 4.48 Coloured Liquid Crystal Screen
screen; one or more cells make up
one pixel. Electric leads around the edge of the LCD create an electric field that twists the crystal
molecule, which lines the light up with the second polarizing filter and allows it to pass through.
The process illustrated in Figure 4.47 is followed for a simple monochrome LCD.
However, colour LCD is more complex. In a coloured LCD panel, each pixel is made up of
three liquid crystal cells. In front of each of these cells, there is a red, green or blue filter. Light
passing through the filtered cells creates the colours on the LCD. Nowadays, nearly every
colour LCD uses a thin-film transistor (TFT), also known as an active matrix, to activate each
cell (see Figure 4.49). TFT-based LCD creates sharp, bright images as compared to previous
LCD technologies. The oldest of the matrix technologies, passive-matrix, offers sharp text
but leaves “ghost images” on the screen when the display changes rapidly, making it less than
optimal for moving video.
Polarizing Filters
Polarizing Filters
screen. The fastest LCD monitors today have a response time of 25 milliseconds,
which is still only about half the speed of a CRT monitor.
Viewing Angle: CRT can be viewed at almost any angle but LCD is best viewed
“head on”. Even when viewing an LCD head on, narrow viewing angles can appear
to have inconsistent colour and brightness.
Viewing Area: The viewing area of a CRT is usually less than its advertised area.
Most 19-inch CRT monitors, for example, typically have about 18 inches of viewable
area. However, the LCD monitors are measured exactly, that is, if a LCD monitor is
advertised as 17.4 inch, it is the same.
Cost: Prices for LCD screens are quite high but they are coming down. They are still
much more costlier than CRT.
Other Types of Monitors: Although CRT and LCD displays are the most commonly
used, other kinds of displays also exist. Some of them are as follows:
Plasma Display: A plasma display (also known as thin-panel) is constructed by
filling a gas (neon or xenon) between the two glass plates. One glass plate consists of
vertical conductors and the other consists of horizontal conductors. When the voltage
is applied to the pair of horizontal and vertical conductors, the gas at the intersection
of two conductors glows. The advantage of plasma display is that it has the capability
of producing more than 16 million colours and is lighter and less bulky than CRT.
However, it is heavier than LCD display and requires more power.
Thin-film Electroluminescent Display: This display is similar to the plasma display
except the fact that the space between the glass plates is filled with phosphorescent
substance (usually zinc sulfide doped with manganese) instead of gas. When high
voltage is applied to the crossing conductors, the phosphoric substance at the intersection
of two conductors becomes conductor and generates the electrical energy. This energy
is absorbed by the manganese atoms and then released as a spot of light. The main
problem with thin-film electroluminescent displays is that they require more power.
(DMD) chip that has thousands of tiny mirrors, each representing a single pixel. These
mirrors tilt back and forth, directing the light either into the lens path to turn the pixel
ON, or away from the lens path to turn it OFF and create the image (see Figure 4.52).
DLP is a newer technology than LCD and is used on some of the smallest, lightest
projectors currently available. DLP projectors handle video images extremely well.
Let Us sUmmarize
1. An input device is an electromechanical device that accepts data or information from the
user and translates the information into a form which the computer can interpret.
2. Keyboards are the most commonly used data entry devices. By pressing down the keys of
the keyboard, data are entered into the computer.
3. Pointing devices are the input devices by which we can point out and select items rapidly
from the multiple options displayed on the screen. These devices can also be used to create
graphic elements on the screen such as lines, curves and freehand shapes. The common types
of pointing devices available are the mouse, trackball, joysticks, touch screens and light pens.
4. Mouse is a small hand-held pointing device which can be used to input commands or
information. It contains two or three buttons and by pressing one of the buttons, the
mouse either marks a place on the screen or makes selections from the data on the screen.
Common types of mouse action available are pointing, click, double-click, right-click
and drag and drop.
5. A trackball is an upturned mouse, with a movable ball on the top of a stationary base. It
is used to control the cursor movements and the actions on a computer screen. It allows
the user to perform each of these tasks separately.
6. Joystick is a device that moves in all directions and controls the movement of the pointer.
It activates the computer with different parts and is used to control the cursor on the screen.
7. Using a light pen, one can select the objects on the monitor by directly pointing to the
objects. It is useful for identifying a specific location. Since the light pen is a passive device
with a sensor only, it provides no information when held over a blank part of the screen.
8. A touch screen is a type of display screen device that is placed on the computer monitor in
order to allow direct selection or activation of the computer when somebody touches the
screen. It registers the input when a finger or other object touches the screen. It consists
of three main components: a touch sensor, a controller and a software driver.
9. Trackpad (also referred to as touchpad) is a stationary pointing device that works by
sensing the movement of fingers across a small sensitive surface (1.5 or 2 inches) and
translating them into the pointer movement on the screen.
10. Speech recognition is the technology by which sounds, words or phrases spoken by
humans are converted into digital signals, and these signals are transformed into coding
patterns where the meaning has been assigned. It is more generally called as sound
recognition.
11. Digital camera records images in an electronic form, that is, the image is represented in
computer’s language of bits and bytes. It is a long string of 1s and 0s that represent all the
tiny coloured dots or pixels that collectively make up the image.
12. A webcam is a portable video camera, which captures live video or images that may be
viewed in real time over the network or the Internet.
13. A scanner is a device that scans an image and transforms the image to ASCII codes.
These images can be edited, manipulated, combined and then printed. The common types
of scanners are: handheld and flatbed.
14. The optical character recognition (OCR) software translates the bitmap image of text to
the ASCII codes that the computer can interpret as letters, numbers and special characters.
15. The optical mark recognition (OMR) is the process of detecting the presence of intended
marked responses. A mark registers significantly less light than the surrounding paper.
Optical mark reading is done by a special device known as optical mark reader.
16. A magnetic ink character reader (MICR) is used to recognize the magnetic ink characters;
it reads the characters by examining their shapes in a matrix form.
17. Bar codes are machine-readable codes, represented in parallel vertical lines with varying
widths. By the combination of these vertical lines (bars) and the spacing between them,
bar codes represent the alphanumeric data. For reading these bar-coded data, a device is
used, which is known as a bar code reader.
18. An output device is an electromechanical device, which converts machine-readable data
or information into human-readable form. The printed form of output is referred to as
hard copy while the form of output displayed on the screen is referred to as soft copy.
19. Based on the hard copy and soft copy outputs, the output devices are classified into:
hard copy and soft copy output devices. Printers, plotters and microfilms are the most
commonly used hard copy output devices while monitors, voice response systems,
projectors, electronic whiteboards, and headphones and headsets are some commonly
used soft copy output devices.
20. A printer is a device that prints information from the computer on to paper. The two
major categories of printer technologies are impact printers and non-impact printers.
21. An impact printer forms characters and graphics on a piece of paper by striking a
mechanism against an ink ribbon that comes into physical contact with the paper. It
includes dot matrix printers, daisy wheel printers and drum printers.
22. Printers that form characters and images without making direct contact between printing
mechanism and paper are called non-impact printers. They are categorized as ink-jet
printers and laser printers.
23. Hybrid document reproduction apparatus (HYDRA) printer, popularly known as all-in-one
printer, is a device that consolidates the capabilities of multiple devices in one machine. It
may include some or all of the devices like printer, scanner, photocopier and fax machine.
Plotters are special-purpose drawing devices, which reproduce graphic images on paper using
a pen whose movements are controlled by the computer. The lines drawn by these devices are
continuous and very accurate. Plotters are classified as pen plotters and electrostatic plotters.
24. Computer output microfilm is an extremely high-speed, low-cost process, which records
computer-generated information directly from the computer tape or cartridge to a
miniaturized microfilm media. The microfilm product is in fiche or roll format, which can
be duplicated rapidly and inexpensively.
25. Computer monitor is used to display the keyed data on the screen and to receive messages
and processed information from the computer.
26. Cathode ray tube (CRT ) is the most common type of monitor for the office and the home. In
a CRT, an electron gun is used which fires electrons at groups of phosphor dots coating the
inside of the screen. When the electrons strike the phosphor dots, they glow to give the colours.
27. In liquid crystal display (LCD) screen, the backlight passes through the first of two
polarizing filters. The polarized light then passes through a layer that contains thousands
of liquid crystal blobs aligned in tiny containers known as cells. Electric leads around the
edge of the LCD create an electric field that twists the crystal molecule, which lines the
light up with the second polarizing filter and allows it to pass through.
28. Although CRT and LCD displays are the most commonly used, other kinds of displays
also exist. Two of them are plasma display and thin-film electroluminescent display.
29. The standard computer system can talk with the addition of two components: a speech
synthesizer and a screen reading software. A speech synthesizer is a software that converts
text information into spoken sentences. Screen reading software enables the user to control
the synthesizer. It allows a user to access, or view text that is present on the screen.
30. Screen image projector is an output device, which is used to project information from a
computer on to a large screen, so that it can be simultaneously viewed by a large group of
people. Projectors are mainly of two types: LCD projectors and DLP projectors.
31. Electronic whiteboard is an interactive presentation device that works electronically to
display digital images, drawings, and text in different colours. The whiteboard is generally
mounted on the wall and is connected to a computer (through USB, serial port or wireless
technology like Bluetooth) and projector.
32. Headphone is an audio device equipped with a pair of speakers which are attached via
a headstrap worn by the users. A headset is a combination of one or two speakers and a
microphone with both the speakers and the microphone attached to a headstrap.
33. Computer terminals, also called as display or video display terminals, enable a computer
to receive or deliver data through input and output devices, respectively.
exercises
Multiple-choice Questions
1. ......................... is the most commonly used input device.
(a) Keyboard (b) Mouse
(c) Joystick (d) Scanner
2. Mouse, trackball and joystick are the examples of .........................
(a) Scanning devices (b) Storing devices
(c) Pointing devices (d) Multimedia devices
3. Which of the following is not a computer terminal?
(a) Intelligent (b) Smart
(c) Both (a) and (b) (d) None of these
4. Which of the following technique is best suited for bank cheques?
(a) OCR (b) OMR
(c) BAR (d) MICR
5. Choose the most suitable device among the following for playing computer games.
(a) Hand-held scanner (b) Joystick
(c) Optical Mark Reader (d) Digital Camera
6. Light pen is frequently used in .........................
(a) Computer Aided Design (b) Word Processing
(c) Presentation (d) Spreadsheet
7. Choose the odd one out.
(a) QWERTY (b) SULTRY
(c) AZERTY (d) DVORAK
8. Which of the following is not a pointing device?
(a) Scanner (b) Trackball
(c) Light Pen (d) Mouse
9. Which of the following is not an output device?
(a) Printer (b) Keyboard
(c) Monitor (d) Plotter
10. With the combinations of ........................., ......................... and ......................... colours,
other colours can be shown.
(a) Red, Black, Blue (b) Yellow, Blue, Green
(c) Red, Blue, Green (d) Black, White, Yellow
11. Which of the following is used for both input and output?
(a) Computer Terminals (b) Pen Plotter
(c) Dot Matrix Printer (d) None of these
Descriptive Questions
1. Why are input and output devices necessary for a computer system?
2. What are pointing devices? Discuss some of the commonly used pointing devices.
3. What is a touch screen device? Explain with their advantages and disadvantages and give
some typical applications for which touch screen is most suitable as an input device.
4. What is a speech recognition system? Explain its types and give logical reasons. Why do
currently available speech recognition devices have limited success?
5. What do you mean by optical scanning devices? Explain any four such devices.
6. Explain the different types of printers. Make a clear difference between them in terms of
speed, cost and method of operation, and suggest suitable applications.
7. Describe the application areas where plotters are useful. Discuss the various types of
plotters.
8. What is speech synthesizer? How does it function? Give some of its typical applications.
9. What is LCD? Differentiate between CRT and LCD monitors.
10. Write short notes on the following:
(a) Resolution (b) Aspect ratio
(c) Dot pitch (d) Refresh rate
(e) Colour depth
ANSWERS
Multiple-choice Questions
1. (a) 2. (c) 3. (c) 4. (d) 5. (b) 6. (a) 7. (b) 8. (a)
9. (b) 10. (c) 11. (a) 12. (c) 13. (a) 14. (d) 15. (d)
Operating System
CHAPTER OBJECTIVES
5.1 INTRODUCTION
In the early days of computer use, computers were huge machines, which were expensive to buy,
run and maintain. The user at that time interacted directly with the hardware through machine
language. A software was required which could perform basic tasks such as recognizing input
from the keyboard, sending output to the display screen, keeping track of files and directories
on the disk, and controlling peripheral devices such as printers and scanners. The search for
such software led to the evolution of modern day operating system (OS). This software is
loaded onto the top of memory and performs all the aforesaid basic tasks. Initially, the OS’s
interface was only character-based. This interface provides the user with a command prompt
and the user has to type all the commands to perform various functions. As a result, the user
had to memorize many commands. With the advancement in technology, OS became even
more user friendly by providing graphical user interface (GUI). The GUI-based OS allows
the user to interact with the system using visual objects such as windows, pull-down menus,
mouse pointers and icons. Consequently, operating the computer became easy and intuitive.
THINGS TO REMEMBER
can also be referred to as the basic unit of lifetime where each state indicates the current
a program that the OS deals with, with the activity of the process. These states are as follows:
help of the processor. For example, a text New: The process is being created.
editor program running on a computer is a Ready: The process is ready to be assigned
process. This program may cause several to the processor.
other processes to begin—like it can
Running: The process is being executed.
furnish a request for printing while editing
the document. Thus, we can say that the Waiting: The process is waiting for signal
text editor is a program that initiates two from some other process.
processes—one for editing the text and Terminated: The process has finished its
second for printing the document. execution.
Hence, a process is initiated by the
program to perform an action, which can be controlled by the user or the OS. A process in order
to accomplish a task needs certain resources like CPU time, memory allocation and I/O devices.
Therefore, the idea of process management in an OS is to accomplish the process assigned by the
system or the user in such a way that the resources are utilized in a proper and efficient manner.
Life Cycle of a Process: The OS is responsible for managing all the processes that
are running on a computer and allocating each process a certain amount of time to use the
processor. In addition, the OS also allocates various other resources that processes need during
Step 9 The calculator process then attains the running state by the scheduler and when
finished, is terminated.
Step 10 Then the text editor process again enters in the running state from the ready state.
Threads: A thread is a task that runs
concurrently with other tasks within the Multithreading
same process. Also known as lightweight Writing a program where a process creates
process, a thread is the simplest unit of a multiple threads is called multithread
process. The single thread of control allows programming. It is the ability by which an
FACT FILE
the process to perform only one task at OS is able to run different parts of the same
one time. An example of a single thread in program simultaneously. It offers better
a process is a text editor where a user can utilization of processor and other system
either edit the text or perform any other resources. For example, word processor
task like printing the document. In a multi- makes use of multithreading—it can check
tasking OS, a process may contain several spelling in the foreground as well as save a
threads, all running at the same time inside document in the background.
the same process. It means that one thread
of a process can be editing the text while another is printing the document. Generally, when a
thread finishes performing a task, it is suspended or destroyed.
Uniprogramming and Multiprogramming: As the name implies, uniprogramming
means only one program at a time. In uniprogramming, users can perform only one activity
at a time. In multiprogrammed systems, multiple programs can reside in the main memory at
the same time. These programs can be executed concurrently, thereby requiring the system
resources to be shared among them. In multiprogrammed systems, an OS must ensure that all
processes get a fair share of CPU time.
Process Scheduling: In a multiprogrammed system, at any given time, several processes
will be competing for the CPU’s time. Thus, a choice has to be made as to which process
to allocate the CPU next. This procedure of determining the next process to be executed
on the CPU is called process scheduling and the module of OS that makes this decision is
called scheduler. The prime objective of scheduling is to switch the CPU among processes so
frequently that users can interact with each program while it is running.
For scheduling purposes, there exist different queues in the system: job queue, ready
queue and device queue. As the processes enter the system for execution, they are kept in the
job queue (or input queue) on a mass storage device such as hard disk. From the job queue,
the processes which are ready for execution are brought into the main memory. In the main
memory these processes are kept in the ready queue. In other words, the ready queue contains
all those processes that are waiting for the CPU. For each I/O device attached to the system, a
separate device queue is maintained. The process that needs to perform I/O during its execution
is kept into the queue of that specific I/O device and waits there until it is served by the device.
Depending on the level of scheduling decisions to be made, the following types of
schedulers may coexist in a complex OS:
Long-term Scheduler: Also known as job scheduler or admission scheduler, it works
with the job queue. It selects the next process to be executed from the job queue and
Process N Process 1
Process 2
is allocated to a process, it cannot be taken back until the process voluntarily releases it (in
case the process has to wait for I/O or some other event) or until the process terminates. Thus,
the main difference between the two schemes is that in the preemptive scheme, the OS has the
control over the process current states whereas in the case of the non-preemptive scheme, the
process once entered in to the running state gets the full control of the processor.
The scheduler uses some scheduling procedure to carry out the selection of a process for
execution. Two popular scheduling procedures implemented by different OSs are first-come-
first-served and round robin scheduling.
First-come-first-served (FCFS): As the name suggests, in FCFS, the processes are
executed in the order of their arrival in the ready queue, which means the process that
enters the ready queue first, gets the CPU first. To implement the FCFS scheduling
procedure, the ready queue is managed as a FIFO (first-in first-out) queue. Each time
the process at the start of queue is dispatched to the processor, all other processes
move up one slot in the queue as illustrated in Figure 5.5. When new processes arrive,
they are put at the end of the queue. FCFS falls under non-preemptive scheduling and
its main drawback is that a process may take a very long time to complete, and thus
holds up other waiting processes in the queue.
Round Robin: Round robin scheduling was designed keeping in mind the limitations
of the FCFS scheduling procedure. This procedure falls under preemptive scheduling,
in which a process is selected for execution from the ready queue in FIFO sequence.
However, the process is executed only for a fixed period known as time slicing or quantum
period after which it is interrupted and returned to the end of the ready queue (see
Figure 5.6). In the round robin procedure, processes are allocated CPU time on a turn basis.
Nowadays, it is common in OSs for processes to be treated according to priority. This
may involve a number of different queues and scheduling mechanisms using priority based on
Process N Process 1
Process 2
previous process activity. For example, the time required by the process for execution or how
long it has been, since it was last executed by the processor.
the CD drive and later for the printer, before releasing both resources. On the other
hand, process Q might request first for the printer and the CD drive later. With this
knowledge in advance, the OS will never allow allocation of a resource to a process
if it leads to a deadlock, thereby avoiding the deadlock.
memory. For example, consider a program that initiates different processes. If the memory manager
allocates the same portion of memory to all the processes instead of different memory allocations
to different processes, a lot of memory is saved. Therefore, the memory protection routine of the
OS should allow controlled sharing of the memory among different processes without letting them
breach the protection criteria. If a process attempts to modify the contents of memory locations that
do not belong to it, the memory protection routine intervenes and usually terminates the program.
Memory Allocation: In uniprogramming systems, where only one process runs at a time,
memory management is very simple. The process to be executed is loaded into the part of
memory space that is unused. Early MS-DOS systems support uniprogramming. The main
challenge of efficiently managing memory comes when a system has multiple processes
running at the same time. In such a case, the memory manager can allocate a portion of primary
memory to each process for its own use. However, the memory manager must keep track of
the running processes along with the memory locations occupied by them, and must also
determine how to allocate and de-allocate available memory when new processes are created
and old processes have finished their execution, respectively.
While different strategies are used to allocate space to processes competing for memory,
three of the most popular are as follows:
Best Fit: In this case, the memory manager places a process in the smallest block of
unallocated memory in which it will fit. For example, a process requests 12 KB of
memory and the memory manager currently has a list of unallocated blocks of 6 KB,
14 KB, 19 KB, 11 KB and 13 KB blocks. The best fit strategy will allocate 12 KB of
the 13 KB block to the process.
First Fit: The memory manager places the process in the first unallocated block that
is large enough to accommodate the process. Using the same example to fulfil the
12 KB request, first fit will allocate 12 KB of the 14 KB block to the process.
Worst Fit: The memory manager places a process in the largest block of unallocated
memory available. To furnish the 12 KB request again, worst fit will allocate 12 KB
of the 19 KB block to the process, leaving a 7 KB block for future use.
Figure 5.9 illustrates that in best fit and first fit strategies, the allocation of memory results
in the creation of a tiny fragment of unallocated memory. Since the amount of memory left is
small, no new processes can be loaded here. This job of splitting primary memory into segments
as the memory is allocated and de-allocated to the processes is known as fragmentation. The
worst fit strategy attempts to reduce the problem of fragmentation by allocating the largest
fragments to the new processes. Thus, a larger amount of space in the form of tiny fragments
is left unused. To overcome this problem, the concept of paging was introduced.
Paging Paging is a memory
management scheme that allows the Physical and Logical Address
processes to be stored non-contiguously Every byte in memory has a specific address
in the memory. The memory is divided known as physical address. Whenever a program
THINGS TO REMEMBER
into fixed size chunks called page frames. is brought into the main memory for execution,
The OS breaks the program’s address it occupies certain memory locations. The set of
space (the collection of addresses used all physical addresses used by the program is
by the program) into fixed-size chunks known as its physical address space. However,
called pages, which are of the same size before execution, a program is compiled to run
as that of the page frames. Generally, a starting from some fixed address and accordingly
page size is of 4 KB. However, some all the variables and procedures used in the
systems support even larger page sizes program are assigned some specific address
such as 8 KB, 4 MB, etc. When a known as logical address. The set of all logical
process is to be executed, its pages are addresses used by the program is known as its
loaded into unallocated page frames (not logical address space.
necessarily contiguous).
Each address generated by the CPU (that is, logical address) is divided into two parts:
page number (high-order bits) and a page offset or displacement (low-order bits). Since the
logical address is a power of 2, the page size is always chosen as a power of 2 so that the logical
address can be converted easily into page number and page offset. To map the logical addresses
to physical addresses in memory, a mapping table called page table is used. The OS maintains
a page table for each process to keep track of which page frame is allocated to which page. It
stores the frame number allocated to each page and the page number is used as the index to the
page table. Figure 5.10 shows the logical memory, page table and physical memory.
Now let us see how address translation is performed in paging. To map a given logical
address to the corresponding physical address, the system first extracts the page number and
the offset. The system, in addition, also checks whether the page reference is valid (that is, it
exists within the logical address space of the process). If the page reference is valid, the system
uses the page number to find the corresponding page frame number in the page table. That
page frame number is attached to the high-order end of the page offset to form the physical
address in memory. The mechanism of translation of logical address into physical address is
shown in Figure 5.11.
The main advantage of paging is that it minimizes the problem of fragmentation since
the memory allocated is always in fixed units and any free frame can be allocated to a process.
Concept of Virtual Memory: A process executes only in the main memory, which is
limited in size. Today, with the advent of graphic-oriented applications like 3D video games,
business applications and so on, a user requires a larger memory than the main memory for
running such applications. Note
that it is not essential that the
whole program must be loaded in
the main memory for processing
as only the currently referenced
page needs to be present in the
memory at the time of execution.
Therefore, the rest of the pages of
the program can reside in a hard
disk portion allocated as virtual
memory and can be loaded into the
Figure 5.12 Virtual Memory main memory whenever needed.
This process of swapping the
pages from the virtual memory to the main memory is called page-in or swap-in. With virtual
memory, the system can run programs that are actually larger than the primary memory of the
system (see Figure 5.12). Virtual memory allows for very effective multiprogramming and
relieves the user from the unnecessarily tight constraints of the main memory.
Virtual memory, in other words, is a way of showing the main memory of a computer
system to appear effectively larger than it really is. The system does this by determining which
parts of its memory are often sitting idle, and then makes a command decision to empty their
contents onto a disk, thereby freeing up precious RAM.
Note: In virtual memory systems, the logical address is referred to as virtual address and logical
address space is referred to as virtual address space.
Page Faults: In virtual memory systems, the page table of each process stores an additional
bit to differentiate the pages in the main memory from that on the hard disk. This additional
bit is set to 1 in case the page is in the main memory; otherwise 0. Whenever a page reference
is made, the OS checks the page table to determine whether the page is in the main memory.
If the referenced page is not found in the main memory, a page fault occurs and the control is
passed to the page fault routine in the OS. To handle page faults, the page fault routine checks
first of all whether the virtual address for the desired page is valid (that is, it exists within the
virtual address space of the process). If it is invalid, it terminates the process giving an error.
Otherwise, it locates for a free page frame in memory and allocates it to the process, swaps
the desired page into this allocated page frame, and updates the page table to indicate that the
page is in memory.
While handling a page fault, there is a possibility that the memory is full and no free
frame is available for allocation. In that case, the OS has to evict a page from the memory
to make space for the desired page to be swapped in. To decide which page frame is to be
replaced with the new page, the OS must track the usage information for all pages. In this way,
the OS can determine which pages are being actively used and which are not (and therefore,
can be removed from the main memory). Often the “least currently accessed” page (the page
that has gone the longest time without being referenced) is selected.
Backup of Data: No matter what kind of information a system contains, backup of data
is of utmost importance for its users. Backup or archiving is an important issue for a user and
especially for business organizations. Typically, a computer system uses hard drives for online
data storage. These drives may sometimes fail, or can be damaged in case of a catastrophic
event, so care must be taken to ensure that the data is not lost. To ensure this, the OS should
provide a feature of backing up of data, say from a disk to another storage device such as a
floppy disk or an optical disk. The purpose of keeping backups is to restore individual files or
complete file system in case of data loss. Recovery from the loss of an individual file, or of an
entire disk, may be done from backup. OSs usually provide some system software that is used
for taking backups of the data.
Let Us sUmmarize
1. OS is a type of software that controls and coordinates the operation of the various
types of devices in a computer system. The two objectives of an OS are controlling
the computer’s hardware and providing an interface between the user and the
machine.
2. OS has six major roles to perform: process management, memory management,
file management, device management, security management and providing user
interface.
3. A process or task is a portion of a program in some stage of execution. A program can
consist of several processes, each working on its own. It may be in one of a number of
different possible states, such as new, running, waiting, ready or terminated.
4. A thread is the simplest part of a process. To enhance efficiency, a process can consist of
several threads, each of which execute separately.
5. In the uniprogramming system, only one process can exist at a time while in the
multiprogramming system, multiple processes can be initiated at a time.
6. Deciding which process should run next is called process scheduling. Process scheduling
is necessary, so that all programs are executed and run fairly.
7. Preemptive switching means that a running process will be interrupted (forced to give up)
and the processor is given to another waiting process.
8. The process of switching from one process to another is called context switching. A period that
a process runs for before being context switched is called a time slice or quantum period.
9. In first-come-first-served scheduling, the processes are executed in the order of their
arrival in the ready queue, which means the process that enters the ready queue first, gets
the CPU first. New processes are placed at the end of the queue.
10. Round robin scheduling employs a technique called time slicing. When the time slice is
up, the running process is interrupted and placed at the rear of the queue. The next process
at the top of the queue is then started.
11. A process is said to be in a state of deadlock when it is waiting for an event, which
will never occur. It can occur if four conditions prevail simultaneously; they are mutual-
exclusion, circular wait, hold and wait, and no preemption.
12. The part of the OS that manages the primary memory of the computer is called the
memory manager.
13. Paging is a memory management scheme that allows the processes to be stored non-
contiguously in memory.
14. Virtual memory is a way of showing the main memory of a computer system to appear
effectively larger than it really is.
15. The system that an OS uses to organize and keep track of files is known as the file
management system.
16. A program that controls a device is called the device driver. OS’s device manager uses
this program to let a user use the specific device.
17. A user interface is a set of commands or menus through which a user communicates with
the system.
exercises
Multiple-choice Questions
1. The OS that is self-contained in a device and resident in the ROM is .........................
(a) Batch Processing System (b) Real-time OS
(c) Embedded OS (d) Multi-processor OS
2. The example of non-preemptive scheduling is .........................
(a) First-Come-First-Served (b) Round Robin
(c) Last-In-First-Out (d) Shortest-Job-First
3. An interface where facility is provided for entering commands is .........................
(a) Menu-driven (b) Command-driven
(c) Graphic-driven (d) None of these
4. The OS that allows only one program to run at a time is .........................
(a) Batch Processing (b) Embedded
(c) Real-time (d) Multitasking
5. The substitution made by the OS between the processes to allocate space is .........................
(a) Swapping (b) Deadlock
(c) Fragmentation (d) Paging
6. The memory management scheme that allows the processes to be stored non-contiguously
in memory is .........................
(a) Paging (b) Spooling
(c) Swapping (d) None of these
7. The fit policy of a memory manager to place a process in the largest block of unallocated
memory is .........................
(a) First Fit (b) Best Fit
(c) Worst Fit (d) Bad Fit
8. With which memory can the system run programs that are actually larger than the primary
memory of the system?
(a) Cache Memory (b) Primary Memory
(c) Virtual Memory (d) None of these
9. What allows the user to run two or more applications on the same computer so that he/she
can move from one to the other without closing the application?
(a) Virtual Storage (b) Multi-processing
(c) Multi-tasking (d) Multiprogramming
10. The scheduler that selects a process from the ready queue and allocates CPU to it
.........................
(a) Short-term (b) Long-term
(c) Medium-term (d) All of these
Descriptive Questions
1. What is an OS? Explain various types of OS.
2. Define a process. Diagrammatically explain the life cycle of a process.
3. Discuss various types of interfaces in the OS.
4. What is a deadlock? How can it be handled?
5. Explain how memory protection and process allocation is done by an OS.
ANSWERS