0% found this document useful (0 votes)
60 views190 pages

Com 111

The document is an introduction to Information Technology, covering topics such as computer basics, organization, memory, input/output media, operating systems, multimedia, programming languages, software, and data communication. It includes detailed sections on the evolution of computers, types of software, and practical applications of Microsoft Office tools. The content is structured with summaries, exercises, and answers for each chapter to enhance learning.

Uploaded by

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

Com 111

The document is an introduction to Information Technology, covering topics such as computer basics, organization, memory, input/output media, operating systems, multimedia, programming languages, software, and data communication. It includes detailed sections on the evolution of computers, types of software, and practical applications of Microsoft Office tools. The content is structured with summaries, exercises, and answers for each chapter to enhance learning.

Uploaded by

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

Introduction to

Information Technology

HT, T, Copyright.indd 1 5/30/2011 6:29:03 PM


HT, T, Copyright.indd 2 5/30/2011 6:29:03 PM
Introduction to
Information Technology
Second Edition

ITL Education Solutions Limited


Research and Development Wing
New Delhi

HT, T, Copyright.indd 3 5/30/2011 6:29:03 PM


Contents

Preface xxv

1. Computer Basics

1.1 Introduction

1.1.1 Characteristics of Computers

1.2 Evolution of Computers

1.3 Generations of Computers

1.3.1 First Generation (1940 to 1956): Vacuum Tubes

1.3.2 Second Generation (1956 to 1963): Transistors

1.3.3 Third Generation (1964 to Early 1970s): Integrated Circuits

1.3.4 Fourth Generation (Early 1970s to Till Date): Microprocessors

1.3.5 Fifth Generation (Present and Beyond): Artificial Intelligence

1.4 Classification of Computers

1.4.1 Microcomputers

1.4.2 Minicomputers

1.4.3 Mainframes

1.4.4 Supercomputers

1.5 The Computer System

1.5.1 Components of a Computer System

1.5.2 How Does a Computer Work?

1.6 Applications of Computers

Let Us Summarize

Exercises

Answers

2. Computer Organization and Architecture

2.1 Introduction

2.2 Central Processing Unit

2.2.1 Arithmetic/Logic Unit

2.2.2 Registers
2.2.3 Control Unit

2.2.4 System Bus

2.2.5 Main Memory Unit

2.2.6 Cache Memory

2.3 Communication among Various Units

2.3.1 Processor to Memory Communication

2.3.2 Processor—I/O Devices Communication

2.4 Instruction Format

2.5 Instruction Cycle

2.6 Instruction Set

2.6.1 CISC Architecture

2.6.2 RISC Architecture

2.6.3 Comparing the CISC with RISC

2.7 Inside a Computer

2.7.1 Power Supply (SMPS)

2.7.2 Motherboard

2.7.3 Ports and Interfaces

2.7.4 Expansion Cards

2.7.5 Ribbon Cables

2.7.6 Memory Chips

2.7.7 Storage Devices

2.7.8 Processors

2.8 Data Representation in Computers

2.8.1 Types of Number System

2.8.2 Conversion between Number Bases

2.9 Coding Schemes

Let Us Summarize

Exercises

Answers
3. Computer Memory and Storage

3.1 Introduction

3.1.1 Memory Representation

3.2 Memory Hierarchy

3.3 Random Access Memory

3.3.1 Types of RAM

3.4 Read Only Memory

3.4.1 Types of ROM

3.5 RAM, ROM and CPU Interaction

3.6 Types of Secondary Storage Devices

3.7 Magnetic Tape

3.7.1 Magnetic Tape Organization

3.7.2 Advantages of Magnetic Tapes

3.7.3 Disadvantages of Magnetic Tapes

3.8 Magnetic Disk

3.8.1 Storage Organization of a Magnetic Disk

3.8.2 Accessing Data from Magnetic Disk

3.9 Types of Magnetic Disks

3.9.1 Floppy Disk

3.9.2 Hard Disk

3.9.3 Zip Disk

3.9.4 Advantages of Magnetic Disks

3.9.5 Disadvantages of Magnetic Disks

3.10 Optical Disk

3.10.1 Storage Organization of Optical Disk

3.10.2 Access Mechanism of Optical Disk

3.11 Types of Optical Disks

3.11.1 Compact Disk

3.11.2 Digital Versatile Disk


3.11.3 Blu-ray Disk

3.11.4 Advantages of Optical Disks

3.11.5 Disadvantages of Optical Disks

3.12 Magneto-optical Storage Devices

3.12.1 Basics of MO Reading

3.12.2 Basics of MO Recording

3.13 Universal Serial Bus

3.13.1 Pen Drive

3.13.2 External Hard Disk Drive

3.14 Memory Stick

3.15 Mass Storage Devices

Let Us Summarize

Exercises

Answers

4. Input Output Media

4.1 Introduction

4.1.1 Importance of Input/Output Devices

4.2 Types of Input Devices

4.2.1 Keyboard

4.2.2 Pointing Devices

4.2.3 Speech Recognition

4.2.4 Digital Camera

4.2.5 Webcam

4.2.6 Scanners

4.2.7 Optical Character Recognition

4.2.8 Optical Mark Recognition

4.2.9 Magnetic-ink Character Recognition

4.2.10 Bar Code Reader

4.3 Types of Output Devices


4.3.1 Printers

4.3.2 Plotters

4.3.3 Computer Output Microfilm

4.3.4 Monitor

4.3.5 Voice Response System

4.3.6 Projector

4.3.7 Electronic Whiteboard

4.3.8 Headphone and Headset

4.4 Computer Terminals

Let Us Summarize

Exercises

Answers

5. Operating System

5.1 Introduction

5.2 Operating System: Definition

5.3 Evolution of Operating System

5.4 Types of Operating Systems

5.5 Functions of an Operating System

5.5.1 Process Management

5.5.2 Memory Management

5.5.3 File Management

5.5.4 Device Management

5.5.5 Security Management

5.5.6 User Interface

Let Us Summarize

Exercises

Answers
6. Multimedia Essentials

6.1 Introduction

6.2 Multimedia: Definition

6.3 Building Blocks of Multimedia

6.3.1 Text

6.3.2 Graphics

6.3.3 Audio

6.3.4 Video

6.3.5 Animation

6.4 Multimedia System

6.4.1 Desirable Features of Multimedia System

6.4.2 Data Compression

6.5 Multimedia Applications

6.5.1 Multimedia and Education

6.5.2 Multimedia and Entertainment

6.5.3 Multimedia and Training

6.5.4 Multimedia and Business

6.5.5 Multimedia Interactive Kiosks

6.6 Virtual Reality

6.6.1 Characteristics of Virtual Reality

Let Us Summarize

Exercises

Answers

7. Computer Programming and Languages

7.1 Introduction

7.1.1 Developing a Program

7.1.2 Program Development Cycle

7.2 Algorithm

7.3 Flowchart
7.3.1 Flowchart Symbols

7.3.2 Guidelines for Preparing Flowcharts

7.3.3 Benefits of Flowcharts

7.3.4 Limitations of Flowcharts

7.4 Decision Tables

7.4.1 Steps to Develop a Decision Table

7.4.2 Benefits of Decision Tables

7.4.3 Limitations of Decision Tables

7.5 Pseudocode

7.5.1 Pseudocode Guidelines

7.5.2 Benefits of Pseudocode

7.5.3 Limitations of Pseudocode

7.6 Program Control Structures

7.6.1 Sequence Control Structure

7.6.2 Selection Control Structure

7.6.3 Repetition Control Structure

7.7 Programming Paradigms

7.7.1 Unstructured Programming

7.7.2 Structured Programming

7.7.3 Object-oriented Programming

7.8 Characteristics of a Good Program

7.9 Programming Languages

7.9.1 Types of Programming Languages

7.10 Generations of Programming Languages

7.10.1 First Generation: Machine Language

7.10.2 Second Generation: Assembly Language

7.10.3 Third Generation: High-level Language

7.10.4 Fourth Generation

7.10.5 Fifth Generation: Very High-level Languages


7.11 Features of a Good Programming Language

Let Us Summarize

Exercises

Answers

8. Computer Software

8.1 Introduction

8.2 Software: Definition

8.2.1 Relationship between Software and Hardware

8.3 Categories of Software

8.3.1 System Software

8.3.2 Application Software

8.4 Installing and Uninstalling Software

8.5 Software Piracy

8.5.1 Types of Software Piracy

8.5.2 Preventing Software Piracy

8.6 Software Terminologies

Let Us Summarize

Exercises

Answers

9. Microsoft Office Word 2003

9.1 Introduction

9.2 Starting Microsoft Office Word 2003

9.2.1 Microsoft Word Environment

9.2.2 Getting Help

9.3 Working with Word 2003 Documents

9.3.1 Creating a New Document

9.3.2 Opening an Existing Document

9.3.3 Saving a Document

9.3.4 Closing a Document and Exiting Microsoft Word


9.4 Working with Text

9.4.1 Inserting Text

9.4.2 Selecting Text

9.4.3 Formatting the Text

9.4.4 Aligning and Indenting Text

9.4.5 Formatting Style

9.4.6 Format Painter

9.4.7 Using Cut, Copy, and Paste in Word

9.4.8 Finding and Replacing Text

9.4.9 Undo and Redo

9.4.10 Bullets and Numbering

9.4.11 Header and Footer

9.5 Working with Tables

9.5.1 Table Properties

9.5.2 Moving and Resizing Table

9.5.3 Formatting Text in Table

9.5.4 Adding and Deleting Rows and Columns

9.5.5 Converting Text to Table

9.5.6 Converting Table to Text

9.6 Checking Spelling and Grammar

9.6.1 Using the Auto Spell and Auto Grammar Features

9.6.2 Using Spelling and Grammar Dialog Box

9.6.3 Using AutoCorrect Options

9.6.4 Using Synonyms and Thesaurus

9.7 Adding Graphics to Document

9.7.1 Pictures

9.7.2 Editing a Picture

9.7.3 Drawing Objects

9.8 Mail Merge


9.8.1 Components of a Mail Merge

9.8.2 Mail Merge Steps

9.9 Printing a Document

9.9.1 Setting Page Margins

9.9.2 Print Preview

9.9.3 Printing the Document

Let Us Summarize

Exercises

Answers

10. Microsoft Office Excel 2003

10.1 Introduction

10.2 Starting Microsoft Office Excel 2003

10.2.1 Microsoft Excel Environment

10.3 Working with Excel Workbook

10.3.1 Creating an Excel Workbook

10.3.2 Opening an Existing Workbook

10.3.3 Saving Workbook

10.3.4 Closing a Workbook

10.4 Working with Worksheet

10.4.1 Entering Data in Cells

10.4.2 Navigating through Cells

10.4.3 Naming of a Range of Cells

10.4.4 Editing a Worksheet

10.4.5 Using Cut, Copy, and Paste in Excel

10.4.6 Finding and Replacing Cells

10.4.7 Undo and Redo

10.5 Formulas and Functions

10.5.1 Functions

10.5.2 Using AutoSum


10.5.3 Formulas

10.6 Inserting Charts

10.6.1 Creating Charts

10.6.2 Using Chart Toolbar

10.6.3 Saving a Chart

10.7 Sorting

10.8 Printing in Excel

10.8.1 Setting Page Layout

10.8.2 Print Preview

10.8.3 Printing Worksheets

Let Us Summarize

Exercises

Answers

11. Microsoft Office PowerPoint 2003

11.1 Introduction

11.2 Starting Microsoft Office PowerPoint 2003

11.2.1 Microsoft PowerPoint Environment

11.3 Working with PowerPoint 2003

11.3.1 Creating a New Presentation

11.3.2 Opening a Presentation

11.3.3 Saving a Presentation

11.3.4 Closing a Presentation

11.4 Working with Different Views

11.5 Designing Presentation

11.5.1 Choosing Design Template

11.5.2 Using Masters

11.5.3 Working with Slides

11.5.4 Working with Text

11.5.5 Formatting the Text


11.5.6 Working with Graphics

11.5.7 Adding Multimedia

11.5.8 Running Slides

11.5.9 Package for CD

11.6 Printing in PowerPoint

11.6.1 Setting Page Layout

11.6.2 Printing Presentation

Let Us Summarize

Exercises

Answers

12. Data Communication and Computer Networks

12.1 Introduction

12.2 Data Communication

12.2.1 Components of Data Communication

12.2.2 Data Transmission Mode

12.2.3 Analog and Digital Data Transmission

12.2.4 Data Communication Measurement

12.3 Transmission Media

12.3.1 Guided/Wired Media

12.3.2 Unguided/Wireless Media

12.4 Modulation

12.4.1 Amplitude Modulation (AM)

12.4.2 Frequency Modulation (FM)

12.4.3 Phase Modulation (PM)

12.5 Multiplexing

12.5.1 Multiplexers

12.5.2 Asynchronous and Synchronous Transmission

12.6 Switching

12.6.1 Circuit Switching


12.6.2 Packet Switching

12.6.3 Message Switching

12.7 Computer Network

12.7.1 Types of Computer Networks

12.8 Network Topologies

12.8.1 Bus Topology

12.8.2 Ring Topology

12.8.3 Star Topology

12.8.4 Tree Topology

12.8.5 Mesh Topology

12.9 Communication Protocol

12.9.1 The OSI Model

12.10 Network Devices

Let Us Summarize

Exercises

Answers

13. The Internet

13.1 Introduction

13.2 Evolution of Internet

13.3 Basic Internet Terms

13.4 Getting Connected to the Internet

13.5 Internet Applications

13.5.1 Electronic Mail (E-mail)

13.5.2 File Transfer Protocol (FTP)

13.5.3 Telnet

13.5.4 Internet Relay Chat (IRC)

13.5.5 Chatting and Instant Messaging

13.5.6 Internet Telephony

13.5.7 Video Conferencing


13.5.8 Commerce through the Internet

13.5.9 Newsgroups (Usenet)

13.5.10 Mailing Lists (Listserver)

13.6 Data Over the Internet

13.6.1 Static Component

13.6.2 Dynamic Component

Let Us Summarize

Exercises

Answers

14. Internet Tools

14.1 Introduction

14.2 Web Browser

14.2.1 Web Browser Features

14.2.2 Opening Internet Explorer

14.2.3 Internet Explorer Environment

14.3 Browsing Internet Using Internet Explorer

14.4 Electronic Mail (E-mail)

14.4.1 E-mail Address Structure

14.4.2 Checking E-mails

14.4.3 Sending E-mails

14.4.4 E-mail Attachments

14.4.5 How E-mail Works

14.4.6 Netiquette

14.4.7 Advantages and Disadvantages of E-mail

14.5 E-mail Client

14.5.1 Features of E-mail Client

14.5.2 Opening Outlook Express

14.5.3 Creating an Account

14.5.4 Sending E-mails Using Outlook Express


14.5.5 Checking E-mails Using Outlook Express

14.5.6 Creating Newsgroup Account

14.6 Search Engines

14.6.1 Searching the Internet

14.6.2 Refining the Search

14.7 Instant Messaging

14.7.1 Features of Messenger

14.7.2 Getting Started with Yahoo Messenger

14.7.3 Sending Instant Messages

14.7.4 Sending Files

Let Us Summarize

Exercises

Answers

15. Computer Security

15.1 Introduction

15.2 Computer Security: Definition

15.2.1 Security Threats

15.3 Malicious Programs

15.3.1 Virus

15.3.2 Other Destructive Programs

15.3.3 Affecting Computer System

15.3.4 Protecting Computer System

15.4 Cryptography

15.4.1 Secret Key Cryptography

15.4.2 Public Key Cryptography

15.4.3 Hash Function

15.5 Digital Signature

15.5.1 How Is Digital Signature Used?

15.6 Firewall
15.6.1 How Firewall Works?

15.6.2 Types of Firewall

15.7 User Identification and Authentication

15.7.1 User Requirements

15.7.2 User Possessions

15.7.3 Biometric Technique

15.8 Data Backup and Recovery

15.8.1 Backup Methods

15.8.2 Online Backups

15.8.3 Recovery Tools

15.9 Security Awareness and Policies

15.9.1 Awareness

15.9.2 Security Policy

Let Us Summarize

Exercises

Answers

16. Database Fundamentals

16.1 Introduction

16.1.1 Data versus Information

16.2 Database: Definition

16.2.1 Basic Database Terms

16.3 Logical Data Concepts

16.3.1 Entity

16.3.2 Attribute

16.3.3 Relationship

16.4 Physical Data Concepts

16.4.1 Sequential Files

16.4.2 Direct Files

16.4.3 Indexed Sequential Files


16.5 Database Management System

16.5.1 Need for DBMS

16.5.2 Benefits of DBMS

16.5.3 Components of a DBMS

16.5.4 Database Administrator

16.5.5 Database Languages

16.5.6 Data Dictionary

16.6 DBMS Architecture

16.6.1 Data Independence

16.7 Database Models

16.7.1 Hierarchical Database Model

16.7.2 Network Database Model

16.7.3 Relational Database Model

16.7.4 Object-oriented Database Model

16.8 Normalization

16.8.1 First Normal Form (1NF)

16.8.2 Second Normal Form (2NF)

16.8.3 Third Normal Form (3NF)

16.9 Types of Databases

16.9.1 Centralized Database

16.9.2 Distributed Database

16.10 Data Warehousing and Data Mining

Let Us Summarize

Exercises

Answers

17. Structured Query Language (SQL)

17.1 Introduction

17.1.1 Communicating with Database Using SQL

17.1.2 Characteristics of SQL


17.1.3 Brief History of SQL

17.2 Getting Started with SQL

17.2.1 Data Types

17.2.2 SQL Syntax

17.3 DDL Commands

17.3.1 CREATE TABLE Command

17.3.2 ALTER TABLE Command

17.3.3 DROP TABLE Command

17.4 DML Commands

17.4.1 INSERT Command

17.4.2 UPDATE Command

17.4.3 DELETE Command

17.4.4 SELECT Command

17.5 Querying Multiple Tables (SQL Joins)

17.5.1 Combining Queries Using UNION

17.6 Nesting Select Statements (Subquery)

Let Us Summarize

Exercises

Answers

18. Current and Future Trends in IT

18.1 Introduction

18.2 Electronic Commerce (E-Commerce)

18.2.1 Types of E-Commerce

18.2.2 Processes in E-Commerce

18.2.3 Types of Electronic Payment

18.2.4 Advantages of E-Commerce

18.2.5 Disadvantages of E-Commerce

18.3 Electronic Data Interchange (EDI)

18.3.1 How EDI Works?


18.3.2 EDI Benefits

18.3.3 EDI Limitations

18.4 Wireless Application Protocol (WAP)

18.5 Smart Card

18.6 Internet Prootcol Television (IPTV)

18.7 Blogging

18.8 Radio Frequency Identification (RFID)

18.9 Brain Computer Interface (BCI)

18.10 Imminent Technologies

18.10.1 Pen Size Computer

18.10.2 Napkin PC

18.10.3 Roll Top Computer

18.10.4 B-membrane PC

18.10.5 USB Memory Stick

Let Us Summarize

Exercises

Answers

Index
CHAPTER 1

Computer Basics

Science Education Medical and Health Care Architect/Engineer

Computer Applications

Entertainment Communication

Business Application Publishing Banking

This chapter lays a foundation for one of the most influential


forces available in modern times, the computer. A computer is
an electronic device, operating under the control of instructions,
which tells the machine what to do. It is capable of accepting
data (input), processing data arithmetically and logically,
producing output from the processing, and storing the results
for future use. The chapter begins with the characteristics,
evolution, and various generations of computers. The
discussion also explores the classification of computers and
their features. The chapter concludes with an overview on
basic computer units and computer applications.

Chapter 01.indd 1 5/11/2011 2:22:09 PM


2 Computer Basics

CHAPTER OBJECTIVES

After reading this chapter, you will be able to understand:


™ The characteristics of computers that make them an essential part of every technology
™ The evolution of computers, from refining of abacus to supercomputers
™ The advancement in technology that has changed the way the computers operate, leading
to powerful, efficient and cheaper computers
™ The classification of computers into micro, mini, mainframe and supercomputers
™ The computer system, which includes components such as the Central Processing Unit
(CPU) and I/O devices
™ The application of computers in various fields, which increases efficiency, thus, resulting
in proper utilization of resources

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

1.1.1 Characteristics of Computers


The human race developed computers so that it could perform intricate operations,
such as calculation and data processing, or simply for entertainment. Today, much of

Chapter 01.indd 2 5/11/2011 2:22:09 PM


Introduction 3

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

Chapter 01.indd 3 5/11/2011 2:22:09 PM


4 Computer Basics

period and then suddenly produces


Limitations of a Computer an error. This happens because of a
rare combination of events or due to
THINGS TO REMEMBER

™ A computer can only perform what it is


programmed to do. an error in the instruction provided
by the user. Therefore, computer
™ The computer needs well-defined instructions
parts require regular checking and
to perform any operation. Hence, computers
maintenance in order to give correct
are unable to give any conclusion without
results. Furthermore, computers need
going through intermediate steps.
to be installed in a dust-free place.
™ A computer’s use is limited in areas where Generally, some parts of computers
qualitative considerations are important. get heated up due to heavy processing.
For instance, it can make plans based on Therefore, the ambient temperature
situations and information, but it cannot of the computer system should be
foresee whether they will succeed. maintained.

1.2 EVOLUTION OF COMPUTERS


The need for a device to do calculations along with the growth in commerce and other
human activities explains the evolution of computers. Having
the right tool to perform these tasks has always been important
for human beings. In their quest to develop efficient computing
devices, humankind developed many apparatuses. However,
many centuries elapsed before technology was adequately
advanced to develop computers.
In the beginning, when the task was simply counting or adding,
Figure 1.1 Abacus people used either their fingers or pebbles along lines in the sand. In
order to conveniently have the sand and pebbles all the time, people
in Asia Minor built a counting device called abacus. This device allowed users to do calculations
using a system of sliding beads arranged on a rack. The abacus was simple to operate and was
used worldwide for centuries. In fact, it is still used in many countries (Figure 1.1).
With the passage of time, humankind invented many computing devices, such as
Napier bones and slide rule. It took many centuries, however, for the next significant
advancement in computing devices. In 1642, a French mathematician, Blaise Pascal,
invented the first functional automatic calculator. This brass rectangular box, also called
a Pascaline, used eight movable dials
to add numbers up to eight figures long
(Figure 1.2).
In 1694, a German mathematician,
Gottfried Wilhem von Leibniz, extended
Pascal’s design to perform multiplication,
division and to find square root. This ma-
chine is known as the Stepped Reckoner.
It was the first mass-produced calculating
Figure 1.2 Pascaline device, which was designed to perform

Chapter 01.indd 4 5/11/2011 2:22:10 PM


Evolution of Computers 5

multiplication by repeated addition. Like its


predecessor, Leibniz’s mechanical multiplier What’s in a Name?
worked by a system of gears and dials. The In 8196, Hollerith found the Tabulating
only problem with this device was that it Machine Company, which was later named

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

Chapter 01.indd 5 5/11/2011 2:22:10 PM


6 Computer Basics

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.

1.3 GENERATIONS OF COMPUTERS


The history of computer development is often discussed with reference to the different
generations of computing devices. In computer terminology, the word generation is described
as a stage of technological development or innovation. A major technological development
that fundamentally changed the way computers operate, resulting in increasingly smaller,
cheaper, more powerful, and more efficient and reliable devices, characterizes each generation
of computers. According to the type of “processor” installed in a machine, there are five
generations of computers.

1.3.1 First Generation (1940 to 1956): Vacuum Tubes


First-generation computers were vacuum tubes/thermionic valve-based machines. These
computers used vacuum tubes for circuitry and magnetic drums for memory. A magnetic drum

Chapter 01.indd 6 5/11/2011 2:22:10 PM


Generations of Computers 7

is a metal cylinder coated with magnetic iron oxide material on


which data and programs can be stored. The input was based
on punched cards and paper tape, and the output was in the
form of printouts (Figure 1.4).
First-generation computers relied on binary-coded
language also called machine language (language of 0s and 1s)
to perform operations and were able to solve only one problem
at a time. Each machine was fed with different binary codes
and hence, were difficult to program. This resulted in lack of
versatility and speed. In addition, to run on different types of
computers, instructions must be rewritten or recompiled.
Examples: ENIAC, EDVAC and UNIVAC.

Characteristics of First-generation Computers


™ These computers were based on vacuum tube Figure 1.4 Vacuum Tube
technology.
™ These were the fastest computing devices of their times (computation time was in
milliseconds).
™ These computers were very large and required a lot of space for installation.
™ Since thousands of vacuum tubes were used, they generated a large amount of heat.
Therefore, air conditioning was essential.
™ These were non-portable and very slow equipments.
™ They lacked in versatility and speed.
™ They were very expensive to operate and used a large amount of electricity.
™ These machines were unreliable and prone to frequent hardware failures. Hence,
constant maintenance was required.
™ Since machine language was used, these computers were difficult to program and use.
™ Each individual component had to be assembled manually. Hence, commercial appeal
of these computers was poor.

1.3.2 Second Generation (1956 to 1963): Transistors


Second-generation computers used transistors, which were
superior to vacuum tubes. A transistor is made up of semiconductor
material like germanium and silicon. It usually has three leads
(see Figure 1.5) and performs electrical functions such as voltage,
current or power amplification with low power requirements.
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. In
second-generation computers, magnetic cores were used as the
primary memory and magnetic disks as the secondary storage
devices. However, they still relied on punched cards for the input
and printouts for the output. Figure 1.5 Transistor

Chapter 01.indd 7 5/11/2011 2:22:10 PM


8 Computer Basics

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.

1.3.3 Third Generation (1964 to Early 1970s): Integrated Circuits


The development of the integrated circuit, also called an IC, was the trait of the third-
generation computers. An IC consists of a single chip (usually silicon) with many compo-
nents such as transistors and resistors fabricated on it. ICs replaced several individually
wired transistors. This development made
computers smaller in size, reliable and ef-
ficient (Figure 1.6).
Instead of punched cards and printouts,
users interacted with third-generation
computers through keyboards and monitors,
and interfaced with the operating system.
This allowed the device to run many different
applications simultaneously with a central
program that monitored the memory. For the
first time, computers became accessible to
mass audience because they were smaller and
cheaper than their predecessors.
Figure 1.6 Integrated Circuit
Examples: NCR 395 and B6500.
Characteristics of Third-generation Computers
™ These computers were based on IC technology.
™ These were able to reduce the computational time from microseconds to
nanoseconds.

Chapter 01.indd 8 5/11/2011 2:22:10 PM


Generations of Computers 9

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

1.3.4 Fourth Generation (Early 1970s to Till Date): Microprocessors


The fourth generation is an extension of third generation technology. Although, the technology
of this generation is still based on the IC, these have been made readily available to us because
of the development of the microprocessor (circuits containing millions of transistors). The
Intel 4004 chip, which was developed in 1971, took the IC one step further by locating all
the components of a computer (CPU, memory and I/O controls) on a minuscule chip. A
microprocessor is built on to a single piece of silicon, known as chip. It is about 0.5 cm along
one side and no more than 0.05 cm thick.
The fourth-generation computers led to an era of Large Scale Integration (LSI) and
VLSI technology. LSI technology allowed thousands of transistors to be constructed on
one small slice of silicon material, whereas VLSI squeezed hundreds of thousands of
components on to a single chip. Ultra Large Scale Integration (ULSI) increased that
number to the millions. This way computers became smaller and cheaper than ever before
(Figure 1.7).
The fourth-generation computers became more powerful, compact, reliable and affordable.
As a result, it gave rise to the PC revolution. During this period, magnetic core memories
were substituted by semiconductor memories, which resulted in faster random access main
memories. Moreover, secondary memories
such as hard disks became economical,
smaller and bigger in capacity. The other
significant development of this era was that
these computers could be linked together to
form networks, which eventually led to the
development of the Internet. This generation
also saw the development of the Graphical
User Interfaces (GUIs), mouse and hand-
held devices. Despite many advantages, this
generation required complex and sophisticated
technology for the manufacturing of the CPU
and the other components.
Examples: Apple II, Altair 8800 and CRAY-1. Figure 1.7 Microprocessor

Chapter 01.indd 9 5/11/2011 2:22:10 PM


10 Computer Basics

Characteristics of Fourth-generation Computers


™ These computers are microprocessor-based systems.
™ These are very small in size.
™ These are the cheapest among all the other generation computers.
™ These are portable and quite reliable.
™ These machines generate negligible amount of heat, hence do not require air conditioning.
™ Hardware failure is negligible so minimum maintenance is required.
™ The production cost is very low.
™ The GUI and pointing devices enabled users to learn to use the computer quickly.
™ Interconnection of computers led to better communication and resource sharing.
1.3.5 Fifth Generation (Present and Beyond): Artificial Intelligence
The dream of creating a human-like computer that would be capable of reasoning and
reaching at a decision through a series of “what-if-then” analyses has existed since the
beginning of computer technology. Such a computer would learn from its mistakes and
possess the skill of experts. These are the objectives for creating the fifth generation of
computers. The starting point for the fifth generation of computers had been set in the early
1990s. The process of developing fifth-generation computers is still in the development
stage. However, the expert system concept is already in use. The expert system is defined as
a computer system that attempts to mimic the thought process and reasoning of experts in
specific areas. Three characteristics can be identified with the fifth-generation computers.
These are:
™ Mega Chips: Fifth-generation computers will use Super Large Scale Integrated
(SLSI) chips, which will result in the production of microprocessors having
millions of electronic components on a single chip. In order to store instructions and
information, fifth-generation computers require a great amount of storage capacity.
Mega chips may enable the computer to approximate the memory capacity of the
human mind.
™ Parallel Processing: Computers with one processor access and execute only one
instruction at a time. This is called serial processing. However, fifth-generation
computers will use multiple processors and perform parallel processing, thereby
accessing several instructions at once and working on them at the same time.
™ Artificial Intelligence (AI): It refers to a series of related technologies that try to
simulate and reproduce human behavior, including thinking, speaking and reasoning.
AI comprises a group of related technologies: expert systems (ES), natural language
processing (NLP), speech recognition, vision recognition and robotics.
1.4 CLASSIFICATION OF COMPUTERS
These days, computers are available in many sizes and types. Some computers can fit in the
palm of the hand, while some can occupy the entire room. Computers also differ based on
their data-processing abilities. Based on the physical size, performance and application areas,
we can generally divide computers into four major categories: micro, mini, mainframe and
supercomputers (Figure 1.8).

Chapter 01.indd 10 5/11/2011 2:22:11 PM


Classification of Computers 11

Classification of
Computers

Micro Mini Mainframe Super

Desktop Laptop Hand-held

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

Desktop Computer: The desktop


computer, also known as the PC, is
principally intended for stand-alone use
by an individual. These are the most-
common type of microcomputers. These
microcomputers typically consist of a
system unit, a display monitor, a keyboard,
an internal hard disk storage and other
peripheral devices. The main reason behind
the importance of the PCs is that they are
not very expensive for the individuals or
the small businesses. Some of the major PC
manufacturers are APPLE, IBM, Dell and
Hewlett-Packard (Figure 1.9).

Laptop: A laptop is a portable computer


Figure 1.9 Desktop Computer
that a user can carry around. Since the
laptop resembles a notebook, it is also
known as the notebook computer. Laptops are small computers enclosing all the basic

Chapter 01.indd 11 5/11/2011 2:22:11 PM


12 Computer Basics

features of a normal desktop computer. The


biggest advantage of laptops is that they are
lightweight and one can use them anywhere and
at anytime, especially when one is travelling.
Moreover, they do not need any external power
supply as a rechargeable battery is completely
self-contained in them. However, they are
expensive as compared to desktop computers
(Figure 1.10).

Hand-held Computers: A hand-held


computer such as a PDA is a portable computer
that can conveniently be stored in a pocket
(of sufficient size) and used while the user is
holding it. PDAs are essentially small portable
Figure 1.10 Laptop computers and are slightly bigger than the
common calculators. A PDA user generally
uses a pen or electronic stylus, instead of a
keyboard for input. As shown in (Figure 1.11),
the monitor is very small and is the only
apparent form of output. Since these computers
can be easily fitted on the top of the palm, they
are also known as palmtop computers. Hand-
held computers usually have no disk drive;
rather, they use small cards to store programs
and data. However, they can be connected to a
printer or a disk drive to generate output or store
data. They have limited memory and are less
powerful as compared to desktop computers.
Some examples of hand-held computers are
Apple Newton, Casio Cassiopeia and Franklin
Figure 1.11 Personal Digital Assistant eBookMan.

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

Chapter 01.indd 12 5/11/2011 2:22:11 PM


Classification of Computers 13

serves as a centralized storehouse for a


cluster of workstations or as a network server.
Minicomputers are usually multi-user systems
so these are used in interactive applications in
industries, research organizations, colleges and
universities. They are also used for real-time
controls and engineering design work. Some
of the widely used minicomputers are PDP 11,
IBM (8000 series) and VAX 7500.
1.4.3 Mainframes
A mainframe is an ultra-high performance
computer made for high-volume, processor-
intensive computing. It consists of a high-end
computer processor, with related peripheral
devices, capable of supporting large volumes
of data processing, high-performance online Figure 1.12 Minicomputer
transaction processing, and extensive data
storage and retrieval. Normally, it is able to
process and store more data than a minicomputer
and far more than a microcomputer. Moreover,
it is designed to perform at a faster rate than a
minicomputer and at even more faster rate than
a microcomputer. Mainframes are the second
largest (in capability and size) of the computer
family, the largest being the supercomputers.
However, mainframes can usually execute
many programs simultaneously at a high speed,
whereas supercomputers are designed for a
single process (Figure 1.13).
The mainframe allows its users to maintain
a large amount of data storage at a centralized Figure 1.13 Mainframe
location and to access and process these data
from different computers located at different locations. It is typically used by large businesses
and for scientific purposes. Some examples of the mainframe are IBM’s ES000, VAX 8000
and CDC 6600.
1.4.4 Supercomputers
Supercomputers are the special-purpose machines, which are especially designed to maximize
the numbers of floating point operations per second (FLOPS). Any computer below one
gigaflop per second is not considered a supercomputer. A supercomputer has the highest
processing speed at a given time for solving scientific and engineering problems. Essentially,
it contains a number of CPUs that operate in parallel to make it faster. Its processing speed
lies in the range 400–10,000 MFLOPS (millions of floating point operations per second). Due

Chapter 01.indd 13 5/11/2011 2:22:11 PM


14 Computer Basics

Figure 1.14 Supercomputer

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

supercomputer, which marks an important are used to solve multivariant mathematical


step towards high-performance computing. problems of existent physical processes,
The PARAM Padma computer was developed such as aerodynamics, metrology and
by India's Center for Development of plasma physics. They are also required by
Advanced Computer (C-DAC) and promises the military strategists to simulate defence
processing speeds of up to 1 teraflop per scenarios. Cinematic specialists use them
second (1 trillion processes per second). to produce sophisticated movie animations.
Scientists build complex models and
simulate them in a supercomputer. However, a supercomputer has limited broad-spectrum use
because of its price and limited market. The largest commercial uses of supercomputers are
in the entertainment/advertising industry. CRAY-3, Cyber 205 and PARAM are some well-
known supercomputers.

1.5 THE COMPUTER SYSTEM


A computer can be viewed as a system, which consists of a number of interrelated components
that work together with the aim of converting data into information. In a computer system,
processing is carried out electronically, usually with little or no intervention from the user.

Chapter 01.indd 14 5/11/2011 2:22:12 PM


The Computer System 15

The general perception of people regarding the computer is that it is an “intelligent


thinking machine”. However, this is not true. Every computer needs to be instructed
exactly what to do and how to do. The instructions given to computers are called programs.
Without programs, computers would be useless. The physical parts that make up a computer
(the CPU, input, output and storage unit) are known as hardware. Any hardware device
connected to the computer or any part of the computer outside the CPU and working
memory is known as a peripheral. Some examples of peripherals are keyboards, mouse
and monitors.
1.5.1 Components of a Computer System
There are several computer systems in the market with a wide variety of makes, models and
peripherals. In general, a computer system comprises the following components:
™ CPU: This unit performs processing of instructions and data inside the computer.
™ Input Unit: This unit accepts instructions and data.
™ Output Unit: This unit communicates the results to the user.
™ Storage Unit: This unit stores temporary and final results (Figure 1.15).
Central Processing Unit: The CPU, also known as a processor, is the brain of the
computer system that processes data (input) and converts it into meaningful information
(output). It is referred to as the administrative section of the computer system that interprets
the data and instructions, coordinates the operations, and supervises the instructions. The
CPU works with data in discrete form, that is, either 1 or 0. It counts, lists, compares and
rearranges the binary digits of data in accordance with the detailed program instructions
stored within the memory. Eventually, the results of these operations are translated into
characters, numbers and symbols that can be understood by the user. The CPU itself has
three parts:
™ Arithmetic Logic Unit (ALU): This unit performs the arithmetic (add, subtract) and
logical operations (and, or) on the data made available to it. Whenever an arithmetic

Memory
Unit

Central Processing Unit Instruction Flow


Data Flow

Registers
Input Output
Unit Unit

Control Arithmetic /
Unit Logic Unit

Figure 1.15 Components of a Computer System

Chapter 01.indd 15 5/11/2011 2:22:12 PM


16 Computer Basics

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

Chapter 01.indd 16 5/11/2011 2:22:12 PM


The Computer System 17

Speaker
Monitor

RAM

Mouse

DVD
Processor Hard Disk Keyboard

Joystick

Figure 1.16 Typical Hardware and Peripherals in a Computer System

1.5.2 How Does a Computer Work?


A computer performs three basic steps to complete any task: input, processing and output.
A task is assigned to a computer in a set of step-by-step instructions, which is known as a
program. These instructions tell the computer what to do with the input in order to produce the
required output. A computer functions in the following manner:
Step 1 The computer accepts the input. The computer input is whatever entered or
fed into a computer system. The input can be supplied by the user (such as
by using a keyboard) or by another computer or device (such as a diskette
or CD-ROM). Some examples of input include the words and symbols in a
document, numbers for a calculation, instructions for completing a process,
and so on.
Step 2 The computer processes the data. During this stage, the computer follows the
instructions using the data that have been input. Examples of processing include
calculations, sorting lists of words or numbers and modifying documents
according to user instructions.
Step 3 The computer produces output. Computer output is the information that has been
produced by a computer. Some examples of computer output include reports,
documents and graphs. Output can be in several formats, such as printouts, or
displayed on the screen (Figure 1.17).

Chapter 01.indd 17 5/11/2011 2:22:12 PM


18 Computer Basics

Storage

Processing Output
Input

Figure 1.17 Basic Computer Operations

1.6 APPLICATIONS OF COMPUTERS


In the last few decades, computer technology has revolutionized the businesses and other
aspects of human life all over the world. Practically, every company, large or small, is now
directly or indirectly dependent on computers for data processing. Computer systems also
help in the efficient operation of railway and airway reservation, hospital records, accounts,
electronic banking and so on. Computers not only save time, but also save paper work. Some
of the areas where computers are being used are listed below.
™ Science: Scientists have been using computers to develop theories, to analyse and
to test the data. The fast speed and the accuracy of the computer allow different
scientific analyses to be carried out. They can be used to generate detailed studies of
how earthquakes affect buildings or pollution affects weather pattern. Satellite-based
applications would not have been possible without the use of computers. It would
also not be possible to get the information of our solar system and the cosmos without
computers.
™ Education: Computers have also revolutionized the whole process of education.
Currently, the classrooms, libraries and museums are utilizing computers to make the
education much more interesting. Unlike recorded television shows, computer-aided
education (CAE) and computer-based training (CBT) packages are making learning
much more interactive.
™ Medicine and Healthcare: There has been an increasing use of computers in the
field of medicine. Now, doctors are using computers right from diagnosing the illness
to monitoring a patient’s status during complex surgery. By using automated imaging
techniques, doctors are able to look inside a person’s body and can study each organ
in detail (such as CAT scans or MRI scans), which was not possible few years ago.
There are several examples of special-purpose computers that can operate within the
human body such as a cochlear implant, a special kind of hearing aid that makes it
possible for deaf people to hear.

Chapter 01.indd 18 5/11/2011 2:22:12 PM


Applications of Computers 19

™ Engineering/Architecture/Manufacturing: The architects and engineers are


extensively using computers in designing and drawings. Computers can create
objects that can be viewed from all the three dimensions. By using techniques
like virtual reality, architects can explore houses that have been designed but
not built. The manufacturing factories are using computerized robotic arms
in order to perform hazardous jobs. Besides, computer-aided manufacturing
(CAM) can be used in designing the product, ordering the parts and planning
production. Thus, computers help in coordinating the entire manufacturing
process.
™ Entertainment: Computers are finding greater use in the entertainment industry.
They are used to control the images and sounds. The special effects, which
mesmerize the audience, would not have been possible without the computers. In
addition, computerized animation and colourful graphics have modernized the film
industry.
™ Communication: E-mail or electronic mail is one of the communication media in
which computers are used. Through an e-mail, messages and reports are passed from
one person to one or more persons with the aid of computers and telephone lines. The
advantage of this service is that while transferring the messages it saves time, avoids
wastage of paper, and so on. Moreover, the person who is receiving the messages can
read the messages whenever he is free and can save it, reply it, forward it or delete it
from the computer.
™ Business Application: This is one of the important uses of the computer. Initially,
computers were used for batch processing jobs, where one does not require the
immediate response from the computer. Currently, computers are mainly used for
real-time applications (like at the sales counter) that require immediate response
from the computer. There are various concerns for which computers are used such
as in business forecasting, to prepare pay bills and personal records, in banking
operations and data storage, in various types of life insurance business, and as
an aid to management. Businesses are also using the networking of computers,
where a number of computers are connected together to share the data and the
information. Use of an e-mail and the Internet has changed the ways of doing
business.
™ Publishing: Computers have created a field known as Desktop Publishing (DTP). In
DTP, with the help of a computer and a laser printer one can perform the publishing
job all by oneself. Many of the tasks requiring long manual hours, such as making a
table of contents and an index, can be automatically performed using the computers
and DTP software.
™ Banking: In the field of banking and finance, computers are extensively used. People
can use the Automated Teller Machine (ATM) services 24 hours a day in order to
deposit and withdraw cash. When the different branches of the bank are connected
through the computer networks, the inter-branch transactions, such as drawing
cheques and making drafts, can be performed by the computers without any delay
(Figure 1.18).

Chapter 01.indd 19 5/11/2011 2:22:12 PM


20 Computer Basics

Science Education Medicine and Health Care Engineering / Architecture/


Manufacturing

Computer Applications

Entertainment Communication

Business Application Publishing Banking

Figure 1.18 Application Areas of Computer

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.

Chapter 01.indd 20 5/11/2011 2:22:12 PM


Let Us Summarize 21

7. Fourth-generation computers use microprocessors (circuits containing millions of


transistors) as their basic processing device. These computers are the most powerful,
compact, reliable and affordable as compared to their predecessors.
8. Fifth-generation computers are still in the development stage. These computers will use
megachips, which will result in the production of microprocessors having millions of
electronic components on a single chip. They will use intelligent programming (AI) and
knowledge-based problem-solving techniques.
9. A microcomputer is a small, low-cost digital computer, which usually consists of a
microprocessor, a storage unit, and an input and output channel, all of which may be on
one chip inserted into one or several PC boards. Microcomputers include desktop, laptop
and hand-held models, such as PDAs.
10. 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.
11. A mainframe is an ultrahigh performance computer made for high-volume, processor-
intensive computing. It is capable of supporting large volumes of data processing, high-
performance online transaction processing, and extensive data storage and retrieval.
12. Supercomputers are the special-purpose machines, which are specifically designed to
maximize the number of FLOPS. Any computer below one gigaflop per second is not
considered as a supercomputer.
13. A computer can be viewed as a system that comprises several units (CPU, input unit,
output unit and storage unit). These individual units work together to convert data into
information.
14. The CPU interprets, coordinates the operations and supervises the instructions. It has
three parts: ALU, CU and registers. The ALU performs arithmetic (add, subtract) and
logical operations (and, or) on the stored numbers. The CU checks the correctness of the
sequence of operations, controls the I/O devices and directs the overall functioning of
the other units of the computer. The registers are special-purpose, high-speed temporary
memory units that can hold varied information such as data, instructions, addresses and
intermediate results of calculations.
15. The input unit involves the receipt of data or instructions from the user, in a computer
acceptable form. The computer takes in the data through input devices like keyboard,
mouse, light pen, etc.
16. The output unit supplies the resulting data obtained from the data processing to the user.
Monitors, printers and plotters are some of the examples of output devices.
17. During processing, the intermediate and the results of processing are held by the storage
unit until the manipulation of the data is completed. When the data to be processed or
the results produced by the processing are in large volumes, they are stored on various
storage media like floppies, hard disks and tapes.
18. A computer performs three basic steps to complete any task: input, processing and output.
A computer receives data as input, processes it, stores it and then produces output.
19. Computers have entered in every sphere of human life and found applications in various
fields, such as medicine and healthcare, business, education, science, technology,
government, entertainment, engineering and architecture.

Chapter 01.indd 21 5/11/2011 2:22:13 PM


22 Computer Basics

exercises

Fill in the Blanks


1. The basic component of first-generation computers was .........................
2. The speed of a computer is calculated in .........................
3. Third-generation computers were ......................... based machines.
4. Keyboard is an ......................... device.
5. Laptops are also known as .........................
6. Computers can be classified as ......................., ......................., ....................... and
....................... computers.
7. A computer performs three basic steps to complete any task, which are .......................,
....................... and .......................
8. PDA stands for ...........................................................................
9. The CPU consists of ........................., ......................... and .........................
10. Physical components on which the data are stored permanently are called
.........................

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

Chapter 01.indd 22 5/11/2011 2:22:13 PM


Exercises 23

7. The CPU stands for .........................


(a) Central protection unit (b) Central processing unit
(c) Central power unit (d) Central prerogative unit
8. UNIVAC is an example of .........................
(a) First-generation computer (b) Second-generation computer
(c) Third-generation computer (d) Fourth-generation computer
9. The unit that performs the arithmetic and logical operations on the stored numbers is
known as .........................
(a) Arithmetic logic unit (b) Control unit
(c) Memory unit (d) Both (a) and (b)
10. The ......................... is the “administrative” section of the computer system.
(a) Input unit (b) Output unit
(c) Memory unit (d) Central processing unit

State True or False


1. The ALU is responsible for performing the arithmetic and logical operations.
2. Microcomputers are more powerful than minicomputers.
3. Laptop is also known as a notebook.
4. Vacuum tubes were a part of third-generation computers.
5. EDVAC was a second-generation computer.
6. LSI and VLSI technology are part of fifth-generation computers.
7. A laptop is a portable computer.
8. Primary memory and main memory are synonyms.
9. Computer development is divided into four main generations.
10. PARAM is an example of a portable computer.

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.

Chapter 01.indd 23 5/11/2011 2:22:13 PM


24 Computer Basics

ANSWERS

Fill in the Blanks


1. Vacuum tube 2. Megahertz 3. Integrated circuits
4. Input 5. Notebook computers 6. Micro, Mini, Mainframe, Super
7. Input, Processing, Output 8. Personal digital assistant 9. ALU, CU, registers
10. Secondary storage devices

Multiple-choice Questions
1. (c) 2. (d) 3. (a) 4. (b) 5. (b) 6. (c) 7. (b) 8. (a)
9. (a) 10. (d)

State True or False


1. True 2. False 3. True 4. False 5. False 6. False 7. True
8. True 9. False 10. False

Chapter 01.indd 24 5/11/2011 2:22:13 PM


CHAPTER 2

Computer Organization
and Architecture

DMA
CPU CPU
Controller

System Bus System Bus

Memory I/O Memory I/O

(a) Without DMA Transfer (b) With DMA Transfer

This chapter provides an insight into the basic science of


computer architecture and organization. The architecture
of a computer defines the manner in which the hardware
components of the system work to meet functional objectives,
and enabling these hardware components to work in a
harmonized manner is called computer organization. The
chapter begins with the structure and functioning of CPU. It
then discusses the operations performed on the instruction
and user data. Further, the communication among the
processor, memory, and I/O devices is explained. CISC
and RISC architectures are described along with their
distinctions. The chapter also discusses the various
hardware peripherals that can be added to a computer. The
chapter concludes with an overview on various number
systems along with the coding schemes.

Chapter 02.indd 25 5/11/2011 2:23:42 PM


26 Computer Organization and Architecture

CHAPTER OBJECTIVES

After reading this chapter, you will be able to understand:


™ The central processing unit (CPU), referred to as the “brain” of the computer system, and
its various components
™ The units of a computer that communicate with each other to formulate a functional computer
™ The instruction format, stating the addressing mode used for each operand in an instruction
™ The instruction cycle, the basic function performed by the CPU, that is, the execution of
a program
™ The instruction set, which is a collection of operations
™ The devices inside a computer that play an important role in the functioning of a properly
designed and well-built computer
™ The number system, which defines a set of values used to represent a quantity
™ How to represent numeric, alphabetic and special characters in a computer-understandable
format

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.

2.2 CENTRAL PROCESSING UNIT


The central processing unit (CPU) is referred to as the “brain” of a computer system
and it converts data (input) into meaningful information (output). It is a highly complex,
extensive set of electronic circuitry, which executes stored program instructions. It controls
all internal and external devices, performs arithmetic and logic operations, and operates

Chapter 02.indd 26 5/11/2011 2:23:42 PM


Central Processing Unit 27

Stores Data and Programs

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

Figure 2.1 The Central Processing Unit

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.

2.2.1 Arithmetic/Logic Unit


The arithmetic/logic unit (ALU) contains the electronic circuitry that executes all arithmetic
and logical operations on the data made available to it. The data required to perform the
arithmetic and logical functions are inputs from the designated registers. The ALU comprises
two units: Arithmetic Unit (AU) and Logic Unit (LU).
Arithmetic Unit: The AU contains the circuitry that is responsible for performing the
actual computing and carrying out arithmetic calculations, such as addition, subtraction,
multiplication, and division. It can perform these operations at a very high speed.
Logic Unit: The LU enables the CPU to make logical operations based on the instructions
provided to it. These operations are logical comparisons between data items. The LU can
compare numbers, letters or special characters and then take action based on the result of the
comparison. Logical operations of the LU test for three conditions:
™ Equal-to Condition: In a test for this condition, the ALU compares two values to
determine if they are equal. For example, if the number of tickets sold equals the
number of seats in a cinema hall, then housefull is declared.

Chapter 02.indd 27 5/11/2011 2:23:42 PM


28 Computer Organization and Architecture

™ 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

Figure 2.2 Registers in the CPU

Chapter 02.indd 28 5/11/2011 2:23:42 PM


Central Processing Unit 29

Table 2.1 Registers and Functions

Register Name Function


Program Counter (PC) The PC keeps track of the next instruction to be executed

Instruction Register (IR) The IR holds the instruction to be decoded by the CU


Memory Address Register (MAR) The MAR holds the address of the next location in the memory to
be accessed
Memory Buffer Register (MBR) The MBR is used for storing data either coming to the CPU or
data being transferred by the CPU

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.

2.2.3 Control Unit


The control unit (CU) of the CPU contains circuitry that uses electrical signals to direct the
entire computer system to carry out, or execute, stored program instructions. This resembles
an orchestra leader who himself does not play a musical instrument but directs other people
to play the musical instrument in a harmonized manner. The CU also does not execute
program instructions; rather, it directs other parts of the system to do so by communicating
with both the ALU and the memory.

Chapter 02.indd 29 5/11/2011 2:23:42 PM


30 Computer Organization and Architecture

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.

2.2.4 System Bus


A bus is a set of connections between two or more components/devices, which are designed
to transfer several/all bits of a word from the source to the destination. It is a shared medium
of information transfer. A bus consists of multiple paths, which are also termed lines, and
each line is capable of transferring one bit at a time. Thus, to transmit 8 bits simultaneously

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

Figure 2.3 Control Unit

Chapter 02.indd 30 5/11/2011 2:23:42 PM


Central Processing Unit 31

Shared
Bus

CPU Memory I/O

Figure 2.4 System 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

CPU Memory Memory I/O I/O

System
Bus

Figure 2.5 Bus Interconnection

Chapter 02.indd 31 5/11/2011 2:23:42 PM


32 Computer Organization and Architecture

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.

2.2.5 Main Memory Unit


The memory is that part of the computer that holds data and instructions for processing.
Logically, it is an integral component of the CPU, but, physically, it is a separate part
placed on the computer’s motherboard. The memory stores program instructions or data
for only as long as the program they pertain to is in operation. The CPU accesses the main
memory in a random manner, that is, the CPU can access any location of this memory to
either read information from it or store information in it. The primary memory is of two
types: the first is called the Random Access Memory (RAM) and the second is the Read Only
Memory (ROM).
The RAM directly provides the required information to the processor. It can be defined
as a block of sequential memory locations, each of which has a unique address determining
the location and those locations contain a data element. Storage locations in the main memory
are addressed directly by the CPU’s instructions. It is volatile in nature, which means the
information stored in it remains as long as the power is switched on. As soon as the power is
switched off, the information contained in the RAM is lost.
The ROM stores the initial start-up instructions and routines in the Basic Input/Output
System (BIOS), which can only be read by the CPU, each time it is switched on. The contents
of the ROM are not lost even in the case of a sudden power failure, thus making it non-volatile
in nature. The instructions in the ROM are built into the electronic circuits of the chip, called
firmware. The ROM is also randomly accessible in nature, which means the CPU can randomly
access any location within the ROM. Improvement in technology for constructing a flexible
ROM comes in various types, namely Programmable Read Only Memory (PROM), Erasable
Programmable Read Only Memory (EPROM) and Electrically Erasable Programmable Read
Only Memory (EEPROM).

2.2.6 Cache Memory


The cache is a very high speed, expensive piece of memory, which is used to speed up the
memory-retrieval process. Due to its higher cost, the CPU comes with a relatively small
amount of cache compared with the main memory. Without the cache memory, every request
from the CPU to access data would be sent to the main memory, which in response sends
the data back to the CPU through the system bus. This is a slow process in computing terms.
The idea of introducing cache is that this extremely fast memory would store data that are
frequently accessed and, if possible, the data that are around it. This is to achieve the quickest
possible response time to the CPU.

Chapter 02.indd 32 5/11/2011 2:23:43 PM


Central Processing Unit 33

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

Figure 2.6 Various Levels of Cache

Chapter 02.indd 33 5/11/2011 2:23:43 PM


34 Computer Organization and Architecture

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

Cache completion of this operation. During this interval, the


Memory processor is forced to wait. Similarly, the following
sequence of events takes place when information is
Address written in the memory:
Data
1. The processor places the address in the MAR
through the address bus.
2. The processor places the data to be written in
Processor
the memory on the data bus.
3. The processor issues a WRITE command to the
memory by the control bus.
Figure 2.7 Processor–Memory 4. The data are written in the memory at the
Communication address specified in the MAR.

Chapter 02.indd 34 5/11/2011 2:23:43 PM


Communication among Various Units 35

The main concern in the processor-memory communication is the speed mismatch


between the memory and processor. The memory speed is slower than the CPU’s speed.
Hence, the CPU is forced to wait for the data. As already discussed, this speed mismatch is
reduced by using the small fast memory (called cache) as an intermediate buffer between
the processor and memory.

2.3.2 Processor—I/O Devices Communication


The I/O units are connected to the computer system through the system bus. Each I/O
device in a computer system is first met with the controller, called the Direct Memory
Access (DMA) controller, which controls the operation of that device. The controller is
connected to the buses to perform a sequence of data transfers on behalf of the CPU (see
Figure 2.8). It is capable of taking over control of the system bus from the CPU, which is
required to transfer data to and from the memory over the system bus. The DMA controller
can directly access the memory and is used to transfer data from one memory location to
another or from an I/O device to the memory and vice versa. The DMA controller can use
the system bus only when the CPU does not require it or it should suspend the operations
currently being processed by the CPU.
With the DMA controller, a dedicated data-transfer device reads the incoming data
from a device and stores that data in a system memory buffer for later retrieval by the
CPU. The DMA controller allows peripheral devices to access the memory for both read
and write operations without affecting the state of the computer’s central processor.
As a result, the data-transfer rate is significantly increased, thus improving the system
efficiency. When a large amount of data is to be transferred from the CPU, the DMA
controller can be used. The DMA controller allows the I/O unit to exchange data directly
with the memory without going through the CPU except at the beginning (to issue the
command) and at the end (to clean up after the command is processed). While the I/O
operation is being performed by the DMA controller, the CPU can start execution of some
other part of the same program or can start executing some other program. Thus, the DMA

DMA
CPU CPU
Controller

System Bus System Bus

Memory I/O Memory I/O

(a) Without DMA Transfer (b) With DMA Transfer

Figure 2.8 Processor—I/O Communication

Chapter 02.indd 35 5/11/2011 2:23:43 PM


36 Computer Organization and Architecture

controller increases the speed of I/O operations by taking over buses and thus eliminating
the CPU’s intervention.

2.4 INSTRUCTION FORMAT


An instruction consists of an opcode and one or more operands, which may be addressed
implicitly or explicitly. To define the layout of the bits allocated to these elements of instructions,
an instruction format is used. The instruction format also indicates (implicitly or explicitly) the
addressing mode used for each operand in that instruction. Figure 2.9 illustrates the format of
an instruction for the processor. The first three bits represent the opcode and the last six bits
represent the operand. The middle bit specifies whether the operand is a memory address or
a number. When the bit is set to 1, the operand represents a number. Note that for most of the
instruction sets, more than one
Number Bit
instruction format is used. Over
the years, a variety of instruction
formats have been used, but
designing of an instruction
Opcode Operand format involves many complex
issues. Some of the key issues are
Figure 2.9 Instruction Format discussed below:
1. Instruction Length: The core designing issue involved in an instruction format
is the designing of the instruction length. The instruction length determines the
flexibility of the machine. The decision on the length of an instruction depends on
the memory size, memory organization and memory transfer length. There exists
a trade-off between a desire of having a powerful instruction range and need of
saving space.
2. Allocation of Bits: For the given instruction length, there is a trade-off between the
number of opcodes and the power of the addressing capability. More opcode means
more bits in the opcode field, for an instruction format of a given length, which
reduces the number of bits available for addressing.

2.5 INSTRUCTION CYCLE


The basic function performed by the CPU is the execution of a program. The program to
be executed is a set of instructions, which are stored in the memory. The CPU executes
the instructions of the program to complete a given task. The CPU fetches instructions
stored in the memory and then executes the fetched instructions within the CPU before it
can proceed to fetch the next instruction from the memory. This process is continued until
specified to stop. The instruction execution takes place in the CPU registers, which are used
as temporary storage areas and have limited storage space. These CPU registers have been
discussed earlier.
In the simplest form, the instruction processing consists of two cycles, fetch cycle and
execute cycle, as shown in Figure 2.10. Here, the CPU fetches (reads) instructions from
the memory, one at a time, and performs the operation specified by this instruction. The
instruction fetching involves reading of an instruction from a memory location to the CPU;

Chapter 02.indd 36 5/11/2011 2:23:44 PM


Instruction Cycle 37

Execute
Fetch/Execute Cycle
Memory

Fetch CPU

Figure 2.10 Two-step Instruction Cycle


the execution of this instruction may involve several operations depending on the nature of
instructions. The processing needed for a single instruction (fetch and execution) is referred
to as the instruction cycle.
Fetch Cycle: In the beginning, the address, which is stored in the PC, is transferred to the
MAR. The CPU then transfers the instruction located at the address stored in the MAR to the
MBR through the data lines connecting the CPU to memory. This transfer from the memory
to the CPU is coordinated by the CU. To finish the cycle, the newly fetched instruction is
transferred to the IR and, unless instructed otherwise, the CU increments the PC to point to the
next address location in the memory.
Figure 2.11 illustrates the fetch cycle, which can be summarized in the following points:
1. PC =>MAR
2. MAR => MEMORY =>MBR
3. MBR =>IR
4. CU increments PC
After the CPU has finished fetching an instruction, the CU checks the contents of the IR
and determines which type of execution is to be carried out next. This process is known as the
decoding phase. The instruction is now ready for the execution cycle.
Address
Line
CPU

PC MAR

CU MEMORY

IR MBR

Data
Line

Figure 2.11 Fetch Cycle

Chapter 02.indd 37 5/11/2011 2:23:44 PM


38 Computer Organization and Architecture

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

Figure 2.12 Execution Cycle

Chapter 02.indd 38 5/11/2011 2:23:44 PM


Instruction Set 39

2.6 INSTRUCTION SET


Processors are built with the ability to execute a limited set of basic operations. The collections
of these operations are known as the instruction set of a processor. An instruction set is
necessary so that a user can create machine language programs to perform any logical and/or
mathematical operations. The instruction set is hardwired (embedded) in the processor, which
determines the machine language for the processor. The more complex the instruction set is,
the slower the processor works.
Processors differ from one another by their instruction set. If the same program can run
on two different processors, they are said to be compatible; for example, programs written for
IBM computers may not run on Apple computers because these two architectures (different
processors) are not compatible. Since each processor has its unique instruction set, machine
language programs written for one processor will normally not run on a different processor.
Therefore, all operating systems and software programs are constructed within the boundaries
of the processor’s instruction set. Thus, the design of the instruction set for the processor
becomes an important aspect of the computer architecture. Based upon the instruction sets,
there are two common types of architectures: Complex Instruction Set Computer (CISC) and
Reduced Instruction Set Computer (RISC).

2.6.1 CISC Architecture


Earlier, programming was done in low-level languages such as the machine language and
assembly language. These languages were executed very quickly on computers, but were not
easy for programmers to understand and code. To overcome these shortcomings and make
programming more accessible to the masses, high-level languages were developed. These
languages resembled the English language and were user-friendly. However, instructions in
high-level languages were required to be converted into their equivalent low-level languages
before the processor can execute them. This conversion process was performed by the
compiler. With continuous development in high-level languages, they became more powerful
and provided more features (e.g. complex mathematical functions). Writing compilers for such
high-level languages became increasingly difficult. Compilers had to translate complex sub-
routines into long sequences of machine instructions. The development of a compiler was a
tricky, error-prone and time-consuming process.
To make the compiler development easier, the CISC was developed. The sole motive
of manufacturers of CISC-based processors was to manufacture processors with a more
extensive and complex instruction set. It shifted most of the burden of generating machine
instructions to the processor. For example, instead of making a compiler to write long
machine instructions for calculating a square root, a CISC processor would incorporate a
hardwired circuitry for performing the square root in a single step. Writing instructions for a
CISC processor is comparatively easy because a single instruction is sufficient to utilize the
built-in ability. In fact, the first PC microprocessors were CISC processors because all the
instructions that the processor could execute were built into the processors. As the memory
was expensive in the early days of computers, CISC processors saved the memory because
their instructions could be fed directly into the processor. Most of the PCs today include a
CISC processor.

Chapter 02.indd 39 5/11/2011 2:23:44 PM


40 Computer Organization and Architecture

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.

2.6.2 RISC Architecture


The RISC is a processor architecture that utilizes a small, highly optimized set of instructions.
The concept behind the RISC architecture is that a small number of instructions are faster in
execution as compared to a single long instruction. To implement this, the RISC architecture
simplifies the instruction set of the processor, which helps in reducing the execution time.
Optimisation of each instruction in the processor is done through a technique known as
pipelining. Pipelining allows the processor to work on different steps of the instruction at the
same time; using this technique, more instructions can be executed in a shorter time. This is
achieved by overlapping the fetch, decode and execute cycles of two or more instructions.
To prevent more interactions with the memory or to reduce the access time, the RISC design
incorporates a larger number of registers.
As each instruction is executed directly using the processor, no hardwired circuitry (used
for complex instructions) is required. This allows RISC processors to be smaller, consume
less power and run cooler than CISC processors. Due to these advantages, RISC processors
are ideal for embedded applications such as mobile phones, PDAs and digital cameras. In
addition, the simple design of a RISC processor reduces its development time as compared to
a CISC processor.

Chapter 02.indd 40 5/11/2011 2:23:44 PM


Instruction Set 41

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.

2.6.3 Comparing the CISC with RISC


The CISC processor came with complex instructions sets, where decoding and execution of
instructions was a complicated and time-consuming task. Moreover, with the development of
high-level languages, using the instruction set posed problems in the compiler’s design. As
the CISC processors were less memory (very expensive earlier) intensive, it resulted in the
rapid growth of CISC processors. With time, memory prices reduced drastically but CISC
processors could not optimally use this availability of cheap memory. Manufacturers started
working towards processors, which could run faster by using extra memory. This idea gave
birth to the RISC architecture, which included small, highly optimized instructions but were
more memory intensive.
The difference between the RISC approach and the CISC approach (see Figure 2.13) can
be best explained by an example, which shows how each design carries out five multiplications
tasks. The general steps required to perform the multiplications are as follows:
1. Read the first number out of the memory.
2. Read the second number out of the memory.

Chapter 02.indd 41 5/11/2011 2:23:44 PM


42 Computer Organization and Architecture

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

Read 1st Read 2nd Write


Multiply Fifth Multiplication
Number Number Result

Read 1st Read 2nd Write


Multiply Fourth Multiplication
Number Number Result

Read 1st Read 2nd Write


Multiply Thrid Multiplication
Number Number Result

Read 1st Read 2nd Write


Multiply Second Multiplication
Number Number Result

Read 1st Read 2nd Write


Multiply First Multiplication
Number Number Result

>>>>TIME >>>>>>>>>

Figure 2.13 CISC versus RISC Operations

3. Multiply the two numbers.


4. Write the result back to the memory.
5. Repeat Steps 1–4 for each of the four remaining multiplications.
On a simple CISC-based CPU, the CPU is first configured to get (read) the numbers and
then the numbers are read. Next, the CPU is configured to multiply the numbers and then
the numbers are multiplied. Next, the CPU is configured to write the result to the memory.
Finally, the numbers are written into the memory. To multiply five sets of numbers, the
whole process must be repeated five times.
On a simple RISC CPU, the process is slightly different. A piece of hardware on
the CPU is dedicated to read the first number. When this operation is complete, another
piece of hardware reads the second number. After completion of this operation, another
hardware performs the multiplication and when it is completed, another hardware writes
the result to the memory. If this operation happens five times in a row, the RISC hardware
dedicated to obtaining the first number from the memory obtains the first number for the
second operation and second number for the first operation. At the same time, the second
number for the second operation is retrieved from the memory, while the first number
for the third operation is obtained. As the first result is written back to the memory, the
second multiplication is performed, while the second number for the third operation is
read from the memory and the first number for the fourth operation is read from the
memory, and so on.

Chapter 02.indd 42 5/11/2011 2:23:44 PM


Inside a Computer 43

2.7 INSIDE A COMPUTER


Computing machines are complex devices made from numerous electronic components.
Many of these components are small, sensitive, expensive and operate with other components
to provide better performance to the computing machines. Therefore, to ensure better
performance and increase in the life of these components, they are placed inside a metal
enclosure called the system case or cabinet (see Figure 2.14). The system case is a metal
and plastic box that houses the main components of the computer. It protects electronics
hardware against the heat, light, temperature, etc. It serves important roles in the functioning
of a properly designed and well-built computer. Several areas where the system case plays an
important role are:
™ Structure: The system case provides a rigid structural framework to the components,
which ensures that everything fits together and works in a well-organized manner.
™ Protection: The system case protects the inside of the system from physical damage
and electrical interference.
™ Cooling: The case provides a cooling system to the vital components. Components
that run under cool temperature last longer and are less troublesome.
™ Organization and Expandability: The system case is a key to the organization of
physical systems. If a system case is poorly designed, upgradation or expansion of a
peripheral is limited.
™ Status Display: The system case contains lights or LEDs that provide varied
information pertaining to the working of the system to the user.

Power Supply

Extra Bays

Tape Drive
Access CD-ROM
Slots
3 ” Floppy Drive
Hard Disk Drive

Motherboard

Peripheral Card

Figure 2.14 System Case

Chapter 02.indd 43 5/11/2011 2:23:44 PM


44 Computer Organization and Architecture

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.1 Power Supply (SMPS)


AC versus DC
Power supply or Switched Mode Power
AC (alternating current) is an electric current
Supply (SMPS) is a transformer and voltage
that reverses its direction in a circuit at
control device in a computer that furnishes
FACT FILE

regular intervals. AC is useful for appliances


power to all the electronic components by
that work based on the fact that the current
converting incoming AC into the low-voltage
is constantly changing, like pumping motors.
DC supply. When a computer is turned
The current flowing from most wall outletson, the power supply allows the converted
in our homes is AC. DC (direct current) iselectricity to travel to other components
an electric current that flows in one direction
inside the computer. The modern-day
only. DC is useful for appliances that run on
power supply provides protection against
a steady current, like emergency light. surge and spikes in the power, which could
damage vital components of the computer.
Nowadays, the computer power supply is
capable of providing different voltages, at
different strengths, and manages additional
signals for the motherboard. The power
supply plays an important role in the
following areas of the computer system (see
Figure 2.15):
™ Stability: A high-quality power
supply with sufficient capacity to
meet the demands of the computer
provides years of stable power for
the computer.
™ Cooling: The power supply
contains the main fan that
controls the flow of air through
the system case. This fan is a
Figure 2.15 Power Supply major component in the computer
cooling system.
™ Expandability: The capacity of the power supply determines the ability to add new
drives to the system or upgrade to a more powerful motherboard or processor.

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

Chapter 02.indd 44 5/11/2011 2:23:45 PM


Inside a Computer 45

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

Figure 2.16 Motherboard

Chapter 02.indd 45 5/11/2011 2:23:45 PM


46 Computer Organization and Architecture

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.

2.7.3 Ports and Interfaces


Ports and interfaces are a generic name for the various “holes” (and their associated electronics)
found at the back of the computer, using which external devices are connected to the computer’s
motherboard. Different interfaces and ports run at varying speeds and work best with specific
types of devices (see Figure 2.17).
™ PS/2 Ports: It is a standard serial port connector used to plug the computer mouse
and keyboards into the personal computer. It consists of six pins in a small, round-
shape socket.

USB Port

Serial Port

PS2 Port

SCSI Port

Parallel Port

Figure 2.17 Different Types of Ports

Chapter 02.indd 46 5/11/2011 2:23:45 PM


Inside a Computer 47

™ Serial Ports: It is a general-purpose communications port through which data are


passed serially, that is, one bit at a time. These ports are used for transmitting data
over long distances. In the past, most digital cameras were connected to a computer’s
serial port in order to transfer images to the computer. However, because of its slow
speed, these ports are used with the computer mouse and modem.
™ Parallel Port: It is an interface on a computer, which supports transmission of
multiple bits of data (usually 8 bits) at the same time. This port transmits data faster
than a serial port and is exclusively used for connecting peripherals such as printers
and CD-ROM drives.
™ SCSI Port: These ports are used in transmitting data up to seven devices in the
“daisy chain” fashion and at a speed faster than serial and parallel ports (usually
32 bits at a time). In the daisy chain fashion, several devices are connected in
series to each other, so that data for the seventh device need to go through the
entire six devices first. These ports are hardware interfaces, which include an
expansion board that plugs into the computer called the SCSI host adapter or SCSI
controller. Devices which can be connected to SCSI ports are hard-disk drives and
network adapters.
™ Universal Serial Bus (USB) Port: The USB port is a plug-and-play hardware
interface for connecting peripherals such as the keyboard, mouse, joystick, scanner,
printer and modem. It supports a maximum bandwidth of 12 MB per second and
has the capability to connect up to 127 devices. With the USB port, a new device
can be added to the computer without adding an adapter card. These ports are the
replacement for the parallel and serial ports.
2.7.4 Expansion Cards
An expansion card, also called an
adapter card, is a circuit board that
provides additional capabilities
to the computer system. Adapter
cards are made up of large-scale
integrated circuit components PC Card
Sound Card
installed on it. The cards are plugged
into the expansion sockets present
on the computer’s motherboard
to provide the computer an added
functionality. Common available
expansion cards connect monitors Modem Video Card
(for enhanced graphics) and
microphones (for sound), each Figure 2.18 Expansion Card
having a special purpose to perform
(see Figure 2.18). However, nowadays most of the adapters come in-built on the motherboard
and no expansion card is required, unless the need for high performance is required.
™ Sound Cards: An expansion card that allows the computer to output sound through
connected speakers, to record sounds from a microphone and to manipulate sounds

Chapter 02.indd 47 5/11/2011 2:23:45 PM


48 Computer Organization and Architecture

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

Chapter 02.indd 48 5/11/2011 2:23:45 PM


Inside a Computer 49

2.7.6 Memory Chips


The memory is the place where the
computer holds programs and data that
are currently in use. The system memory 4.25” 72-pins SIMM
on the motherboard is arranged in groups
called the memory banks. The number of
the memory banks and their configurations
vary from computer to computer because
these are determined by the CPU and the 5.25” 168-pins DIMM
way it receives information. The speed of Figure 2.20 SIMM and DIMM RAM Chips
the CPU determines the number of memory
sockets required in a bank. For the main memory, either of the two types of memory chips is
used: Single In-Line Memory Modules (SIMM) or Dual In-Line Memory Modules (DIMM)
(see Figure 2.20).
SIMM: SIMM are small circuit boards designed to accommodate surface-mount memory
chips. A typical SIMM chip comprises a number of RAM chips on a printed circuit board
(PCB), which fits into a SIMM socket on a computer’s motherboard. These chips are packed
into small plastic or ceramic dual inline packages (DIPs), which are assembled into a memory
module. A typical motherboard offers four SIMM sockets capable of taking either single-sided
or double-sided SIMMs with module sizes of 4, 8, 16, 32 or even 64 MB. When 32-bit SIMM
chips are used with processors, they have to be installed in pairs, with each pair of modules
making up a memory bank. These chips support 32-bit data paths and are originally used with
32-bit CPUs. The CPU then communicates with the memory bank as one logical unit. SIMM
chips usually come in the following two formats:
™ A 30-pin SIMM used in older system boards, which deliver 1 byte of data.
™ A larger 72-pin SIMM used in modern PCs, which deliver 4 bytes of data (plus parity)
in every memory request.
DIMM: With the increase in speed and bandwidth capability, a new standard for the memory
was adopted called dual in-line memory module (DIMM). These chips have 168 pins in two
(or dual) rows of contacts; one on each side of the card. With the additional pins, a CPU
retrieves information from the DIMM chip at 64 bits as compared to a 32- or 16-bit transfer
with SIMMs. Some of the physical differences between 168-pin DIMMs and 72-pin SIMMs
include the length of the module, the number of notches on the module and the way the module
is installed. The main difference between the two is that on a SIMM, opposing pins on either
side of the board are tied together to form one electrical contact, while on a DIMM, opposing
pins remain electrically isolated to form two separate contacts. DIMMs are often used in
computer configurations that support a 64-bit or wider memory bus (like Intel’s Pentium 4).
2.7.7 Storage Devices
Disk drives are the important components present inside the system case. These drives are
used to read and write information to and from the processor. The three most common disk
drives located inside a system case are the hard drive, floppy disk drive and CD-ROM.

Chapter 02.indd 49 5/11/2011 2:23:46 PM


50 Computer Organization and Architecture

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.

2.8 DATA REPRESENTATION IN COMPUTERS


Since the early days of human civilisation, people have been using their fingers, sticks,
etc., for counting things. The need for counting probably originated when man started to
use animals for domestic purposes and practise animal breeding for fulfilling his needs and
requirements. As daily activities became more complex, numbers became more important
in trade, time, distance and in all other spheres of human life. Ever since people discovered
that it was necessary to count objects, they have been looking for easier ways of counting.

Chapter 02.indd 50 5/11/2011 2:23:46 PM


Data Representation in Computers 51

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

Chapter 02.indd 51 5/11/2011 2:23:46 PM


52 Computer Organization and Architecture

2.8.1 Types of Number System


Generally, a user is least aware of the fact that actual operations in a computer are
done with a binary number system. Traditionally, the two possible states for the binary
system are represented by the digits 0 and 1. Long before the introduction of octal and
hexadecimal numbers, programmers used a convenient method of handling large binary
numbers in either 3-bit or 4-bit groupings. Later, the actual machine code for the computer
instructions was replaced by mnemonics, which comprised of three to four letters of the
assembly language for a particular CPU. It was also possible to use more than one base
number for writing instructions/programs in the assembly languages, so programmers
made sure their assemblers could understand octal, hexadecimal and binary numbers.
Octal and hexadecimal numbers are more compact than binary numbers, which a computer
understands. Thus, octal and hexadecimal numbers prevent unwieldy strings that were
written in binary. For example, the three-digit decimal number 513 requires 10 digits in
pure binary (1000000001) but only three (201) in hexadecimal. Table 2.2 lists the types
of number system.

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.

Table 2.2 Types of Number System

Number System Radix Value Set of Digits Example

Decimal R = 10 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) (25)10

Binary R=2 (0, 1) (11001)2


Octal R=8 (0, 1, 2, 3, 4, 5, 6, 7) (31)8

Hexadecimal R = 16 (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F) (19)16

Chapter 02.indd 52 5/11/2011 2:23:46 PM


Data Representation in Computers 53

Table 2.3 Representing 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

Decimal Number Binary Number Octal Number

0 0000 000 (0 × 80)

1 0001 001 (1 × 80)

2 0010 002 (2 × 80)

3 0011 003 (3 × 80)

4 0100 004 (4 × 80)

5 0101 005 (5 × 80)

6 0110 006 (6 × 80)

7 0111 007 (7 × 80)

8 1000 010 (1 × 81 + 0 × 80)

9 1001 011 (1 × 81 + 1 × 80)

Chapter 02.indd 53 5/11/2011 2:23:46 PM


54 Computer Organization and Architecture

Table 2.5 Comparing Decimal, Binary, Octal and Hexadecimal

Decimal Binary Octal Hexadecimal


0 0000 000 0
1 0001 001 1
2 0010 002 2
3 0011 003 3
4 0100 004 4
5 0101 005 5
6 0110 006 6
7 0111 007 7
8 1000 010 8
9 1001 011 9
10 1010 012 A
11 1011 013 B
12 1100 014 C
13 1101 015 D
14 1110 016 E
15 1111 017 F

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

2.8.2 Conversion Between Number Bases


Computers and other digital systems process information as their primary function. Therefore,
it is necessary to have methods and systems for representing information in forms, which can
be manipulated and stored electronically. As discussed earlier, internally, a computer uses
binary numbers for data representation, whereas, externally, it uses decimal numbers. It means
a computer performs the decimal to binary conversion and vice versa. In general, any number
in one number system can be represented in another number system.
Converting Decimal to Binary, Octal and Hexadecimal: The method used
for the conversion of a decimal number into other number systems is often done using the
“remainder” method. This method involves the following steps:
1. Divide the decimal number by the base of the target number system. That is, to
convert decimal to binary, divide the decimal number with 2 (the base of the binary
number system), 8 for octal and 16 for hexadecimal.

Chapter 02.indd 54 5/11/2011 2:23:46 PM


Data Representation in Computers 55

2. Note the remainder separately. In case of hexadecimal, if the remainder exceeds 9,


then convert the remainder into an equivalent hexadecimal form; for example, if the
remainder is 10, then note the remainder as A.
3. Continually repeat the process of dividing until the quotient is zero and keep writing
the remainders after each step of division.
4. Finally, when no more division can occur, write down the remainders in reverse
order.
Example 1: Determine the binary equivalent of (36)10.

2 36 Remainder Least Significant Bit (LSB)


2 18 0
2 9 0
2 4 1
2 2 0
2 1 0
0 1 Most Significant Bit (MSB)
Taking remainders in the reverse order, we have 100100. Thus, the binary equivalent of (36)10
is (100100)2.
Example 2: Determine the octal equivalent of (359)10.

8 359 Remainder Least Significant Bit (LSB)


8 44 7
8 5 4
8 0 5 Most Significant Bit (MSB)
Thus, the octal equivalent of (359)10 is (547)8.
Example 3: Determine the hexadecimal equivalent of (5112)10.

16 5112 Remainder Least Significant Bit (LSB)


16 319 8=8
16 19 15 = F
16 1 3=3
16 0 1=1 Most Significant Bit (MSB)
Thus, the hexadecimal equivalent of (5112)10 is (13F8)16.
Converting Binary, Octal and Hexadecimal to Decimal: The method used for
the conversion of a binary, octal or hexadecimal number to decimal number involves each digit
of the binary, octal or hexadecimal number to be multiplied by its weighted position and then
each of the weighted values is added together to get the decimal number.

Chapter 02.indd 55 5/11/2011 2:23:46 PM


56 Computer Organization and Architecture

Example 1: Determine the decimal equivalent of (11010)2.

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.

Example 2: Determine the decimal equivalent of (456)8.

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.

Example 3: Determine the decimal equivalent of (B14)16.

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.

Converting Among Binary, Octal and Hexadecimal: Converting among binary,


octal and hexadecimal can be accomplished easily without converting to decimal first, as the
base numbers of all three systems (2, 8 and 16, respectively) are powers of 2. Any octal digit
can be written as a group of three binary digits, while a hexadecimal number will comprise
four binary digits.
Example 1: Determine the octal equivalent of (010111)2

Binary Number 010 111


Octal Number 2 7
The octal equivalent of (010111)2 is (27)8.

Chapter 02.indd 56 5/11/2011 2:23:46 PM


Data Representation in Computers 57

Example 2: Determine the hexadecimal equivalent of (11001011)2.

Binary Number 1100 1011


Decimal Number 12 11
Hexadecimal Number C B
The hexadecimal equivalent of (11001011)2 is (CB)16.
Example 3: Determine the binary equivalent of (231)8.

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.

Example 1: Determine the hexadecimal equivalent of (2327)8.

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.

Chapter 02.indd 57 5/11/2011 2:23:46 PM


58 Computer Organization and Architecture

Example 2: Determine the octal equivalent of (2B6)16.

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.

Chapter 02.indd 58 5/11/2011 2:23:46 PM


Coding Schemes 59

Table 2.6 ASCII Coding Chart

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 □

Chapter 02.indd 59 5/11/2011 2:23:47 PM


60 Computer Organization and Architecture

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

transformation formats, namely Unicode standard allocates a unique numeric value


Transformations Format-8 (UTF-8) and UTF-16. and name to each character. The objective
UTF-8 is a lossless encoding of Unicode behind the Unicode was to use a single
characters. This format encodes each Unicode 16-bit encoding that provides code
character as a variable number of octets (1–4), points for more than 65,000 characters
where the number of octets required depends on and to support characters in major
the number assigned to the character. languages of the world. The Unicode
In the UTF-16 encoding, characters are standard incorporates punctuation marks,
symbolized using either one or two unsigned mathematical symbols, technical symbols,
16-bit integers, depending on the character value arrows and many more characters.
for storage or transmission through data networks. Even though a character may be
used in more than one language, it is
defined only once in the Unicode; for example, the Latin capital letter “A” is mapped once,
even though it is used in English, German and Japanese. On the other hand, it was decided
that the Cyrillic capital letter “A” is a different character from the Latin capital letter “A”,
even though the two letters look a lot like each other. The reason behind decisions like these is
interesting to linguists, but usually not important to programmers.

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.

Chapter 02.indd 60 5/11/2011 2:23:47 PM


Let Us Summarize 61

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.

Chapter 02.indd 61 5/11/2011 2:23:47 PM


62 Computer Organization and Architecture

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

Fill in the Blanks


1. The ......................... controls the I/O devices and transfer of data to and from the primary
storage.
2. ......................... enables the processor to access data quickly whenever they are needed.
3. The ......................... informs the CPU about the location of the data residing in the memory.
4. The ......................... is responsible for recognizing which operation the bit pattern represents.
5. Decoding and executing instructions are complicated and time-consuming in the
......................... processor architecture.
6. A metal and plastic box that houses the main components of the computer and protects
against the heat, light, temperature and other means is called .........................
7. ......................... is a large multilayered printed circuit board inside a computer that
contains CPU, BIOS ROM chip and the CMOS setup information.
8. ......................... is a general-purpose communications port through which data are passed
slowly over long distances.
9. ......................... is an expansion card that allows two computers to communicate over
ordinary phone lines.
10. The number systems can be categorized into two broad categories: ......................... and
.........................

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

Chapter 02.indd 62 5/11/2011 2:23:47 PM


Exercises 63

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

State True or False


1. A processor only operates on binary data, that is, data composed of 1s and 0s.
2. The address bus informs the CPU about the location of the data residing in the memory.
3. Registers are special-purpose, high-speed permanent memory units.
4. A program counter is a general-purpose register used for storing temporary results and
results produced by the ALU.
5. The L2 cache is usually 64 KB–2 MB in size.
6. A power supply is a transformer that converts power into the low-voltage AC supply.
7. A USB port is a plug-and-play hardware interface that supports maximum bandwidth of
12 Mbit per second.
8. The PC card is a removable device, approximately the size of a credit card.
9. SIMM chips are faster than DIMM chips.
10. The Unicode is a character-encoding standard developed by the Unicode Consortium.

Chapter 02.indd 63 5/11/2011 2:23:47 PM


64 Computer Organization and Architecture

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

Fill in the Blanks


1. CU 2. Cache 3. Address bus
4. Decode cycle 5. CISC 6. System case
7. Motherboard 8. Serial port 9. Modem
10. Non-positional number system,
positional number system

Multiple-choice Questions
1. (b) 2. (a) 3. (b) 4. (a) 5. (c) 6. (c) 7. (b) 8. (a)
9. (b) 10. (d)

State True or False


1. True 2. True 3. False 4. False 5. True 6. False 7. True
8. True 9. False 10. True

Chapter 02.indd 64 5/11/2011 2:23:47 PM


CHAPTER 3

Computer Memory
and Storage

This chapter introduces the reader to memory and storage


present inside a computer system. A computer memory refers
to the electronic holding place for instructions and data where
the computer’s microprocessor can reach quickly. Computer
storage refers to the permanent computer memory that stores
all the data files and instructions even after the computer
system is turned off. The chapter begins with a brief outlook
on memory and its representation. Next, memory hierarchy
along with RAM and ROM is studied. Furthermore,
classification of storage devices, magnetic tapes, magnetic
disks, and optical disks are examined in detail. Finally, the
chapter concludes by providing an outlook on mass storage
devices along with their types.

Chapter 03.indd 65 5/11/2011 2:25:02 PM


66 Computer Memory and Storage

CHAPTER OBJECTIVES

After reading this chapter, you will be able to understand:


™ The three fundamental types of memory in a computer system
™ How random access memory (RAM) stores and keeps track of the data currently being
processed in a computer
™ Read only memory (ROM), a special chip that stores start-up instructions to help the
computer in the booting process
™ Memory, the most essential part of computer processing, and how the CPU uses memory
™ Different types of secondary storage devices
™ How magnetic tape holds data recording in the form of tiny segments of magnetized and
demagnetized part on the surface of the tape
™ Magnetic disk, the most popular and widely used storage medium for direct access
secondary storage
™ Various types of magnetic disks and how read/write operation is performed on these disks
™ Optical disk, a new storage medium that is gaining popularity
™ Various types of optical disks—CD-ROM and DVD-ROM
™ Magneto-optical storage devices, which include the basic principle of both magnetic and
optical storage
™ How mass storage device provides vast amount of storage capacity, and its different types

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.

Chapter 03.indd 66 5/11/2011 2:25:02 PM


Memory Hierarchy 67

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.

3.2 MEMORY HIERARCHY


The processor is the “brain” of the computer where all the essential computing takes place.
But unlike a human brain, a computer processor has very limited memory. Thus, it has to rely
on other kinds of memories to hold data and instructions and to store results. The memory in a
computer system is of three fundamental types:
™ Internal Processor Memory: This memory is placed within the CPU (processor)
or is attached to a special fast bus. Internal memory 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. Processor memory is the fastest among all the memories but is the
most expensive also. Therefore, a very diminutive part of internal processor memory
is used in the computer system. It is generally used to compensate for the speed gap
between the primary memory and the processor.

Chapter 03.indd 67 5/11/2011 2:25:02 PM


68 Computer Memory and Storage

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

Figure 3.1 Memory Hierarchy

Chapter 03.indd 68 5/11/2011 2:25:02 PM


Random Access Memory 69

3.3 RANDOM ACCESS MEMORY


RAM is like the computer’s scratch pad. It 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. RAM is much faster to read
from and write to than the other kinds of storage in a computer, like the hard disk or floppy
disk. However, the data in RAM stay there only as long as the computer is running. When the
computer is turned off, RAM loses all its contents. When the computer is turned on again,
the operating system and other files are once again loaded into RAM. When an application
program is started, the computer loads it into RAM and does all the processing there. This
allows the computer to run the application faster. Any new information that is created is kept in
RAM and since RAM is volatile in nature, one needs to continuously save the new information
to the hard disk.
Let us take a simple example of why RAM is used by the computer. Whenever a user enters a
command from the keyboard, the CPU
interprets the command and instructs
the hard disk to “load” the command
or program into main memory (see
Figure 3.2). Once the data are loaded
into memory, the CPU is able to access
them much quickly. The reason behind
this is that the main memory is much
faster than secondary memory. The
process of putting things that the CPU
needs in a single place from where it
can get them more quickly is similar to
placing various documents, which the
user needs, into a single file folder. By
doing so, the user finds all the required
files handy and avoids searching in Figure 3.2 Interaction of Memory and Storage
several places every time he needs them. with Processor
3.3.1 Types of RAM
RAM is of two types:
™ Static RAM (SRAM): The word “static” indicates that the memory retains its
contents as long as power is being supplied. However, as soon as the power goes
down, the data are lost. This makes SRAM a volatile memory as opposed to ROM.
SRAM does not need to be “refreshed” (pulse of current through all the memory
cells) periodically. It is very fast but much more expensive than DRAM (Dynamic
RAM). SRAM is often used as cache memory due to its high speed.
™ Dynamic RAM (DRAM): It is named so because it is very unstable. The data
continue to move in and out of the memory as long as power is available. Unlike
SRAM, DRAM must be continually refreshed in order to maintain the data. This

Chapter 03.indd 69 5/11/2011 2:25:02 PM


70 Computer Memory and Storage

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

can have very low power consumption in


RAM is also called read/write memory
the region of a microwatt. Currently, the
because, unlike ROM that does not allow any
technology does not exist to produce small
write operation, RAM allows the CPU to read
SRAMs so that they can replace DRAMs.
as well as write data and instructions.
Thus, DRAM is still used in computers.

3.4 READ ONLY MEMORY


Just as a human being needs instructions from the brain to perform actions in a certain event,
a computer also needs special instructions every time it is started. This is required because
during the start up operation, the main memory of the computer is empty due to its volatile
property so there have to be some instructions (special boot programs) stored in a special chip
that could enable the computer system to perform start up operations and transfer the control
to the operating system. This special chip, where the start up instructions are stored, is called
ROM. It is non-volatile in nature, that is, its contents are not lost when the power is switched
off. The data and instructions stored in ROM can only be read and used but cannot be altered,
thereby making ROM much safer and secure than RAM. ROM chips are used not only in the
computer but also in other electronic items like washing machines and microwave ovens.
Generally, designers program ROM chips at the time of manufacturing circuits. Burning
appropriate electronic fuses to form patterns of binary information does the programming.
These patterns of binary information are meant for specific configurations, which is why
different categories of computers are meant for performing different tasks. For example, a
micro program called system boot program contains a series of start-up instructions to check

Chapter 03.indd 70 5/11/2011 2:25:03 PM


Read Only Memory 71

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,

Chapter 03.indd 71 5/11/2011 2:25:03 PM


72 Computer Memory and Storage

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.

3.5 RAM, ROM AND CPU INTERACTION


Picture a bulletin board under the glass at the back of a classroom. One way to think of ROM
is that it is similar to the hard-copy notes placed under the glass. At the end of the day, they
remain unchanged. The next day, the notes are exactly the way they were the day before.
Students are able to only read them. RAM, on the other hand, can be thought of as a blackboard,
which starts out blank and during the day, information is written on it, read from it, and even
erased from it. When something is erased, new data can then be written on the same place on
the board. When students go home at the end of the day, the blackboard is washed clean and
whatever data was on it goes away forever. This is what happens when a computer’s power is
turned off; RAM no longer has the electrical current available to sustain the data in its memory
cells. ROM is more like your long-term memory; the things you remember from your past.
When you wake up in the morning, you get ready for school/office and know the address of
your destination. Similarly, when computer “wakes up”, it searches for start-up routines from
ROM BIOS and then hands over the control to the operating system to function properly.
The most essential part of computer processing is the memory. From the moment the
computer is turned ON and until it is shut down, the CPU constantly uses memory. A typical
scenario is listed below and illustrated in Figure 3.3:
Step 1 The computer is switched ON.
Step 2 CPU loads data and instructions from ROM and checks whether all the major
components like processor and hard disk are functioning properly.
Step 3 CPU loads BIOS (basic input/output system) from ROM to determine the
machine’s fundamental configuration and environment. The information stored
in ROM BIOS chip determines what peripherals the system can support.
Step 4 CPU loads the operating system from the secondary storage (hard disk) into
RAM. This allows the CPU immediate access to the operating system, which
enhances the performance and functionality of the overall system.
Step 5 When an application is opened, it is loaded into RAM and any file that is opened
for use in that application is also loaded into RAM.
Step 6 After processing, when the user saves the file and closes the respective
application, the file is written to the specified location on the secondary storage
device. After that the file(s) and the application are “flushed out” from the RAM.

Chapter 03.indd 72 5/11/2011 2:25:03 PM


Types of Secondary Storage Devices 73

Figure 3.3 RAM, ROM and CPU Interaction


Every time something is loaded or opened, it is placed into RAM so that the CPU can
access that information more easily and promptly. The CPU requests the required data from
RAM, processes it, and writes new data back to RAM in a continuous cycle. In most computers,
this shuffling of data between the CPU and RAM happens millions of times every second.
When the application is closed, the application and any other accompanying files are usually
erased from RAM to make space for the new data.
3.6 TYPES OF SECONDARY STORAGE DEVICES
Secondary storage devices facilitate storing of data and instructions permanently. The data
stored on a secondary storage device can be accessed depending upon how it is stored on the
device. Primarily, there are two methods of accessing data from the secondary storage devices
(see Figure 3.4):
™ Sequential Access: Sequential access means the computer system must search the
storage device from the beginning until the desired data is found. The most common
sequential access storage
device is magnetic tape where
data is stored and processed
sequentially. Suppose, a tape
contains information regarding
employees of an organization.
Now, to look for employee
number 100’s information, the Figure 3.4 Sequential and Direct Access

Chapter 03.indd 73 5/11/2011 2:25:03 PM


74 Computer Memory and Storage

Figure 3.5 Classification of Secondary Storage Devices


computer will have to start with employee number 1 and then go past 2, 3 and so on,
until it finally comes to 100. The sequential access method is quite simple than other
methods but searching for data is slow.
™ Direct Access: Direct access, also known as random access, means that the computer
can go directly to the location, where the data that the user wants, are stored. The most
common direct access storage devices are magnetic disk and optical disk. In these
devices, the data are stored as sequentially numbered blocks. Thus, one can access
block 12, then access block 78, then block 2 and so on. The direct access method
is ideal for applications like airline reservation systems or computer-based directory
assistance operations. In these cases, there is no fixed pattern of requests for data.
Based on the access method, secondary storage devices can be classified as shown in
Figure 3.5.
3.7 MAGNETIC TAPE
Magnetic tape appears similar to the tape used in music cassettes. It is a plastic tape with
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 magnetized portion of the surface
refers to the bit value “1” whereas the demagnetized portion refers to the bit value “0”. Magnetic
tapes are available in different sizes, but the major difference between different magnetic tape
units is the speed at which the tape is moved past the read/write head and the tape’s recording
density. The amount of data or the number of binary digits that can be stored on a linear inch
of tape is the recording density of the tape.
Magnetic tapes are very durable and can be erased as well as reused. They are an
inexpensive and reliable storage medium for organizing archives and taking backups.
However, they are not suitable for data files that need to be revised or updated often because
data on them are stored in a sequential manner and the user needs to advance or rewind the
tape every time to the position where the requested data starts. Tapes are also slow due to
the nature of the media. If the tape stretches too much, then it will render itself unusable for

Chapter 03.indd 74 5/11/2011 2:25:03 PM


Magnetic Tape 75

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.

3.7.1 Magnetic Tape Organization


The magnetic tape is divided into vertical
columns (frames) and horizontal rows
(channels or tracks) as shown in Figure 3.6.
The data is stored in a string of frames with
one character per frame, and each frame
spans multiple tracks (usually seven or
nine tracks). Thus, a single bit is stored in
each track, that is, one byte per frame. The
remaining track (seventh or ninth) stores the
parity bit. When a byte is written to the tape, Figure 3.6 Representing Data
the number of 1s in the byte is counted, the in Magnetic Tape
parity bit is then used to make the number
of 1s even (even parity) or odd (odd parity). When the tape is read again, the parity bit is
checked to see if any bit has been lost. In case of odd parity, there must be an odd number
of 1s represented for each character and an even number of 1s in case of even parity.
Magnetic tape drive uses two reels: supply reel and take-up reel. Both reels are mounted
on the hubs and the tape moves from the supply reel to the take-up reel. Figure 3.7 shows the
basic tape drive mechanism. The magnetic-oxide-coated side of the tape passes directly over
the read/write head assembly, thus making contact with the heads. As the tape passes under
the read/write head, the data can be either read and transferred to the primary memory or read
from the primary memory and written onto the tape.

Figure 3.7 Basic Tape Drive Mechanism

Chapter 03.indd 75 5/11/2011 2:25:04 PM


76 Computer Memory and Storage

A magnetic tape, as shown in Figure 3.8, is


physically marked to indicate the location from where
reading and writing on the tape is to begin (BOT or
beginning of tape) and end (EOT or end of tape). The
length of the tape between BOT and EOT is referred
to as the usable recording (reading/writing) surface.
BOT/EOT markers are usually made up of reflective-
type of short silver strips. These markers are sensed by
an arrangement of lamps and/or photodiode sensors to
Figure 3.8 Information Format indicate the location from where reading and writing is
of Magnetic Tape to begin and end. On a magnetic tape, data are recorded
in the form of blocks where each block consists of a grouping of data (known as records) that
is written or read in a continual manner. Between these blocks, the computer automatically
reserves some blank space called inter-block gap (IBG). One block may contain one or more
records that are again separated by blank spaces (usually 0.5 inch) known as inter-record gap
(IRG). Whenever an IRG is reached while reading data from a moving tape, the moving tape
is stopped. It remains immobile until the record is processed.
3.7.2 Advantages of Magnetic Tapes
™ Magnetic tapes hold high data recording density thereby resulting in low cost per bit
of storage.
™ Magnetic tapes have virtually unlimited storage capacity because as many tapes as
required can be used to store a large amount of data.
™ Magnetic tapes are portable because they are compact in size, lightweight and
removable. Due to these properties, they are also easy to handle and store.
™ Magnetic tapes represent a very inexpensive mode of offline data storage and a large
amount of data can be stored in a small storage space.
3.7.3 Disadvantages of Magnetic Tapes
™ Since magnetic tapes are sequential in nature, they are not suitable in situations where
data access is required in a random order. Moreover, data transmission in magnetic
tapes is also slow as compared to the magnetic disks.
™ Magnetic tapes should be kept in a dust-free environment and away from corrosive
gases and chemicals as they can cause tape-reading errors.
™ Since magnetic tapes use parity bit to check the data, the data on such devices are
difficult to recover even if a minor bit error occurs.
™ Magnetic tapes are not flexible as compared to other media types when file updating
requires record insertion or deletion. One more drawback of magnetic tapes is that
they wear out.
3.8 MAGNETIC DISK
Magnetic disks are the 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. A magnetic disk consists of a plastic/metal circular plate/platter, which is coated

Chapter 03.indd 76 5/11/2011 2:25:04 PM


Magnetic Disk 77

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.

3.8.2 Accessing Data from Magnetic Disk


Data in a magnetic disk are recorded on the surface of the circular tracks with the help of the
read/write head, which is mounted on the access arm assembly (see Figure 3.10). These heads

Chapter 03.indd 77 5/11/2011 2:25:05 PM


78 Computer Memory and Storage

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

Rotate Rotational Delay

Data Transfer Data Transfer Time

Chapter 03.indd 78 5/11/2011 2:25:06 PM


Types of Magnetic Disks 79

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.

3.9 TYPES OF MAGNETIC DISKS


All magnetic disks come in the form of round platters. These disks are available in different
sizes, shapes and designs. Some are attached to the read/write head assembly whereas some
are available in the form of removable disks. Broadly, magnetic disks can be classified into
three types: floppy disk, hard disk and zip disk.

3.9.1 Floppy Disk


A floppy disk is a round, flat piece of Mylar plastic coated with ferric oxide (a rust-like
substance containing tiny particles capable of holding a magnetic field) and encased in a
protective plastic cover (disk jacket). It is a removable disk and is read and written by a floppy
disk drive (FDD), which is a device that performs the basic operation on a disk, including
rotating the disk and reading and writing data onto it. The disk drive’s read/write head alters
the magnetic orientation of the particles, where orientation in one direction represents “1” and
orientation in the other represents “0”.
Traditionally, floppy disks were used on personal computers to distribute software,
transfer data between computers and create small backups. Earlier, 5¼-inch floppy disks were
used. Later, a new format of 3½-inch floppy disk came into existence, which has larger storage
capacity and supports faster data transfer as compared to 5¼-inch floppy disks. Floppy diskettes
are small, inexpensive, readily available, easy to store and have a good shelf life if stored
properly. They also possess the write-protect feature, which allows the users to protect a diskette
from being written on. To write-protect a diskette, the user has to shift a slide lever towards
the edge of the disk, uncovering a hole. The key advantage of floppy disk is that it is portable.

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.

Chapter 03.indd 79 5/11/2011 2:25:06 PM


80 Computer Memory and Storage

Figure 3.11 Floppy Disk Drive

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.

3.9.2 Hard Disk


The hard disk, also called the hard
drive or fixed 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 (see Figure 3.12). They are
tightly sealed to prevent any dust
particle, which causes head crash,
from getting inside. A hard disk can
Figure 3.12 Hard Disk be external (removable) or internal

Chapter 03.indd 80 5/11/2011 2:25:06 PM


Types of Magnetic Disks 81

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

Chapter 03.indd 81 5/11/2011 2:25:07 PM


82 Computer Memory and Storage

3.9.3 Zip Disk


Zip disk is a removable storage device that started with
100 MB storage capacity but today it can store 250–750
MB of data. Zip disk’s drive unit is measured as 18 × 13 ×
4 cm and weighs about half a kilogram (see Figure 3.14).
It has rubber feet to stabilize the unit in either vertical or
horizontal position. The substrate for the disk is made of
a plastic material coated with magnetic oxide particles.
There are two indicator lights: green for power and
Figure 3.14 Zip Disk Drive amber for disk access. It has an eject button, but no ON/
OFF switch. It comes complete with drive, connection
cable, power supply, operating software and a starter 100 MB disk with a set of zip tools
software. On installation, the zip drive is automatically assigned a logical drive letter, and you
can transfer files to and from the zip disk as if you are accessing a hard disk or floppy disk.
Zip disk is similar to the 3½-inch floppy diskette in diameter. However, one should keep
in mind that zip drive cannot read or write floppy disks and similarly a floppy drive cannot
read/write data from/to a zip disk. Either the zip drive can be built into the computer or it can
be connected to the computer via the parallel port. There are different versions of zip disks and
drives available in the market. These versions can hold 100, 250 and 750 MB of data. As a zip
disk can hold as much as 70 times the information as compared to a floppy disk, it can be used
to store heavy graphics, music or presentation files.

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.

3.9.4 Advantages of Magnetic Disks


™ Magnetic disks follow direct access mode for reading and writing the data files,
thereby making an ideal device for accessing frequently accessed data.
™ Magnetic disks are used for both online and offline storage of data. Hard disk is used
as an online storage whereas floppy and zip disks are used as offline storage.
™ Magnetic disks are easily moveable from one place to another because of their small size.
™ The data transfer rate of disks is much higher than magnetic tapes.

Chapter 03.indd 82 5/11/2011 2:25:08 PM


Optical Disk 83

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

3.9.5 Disadvantages of Magnetic Disks


™ Magnetic disks must be stored in a dust-free environment in order to protect them
from crashing.
™ Magnetic disks are not ideal devices to use in scenarios where the file access required
is of sequential nature rather than direct or random nature.
™ Magnetic disks are more expensive than the magnetic tapes.
™ Magnetic disks are more susceptible to breach of security and access gain to sensitive
online disk files from remote terminals.

3.10 OPTICAL DISK


Apart from magnetic tapes and magnetic disks, a new storage medium, which is gaining
popularity, is the optical disk. 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
source, such as a laser diode. These disks are capable of storing enormously high amounts of
data in a limited amount of space. The optical disk storage system consists of a rotating disk
coated with a thin layer of metal (aluminium, gold or silver) that acts as a reflective surface and
a laser beam, which is used as a read/write head for recording data onto the disk.
Optical disk comes in various sizes and capacities. A compact disk (CD) with 700 MB
capacity and 12 cm diameter is the most popular means of optical storage. In a single-track
optical disk, storage capacity is calculated by the multiple of number of sectors and number of
bytes per sector. Since the storage capacity of an optical disk is huge, the cost per bit of storage
is very low.

3.10.1 Storage Organization of Optical Disk


Unlike magnetic disk (which has several layers of concentric layers), an optical disk consists
of a single long track in spiral shape as shown in Figure 3.15. This track starts from the outer
edge and spirals inward to the centre of the disk. The spiral shape of the track makes the optical
disk suitable for storing large blocks of sequential data onto it, such as music. Even though
random access is possible, it is usually slower than magnetic disk (especially hard disk). The
reason behind it is that in case of magnetic disk, it is easy to locate the magnetic disks tracks
since they are located at a fixed distance from the centre.
These tracks are further divided into small sectors of the same length, regardless of their
location on the disk’s surface. Such type of disk formatting allows the data to be stored in even
more densely as compared to magnetic disks. With more data recording density, the optical
drives have a more complicated mechanism as compared to the magnetic disks drives. Here,

Chapter 03.indd 83 5/11/2011 2:25:08 PM


84 Computer Memory and Storage

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

Figure 3.16 Read Operation in an Optical Disk

Chapter 03.indd 84 5/11/2011 2:25:10 PM


Types of Optical Disks 85

3.11 TYPES OF OPTICAL DISKS


Optical disks come in several varieties, which are made in somewhat different ways for
different purposes. Compact disk (CD), digital versatile disk (DVD) and blu-ray disk (BD)
are the three forms of optical disks. Note that these technologies are not compatible with one
another. Each requires a different type of disk drive and disk. Even within one category, there
are many competing formats.

3.11.1 Compact Disk


What’s in a Name?
Compact disk is the most popular and the
least expensive type of optical disk. It was CD-Rs and CD-RWs are made up of a
originally intended only for storing music polycarbonate substrate, a thin metal coating

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.

Reading Data from a CD-ROM: A CD is made up of three coatings, namely, polycarbonate


plastic, aluminium and an acrylic coating to protect the disk from external scratches and dust.
The polycarbonate plastic is stamped with millions of tiny indentations (pits), moulded in the
spiral-shaped track. A CD drive reads information from the CD’s spiral track of pits and lands,

Chapter 03.indd 85 5/11/2011 2:25:11 PM


86 Computer Memory and Storage

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

Chapter 03.indd 86 5/11/2011 2:25:11 PM


Types of Optical Disks 87

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.

Chapter 03.indd 87 5/11/2011 2:25:12 PM


88 Computer Memory and Storage

Single-sided, single layer (4.7 GB) DVD allows for


Double-sided, single layer (9.4 GB)
double-sided disks (see

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

between the two polycarbonate layers. Due to


erased and recorded a number of
the layer on the top of data, the substrate layer
times on the same disk.
may refract the laser beam into two separate
™ BD-RE: It is also a rewritable disk
beams, which is known as birefringence. If
but is used only for high definition
the beam is split too widely, the disk-reading
audio/video and television recording.
operation cannot be performed. Blu-ray disk
Blu-ray disks are available in two
overcomes the birefringence by placing the
sizes: standard (12 cm) and mini (8 cm).
data on the top of the polycarbonate layer, and
Each disk can have either a single layer or
thus prevents the disk-reading problem.
dual layers, depending on which the data

Chapter 03.indd 88 5/11/2011 2:25:12 PM


Magneto-Optical Storage Devices 89

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

Chapter 03.indd 89 5/11/2011 2:25:12 PM


90 Computer Memory and Storage

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.

3.12.1 Basics of MO Reading


Traditional magnetic recording systems use
currents induced in the magnetic heads by the
changing magnetic fluxes on the disk surface to
read the data. However, magneto-optical systems
use polarized light to read the data from the disk
(see Figure 3.23). The changes in light polarization
occur due to the presence of a magnetic field on the
surface of the disk. This phenomenon is known as
the Kerr effect, where the polarity of the reflected
light is altered depending on the orientation of the
magnetic particles. If a beam of polarized light is
Figure 3.23 Reading shined on the surface, the light polarization of the
from Magneto-optical Disk reflected beam will change slightly, (typically
less than 0.50) if it is reflected from a magnetized
surface. If the magnetization is reversed, the change in polarization (the Kerr angle) is reversed
too. The magnetized areas, that is, pits, cannot be seen in regular light, but only in polarized
light. The change in direction of magnetization could be associated with numbers 0 or 1,
making this technique useful for binary data storage.
Various other rewritable disks include CD-RW, DVD-RW, DVD-RAM and DVD+RW.
The data layer for these disks uses a phase-changing metal alloy film. This film can be melted
by the laser’s heat to level out the marks made by the laser and then lasered again to record
new data. In theory, one can erase and write on these disks as many as 1000 times, for CD-RW,
and even 100,000 times for the DVD-RW types. DVD-RAM was the first erasable version of
DVD to come to market and has subsequently found competition in the rival DVD-RW and
DVD+RW format.

3.12.2 Basics of MO Recording


After reaching the Curie temperature (around 200°C), every magnetic material loses
magnetization due to a complete disordering of their magnetic domains, and as a result, lose the
data stored on them. Moreover, the material’s coercivity, that is, the measure of the material’s

Chapter 03.indd 90 5/11/2011 2:25:12 PM


Universal Serial Bus 91

resistance to magnetization by the applied


magnetic field decreases as the temperature
approaches the Curie point, and reaches
zero when this temperature is exceeded.
Therefore, it is imperative that the only
change to the material, when it is heated
and cooled, is the change in magnetization
with no damage to the material itself.
The fact that the material’s coercivity
drops at higher temperatures allows
thermally assisted magnetic recording
with relatively weak magnetic fields.
Even a relatively weak laser can generate
high local temperatures when focused at Figure 3.24 Writing to Magneto-Optical Disk
a small spot (about 1 micron in case of MO systems). When the material is heated, and its
coercivity is low, the magnetization of the media can be changed by applying a magnetic field
from the magnet. When the material is cooled to room temperature, its coercivity rises back to
such a high level that the magnetic data cannot be easily affected by the magnetic fields. The
basic schematic of this recording process is illustrated in Figure 3.24.
The recording layer is heated by the laser to a point where its magnetic orientation is
dissipated. As this spot on the disk cools, the new magnetic orientation—corresponding to the
new information—is set by the magnetic head to correspond to “0” and “1” of digital signals.
Normally, to rewrite data on a MO disk, it is necessary to erase all previous signals before new
data can be recorded. This means either two lasers are used to record (one to erase and one
to record) or a single laser must first erase the data in a first rotation and then record the data
the second time. This requires either a recorder with two lasers or longer recording times for
a single laser system.

3.13 UNIVERSAL SERIAL BUS


Universal serial bus (USB), developed by Intel, is a set of connectivity specifications that
establishes communication between personal computers and devices such as mouse, keyboard,
pen drive, external hard disk drives, etc. Nowadays, almost every computer or laptop is
equipped with one or more USB ports. The USB connector is a narrow socket around 1 cm
wide and 0.5 cm high.
All USB devices come with a USB connector that is plugged into the USB port on
the computer. As you plug in a USB device, it is detected by the computer and the required
software is configured automatically; there is no need to restart the computer. Another
advantage of USB is that it determines (and provides) the electrical power required by the
device connected to it.

3.13.1 Pen Drive


A pen/flash drive is a removable storage device that is frequently used nowadays to transfer
audio, video, and data files from one computer to another. A pen drive consists of a small

Chapter 03.indd 91 5/11/2011 2:25:12 PM


92 Computer Memory and Storage

printed circuit board, which is fitted inside a plastic, metal,


or rubber casing to protect it. The USB connector which
is present at one end of pen drive is protected by either a
removable cap or pulling it back in the casing. Figure 3.25
shows a pen drive.
The pen drive is a high-storage–capacity (ranging from
1 GB to 32 GB) device and is physically small enough to fit
Figure 3.25 Pen Drive into a pocket. In addition, it is fast, robust and reliable and
requires very less power to operate, which it gets through a USB port, and hence no battery is
required.
Using a pen drive is easy. Following are the steps to use pen drive.
1. Insert the pen drive in the USB port of a computer. The computer detects the device,
configures the necessary software and displays a drive corresponding to the pen drive
in My Computer.
2. Perform any of the following actions:
™ Double-click the drive icon in My Computer to access the files stored in the pen
drive.
™ Right-click the file or folder you want to send to the pen drive, which displays a
menu. Select Send To and select the drive corresponding to the pen drive from
the sub menu that appears.
3. After performing all your actions, left-click the Safely Remove Hardware icon in
the system tray to display a menu containing Safely remove USB Mass Storage
Device option.
4. Select this option to display a notification icon indicating that it is now safe to remove
the hardware and plug-out the pen drive.
3.13.2 External Hard Disk Drive
External hard disk drive is a type of hard drive that
resides in its own enclosure (called hard drive cage)
outside the computer case and is connected to the
system through interfaces like USB (Figure 3.26).
With the addition of USB interfaces in the personal
computer, external hard drive has become quite
popular in the computer market. The storage capacity
of external hard disk ranges from 20 GB to several
TBs and it is compatible with operating systems that
support interface standards such as USB MSC (mass
storage class) and IEEE1394.
Figure 3.26 An External Hard The internal structure and functioning of an
Disk Drive with USB external hard disk drive is similar to the internal hard
Connector disk drive. Hence, the external hard disk drive is a
reliable and high capacity storage media. In addition, it is portable and provides the plug and
play feature. It means just plug in the connector of external hard drive into the USB interface
and access the stored data as well as transfer data to/from the external hard disk drive.

Chapter 03.indd 92 5/11/2011 2:25:13 PM


Memory Stick 93

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.

3.14 MEMORY STICK


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. (Figure 3.27). It was launched in 1998 by Sony and
immediately gained popularity due to its support for fast data
transfer speed and large storage capacity. Though the original
Memory Stick provided storage capacity of up to 128 MB,
nowadays Memory Sticks with storage capacity of up to 32 Figure 3.27 Memory Stick
GB are available in the market. Even the Memory Stick with
the smallest storage capacity (4 MB) can store up to 80 images, which is much more than a
standard 3½-inch floppy disk. The Memory Stick can be removed from the portable device and
accessed by a personal computer using Memory Stick-capable memory card reader.
Over the years and with advancement in technology, the Memory Stick is getting smaller
in physical size and larger in logical size. Nowadays, several different standards or formats of
Memory Stick are available in the market, which are as follows:
™ Memory Stick PRO: It was introduced in the year 2003 jointly by two big
companies—Sony and SanDisk. It supports marginally higher data transfer speed
than the original one and provides theoretical storage capacity of up to 32 GB. It
provides a 4-bit parallel interface with theoretical transfer rates of up to 480 Mb/s. It
is widely used in high megapixel digital cameras and camcorders.
™ Memory Stick Duo: It is a small size Memory Stick for small, pocket-sized devices
such as mobile phones, music players, digital cameras, etc. It has reduced the use of
large size Memory Stick, which had been very popular for a long time. It is equipped
with MagicGate technology that is used to encrypt the data stored on the card. It
provides all the features of the large standard Memory Stick and is smaller in size,
but costs more.
™ Memory Stick PRO Duo: Though Memory Stick Duo fulfils the need for pocket-
sized devices, it has a slow transfer rate and limited storage capacity of 128 MB;
however, Memory Stick PRO Duo supersedes it because Memory Stick PRO Duo
provides larger memory space (up to 32 GB) and high speed of data transfer to/from
the card.
™ Memory Stick PRO-HG Duo: It was introduced by Sony and SanDisk in 2006.
Unlike Memory Stick PRO which has a parallel interface of 4-bit, Memory Stick
PRO-HG DUO has an 8-bit parallel interface. In addition, the clock frequency
has increased from 40 MHz to 60 MHz in Memory Stick Pro-HG Duo. With
these improvements, it provides a higher transfer speed than the Memory Stick
Pro Duo.

Chapter 03.indd 93 5/11/2011 2:25:13 PM


94 Computer Memory and Storage

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

3.15 MASS STORAGE DEVICES


In order to get a vast amount of storage capacity of several bytes (trillions and more) in a
computer system, a different kind of storage system is used. In such type of systems, multiple
units of similar kinds of storage media are associated together to form a chain of mass storage
devices. These storage media may include multiple magnetic tape reels or cartridges, multiple
arrays of magnetic disks or multiple CD-ROMs as a storage device. We can categorize mass
storage devices into three types:
™ Redundant Array of Inexpensive Disks (RAID): The basic idea of RAID is to
combine multiple hard disks into an array of disk drives to obtain high performance,
large capacity and reliability. These drives appear to the host computer as a single
logical drive. The disk arrays can be made fault-tolerant by redundantly storing
information in various ways. Seven types of array architectures, RAID 0 through
RAID 6, have been defined; each provides disk fault-tolerance with different
compromises in features and performance.
™ Automated Tape Library: An automated tape library comprises numerous sets
of magnetic tapes along with their drives and controllers mounted in a single unit
(see Figure 3.28). The unit comprises one or more tape drives to perform read/write
operations on the tapes in the tape library. In the multiple tape drive environment,
these tapes can be simultaneously read or write, thus resulting in the speedy rate of
data transfer. Multiple drives lead to the reliability of the storage unit because if one
of the drives fails, then the unit can continue to operate with the other tape drives.
The unit, with the help of a robotic arm, retrieves the appropriate tape from the tape
library, mounts it on the tape drive for processing, and then returns to the library after
the job has been finished. These tape libraries can store up to several terabytes of data
in it, so they can be used for archiving data for offline storage and also as data backup
devices during online storage.

Figure 3.28 Automated Tape Library

Chapter 03.indd 94 5/11/2011 2:25:13 PM


Let Us Summarize 95

™ CD-ROM Jukebox: A CD-ROM jukebox comprises numerous sets of CD-ROM


disks along with their drives and controllers mounted in a single unit. The unit
comprises one or more CD-ROM drives to perform read/write operations on the
CD-ROM in the jukebox. In the multiple CD-ROM drive environment, these
CD-ROMs can be simultaneously read or write, resulting in the speedy rate of
data transfer. Multiple drives lead to the reliability of the storage unit because if
one of the drives fails, then the unit can continue to operate with other CD-ROM
drives. The unit, with the help of a robotic arm, retrieves the appropriate CD-ROM
from the CD-ROM jukebox, mounts it on the CD-ROM drive for processing, and
then returns it to the appropriate slot in the jukebox after the job has been finished.
These jukeboxes can store up to several terabytes of data in it, so they can be used
for archiving of read-only data for offline storage and also as data backup devices
during online storage.
Mass storage devices have relatively slow access time, generally in the order of seconds
instead of milliseconds. Due to this, their use is limited in a number of applications. The
slow access time of mass storage devices is because of the time taken by the transport
mechanism to first move onto the particular storage media such as disks and then the time
taken, in few milliseconds, to transfer the desired data to the main memory in the computer
system. However, they have huge amounts of storage capacity and possess minimum cost
per bit storage. Mass storage devices are a cost-effective option, as compared to the online
tapes and disks storage, in situations where a large storage capacity is required and where
prompt data access is not essential. When used as offline storage, they are referred to as
archival storage.

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

Chapter 03.indd 95 5/11/2011 2:25:13 PM


96 Computer Memory and Storage

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.

Chapter 03.indd 96 5/11/2011 2:25:13 PM


Exercises 97

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

Fill in the Blanks


1. .......................... refers to the electronic holding place for instructions and data in a
computer system.
2. The time period lag between a request made and the action being performed is called
..........................
3. The memory that requires constant refreshing to preserve the information is called
..........................
4. .......................... memory provides backup storage for instructions and data that are not
currently being used by the processor.

Chapter 03.indd 97 5/11/2011 2:25:13 PM


98 Computer Memory and Storage

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

Chapter 03.indd 98 5/11/2011 2:25:13 PM


Exercises 99

9. A floppy can be made write-protected by


(a) Breaking the slider
(b) Positioning the slider to cover the hole
(c) Positioning the slider away from the hole
(d) Cannot be write-protected
10. A spiral shape track formatting is present in
(a) Floppy Disk (b) Optical Disk
(c) Hard Disk (d) Half-inch Tape Cartridge

State True or False


1. A terabyte comprises 1024 megabytes.
2. The ROM chip, which can be rewritten several times and requires the action of ultraviolet
radiations to erase its contents, is EPROM.
3. The memory which is utmost accessible to the processor is hard disk.
4. CD-ROM is a kind of magneto-optical disk.
5. Rotational delay time is also known as latency.
6. Auxiliary memory stores information about BIOS and start-up routines.
7. The memory that resides inside the processor is called processor memory.
8. DVD-ROM and CD-ROM has the same storage capacity.
9. The speed of memory depends upon the access time of data that is stored.
10. Floppy disk can be made write-protected.

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

Chapter 03.indd 99 5/11/2011 2:25:13 PM


100 Computer Memory and Storage

ANSWERS

Fill in the Blanks


1. Memory 2. Latency 3. DRAM
4. Auxiliary 5. Sequential access, Direct access 6. Track sector
7. Seek time 8. Write once-read many 9. Magneto-optical disk
10. RAID

Multiple-choice Questions
1. (a) 2. (a) 3. (c) 4. (b) 5. (c) 6. (d) 7. (b) 8. (c)
9. (c) 10. (b)

State True or False


1. False 2. True 3. False 4. False 5. True 6. False 7. True
8. False 9. True 10. True

Chapter 03.indd 100 5/11/2011 2:25:13 PM


CHAPTER 4

Input Output Media

Input via
Input Device
Output via
Output Device

CPU and
Memory

Input Data coded


In Computer Processed
understandable Data to
form Output Device

This chapter deals with two basic computer units—input and


output devices. Input devices are used to enter the data and
instructions into the computer system before any processing
can be performed. Output devices are used for the conversion
of machine-readable information into human-readable form.
The chapter discusses some commonly used input devices
including keyboard, mouse, joystick, scanner, and optical
scanners. The functions of all these input devices along with
the hard copy and soft copy output devices under which,
various types of printers and plotters have been explored.
Next display devices such as CRT monitors, LCD monitors
and speech synthesisers are explained. The chapter
concludes by giving an overview of computer terminals.

Chapter 04.indd 101 5/11/2011 2:27:23 PM


102 Input Output Media

CHAPTER OBJECTIVES

After reading this chapter, you will be able to understand:


™ The basic concepts of input and output devices
™ Various types of input devices and how they function
™ Various types of output devices and how they function
™ Computer terminals which are special units capable of performing both input and output of data
4.1 INTRODUCTION
Previously, we discussed that a computer accepts input and processes it to get a desired
output according to the sequence of instructions. Essentially, a computer system consists of
four components: input devices, CPU, output devices and memory. Input devices are used
to provide data to the CPU for processing. After processing, the input data is converted
into meaningful information and this output is presented to the user with the help of output
devices. In computer terminology, a device can be referred to as a unit of hardware, which
is capable of providing input to the computer or receiving output, or both.
An input device is an electromechanical
device that allows the user to feed information
into the computer for analysis, storage and to
give commands to the computer. Data and
instructions are entered into the computer’s
memory through an input device. It captures
information and translates it into a form that
can be processed and used by the other parts
of the computer. After processing the input
data, the computer provides the results with
the help of output devices. An output device
Figure 4.1 Data Processing converts machine-readable information into
human-readable form. The basic functioning
of the output device is just the opposite of the input device, that is, the data is “fed into” the
computer system through the input device while the output is “taken out” from the computer
through the output device. However, the output, which comes out from the CPU, is in the form
of digital signals (see Figure 4.1). The output devices display the processed information by
converting them into graphical, alphanumeric, or audio-visual form.

4.1.1 Importance of Input/Output Devices


As we know, the processing of the data by the computer system can be viewed as a three-step
process:
Step 1 Data input via an input device.
Step 2 Processing of data.
Step 3 Data output via an output device.

Chapter 04.indd 102 5/11/2011 2:27:23 PM


Types of Input Devices 103

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

Figure 4.2 Keyboard

Chapter 04.indd 103 5/11/2011 2:27:23 PM


104 Input Output Media

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

4.2.2 Pointing Devices


Most computers come with an alphanumeric keyboard but in some applications, the keyboard
is not convenient. For example, if the user wants to select an item from a list, the user can
identify that item’s position by selecting it through the keyboard. However, this action
could be performed quickly by pointing at the correct position. A pointing device is used to
communicate with the computer by pointing to locations on the monitor screen. Such devices
do not require keying of characters; instead the user can move a cursor on the screen and
perform move, click, or drag operations. Some of the commonly used pointing devices are
mouse, trackball, joystick, light pen, touch screen and trackpad.

Chapter 04.indd 104 5/11/2011 2:27:24 PM


Types of Input Devices 105

Mouse: A Mouse is a small hand-


Wireless Keyboard and Mouse
held pointing device with a rubber ball
embedded at its lower side and buttons on With the increasing use of wireless
the top. Usually, a mouse contains two or technology, the wireless versions of keyboard
three buttons, which can be used to input and mouse have also been developed. Rather
commands or information (see Figure 4.4). than connecting through wires, they connect
It may be classified as a mechanical mouse with the computer using one of the three

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.

How does a mouse work? As shown


in Figure 4.5, a mechanical mouse has a rubber
ball at the bottom. When the user moves the
mouse along the flat surface, the ball rolls.
The distance, direction and speed of the ball’s
motion is tracked. This information is used by
the computer to position the mouse pointer on
the screen. Inside the mouse are three rollers.
One of them, which is mounted at a 45° angle
to the other two, is spring loaded. This roller
is usually the smallest of the three. It is there
simply to hold the ball against the other two
rollers. The other two rollers are usually
larger, and of different colour. These rollers
are mounted at a 90° angle to one another, one Figure 4.5 Inside a Mechanical Mouse

Chapter 04.indd 105 5/11/2011 2:27:24 PM


106 Input Output Media

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

Chapter 04.indd 106 5/11/2011 2:27:24 PM


Types of Input Devices 107

side of each encoding wheel is a pair


of LEDs (light emitting diode) that
emits infrared light. On the opposite
side of each pair of LEDs is a light
sensor. Every time light from the
LEDs shines through a hole in the
encoding wheel, a pulse of electricity
is sent from the light sensor to the
microprocessor. When the trackball
rolls side-to-side, the horizontal
(x-axis) shaft rotates, spinning the
attached encoder wheel. Similarly,
when the trackball is rolled up and Figure 4.7 Inside a Trackball
down, the vertical (y-axis) shaft
rotates, spinning the attached encoder wheel. Due to this spinning, the light blinks, which can
be detected by the light sensor. The microprocessor counts how many times the light sensors
detect light each second and sends this information to the computer along the cord.
Joystick: A joystick is a device that moves in all directions
and controls the movement of the cursor. The basic design
of a joystick consists of a stick that is attached to a plastic
base with a flexible rubber sheath. This plastic base houses
a circuit board that sits beneath the stick. The electronic
circuitry measures the movement of the stick from its
central position and sends the information for processing. A
joystick also consists of buttons which can be programmed
to indicate certain actions once a position on the screen has
been selected using stick (see Figure 4.8). It offers three
types of control: digital, glide and direct. Digital control Figure 4.8 Joystick
allows movement in a limited number of directions such as
up, down, left and right. Glide and direct control allow movements in all directions (360°).
Direct control joysticks have the added ability to respond to the distance and speed with
which the user moves the stick.
A joystick is generally used to control the velocity of the screen cursor movement rather than
its absolute position. It is used for computer games. The other applications in which it is used are
flight simulators, training simulators, CAD/CAM systems and for controlling industrial robots.
How does a joystick work? Various joystick technologies are available and they differ
mainly in how much information they pass on. All joysticks are designed to inform the computer
about the positioning of the stick at any given time. This is done by providing the x – y coordinates
of the stick. The x-axis represents the side-to-side position and the y-axis represents the forward
block position (see Figure 4.9). The circuit board that sits directly underneath the stick carries
electricity from one contact point to another. When the joystick is in neutral position, all but one
of the individual circuits is broken. Each broken section is covered with a simple plastic button
containing a tiny metal disc. When the stick is moved in any direction, it pushes down on one of

Chapter 04.indd 107 5/11/2011 2:27:25 PM


108 Input Output Media

these buttons, pressing the conductive metal


disc against the circuit board. This closes the
circuit, that is, it completes the connection
between the two wire sections. When the
circuit is closed, electricity can flow down
a wire from the computer and to another
wire leading back to the computer. When the
computer picks up a charge on a particular
wire, it knows that the joystick is in the right
position to complete that particular circuit.
The joystick buttons work exactly the same
way. When a button is pressed, it completes
a circuit and the computer recognizes a
Figure 4.9 Inside a Joystick command.
Light Pen: A light pen (sometimes called a mouse pen) is a
hand-held electro-optical pointing device which when touched
to or aimed closely at a connected computer monitor, will allow
the computer to determine where on that screen the pen is aimed.
It facilitates drawing images and selects objects on the display
screen by directly pointing to the objects. It is a pen-like device,
which is connected to the machine by a cable (see Figure 4.10).
Although named light pen, it actually does not emit light but
its light-sensitive diode would sense the light coming from the
screen. The light coming from the screen causes the photocell
Figure 4.10 Light Pen to respond by generating a pulse. This electric response is
transmitted to the processor that identifies the position to which
the light pen is pointing. With the movement of light pen over the screen, the lines or images
are drawn.
Light pens give the user the full range of mouse capabilities without the use of a pad or
any horizontal surface. Using light pens, users can interact more easily with applications, in
such modes as drag and drop, or highlighting. It is used directly on the monitor screen and it
does not require any special hand–eye coordinating skills. Pushing the light pen tip against the
screen activates a switch, which allows the user to make menu selections, draw and perform
other input functions. Light pens are perfect for applications where desk space is limited, in
harsh workplace environments, and any situation where fast accurate input is desired. It is
very useful to identify a specific location on the screen. However, it does not provide any
information when held over a blank part of the screen. A light pen is economically priced and
requires little or no maintenance.
How does a light pen work? The light pen contains a lens and a photo detector
located in its tip (see Figure 4.11). When the electron beam that sweeps the monitor strikes
the phosphor within the light pen’s field of view, the light emitted by the phosphor is focused
through the lens and onto the photo detector. Due to this, the signal current is increased and is
transmitted to the computer. The position of the beam is tracked by the horizontal and vertical

Chapter 04.indd 108 5/11/2011 2:27:25 PM


Types of Input Devices 109

counters, which relay this information to a register. This


cycle is repeated for every frame produced by the electron
beam. By noting when a scan goes by and measuring the
interval between scan lines or entire screen refreshes, an
accurate position of the photo detector on the screen is
determined. The light pen software generates x – y vectors
corresponding to a point on the screen, which may be used
to make a selection by activating a switch on the light pen.
Touch Screen: A touch screen is a special kind of input
device that allows the direct selection of a menu item or
the desired icon with the touch of finger (see Figure 4.12).
Essentially, it registers the input when a finger or other Figure 4.11 Inside
object is touched to the screen. It is normally used when a Light Pen
information has to be accessed with minimum effort.
However, it is not suitable for input of large amounts of
data. Typically, it is used in information-providing systems
like hospitals, airlines and railway reservation counters,
amusement parks, and so on.
How does a touch screen work? A basic touch
screen has three main components: a touch sensor, a controller
and a software driver (see Figure 4.13). The touch sensor/
panel is a clear glass panel with a touch responsive surface.
It is placed over a display screen so that the responsive area
of the panel covers the viewable area of the video screen.
There are several different touch sensor technologies in the
market today, each using a different method to detect touch Figure 4.12 Touch Screen
input. These methods are optical, acoustical and electrical.
In the optical method, infrared beams interlace the surface of
the screen, and when a light beam is broken, that particular
location is recorded. In the acoustical method, ultrasonic
acoustic waves pass over the surface of the screen, and when
the wave signals are interrupted by some contact with the
screen, the location is recorded. In the electrical method,
the panel has an electrical current running through it and
touching the screen causes a voltage change, which is used to
determine the location of the touch to the screen.
The controller connects the touch sensor and the
computer. It takes information from the touch sensor and
translates it into information that a computer can understand.
The driver is a software update for the computer system that
allows the touch screen and computer to work together. It
tells the operating system how to interpret the touch event Figure 4.13 Working
information that is sent from the controller. of Touch Screen

Chapter 04.indd 109 5/11/2011 2:27:26 PM


110 Input Output Media

Trackpad: 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 (see Figure 4.14). It is generally used in
laptops but can also be connected to a PC through
a cord. It is also equipped in personal digital
assistants (PDAs) and media players such as the
iPod. Typically, a trackpad also consists of two
or three buttons which work as mouse buttons.
Many trackpads are also strike sensitive, that
is, the user can tap on the trackpad to perform
operations like selecting an object, maximizing/
minimizing the window, etc.
Note: The device manufactured by Apple is
referred to as Trackpad while the device
Figure 4.14 Trackpad manufactured by others is known as Touchpad.

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.

Chapter 04.indd 110 5/11/2011 2:27:26 PM


Types of Input Devices 111

Speech recognition is gaining popularity


in the corporate world among non-typists,
people with disabilities, and business travellers
who record information for later transcription.
The computer-based speech-recognition
systems can be used to create text documents
such as letters or e-mails, to browse the Internet,
and to navigate among applications by voice
commands. They have relatively high accuracy
rates. They allow the user to communicate
with the computer directly without using a Figure 4.15 Speech Recognition
keyboard or a mouse. However, as compared
to other input devices, the reliability of the speech recognizer is lesser. Sometimes, it is unable
to differentiate between two similar sounding words such as see and sea. It is also not suitable
for noisy places.
How does speech recognition work? A speech recognition system consists of a
number of components, and together they convert spoken human words into computer text
and commands. The system works like this: when a person speaks, the speech recognition
software captures the sound through a microphone and converts it into a digital signal. The
signals coming out from the microphone are analog waves. These analog waves are converted
into digital signals by the computer’s sound card. The speech recognition software analyses
the digital pattern to find matches with known sounds contained in a database, and then passes
the recognized words to an application such as Microsoft Word or WordPerfect as illustrated
in Figure 4.16. Part of that database consists of predefined sound patterns—a one-size-fits-
all vocabulary for recognizing speech from as many different voices as possible. The rest is
built when a user “trains” the software by repeating keywords so it can recognize the user’s
distinctive speech patterns.

SPEECH
RECOGNITION ON USER’S
USER MICROPHONE SOUND CARD SOFTWARE SCREEN

Figure 4.16 Speech Recognition System

Chapter 04.indd 111 5/11/2011 2:27:27 PM


112 Input Output Media

4.2.4 Digital Camera


A Digital camera, as shown in Figure 4.17, stores
images digitally rather than recording them on a film.
Once a picture has been taken, it can be transferred to
a computer system and then manipulated with an image
editing software, and printed. The big advantage of digital
cameras is that making photos is both inexpensive and
fast because there is no film processing.

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

Chapter 04.indd 112 5/11/2011 2:27:27 PM


Types of Input Devices 113

its data arrive via network; the recipient


need not download the video. However, a
high-speed Internet connection is needed
to transfer the video smoothly, and the
image quality is also comparatively poor.
On the other hand, a snapshot webcam
captures only still images (usually,
once every 30 seconds) and refreshes it
continuously. It produces better quality
images and is easier to configure than
streaming videos.
The popularity of webcams is
increasing everyday due to their unlimited
uses. The most popular use of webcams is
in videoconferencing to provide real-time
communication where groups of people Figure 4.19 Webcam
can see and interact with each other. It
can be used with various messenger
programs like Yahoo and Windows

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,

Chapter 04.indd 113 5/11/2011 2:27:28 PM


114 Input Output Media

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.

Flatbed Scanner: A flatbed scanner looks similar to a


photocopier machine. It consists of a box containing a glass plate
on its top and a lid that covers the glass plate (Figure 4.22). This
Figure 4.22 Flatbed glass plate is used for placing the document to be scanned. The
Scanner light beam is placed below the glass plate and when it is activated,

Chapter 04.indd 114 5/11/2011 2:27:28 PM


Types of Input Devices 115

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.

4.2.7 Optical Character Recognition


As stated earlier, a scanner converts an input document into an electronic format that can be
stored on the disk. If the document to be scanned contains an image, it can be manipulated
using image editing software. However, if the document to be scanned contains text, you need
an optical character recognition (OCR) software. This is because when the scanner scans a
document, the scanned document is stored as a bitmap in the computer’s memory. The OCR
software translates the bitmap image of text to the ASCII codes that the computer can interpret
as letters, numbers and special characters.
Because of OCR, data entry becomes easier, error-free and less time consuming. However,
it is very expensive and if the document is not typed properly, it will become difficult for the
OCR to recognize the characters. Furthermore, except for tab stops and paragraph marks, most

Chapter 04.indd 115 5/11/2011 2:27:28 PM


116 Input Output Media

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

4.2.8 Optical Mark Recognition


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. In order to be detected
by the OMR reader, a mark has to be positioned correctly on the paper and should be
significantly darker than the surrounding paper. The OMR technology enables a high-speed
reading of large quantities of data and transferring this data to a computer without using a
keyboard. Generally, this technology is used to read answer sheets (objective type tests). In
this method, special printed forms/documents are printed with boxes, which can be marked
with a dark pencil or ink (Figure 4.25). These forms are then passed under a light source
and the presence of dark ink is transformed into electric pulses, which are transmitted to the
computer.
OMR has a better recognition rate than OCR because fewer mistakes are made by
machines to read marks than in reading handwritten characters. Large volumes of data can
be collected quickly and easily without the need for specially trained staff. Usually, an
OMR reader can maintain a throughput of 1500 to 10,000 forms per hour. However, the

Chapter 04.indd 116 5/11/2011 2:27:29 PM


Types of Input Devices 117

designing of documents for optical


mark recognition is complicated
and the OMR reader needs to be
reprogrammed for each new document
design. OMR readers are relatively
slow because the person putting
marks on the documents must follow
the instructions precisely. Any folding
or dirt on a form may prevent the form (b) Answer Sheet
from being read correctly. In addition, (a) Question Sheet with OMR Marks
it requires accurate alignment of
printing on forms and needs a paper of Figure 4.25 Questionnaire Using OMR Marks
good quality.
How does an OmR work? To make an OMR system work, any of the following
methods of mark reading can be used.
™ The first method is based on the conductivity of graphite in order to determine the
presence of a pencil mark. The marks must be made only in pencil because the number
of magnetic particles in the lead pencils is large.
™ The second method is based on the reflection of light. In this, a thin beam of light
is directed on the surface of the paper. When a lesser amount of light is transmitted
through the dot, the filled box can be recognized. OMR can evaluate only those
documents which are printed with the marked positions in the specified areas.
OMR is traditionally performed using the reflective light method where a beam of light
is reflected on a sheet with marks to capture the reflection (presence of a mark) or absence of
reflection (absence of a mark). The OMR data entry system converts the information about
the presence or absence of marks into a computer data file. A simple pen or pencil mark is
made on the form to indicate each selected response such as answers to survey questions. The
completed forms are scanned by an optical mark reader, which detects the presence of a mark
by measuring the reflected light. The OMR reader then interprets the pattern of marks into a
data record and sends this to a computer for storage, analysis and reporting.

4.2.9 Magnetic-ink Character Recognition


You must have seen special magnetic
encoding using characters printed on
the bottom of a cheque (Figure 4.26).
The characters are printed using special
ink, which contains iron particles that
can be magnetized. To recognize these
magnetic ink characters, a Magnetic
ink character reader (MICR) is used.
It reads the characters by examining
their shapes in a matrix form and the
information is then passed on to the Figure 4.26 Cheque Number Written
computer. in MICR Font

Chapter 04.indd 117 5/11/2011 2:27:29 PM


118 Input Output Media

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

information. For example, the bar codes


A bar code data entry has an error rate of about
found on food items do not contain the price
1 in 3 million. Bar coding also reduces cost in
or other description; instead the bar code has
terms of labour and revenue losses resulting
a product number in it. When read by a bar
from data collection errors. Bar code readers
code reader and transmitted to the computer,
are widely used in supermarkets, department
the computer finds the disk record file(s)
stores, libraries and other places. You must
associated with that item number. This file
have seen bar code on the back cover of
contains the price, vendor name and other
certain books and greeting cards. Retail
information.
and grocery stores use a bar code reader to
determine the item being sold and to retrieve the item price from a computer system.
Bar code scanners are electro-optical systems that include a means of illuminating the
symbol and measuring reflected light. The light waveform data are converted from analog to
digital, in order to be processed by a decoder, and then transmitted to the computer software.
The process begins when a device directs a light beam over a bar code. The device contains
a small sensory reading element, called sensor, which detects the light being reflected back

Chapter 04.indd 118 5/11/2011 2:27:29 PM


Types of Output Devices 119

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 TYPES OF OUTPUT DEVICES


Output is data that have been processed into useful information. It can be displayed or viewed
on a monitor, printed on a printer, or listened through speakers or a headset. Generally, there
are two basic categories of output: the output which can be readily understood and used by
humans, and which is stored on secondary storage devices so that the data can be used as input
for further processing. The output which can be easily understood and used by human beings
are of the following two forms:
™ Hard Copy: The physical form of output is known as hard copy. In general, it refers
to the recorded information copied from a computer onto paper or some other durable
surface such as microfilm. Hard copy output is permanent and a relatively stable form
of output. This type of output is also highly portable. Paper is one of the most widely
used hard copy output media. The principal examples are printouts, whether text or
graphics from printers.
™ Soft Copy: The electronic version of an output, which usually resides in computer
memory and/or on disk, is known as soft copy. Unlike hard copy, soft copy is not a
permanent form of output. It is transient and is usually displayed on the screen. This
kind of output is not tangible, that is, it cannot be touched. Soft copy output includes
audio and visual form of output, which is generated using a computer. In addition,
textual or graphical information displayed on a computer monitor is also a soft copy
form of output.
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.

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

Chapter 04.indd 119 5/11/2011 2:27:29 PM


120 Input Output Media

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

Chapter 04.indd 120 5/11/2011 2:27:30 PM


Types of Output Devices 121

printer. The daisy wheel printer is named so


because the print head of this printer resembles
a daisy flower, with printing arms that appear
like the petals of the flower (see Figure 4.30).
These printers are commonly referred to as
letter quality printers as the print quality is as
good as that of a high-quality typewriter.
Daisy wheel printers produce high-
resolution output and are more reliable than Figure 4.30 Daisy Wheel Printer
dot matrix printers. They can have speeds up to 90 cps. These printers are also called smart
printers because of their bi-directional printing and built-in microprocessor control features.
However, daisy wheel printers give only alphanumeric output. They cannot print graphics and
cannot change fonts unless the print wheel is physically replaced. These printers are usually
very slow because of the time required to rotate the print wheel for each character desired.
Daisy wheel printers are slower and more expensive than dot matrix printers. However, if the
appearance of the correspondence is important and you do not need graphics, a daisy wheel
printer is a better choice.

How does a daisy wheel printer work?


These printers have print heads composed of metallic
or plastic wheels. A raised character is placed on the
tip of each of the daisy wheel’s “petals”. Each petal has
an appearance of a letter (upper case and lower case),
number or punctuation mark on it. To print, the print
wheel is rotated around until the desired character
is under the print hammer. The petal is then struck
from behind by the print hammer, which strikes the
character, pushing it against the ink ribbon, and onto
the paper, creating the character (see Figure 4.31).

Drum Printer: The dot matrix and daisy wheel


printers are character or serial printers, that is, they
print one character at a time. However, a drum printer Figure 4.31 Working of Daisy
(shown in Figure 4.32) is a line printer, that is, it can Wheel Printer
print a line in a single operation. Generally, a line
printer is used because of its speed as it uses special
tractor-fed paper with pre-punched holes along
each side. This arrangement allows a continuous
high-speed printing. Its printing speed varies from
300 lines to 2000 lines per minute with 96–160
characters on a 15-inch line. Although such printers
are much faster than character printers, they tend to
be quite loud, have limited multi-font capability and
often produce lower print quality than most recent
printing technologies. Line printers are designed for Figure 4.32 Drum Printer

Chapter 04.indd 121 5/11/2011 2:27:31 PM


122 Input Output Media

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

Chapter 04.indd 122 5/11/2011 2:27:32 PM


Types of Output Devices 123

(a) Bubble-jet Method (b) Piezoelectric Method

Figure 4.35 Spraying Techniques of Ink-jet Printer

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

Chapter 04.indd 123 5/11/2011 2:27:33 PM


124 Input Output Media

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

Figure 4.37 Working of a Laser Printer

Chapter 04.indd 124 5/11/2011 2:27:33 PM


Types of Output Devices 125

Hydra Printer: 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
(see Figure 4.38). It may include some or all of
the devices like printer, scanner, photocopier
and fax machine. Apart from these devices,
some hydra printers contain memory card slots
which facilitate easier printing of photos and also
have the in-built wireless capabilities that make
sharing of this printer with other systems easier. Figure 4.38 Hydra Printer
Following are the features that must be considered to evaluate these printers:
™ Print speed
™ Maximum resolution
™ Memory card compatibility
™ Scanner resolution
™ Fax speed
Hydra printers are useful for small organizations due to their small size, less space
requirement and cost effectiveness. The cost of these printers depend on the technology (inkjet
or laser) being used. They save power to a great extent as only one power outlet is required for
performing various operations. They are easy to install and maintain and have easy-to-use GUI
(graphical user interface) that help users to understand their functions easily.
4.3.2 Plotters
Raster versus Vector
A plotter is a pen-based output device
that is attached to a computer for A grid of pixels defines raster; each pixel is

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,

Chapter 04.indd 125 5/11/2011 2:27:33 PM


126 Input Output Media

(a) Drum Plotter (b) Flatbed Plotter

Figure 4.39 Plotters


it is unable to produce solid fills and shading. Plotters are relatively expensive as compared
to printers but can produce more printouts than standard printers. They are mainly used for
Computer Aided Design (CAD) and Computer Aided Manufacturing (CAM) applications
such as printing out plans for houses or car parts. These are also used with programs like
AUTOCAD (computer assisted drafting) to give graphic outputs. As shown in Figure 4.39,
there are two different types of plotters: drum plotter (where the paper moves) and flatbed
plotter (where the paper is stationary).
™ Drum Plotter: In drum plotters, the paper on which the design is to be printed is
placed over a drum. These plotters consist of one or more pen(s) that are mounted on
a carriage which is horizontally placed across the drum. The drum can rotate in either
clockwise or anticlockwise direction under the control of plotting instructions sent
by the computer. In case a horizontal line is to be drawn, the horizontal movement of
the pen is combined with the vertical movement of the page via the drum. The curves
can also be drawn by creating a sequence of very short straight lines. In these plotters,
each pen can have an ink of a different colour to produce multicolour designs. Drum
plotters are used to produce continuous output such as plotting earthquake activity or
for long graphic output such as tall building structures.
™ Flatbed Plotter: Flatbed plotters consist of a stationary, horizontal plotting
surface on which paper is fixed. The pen is mounted on a carriage, which can move
horizontally, vertically, leftwards or rightwards to draw lines. In flatbed plotters,
the paper does not move, the pen-holding mechanism provides all the motion.
These plotters are instructed by the computer on the movement of pens in the x – y
coordinates on the page. These plotters are capable of working on any standard, that
is, from A4 size paper to some very big beds. Depending on the size of the flatbed
surface, these are used in designing of ships, aircrafts, buildings and so on. The
major disadvantage of this plotter is that it is a slow output device and can take hours
to complete a complex drawing.

Chapter 04.indd 126 5/11/2011 2:27:34 PM


Types of Output Devices 127

Figure 4.40 Working of Flatbed Plotter

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.

4.3.3 Computer Output Microfilm


Computer Output Microfilm (COM) 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. This process can produce data in microfilm
form at a highly significant speed from that of a paper printer. The image area of the
copy is dramatically reduced, up to 1/40 of its original size; yet, it retains its original
clarity. Traditional roll microfilm is 16 mm wide, with a film image that is 1/24 of the
size of the original document, often called 24x. Images are normally side-by-side on
the film. Therefore, a letter size image is a little over 1/3 inch wide, and a ledger sheet
can be well over 1/2 inch. Some cameras and computer output systems create an image
1/42 or 1/48 of the document’s original size, with a few systems using even smaller or

Chapter 04.indd 127 5/11/2011 2:27:34 PM


128 Input Output Media

larger sizes. A jacket microfilm (microfiche), plastic sleeves


with small pieces of film, represents individual document
(cut from roll microfilm). All the documents for a particular
context are placed in a single jacket, much like a file folder.
Each 105 × 148 mm jacket typically has five horizontal rows,
with an opening at the right end of each row where the film is
inserted. Each row can hold 10–15 pages. Microfiche can be
indexed in order to locate necessary information quickly and
easily and have a life expectancy of more than 500 years. To
retrieve the images, the microfilm images may be enlarged
Figure 4.41 Microfilm on a viewing screen with the help of a microfilm reader
Reader (see Figure 4.41) for comfortable reading.
COM results in material, space and equipment savings
along with mailing costs and information retrieval savings. In addition, hard copy prints
can be made without loss of detail when compared with the original document. It facilitates
indexing to access information. Furthermore, it provides an inexpensive way to preserve
records from a variety of electronic sources. Such records might need to be stored for
long periods and referenced only occasionally. The main disadvantage, however, is that
it is expensive to install COM, and microfilms cannot be read without the assistance of
a special reader device. Moreover, development of secondary-storage techniques such as
the use of removable, high-capacity hard disks had lessened their appeal as output and
storage method.
Generally, a COM system is ideal for applications where there is a large amount of
information to be retained, and therefore very useful for manuals, industrial catalogues and
archives. Microfilm output is used for distribution of airline schedules, medical X-rays and
lists of books in print. Banking and insurance companies, government agencies, public utilities
and many other types of organizations are regular users of COM.
Creating Microfilms: Microfilms can be created in the following two ways:
™ Photographic Process: It is the oldest method of creating microfilms. Essentially,
it is a form of miniature photography, which uses a microfilm camera for producing
microfilms. When the original documents are fed through a microfilm camera,
it captures the document into a reduced-size photo. Once all the photographs are
taken, the rolls of films are removed from the camera for further processing and
development. The processed images can be rolled on film rolls, or cut into sections
and loaded to flat microfiche holders.
™ Non-photographic Process: In this process, the user can entirely avoid the film-
developing process. This process uses a monitor and the computer output is read
onto the magnetic tape. After this, data are printed on microfilm by using a microfilm
recorder. Moreover, it is possible to couple a microfilm machine directly to a computer;
therefore, the recorder can directly receive information from the computer. As the
recorder projects the computer information onto the screen, a high-speed camera
photographs the displayed information.
The process of creating microfilm from magnetic tape is illustrated in Figure 4.42.

Chapter 04.indd 128 5/11/2011 2:27:34 PM


Types of Output Devices 129

Magnetic
Tape

Microfilm
Reader

Tape
Drive

COM
Recorder
Roll
Fiche

Film
Processor

Figure 4.42 Creating Microfilm from Magnetic Tape

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

Chapter 04.indd 129 5/11/2011 2:27:34 PM


130 Input Output Media

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

Chapter 04.indd 130 5/11/2011 2:27:35 PM


Types of Output Devices 131

Figure 4.45 Cathode Ray Tube

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.

Chapter 04.indd 131 5/11/2011 2:27:35 PM


132 Input Output Media

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-

Figure 4.46 Raster Scanning

Chapter 04.indd 132 5/11/2011 2:27:35 PM


Types of Output Devices 133

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

Chapter 04.indd 133 5/11/2011 2:27:35 PM


134 Input Output Media

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.

Chapter 04.indd 134 5/11/2011 2:27:36 PM


Types of Output Devices 135

Polarizing Filters

Polarizing Filters

Figure 4.49 Active Matrix LCD


An LCD addresses each pixel individually. As a result, they can create sharper text than
CRTs. However, LCD has only one “natural” resolution, limited by the number of pixels
physically built into the display. If you want to move up to, say, 1024 by 768 LCD on an 800
by 600 LCD, you have to emulate it with software, which will work only at certain resolutions.
Differences between LCD and CRT: Although both the CRT and LCD monitors are
the most frequently used types of displays in computers, they are worlds apart in terms of what
is important when making a purchase decision. Here is a brief discussion of what is different
about LCD monitors.
™ Size: LCD is lightweight and compact, which saves desktop space as compared to a CRT.
™ Resolution: LCD is designed to work in a single resolution while CRT is designed
for many resolutions.
™ Pixel Density: Pixel density of LCD is generally not as tight as the dot pitch in CRT
but for most applications, the density is acceptable.
™ Brightness: The illuminated phosphor of a CRT is not nearly as bright as what the
LCD can produce with its florescent backlight.
™ Power Consumption: LCD consumes significantly less power than CRT and has a
low emission risk. Typically, a LCD consumes approximately half of the power of a
typical CRT.
™ Flicker: With CRT monitors, the goal is to get a faster refresh rate of at least 85 Hz,
but LCD monitors are designed to run at a much slower refresh rate (usually about
60 Hz) and flicker is never an issue.
™ Pixel Response Time: The time taken by a pixel to change its state is called pixel
response time. CRT has extremely fast pixel response time but LCD can be quite
slow. As a result, the user might see “ghost images” when there is movement on the

Chapter 04.indd 135 5/11/2011 2:27:36 PM


136 Input Output Media

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.

4.3.5 Voice Response System


Previously, we discussed that voice (in speech recognition) can be taken as an input by the
computer system. Similarly, the computer can also give output in the form of audio. Voice
response system has an audio-response device which produces audio output. These sounds are
pre-recorded in a computer system. Each sound has a unique code. Whenever an enquiry is
sought from the system, the computer responds in digital form which is sent to voice devices that
unscramble the digital information and produces sound messages to the requesting computer.
There are two basic approaches to get a computer to talk to the user. The first is synthesis
by analysis, in which the device analyses the input of an actual human voice speaking words,
stores and processes the spoken sounds, and reproduce them as needed. The process of storing
words is similar to the digitizing process we discussed while considering voice input. In essence,
synthesis by analysis uses the computer as a digital tape recorder. The second approach to
synthesizing speech is synthesis by rule, in which the device applies a complex set of linguistic
rules to create artificial speech. Synthesis based on the human voice has the advantage of
sounding more natural but is limited to the number of words stored in the computer.

Chapter 04.indd 136 5/11/2011 2:27:36 PM


Types of Output Devices 137

Figure 4.50 Audio Output


The standard computer system can provide audio output with the addition of two
components: a speech synthesizer that does the speaking and a screen reading software that tells
the synthesizer what to say (see Figure 4.50). The synthesizer can be a computer card inserted
into the computer or software that works with the computer’s sound card. Screen reader is a
software program that allows the user to control the synthesizer so that he can access text,
which is displayed on the computer monitor, with combinations of keystrokes. Some screen
review softwares use the standard computer keyboard keys, some use the numeric keypad,
and some use special external keypads. A visually impaired user can use a screen reader to
read anything on the screen. The screen reading software can even notify a user about various
computer messages that “pop up” on the monitor from time to time.
Voice output has become common in many places like airlines, bus terminals, banks and
brokerage houses. It is typically used when an inquiry is followed by a short reply (such as a
bank balance or flight time). Many businesses have found other creative uses for voice output.
For example, the telephone. Automatic telephone voices take surveys, inform customers that
catalogue orders are ready to be picked up, and perhaps remind consumers that they have
not paid their bills. Moreover, people with a total or partial speech handicap are faced with
the problem of communicating their wishes and needs to others. Speech output systems are a
valuable aid in this case.
4.3.6 Projector
Projectors have an important place in history, as its growth led to the first moving pictures
of the late 19th century, and soon to television. They have allowed the world to share greater
information pertaining to culture, technology, medicine and community. 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. Projection display is
commonly used for classrooms training or conference room or for multimedia presentations
with a large audience. Like monitors, projectors provide a temporary, soft copy output.
Types of Projectors: Projectors are mainly of two types:
™ LCD Projectors: LCD is the established technology used by most of the leading
manufacturers. Most of today’s LCD projectors contain three separate LCD glass
panels, one each for red, green and blue components of the image signal being fed
into the projector. As light passes through the LCD panels, individual pixels can be
opened to allow light to pass, or closed to block the light. This activity modulates the
light and produces the image that is projected onto the screen (see Figure 4.51).
™ DLP Projectors: DLP is the acronym for digital light processing. It is a proprietary
technology developed by Texas Instruments. DLP uses a single digital mirror device

Chapter 04.indd 137 5/11/2011 2:27:36 PM


138 Input Output Media

Figure 4.51 LCD Projector Display

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

Figure 4.52 DLP Projector Display

Chapter 04.indd 138 5/11/2011 2:27:37 PM


Types of Output Devices 139

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.

4.3.7 Electronic Whiteboard


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. The
projector projects the computer’s desktop
on the whiteboard and user can interact with
it using electromagnetic pens, fingers or
other pointing devices (see Figure 4.53). The
electromagnetic pens can be configured to any Figure 4.53 Electronic Whiteboard
colour or width.
A user can activate programs, applications and menus as well as enter text using either
the on-screen keyboard or handwriting recognition utility. Nowadays, most whiteboards
come with software that provides various tools and features to create virtual versions of
paper flipcharts with pen, highlighter, etc., enhancing the use of electronic whiteboard to a
great extent. Electronic whiteboard is widely used for various purposes such as to display
presentations, for teaching in classrooms, in corporate meetings, professional sports coaching
and so on.
An interactive electronic whiteboard can be classified into one of the following
categories:
™ Touch-based Whiteboard: A touch-based whiteboard allows user to use their fingers
or other pointing devices to interact with it. The working on these whiteboards is easy
as anything can be used as a pointer, for example, a stick, finger, etc., where the touch
of a finger on the whiteboard is considered as a left click of the mouse.
™ Pen-based Whiteboard: A pen-based whiteboard mainly uses an electromagnetic
pen that alters electrical signals produced by the board and does not require batteries
or power source for its operation. When the tip of the pen is pressed to the whiteboard,
it results in the activation of a switch in the pen, which signifies a mouse click to
the computer. These whiteboards are widely used by professional digital artists and
designers as they help in providing more accurate information.
™ Wii Remote, IR Pen-based Whiteboard: A Wii Remote, infrared (IR) pen-based
whiteboard works on sound electronic and optical principles. It uses Wii remote
control with IR camera placed in front of a remote control to track dots of an infrared
light which is created by an IR pen. These whiteboards have become much popular
due to their portability and reduced cost.
Note: The device driver software installed on the computer enables the whiteboard to act as a
human input device (HID), just like a mouse, to help the user with easy interaction.

Chapter 04.indd 139 5/11/2011 2:27:37 PM


140 Input Output Media

4.3.8 Headphone and Headset


Headphone is an audio device equipped with a pair of speakers attached to a headstrap worn by
the users. Headphones are used with almost all electronic devices such as portable computers,
CD/DVD players, mp3 players, iPod, etc. They
comprise high-quality speakers, are light in
weight and very comfortable to wear. They can
be easily connected to a computer via a mini
stereo plug.
The headphones allow the users to listen
only; however, some applications like live
chats, videoconferencing and telecalling
services demand the user to also speak at the
same time. For such applications, a headset
is used instead of a headphone. A headset is
a combination of one or two speakers and a
Figure 4.54 Headphone and Headset microphone with both the speaker and the
microphone attached to a headstrap. The
speaker(s) allows the person to hear the conversation and the microphone allows the user to
communicate with the person on the other end (see Figure 4.54).

4.4 COMPUTER TERMINALS


A computer terminal is a special unit that can perform both input and output. A terminal is
an I/O device that uses a keyboard for input and a monitor for output. Due to this reason, a
terminal is also known as video display terminal (VDT ). Terminals can be categorized into the
following types:
™ Dumb Terminal: It refers to a terminal that has no processing or programming
capabilities. It is designed to communicate exclusively with a host computer. Usually,
it consists of a screen and keyboard used to access a host computer. It has electronics
circuitry enough to interpret incoming instructions from the host computer, to display
characters on the screen, to interpret keystrokes on the keyboard and pass them on
to the host computer. Generally, dumb terminals are used for simple data entry or
retrieval tasks. An example of a dumb terminal is one used by airline clerks at airport
ticket and check-in counters.
™ Smart Terminal: A smart terminal has built-in processing capability and memory but
does not have its own storage capacity. In comparison to the dumb terminal, a smart
terminal can communicate, retrieve data and can perform a limited processing of its
own, that is, editing or verification of data. However, this kind of terminal cannot be
used for programming. They are often found in local area networks in offices.
™ Intelligent Terminal: An intelligent terminal has memory and inbuilt microprocessors,
thus also known as user-programmable terminal. This terminal can independently
perform a certain number of jobs without even interacting with the mainframe.
Although they are intelligent terminals, some workstations are designed without disk
drives. Due to this, restricted data cannot be downloaded or copied.

Chapter 04.indd 140 5/11/2011 2:27:38 PM


Let Us Summarize 141

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.

Chapter 04.indd 141 5/11/2011 2:27:38 PM


142 Input Output Media

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

Chapter 04.indd 142 5/11/2011 2:27:38 PM


Exercises 143

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

Fill in the Blanks


1. Mouse and light pen are examples of ......................... input devices.
2. Two basic methods used for optical character recognition (OCR) are ......................... and
.........................
3. .......................... is a machine-readable code in the form of parallel vertical lines.
4. MICR stands for .........................
5. The bar-coded data represent the ......................... and a device, which is used for reading
the bar-coded data, is known as .........................
6. The most used layout of a keyboard is .........................
7. The printed form of output is referred to as .......................... and the form of output, which
is shown on a display screen, is referred to as .........................
8. An impact printer, which gives only alphanumeric output, is called .........................
9. ......................... plotters are computer graphics devices that use drum or flatbed paper
holder.
10. A non-impact printer that forms an image by spraying ink from a matrix of tiny jets is
called .........................

Chapter 04.indd 143 5/11/2011 2:27:38 PM


144 Input Output Media

11. The mouse may be classified as ......................... or ..........................


12. ......................... is the oldest printing technology.
13. The quality of the monitor is generally judged by considering four basic terms
........................., ........................., ........................., and .........................
14. The number of bits used to describe a pixel is known as .........................
15. A computer can talk to persons through a device known as .........................

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

Chapter 04.indd 144 5/11/2011 2:27:38 PM


Exercises 145

12. The ......................... is also called as letter quality printer.


(a) Dot Matrix Printer (b) Ink Jet Printer
(c) Daisy Wheel Printer (d) Laser Printer
13. The ......................... terminal is referred to as non-programmable terminal whereas
......................... terminal is referred to as user-programmable terminal.
(a) Dumb, Intelligent (b) Dumb, Smart
(c) Smart, Intelligent (d) None of these
14. An individual small dot, which one sees on the computer screen is called .........................
(a) Font (b) Character
(c) Screen Point (d) Pixel
15. LCD stands for .........................
(a) Liquid Colour Display (b) Light Colour Display
(c) Lithium Crystal Display (d) Liquid Crystal Display

State True or False


1. Any hardware item that is attached to the CPU is referred to as peripheral device.
2. Impact printers are slower as compared to non-impact printers.
3. The speed of a printer is measured by character per minute.
4. Audio response is a soft copy output.
5. Dot pitch can be changed by the user.
6. Plotters are best suited for desktop publishing.
7. Bank cheques are an example of bar code marking.
8. QWERTY is the most popular keyboard layout.
9. A speech recognition system converts the computer text and commands into human
spoken words.
10. More pixels per square inch mean better resolution.
11. A digital camera’s photographs can be stored in a computer’s hard disk.
12. The most common aspect ratio used in computer monitors is 4:4.
13. Raster scan monitors draw a picture one line at a time and for this reason they are referred
to as vector displays, stroke-writing, or calligraphic displays.
14. Ultrasonic acoustic waves are one of the most commonly used touch screen
techniques.
15. 16-bits colour allows up to 256 colours.

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.

Chapter 04.indd 145 5/11/2011 2:27:38 PM


146 Input Output Media

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

Fill in the Blanks


1. Pointing 2. Matrix matching, Feature extraction
3. Bar code 4. Magnetic ink character recognition
5. Alphanumeric data, Bar code reader 6. QWERTY
7. Hard copy, Soft copy 8. Daisy wheel
9. Pen 10. Ink-jet
11. Mechanical mouse, Optical mouse 12. Dot Matrix
13. Size, Resolution, Refresh rate, Dot pitch 14. Resolution
15. Speech synthesizer

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)

State True or False


1. True 2. True 3. False 4. True 5. False 6. False 7. False
8. True 9. False 10. True 11. True 12. False 13. False 14. True
15. False

Chapter 04.indd 146 5/11/2011 2:27:38 PM


CHAPTER 5

Operating System

This chapter provides an outlook on operating system. An


operating system is a collection of system programs, which
controls the operation of a computer system. The discussion
begins with the evolution and types of operating system. It
continues with the various functions of an operating system,
namely, process management, memory management, file
management, device management, security management,
and user interface.

Chapter 05.indd 147 5/11/2011 2:39:07 PM


148 Operating System

CHAPTER OBJECTIVES

After reading this chapter, you will be able to understand:


™ The need to develop an operating system
™ What is an operating system and what are its objectives
™ How operating systems evolved from single user character-based interfaces to modern day
multi-user graphical user interface
™ Six major types of operating systems
™ Six major functions of an operating system

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.

5.2 OPERATING SYSTEM: DEFINITION


An operating system is a collection of system programs that together controls the operation
of a computer system. The OS along with hardware, applications, other system software and
users constitute a computer system as shown in Figure 5.1. It is the most important part of any
computer system. It acts as an intermediary between
a user and the computer hardware. The OS has two
objectives.
™ Managing Hardware: The prime objective
of the OS is to manage and control
various hardware resources of a computer
system. These hardware resources include
processor, memory, disk space, I/O devices
and so on. The OS supervises which
input device’s data is requesting for being
Figure 5.1 Managing Hardware processed and which processed data is

Chapter 05.indd 148 5/11/2011 2:39:08 PM


Evolution of Operating System 149

ready to be displayed on the output device.


In addition to communicating with hardware,
the OS provides an error handling procedure
and displays an error notification. If a device
is not functioning properly, the OS tries to
communicate with the device again. If it is
still unable to communicate with the device,
it provides an error message notifying the
user about the problem. Figure 5.2 illustrates
how an OS manages the hardware resources
of a computer system.
™ Providing an Interface: The OS organizes
applications so that users can easily access, Figure 5.2 Computer System
use and store them. When an application is Components
opened, the OS assists the application to provide the major part of the user interface.
It provides a stable and consistent way for applications to deal with the hardware
without the user having to know all the details of the hardware. If the application
program is not functioning properly, the OS again takes control, stops the application
and displays an appropriate error message.
5.3 EVOLUTION OF OPERATING SYSTEM
In the early days, the computers lacked any form of OS. The user would arrive at the machine
armed with his program and data, often on punched paper tape. The program would be loaded
into the machine and the machine set to work. Then came machines with libraries of support
code (initial OSs), which were linked to the user’s program to assist in operations such as
input and output. At this stage, OSs were very diverse with each vendor producing one or
more OSs specific to its particular hardware. Typically, whenever new hardware architecture
was introduced, there was a need of new OS compatible with the new architecture. This state
of affairs continued until 1960s when IBM developed the S/360 series of machines. Although
there were enormous performance differences across the range, all the machines ran essentially
the same OS called S/360.
Then came the small 4 bit and 8 bit processors known as microprocessors. The
development of microprocessors provided inexpensive computing for the small businesses.
This led to the widespread use of interchangeable hardware components using a common
interconnection, and thus creating an increasing need for standardized OS to control them. The
most important among the early OSs was CP/M-80 for the 8080/8085/Z-80 microprocessors.
With the development of microprocessors like 386, 486 and the Pentium series by Intel, the
whole computing world got a new dimension. AT&T and Microsoft came up with character-
based OSs, namely, Unix and Disk OS, respectively, which supported the prevalent hardware
architectures. After the character-based OSs, Microsoft and Apple Macintosh came with their
Windows 3.1 and MAC, which were GUI-based OSs and well suited for the Desktop PC
market. Today, OSs such as Windows XP and Red Hat Linux have taken the driver’s seat in
personal desktops. These OSs with their remarkable GUI and network support features can
handle diverse hardware devices.

Chapter 05.indd 149 5/11/2011 2:39:09 PM


150 Operating System

5.4 TYPES OF OPERATING SYSTEMS


The OS has evolved immensely from its primitive days to the present digital era. From batch
processing systems to the latest embedded systems, the different types of OSs can be classified
into six broad categories.
™ Batch Processing OS: This type of OS was one of the first to evolve. Batch processing
OS allowed only one program to run at a time. These kinds of OSs can still be found
on some mainframe computers running batches of jobs. Batch processing OS works
on a series of programs that are held in a queue. The OS is responsible for scheduling
the jobs according to priority and the resources required. Batch processing OSs are
good at churning through large numbers of repetitive jobs on large computers. For
example, this OS would be best suited for a company wishing to automate their
payrolls. A list of employees will be entered, their monthly salaries will be calculated,
and corresponding pay slips would be printed. Batch processing is useful for this
purpose since these procedures are to be repeated for every employee and each month.
™ Multi-user or Time-sharing OS: This system is used in computer networks which
allow different users to access the same data and application programs on the same
network. The multi-user OS builds a user database account, which defines the rights
that users can have on a particular resource of the system.
™ Multi-programming OS: In this system, more than one process (task) can be
executed concurrently. The processor is switched rapidly between the processes.
Hence, a user can have more than one process running at a time. For example, a
user on his computer can have a word processor and an audio CD player running at
the same time. The multi-tasking OS allows the user to switch between the running
applications and even transfer data between them. For example, a user can copy a
picture from an Internet opened in the browser application and paste it into an image
editing application.
™ Real-time OS (RTOS): This system is designed to respond to an event within
a predetermined time. This kind of OS is primarily used in process control,
telecommunications and so on. The OS monitors various inputs which affect the
execution of processes, changing the computer’s model of the environment, thus
affecting the output, within a guaranteed time period (usually less than one second).
As the real-time OSs respond quickly, they are often used in applications such as
flight reservation systems, railway reservation systems, military applications, etc.
™ Multi-processor OS: This system can incorporate more than one processor dedicated
to running processes. This technique of using more than one processor is often called
parallel processing. The main advantage of multi-processor systems is that they
increase the system throughput by getting more work done in less time.
™ Embedded OS: It refers to the OS that is self-contained in the device and resident in
the ROM. Since embedded systems are usually not general-purpose systems, they are
lighter or less resource intensive as compared to general-purpose OSs. Most of the
embedded OSs also offer real-time OS qualities. Typical systems that use embedded
OSs are household appliances, car management systems, traffic control systems and
energy management systems.

Chapter 05.indd 150 5/11/2011 2:39:09 PM


Functions of an Operating System 151

5.5 FUNCTIONS OF AN OPERATING SYSTEM


The main functions of a modern OS are as follows:
™ Process Management: As a process manager, the OS handles the creation and
deletion of processes, suspension and resumption of processes, and scheduling and
synchronization of processes.
™ Memory Management: As a memory manager, the OS handles the allocation and
de-allocation of memory space as required by various programs.
™ File Management: The OS is responsible for creation and deletion of files and
directories. It also takes care of other file-related activities such as organizing, storing,
retrieving, naming and protecting the files.
™ Device Management: The OS provides input/output subsystem between process and
device driver. It handles the device caches, buffers and interrupts. It also detects the
device failures and notifies the same to the user.
™ Security Management: The OS protects system resources and information against
destruction and unauthorized use.
™ User Interface: The OS provides the interface between the user and the hardware.
The user interface is the layer that actually interacts with the computer operator. The
interface consists of a set of commands or menus through which a user communicates
with a program.

5.5.1 Process Management


States of a Process
A process is an execution of a sequence
of instructions or program by the CPU. It A process changes various states during its

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

Chapter 05.indd 151 5/11/2011 2:39:09 PM


152 Operating System

Figure 5.3 Life Cycle of a Process


execution, such as computer memory or disk space. To keep track of all the processes, the OS
maintains a table known as the process table. This table stores many pieces of information
associated with a specific process, that is, program counter, allocated resources, process state,
CPU-scheduling information, and so on.
Initially, a process is in the new state. When it becomes ready for execution and needs the
CPU, it switches to the ready state. Once the CPU is allocated to the process, it switches to the
running state. From the running state, the process goes back to the ready state if an interrupt
occurs or to the waiting state if the process needs some I/O operation. In case the process has
switched to ready state, it again comes to running state after the interrupt has been handled. On
the other hand, if the process has switched to waiting state, then after the completion of I/O, it
switches to ready state and then to running state. Thus, a process continues to switch among
the ready, running and waiting states during its execution. Finally, it switches to terminated
state after completing its execution as shown in Figure 5.3.
Note: The change of the state of the process from one form to another is called context change and
this course of action is known as context switching.
Let us consider the steps in an example of two processes, a text editor and a calculator,
running simultaneously on a computer system.
Step 1 The OS receives a request to open a text editor.
Step 2 A new process for the text editor is initiated by the OS.
Step 3 Resources such as keyboard, memory and hard disk are made available and the
process enters in to ready state.
Step 4 The scheduler then dispatches the text editor to running state.
Step 5 In the meantime, another process, a calculator, is initiated by the user.
Step 6 A new process is created by the OS for the calculator.
Step 7 Resources such as keyboard and memory are made available and this process
enters in to ready state.
Step 8 Now as the calculator process is ready for the processor to work upon, the text
editor process, if not terminated (finished), is kept in either waiting state or in
the ready state.

Chapter 05.indd 152 5/11/2011 2:39:09 PM


Functions of an Operating System 153

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

Chapter 05.indd 153 5/11/2011 2:39:09 PM


154 Operating System

Figure 5.4 Types of Schedulers


loads it into the main memory for execution. This scheduler is generally invoked only
when a process exits from the system. Thus, the frequency of invocation of long-term
scheduler depends on the system and workload and is much lower than other two
types of schedulers.
™ Short-term Scheduler: Also known as CPU scheduler, it selects a process from the
ready queue and allocates the CPU to it. This scheduler is required to be invoked
frequently as compared to long-term scheduler. This is because a process generally
executes for a short period and then it may have to wait either for I/O or some other
reason. At that time, the CPU scheduler must select some other process and allocate
the CPU to it. Thus, the CPU scheduler must be fast in order to provide the least time
gap between executions.
™ Medium-term Scheduler: Also known as swapper, it comes into play whenever a
process is to be removed from the ready queue (or from the CPU in case it is being
executed) thereby reducing the degree of multiprogramming. This process is stored
at some space on the hard disk and later brought into the memory to restart execution
from the point where it left off. This task of temporarily switching a process in and
out of main memory is known as swapping. The medium-term scheduler selects
a process among the partially executed or unexecuted swapped-out processes and
swaps it in the main memory. The medium-term scheduler is usually invoked when
some space becomes free in memory by the termination of a process or if the supply
of ready process reduces below a specified limit.
The various types of schedulers are illustrated in Figure 5.4.
Preemptive and non-preemptive scheduling CPU scheduling may take place
under the following four circumstances:
1. When a process switches from the running state to the waiting state.
2. When a process switches from the running state to the ready state.
3. When a process switches from the waiting state to the ready state.
4. When a process terminates.
When scheduling takes place under the “first” and “fourth” circumstances, it is said
to be non-preemptive scheduling and if the scheduling takes place under the “second” and
“third” circumstances, it is said to be preemptive. In the preemptive scheme, the scheduler
can forcibly remove the processor from the currently running process before its completion in
order to allow some other process to run. In the non-preemptive scheme, once the processor

Chapter 05.indd 154 5/11/2011 2:39:09 PM


Functions of an Operating System 155

Process N Process 1

Process 2

Figure 5.5 First-Come-First-Served Procedure

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

Figure 5.6 Round Robin Procedure

Chapter 05.indd 155 5/11/2011 2:39:10 PM


156 Operating System

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.

Deadlock: In a multiprogramming environment, several processes may compete for


a limited number of resources. A process requests for the required resource and if it is not
available then the process enters the waiting state and remains in that state until it acquires
the resource. There might be a situation when the process has to wait endlessly because the
requested resource may be held by another waiting process. This type of situation is known as
deadlock. To illustrate the deadlock situation, consider a system with two resources (say, printer
and disk drive) and two processes P1
and P2 running simultaneously. During
execution, P1 requests for printer and
P2 for disk drive. As the requested
resources are available, the requests
of both P1 and P2 are granted and the
desired resources are allocated to them.
Further, P1 requests for disk drive held
by P2 and P2 requests for printer held
by P1. Here, both processes will enter
the waiting state. Since each process is
waiting for the release of resource held
by the other, they will remain in the
Figure 5.7 Deadlock waiting state forever, thus producing a
deadlock (see Figure 5.7).
A deadlock situation arises if the following four conditions hold simultaneously on the
system:
™ Mutual Exclusion: Only one process can use a resource at a time. If another process
requests for the resource, the requesting process has to wait until the requested
resource is released.
™ Hold and Wait: In this situation, a process might be holding some resource while
waiting for additional resource, which is currently being held by another process.
™ No Preemption: Resources cannot be preemptive, that is, resources cannot be
forcibly removed from a process. A resource can only be released voluntarily by the
holding process after that process has completed its task.
™ Circular Wait: This situation may arise when a set of processes waiting for allocation
of resources held by other processes forms a circular chain in which each process is
waiting for the resource held by its successor process in the chain.
To ensure that deadlocks never occur, the system can use either a deadlock-prevention or
a deadlock-avoidance scheme.
™ Deadlock Prevention: Deadlock can occur only when all the four deadlock-causing
conditions hold true. Hence, the system should ensure that at least one of the four
deadlock-causing conditions would not hold true so that deadlock can be prevented.
™ Deadlock Avoidance: Additional information concerning which resources a process
will require and use during its lifetime should be provided to the OS beforehand. For
example, in a system with one CD drive and a printer, process P might request first for

Chapter 05.indd 156 5/11/2011 2:39:10 PM


Functions of an Operating System 157

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.

5.5.2 Memory Management


In addition to managing processes, the OS also manages the primary memory of the computer.
The part of the OS that handles this job is called memory manager. Since every process must
have some amount of primary memory to execute, the performance of the memory manager is
crucial to the performance of the entire system. As the memory is central to the operation of any
modern OS, its proper use can make a huge difference. The memory manager is responsible
for allocating the main memory to processes and for assisting the programmer in loading and
storing the contents of the main memory. Managing the main memory, sharing, and minimizing
memory access time are the basic goals of the memory manager. The major tasks accomplished
by the memory manager so that all the processes function in harmony, are as follows:
™ Relocation: Each process must have enough memory to execute.
™ Protection and Sharing: A process should not run into another process’s memory space.

Relocation: When a process is to


be executed, it has to be loaded from
the secondary storage (like hard disk)
to the main memory (RAM). This is swap out
called process loading. Since, the main
memory is limited and other processes
also need it for their execution, an swap in
OS swaps the two processes, which
is called swapping (see Figure 5.8).
Once the process is “swapped out”,
it is uncertain to say when it will be Figure 5.8 Process Swapping
“swapped in” because of the number of processes running concurrently.
Normally, when the process is swapped back into the main memory, it will be placed
back to the same memory space that it occupied previously. However, in certain cases, it is
not possible to place the process at the same memory location. This is not of much importance
if the process is not address-sensitive. However, if the process requires some of its data or
instruction to occupy the memory with a specific address, the process needs to be relocated. It
is the responsibility of the memory manager to modify the addresses used in address-sensitive
instructions (that use memory addresses) of the process so that it can execute correctly from
the assigned area of memory.
Protection and Sharing: In multiprogrammed systems, as a number of processes may
reside in the main memory at the same time, there is a possibility that a user program, during
execution, may access the memory location allocated either to other user processes or to the OS.
It is the responsibility of the memory manager to protect the OS from being accessed by other
processes and the processes by one another. At the same time, the memory protection program
should be flexible enough to allow concurrent processes to share the same proportion of the main

Chapter 05.indd 157 5/11/2011 2:39:10 PM


158 Operating System

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

Figure 5.9 Strategies for Memory Allocation

Chapter 05.indd 158 5/11/2011 2:39:11 PM


Functions of an Operating System 159

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.

Figure 5.10 Logical Memory, Page Table and Physical Memory

Chapter 05.indd 159 5/11/2011 2:39:11 PM


160 Operating System

Figure 5.11 Address Translation in Paging

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.

Chapter 05.indd 160 5/11/2011 2:39:11 PM


Functions of an Operating System 161

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.

5.5.3 File Management


File system is one of the most visible aspects of the OS. It provides a uniform logical view of the
information storage, organized in terms of files, which are mapped onto the underlying physical
device like the hard disk. While the memory manager is responsible for the maintenance of
the primary memory, the file manager is responsible for the maintenance of the file system.
In the simplest arrangement, the file system contains a hierarchical structure of data. This
file system maintains user data and metadata (the data describing the files of the user data).
The hierarchical structure usually contains the metadata in the form of directories of files and
sub-directories. Each file is a named collection of data stored on the disk. The file manager
implements this abstraction and provides directories for organizing files. It also provides a
spectrum of commands to read/write the contents of a file, to set the read/write position, to
use the protection mechanism, to change the ownership, to list files in a directory, and to
remove a file. The file manager provides a protection mechanism to allow users to administer
how processes executing on behalf of different users can access the information contained in
different files.
The file manager also provides a logical way for users to organize files in the secondary
storage. To assist users, most file managers allow files to be grouped into a bundle called a
directory or a folder. This allows a user to organize his or her files according to their purpose
by placing related files in the same directory. By allowing directories to contain other

Chapter 05.indd 161 5/11/2011 2:39:11 PM


162 Operating System

directories, called sub-directories, a hierarchical organization


can be constructed. For example, a user may create a directory
called games that contains sub-directories called cricket,
football, golf, rugby and tennis (see Figure 5.13). Within each
of these sub-directories are files that fall within that particular
category. A sequence of directories within directories is called
a directory path.
Figure 5.13 File System

5.5.4 Device Management


Device management in an OS refers to the process of managing various devices connected
to the computer. The device manager manages the hardware resources and provides an
interface to hardware for application programs. A device communicates with the computer
system by sending signals over a cable. The device communicates with the machine
through a connection point called port. The communication using a port is done through
rigidly defined protocols, like when to send the data and when to stop. These ports are
consecutively connected to a bus (a set of wires) which one or more device uses to
communicate with the system. The OS communicates with the hardware with the help of
standard software provided by the hardware vendor called device drivers. A device driver
works as a translator between the electrical signals from the hardware and the application
programs of the OS. Drivers take data that the OS has defined as a file and translate them
into streams of bits placed in specific locations on storage devices. There are differences
in the way that the driver program functions, but most of them run when the device is
required, and function much the same as any other process. The OS will frequently assign
processes based on priority to drivers so that the hardware resources can be released and
set free for further use.
Broadly, managing input and output is a matter of managing queues and buffers. A buffer
is a temporary storage area that takes a stream of bits from a device like keyboard to a serial
communication port. Buffers hold the bits and then release them to the CPU at a convenient
rate so that the CPU can act on it. This task is important when a number of processes are
running and taking up the processor’s time. The OS instructs a buffer to continue taking the
input from the device. In addition, it also instructs the buffer to stop sending data back to
the CPU if the process, using the input, is suspended. When the process, requiring input, is
made active once again, the OS will command the buffer to send data again. This process
allows a keyboard to deal with external users at a higher speed.
Spooling: SPOOL is an acronym for simultaneous peripheral operation on-line.
Spooling refers to storing jobs in a buffer so that CPU can be efficiently utilized.
Spooling is useful because devices access data at different rates. The buffer provides a
waiting station where data can rest while the slower device catches up. The most common
spooling application is print spooling. In print spooling, documents are loaded into a
buffer, and then the printer pulls them off from the buffer at its own rate. Meanwhile, a
user can perform other operations on the computer while the printing takes place in the
background. Spooling also lets a user place a number of print jobs on a queue instead of

Chapter 05.indd 162 5/11/2011 2:39:12 PM


Functions of an Operating System 163

waiting for each one to finish before


specifying the next one. The OS
manages all requests to read or write
data from the hard disk through
spooling (see Figure 5.14).
5.5.5 Security Management
Security in terms of a computer system
covers every aspect of its protection in
case of a catastrophic event, corruption
of data, loss of confidentiality and so
on. Security requires not only ample
protection within the system, but Figure 5.14 Spooling
also from the external environment
in which the system operates. In this section, we will be covering security in terms of
internal protection, which is one of the most important functions of the OS. This involves
protecting information residing in the system from unauthorized access. Various security
techniques employed by the OS to secure the information are user authentication and
backup of data.

User Authentication: The process of authenticating users can be based on a user’s


possession like a key or card, user information like username and password or user attributes
like fingerprints and signature. Apart from these techniques, user information is often the first
and most significant line of defence in a multi-user system. After the user identifies himself by
a username, he is prompted for a password. If the password supplied by the user matches the
password stored in the system, the system authenticates the user and gives him access to the
system. A password can also be associated with other resources (files, directories and so on),
which when requested, prompts the user for password. Unfortunately, passwords can often
be guessed, illegally transferred, or exposed. To avoid such situations, a user should keep the
following points in mind:
™ Password should be at least six characters in length.
™ The system should keep track of any event about any attempt to break the
password.
™ The system should allow limited number of attempts for submitting a password on a
particular system.
™ Password based on dictionary words should be discouraged by the system.
Alphanumeric passwords, such as PASS011, should be used.

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

Chapter 05.indd 163 5/11/2011 2:39:12 PM


164 Operating System

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.

5.5.6 User Interface


OSs organize applications so that users can easily access them, use them and store application
data. When an application is opened, the OS lets the application provide the majority of the
user interface. The OS still has the responsibility of providing access to the hardware for
whatever the application needs. If the program cannot function properly, the OS again takes
control, stops the application, and displays an error message. An effective interface of an OS
does not concern the user with the internal workings of the system. A good user interface
should attempt to anticipate the user’s requirements and assist him to gather information and
use necessary tools. Common interfaces provided by different OSs can be categorized as
command line interface (CLI) and graphical user interface (GUI).

Command Line Interface: In


early days of computing, OSs
provided the user with the facility of
entering commands via an interactive
terminal. Those were the only means
of communication between a program
and its user, based solely on textual
input and output. Commands were
used to initiate programs, applications
and so on. A user had to learn many
commands for proper operation of the
Figure 5.15 Command Line Interface system (see Figure 5.15).

Graphical User Interface: With


the development in chip designing
technology, computer hardware became
quicker and cheaper, which led to the
birth of GUI-based OS. These OSs
provide users with pictures rather than
just characters to interact with the
machine. The OS displays icons, buttons,
dialog boxes, etc., on the screen (see
Figure 5.16). The user sends instructions
by moving a pointer on the screen
(generally mouse) and selecting certain
objects by pressing buttons on the mouse
while the mouse pointer is pointing at
Figure 5.16 Graphical User Interface them.

Chapter 05.indd 164 5/11/2011 2:39:12 PM


Let Us Summarize 165

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.

Chapter 05.indd 165 5/11/2011 2:39:12 PM


166 Operating System

exercises

Fill in the Blanks


1. ......................... is a program which acts as a mediator between the user and the
hardware.
2. A table where many pieces of information associated with a specific process, that is,
program counter, process state, CPU-scheduling information and so on are stored, is
known as .........................
3. ......................... is also called a lightweight process.
4. ......................... refers to storing the jobs in the buffer so that the CPU can be efficiently
utilized.
5. Two main user interfaces, which an OS has, are ......................... and .........................
6. Four main conditions that cause deadlock to occur are ........................., .........................,
......................... and .........................
7. A process is said to be in a state of ......................... when it is waiting for an event that
will never occur.
8. The major tasks accomplished by the memory manager so that all the processes run in a
harmonious manner are ......................... and .........................
9. RTOS stands for .........................
10. First-come-first-served and round robin are types of .........................

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

Chapter 05.indd 166 5/11/2011 2:39:12 PM


Exercises 167

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

State True or False


1. OS is a hardware component.
2. Microsoft Windows XP is a GUI-based OS.
3. A document printing process uses spooling.
4. Virtual memory allows for very effective multiprogramming.
5. Another term for time-sharing is multitasking.
6. Railway reservation systems use batch-processing OSs.
7. Round robin is a non-preemptive scheduling technique.
8. Best-fit, first-fit and worst-fit are memory allocation techniques.
9. The directory system of Microsoft Windows operating is hierarchical.
10. The job of splitting the primary memory into segments as the memory is allocated and
de-allocated to the processes is known as fragmentation.

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.

Chapter 05.indd 167 5/11/2011 2:39:12 PM


168 Operating System

6. Write down the differences between:


(a) Uniprogramming and Multiprogramming
(b) Preemptive and Non-preemptive Scheduling
(c) Deadlock Avoidance and Deadlock Prevention

ANSWERS

Fill in the Blanks


1. OS 2. Process table
3. Thread 4. Spooling
5. GUI, CLI 6. Circular wait, Mutual exclusion, No preemption, Hold and wait
7. Deadlock 8. Relocation, Protection and sharing
9. Real-time OS 10. Process scheduling
Multiple-choice Questions
1. (c) 2. (a) 3. (b) 4. (a) 5. (a) 6. (a) 7. (c) 8. (c)
9. (c) 10. (a)
State True or False
1. False 2. True 3. True 4. True 5. False 6. False 7. False
8. True 9. True 10. True

Chapter 05.indd 168 5/11/2011 2:39:12 PM

You might also like