0 ratings0% found this document useful (0 votes) 30 views25 pagesIntroduction To Computers Part 1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here.
Available Formats
Download as PDF or read online on Scribd
Introduction
aS SILOAM aA
The word “computer” comes from the word “compute”, which means, “to calculate”. Hence, people usually
consider a computer to be a calculating device that can perform arithimetic operations at high speed. Although the
original objective of inventing a computer was to create a fast calculating device, we now define a computer as a
device that operates upon data because more than 80% of work done by today’s computers is data processing,
Data can be anything like bio-data of applicants when computer is used for short listing candidates for recruiting;
marks obtained by students in various subjects when used for preparing results; details (name, age, sex, etc.) of
passengers when used for making airline or railway reservations; or number of different parameters when used for
solving scientific research problems, etc. Notice from the examples that data can be either numerical, non-
numerical, or a mixture of both.
‘A computer is often referred to as a data processor because it can store, process, and retrieve data whenever
desired. The name data processor is more inclusive because modern computers not only compute in the usual
sense but also perform other functions with data that flows to and from them. For example, data processors may
-gather data from various incoming sources, merge (process of mixing or putting together) them all, sort (process
of arranging in some sequence — ascending or descending) them in the desired order, and finally print them in.
desired format. Notice that none of these operations involves arithmetic computations in the usual sense but a
‘computer is the most suitable device for performing them.
The activity of processing data using a computer is called data processing. Data processing consists of three sub-
activities: capturing input data, manipulating the data, and managing output results. As used in data processing,
information is data arranged in an order and form that is useful to people receiving it. Hence, data is raw material
used as input to data processing and information is processed data obtained as output of data processing (see
Figure 1.1).al
Chapter 1: Introduction
Data
(Raw material)
igure 1.2. A computer (ato ATOM"
CHARACTERISTICS O! and usefl tool The Power and useful
s proved that it is VeP) power
me following characteristics :
jithout human intervention. Computers are auton,
itself Wi he job (normally without any human assistan
j Ives andicannot go out ;;
not start themsel n
a mputer using coded instructions »)
sharacteristics ‘of computers (such
problem without any hun
Increasing popularity of computers ha
of this popular tool are mainly due toi
1. Automatic. An automatic machine works BY
Jrachines because once started na job they cay nies
until it is finished. However, computers being machi et 8 oO
Trad their own problems and solations. We need 1 1 ther cl
specify exactly how it will do a particular job Some of the oreek on
speed and accuracy) are because they are automatic an
intervention.
2. Speed. A computer i
human being can do in an entire year ~
words, a computer can do in afew minutes
the amount of work tha
a very fast device. It can perform i & few seconds, thi
cae Ported day and night and did nothing ese, In oh
‘what would take a man his entire lifetime.
i ds or even milliseconds
While talking about the speed of a computer we do not talk in terms of secon br id
(10°) but in terms of microseconds (10°), nanoseconds (10%), and even picosecor nds. ely ). A power
‘computer is capable of performing several billion (10°), even trillion (10), simple arithmetic operation
per second.
3, Accuracy. In addition to being very fast, computers are very accurate. Accuracy, of a computer is
consistently high and the degree of its accuracy depends upon its design. ‘A computer performs every
calculation with the same accuracy.
_ However, eas can oer na computer. Trese errors are mainly due to human rather than technol
weaknesses. For example, errors may occur due to imprecise thinking by a programmer (a person who
a Lephaeapic oe to solve a particular problem) or incorrect input data. We often refer '0
(GeO). errors 1¢ to incorrect input data or unreliable programs as garbage-in-garbage-0!
Diligence. Unlike human beit is 7
I ings, a computer is free from monotony, tiredness, and lack of concentratio®
it can continuously work for hours without creating any error and wit ;
see over iuman beings in doing rutin type of br thet wen ee computer
‘Sito have to be performed, compucs el veto tas sens teat secure. If ten
and speed as the frst one. : Perform the last one with exactly the same accu)
5. Versatility. Versatility is one of the most wonderful thi
: things a i
es cin cb pg ec oe
h B an important letter ills, and in between, it
is to slip in a new pro; in seconds, A! eee a
‘spuble of performing fam (a sequence of instructions forthe co I! that is required to change its
task, if the task can be reduced toe feos te nef, computer ®
a finite series of logical steps.
logicalback of mind or just forgets them, This is not the case with computers. A computer can store and recall
any amount of information because of its secondary storage (a type of detachable memory) capability. Tt
‘can retain a piece of information as long as a user desires and the user can recall the information
whenever required. Even after several years, a user can recall exactly the same information that he/she
had stored in the computer several years ago. A computer forgets or looses certain information only when
a user asks it to do so. Hence, it is entirely up to the user to make a computer retain or forget some
information,
7. Nol. Q. A computer is not a magical device. It possesses no intelligence of its own. Its I. Q. is zero, at
least until today. It has to be told what to do and in what sequence. Hence, only a user determines what
tasks a computer will perform. A computer cannot take its own decision in this regard.
8. No feelings. Computers are devoid of emotions. They have no feelings and no instincts because they are
machines, Although men have succeeded in building a memory for computer, but no computer possesses
the equivalent of a human heart and soul, Based on our feelings, taste, knowledge, and experience we
often make certain judgements in our day-to-day life whereas, computers cannot make such judgements
on their own. They make judgements based on the instructions given to them in the form of programs that
are written by us (human beings).
Figure 1.2 provides a summary of characteristics of computers.
_—_—
Characteristics ‘ Description
‘Automatic Tt carries out a job normally without any human intervention
5 It can perform several billion (10°), even trillion (10"), simple arithmetic
peed operations per second
3 | Accuracy It performs every calculation with the same accuracy
4 | Diligence Itis free from monotony, tiredness, and lack of concentration
5 | Versatility It can perform a wide variety of tasks
Tican store huge amount of information and can recall any piece of this information
6... | Memory whenever required
rset Tt cannot take its own decisions, and has to be instructed what to do and in what
LQ sequence es
No feelings Tt cannot make judgments based on feelings and instincts
Figure 1.2. Characteristics of computers.
EVOLUTION OF COMPUTERS
eee eee
Necessity, is the mother of invention. The saying holds true for computers too, Researchers invented computers
because of man’s search for fast and accurate calculating devices.
Blaise Pascal invented the first mechanical adding machine in 1642. Later, in the year 1671, Baron Gottfried
Wilhelm von Leibniz of Germany invented the first calculator for multiplication. Keyboard machines originated
in the United States around 1880 and we use them even today. Around the same period, Herman Hollerith came
up with the concept of punched cards that computers used extensively as input medium even in late 1970s.
Business machines and calculators made their appearance in Europe and America towards the end of the
nineteenth century.Cureten Q
Basic Computer Organization
Even though the size, shape, performance, reliability, and cost of computers have been changing over the last
several years, the basic logical structure (based on the stored program concept), as proposed by Von Neumann,
has not changed. No matter what shape and size of computer we are talking about, all computer systems perform
the following five basic functions for converting raw input data into useful information and presenting it to a user:
Inputting. It is the process of entering data and instructions into a computer system,
Storing. It is the process of saving data and instructions to make them readily available for initial or
additional processing as and when required.
3. Processing. Performing arithmetic operations (add, subtract, multiply, divide, etc.) or logical operations
(comparisons like equal to, less than, greater than, etc.) on data to convert them into useful information is
known as processing.
4, Outputting. It is the process of producing useful information or results for a user, such as printed report
or visual display.
Controlling. Directing the manner and sequence in which the above operations are performed is known
as controlling.
The goal of this chapter is to familiarize you with the units of a computer system that Perform these functions. It
provides an overview of computer systems as computer system architects view them.
; ffers from one system model to another. However, b: izati
1 architecture of computers differ tc wever, basic organization remains
i annie for all computer systems. Figure 2.1 shows a block diagram of basic computer organization, In this |Input Unit
figure, solid lines indicate flow of instruction and data, and dotted lines represent control exercised by control
unit. It displays the five major building blocks (functional units) of a digital computer system. These five units
correspond to the five basic operations performed by all computer systems. Functions of each of these units are
Storage unit
Information (Results)
> Indicates flow of
instructions and data
Indicates the control
exercised by the
control unit
Central Processing Unit (CPU)
Figure 2.1. Basic organization of a computer system.
INPUT UNIT
Data and instructions must enter a computer system before the computer can perform any computation on the
supplied data. The input unit that links a computer with its external environment performs this task. Data and
instructions enter a computer through an input unit in a form that depends upon the input device used. For
example, data can be entered using a keyboard in a manner similar to typing and this differs from the way in
which data is entered through a scanner, another type of input device. However, a computer's memory is designed
to accept input in binary code and hence, all input devices must transform input signals to binary codes. Units
called input interfaces accomplish this transformation. Input interfaces match the unique physical or electrical
characteristics of input devices to the requirements of a computer system.
,
In short, an input unit performs following functions:
1. It accepts (or reads) instructions and data from outside world.
2, It converts these instructions and data in computer acceptable form. Units called input interfaces
accomplish this task.
"3. It supplies the converted instructions and data to the storage unit for storage and further processing.
OUTPUT UNIT
An output unit performs the reverse operation of that of an input unit. It supplies information obtained from data
processing to outside world. Hence, it links a computer with its external environment, As computers work with
binary code, results produced are also in binary form. Therefore, before supplying.the results to outside world, theChapter 2: Basic Computer Organization ~
ted ourput interfaces accomplish this
it devices (terminals,
readable) form. Units call
ties of outpu
System must convert them to human acceptable ( e
1 of electrical characteris
task, Output interfaces match the unique physical
Printers, etc.) to the requirements of an external environment,
Jn short, an output unit performs following functions:
1, Taccepts the produced results, which are in coded form. We cannot understand the coded
2. W converts these coded results to human acceptable (readable) form. Units called awPut interfaces
accomplish this task.
3. It supplies the converted results to outside world.
STORAGE UNIT
Data and instructions entered into a computer system through input units have to be stored inside the computer
before actual processing starts. Similarly, results produced by a computer after processing have to be kept
‘somewhere inside the computer system before being passed on to an output unit. Moreover, a computer must also
preserve intermediate results for ongoing processing. Storage unt of a computer system caters to all these needs.
intermediate results, and results for output.
It provides space for storing data and instructions,
results easily.
In short, a storage unit holds (stores):
1. The data and instructions required for processing (received from input units).
2. Intermediate results of processing.
3, Final results of processing, before the system releases them to an output unit.
Storage unit of all computers is comprised of following two types of storage:
1. Primary storage. Primary storage of a computer system, also known as main memory, stores pieces of
program instructions and data, intermediate results of processing, and recently produced results of those
job(6) on which the computer system is currently working. The central processing unit can access these
pieces of information directly at a very fast speed because they are represented electronically in the main
memory chip’s circuitry. However, primary storage is volatile, and it loses the information in it as soon
as the computer system switches off or resets. Moreover, primary storage normally has limited storage
capacity because it is very expensive. Primary storage of modern computer systems is made up
semiconductor devices.
2. Secondary storage. Secondary storage of a computer system, also known as auxiliary storage, takes cafe
of the limitations of primary storage. It supplements the limited’ storage capacity and volatile
characteristic of primary storage. This is because secondary storage is much cheaper than primary storage
and it can retain information even when the computer system switches off or resets. A computer system
uses secondary storage to store program instructions, data, and information of those jobs on which the
computer system is currently not working but needs to hold them for processing later. The most
commonly used secondary storage medium is magnetic disk.Arithmetic Logic Unit (ALU)
ARITHMETIC LOGIC UNIT (ALU)
_
A computer performs all calculation and comparison (decision-making) operations in the ALU. During processing
of a job, the computer transfers data and instructions stored in its primary storage to ALU as and when needed.
oon ae the processing fin ihe Compatertmporuly transfers the intermediate results generated there back to
imary storage < . Hence, data may move b i i
mano ae erence, data may move back and forth several times between primary tose
The engineering design of a computer's ALU determines the type and number of arithmetic and logi i
logic operations
that a computer can perform. However, almost all ALUs are designed to perform the four basic arithmetic
operations (add, subtract, multiply, and divide) and logic operations or comparisons such as, less than, equal to,
and greater than.
CONTROL UNIT (CU)
How does an input device of a computer system know that itis time for it to feed data to storage unit? How does
its ALU know what should be done with the data once it receives them. Moreover, how it is that the computer
sends only the results for output to an output device and not the intermediate results? All this is possible due to the
control unit of the computer system.
‘A computer's control unit does not perform any actual processing of jobs, but acts as the central nervous system
for other components of the computer system: It manages and coordinates the operations of all other components.
It obtains instructions from a program stored in main memory, interprets the instructions, and issues signals
causing other units of the system to execute them.
CENTRAL PROCESSING UNIT (CPU)
Control unit (CU) and arithmetic logic unit (ALU) of a computer system are together known as the Central
Processing Unit (CPU). Ivis the brain of a computer system. In a human body, the brain takes all major decisions
and other pars of the body function as directed by the brain. Similarly, in a computer system, the CPU performs
all major calculations and comparisons, and also activates and controls the operations of othet units of the
computer system.
THE SYSTEM CONCEPT
“You might have observed that we have been referring to a computer as a system (computer system). This is
because system is a group of integrated parts having a common purpose of achieving some objectives). Hence, 8
system has following three characteristics:
1. Ithas more than one element.
2. All its elements are related logically.
3, All its elements are controlled in a manner to achieve the system goal.Chreten 3
Number Systems
We saw in the previous chapter that a computer stores data internally in a format that human beings cannot read
easily. This is the reason why computer systems require input and output (V/O) interfaces. Every computer stores
numbers, letters, and other special characters in coded form. Before going into the details of these codes, it is
essential to have a basic understanding of number system. Hence, this chapter familiarizes you with the
fundamentals of number system. It also introduces some commonly used number systems by computer
professionals and relationship among them.
NON-POSITIONAL NUMBER SYSTEMS
‘Number systems are of two types - non-positional and positional. In early days, human beings counted on fingers.
When counting beyond ten fingers, they used stones, pebbles, or sticks to indicate values. This method of
counting uses an additive approach or non-positional number system. In this system, we have symbols such as 1
for 1, Il for 2, Il for 3, III for 4, HII for 5, etc. Each symbol represents the same value regardless of its position
in a number, and to find the value of a number, one has'to count the number of symbols present in the number.
Since it is very difficult to perform arithmetic with such a number system, positional number systems were
developed._] Chapter 3: Number Systems
POSITIONAL NUMBER SYSTEMS
hese symbols represent differey
digits. TI 7 i ‘
In a positional number system, here are only a few symbols called dig | cnsiderations determine ty
i
values, depending on the position they occupy in a number. The following
value of each digit in such a number:
1. The digit itself,
2. The position of the digit in the number, and
3. The base of the number system. Base is defined as the
system. The first digit is always zero. Hence, the maximus
less than the value of the base. 7
of digits available in the numbe
ber
tot aia single digit is always equal ty
im value of a
i yur day-to-day life. In this system, base i
Asan illustration let us consider decimal number ysem that we use in our day-40- 293 I ON
equal to 10 because there are altogether ten symbols or digits (0, 1, 5 .
decimal number system, pee positions to the left of the decimal point represent units, a ines
thousands, etc. Each position represents a specific power of the base (10). For example, decimal number 258
(written as 2586,0) consists of digit 6 in unit position, 8 in tens position, 5 in hundreds position, and 2 in thousand
Position, and its value can be written as:
(2 x 10°) + (5 x 10°) + (8 x 10!) +6 x 10°) = 2000 + 500 + 80 + 6 = 2586
Observe that the same digit signifies different values, depending on the position it occupies in the number. Fo
example,
In 2586,o the digit 6 signifies 6 x 10°
In 25680 the digit 6 signifies 6 x 10)
In 26580 the digit 6 signifies 6 x 10° = 600
In 62589 the digit 6 signifies 6 x 10° = 6000
Hence, we can represent any number by using the available digits and arranging them in various positions.
The principles that apply to decimal number system, also apply to any other positional number system. It |
important to keep track of only the base of the number system in which we are working.
The value of the base in all positional number systems suggests the following characteristics:
1, The value of the base determines the total number of different symbols or digits available in the numbe
system. The first of these choices is always zero.
2. The maximum value of a single digit is always equal to one less than the value of the base.
We describe below some positional number systems used in computer design and by computer professionals.
Binary Number System
In binary number system, the value of base is 2. Hence, it has only two symbols or digits (0 and 1), the large
single digit being 1 (one less than the base). Each position in a binary number represents a power of the base 2
Hence, in this system, the rightmost position is units (2°) position, the second position from the right is 2's @joie seESeestaaennnra _____________ Positional Number Systems [75
position, and proceeding in this way, we have 4’s (22) position, 8's (2"
. : vays position, 8's (2
‘Therefore, decimal equivalent of binary number 10101 (written a8 TO10ty
(x24 Ox2+ 1x24 Ox 41 x%=16404440+ 1291
ion, 16's (2*) position, and so on.
In order to be specific about which 5}
yystem we are referring to, i ice to indi
subscript. Hence, we write: 8 (0, it is a common practice to indicate the base as a
10101) = 21)
Bit is the short form of “binary digit”. Hence, a “bit” in computer terminology means either a0 or 1, An n-bit
number is a binary number consisting of ‘n” bits. Figure 3.1 lists all 3-bit numbers along with their decimal
equivalent. Remember that we have only two digits, 0 and 1, in binary number system and hence, binary
equivalent of decimal number 2 has to be stated as 10 (read as one, zero). Another important point to note is that
with 3 bits Positions), only 8 (2') different patterns of Os and 1s are possible, and it may be seen from Figure 3.1
that a 3-bit number can have one of the 8 values in the range 0 to 7. In fact, any decimal number in the range 0 to
2°-1 can be represented in binary form as an n-bit number.
Every computer stores numbers, letters, and other special characters
in binary form. Computer professionals need to know raw data
contents of a computer's memory on several occasions. A commonly
used way of doing this is to printdisplay raw memory contents,
which is called memory dump. Memory dumps in binary form would
have many pages of Os and 1s. Working with memory dumps in
binary form would be very difficult and error prone for computer
professionals. Hence, computer professionals often use octal and
hexadecimal number systems, as shortcut notations for binary. They
are described below.
Figure 3.1. 3-bit numbers with their
decimal values.
Octal Number System
In octal number system, the base is 8. Hence, there are only eight symbols or digits: 0, 1,2, 3, 4,5, 6, and 7 (8 and
9 do pot exist in this system). The largest single digit is 7 (one less than the base 8). Each position in an octal
number represents a power of the base (8). Therefore, decimal equivalent of octal number 2057 (written as 2057.)
is:
(2.x 8°) + (0x 82) + (5 x8!) + (7x 8°) = 1024 +0 + 40+7= 1071
Hence, 2057 = 107110
Observe that since there are only 8 digits in octal number system, 3 bits (2° = 8) are sufficient to represent any
octal number in binary (see Figure 3.1).
Hexadecimal Number System
its. The first 10 digits are the
In hexadecimal number system, the base is 16. Hence, there are 16 symbols or digits. The
same digits of decinil number system ~ 0, 1,2, 3, 4, 5, 6,7, 8, and9. The remaining six digits are the symbols A,
B, C.D, E, and F, representing decimal values 10, 11, 12, 13, 14, and 15, respectively. Hence, the largest singleeis is F or 15 (one tess than the base 16). Each position in hexadecimal number system represents & POWEr ofthe
Se (16), Therefore, decimal equivalent of hexadecimal number TAF (written as LAF) is:
(US 16) + (AX 16) + Fx 16°) » (1 x 256) + (10 x 16) + (15 x 1) = 256 4160 + 15 = 431
Hence, LAF ig = 4319
Observe that since there are only 16 digits in hexadecimal number system, 4 bits (2 =
Tepresent any hexadecimal number in binary
16) are sufficient tp
CONVERTING FROM ONE NUMBER SYSTEM TO ANOTHER
Input data fed to computers and final output values are to be in decimal because decimal numbers are much mor
meaningful to us than are numbers expressed in any other number system. Hence, computer professionals ar
often required to convert numbers in other number systems to decimal and vice-versa. They use various methods
to convert numbers from one base to another. A method of converting from another base to decimal, and a method
of converting from decimal to another base are described below.
Converting from Another Base to De:
We use the following steps to convert a number in any other base to a base 10 (decimal) number:
Step 1: Determine the column (positional) value of each digit (this depends on the position of the digit and the
base of the number system).
Step 2: Multiply the obtained column values (in Step 1) by the digits in the corresponding columns.
Step 3: Sum up the products calculated in Step 2. The total is the equivalent value in decimal.
Solution:
Step 1: Determine column values
Column Number Column Value
Step 1: Determine column values
Column Number Column Value
(from right)
(from right)
ir ct ree]
(Continued on next page...) (Continued on next page...)Processor and Memory
|
|
In Chapter 2, we saw that the main components of a computer system ar© input, output, storage, and CPU. We
also saw that storage units are of two types ~ primary and secondary. With this knowledge, we are now ready '0
i150 Smore about the internal structure and functioning of various components of a compute! sytem, This andthe
next two chapters are devoted to the learning of the components of a computer. In this chapter, you will leam
bout the structure and functioning of CPU (also known as processor) and primary SUTEGS (also known as main”
memory or simply memory). Subsequently, Chapters 8 and 9 present the structure and functioning of second)
storage devices and input/output devices, respectively.
Figure 7.1 shows the basic architecture of processor and memory of a computer system.
CENTRAL PROCESSING UNIT (CPU) -
ter system, It performs all major calculations and comparisons, and also activates
mputer system. Hence, no other single component of a comp
determines its overall performance as much as its CPU. In order to evaluate a computer's capabilities quickly:
important to know how CPUs are internally structured, how different CPUs differ from each other, and how")
evaluate CPU speed. These and other related concepts are described below.
CPU is the brain of a comput
controls the operations of other units of the cor
se— ~ 7 Central Processing Unit (CPU) [EHO51)
Figure 7.1:' Processor and memory architecture of a computer system.
Control Unit (CU)
In Chapter 2 (see Figure 2.1), we saw that the two basic components of a,CPU are Control Unit (CU) and
‘Arithmetic Logic Unit (ALU). The control unit of a CPU selects and interprets program instructions and then
coordinates their execution. As Figure 7.1 shows, it has some special purpose registers (whose functions are
described in a later subsection) and a decoder to perform these activities. The special purpose registers named
instruction register and program control register, respectively, hold the current instruction and the next
instruction for execution, and in this way help the control unit in instruction selection. On the other hand, the
decoder has necessary circuitry to decode and interpret the meaning of every instruction supported by the CPU.
Each instruction is accompanied by microcode - very ‘basic directions that tell the CPU how to execute the
instruction.
‘Although, the control unit does not perform any actual processing of data, it acts as the central nervous system for
all other components of computer. It manages ‘and coordinates the entire computer system including its input and
output units. It obtains instructions from a program stored in main memory, interprets the instructions, and issues
signals that cause other units of the system to execute them.Chapter 7: Processor and Memory —-
ace during data processing When thy
Arithmetic Logic Unit (ALU)
‘ion of instructions takes pla it oe 283, sabtracl, multiply
trol to the ALU. As shown iq
ALU of a CPU is the place where ron eon
i it that involves an a p 7
control unit encounters an instruction ea tt li A
ivi ‘operation (such as less than, Pare descril c
Faure 7 SR TALU ine special purpose registers (whose functions at the set of instructions ‘supported
i i included in
y circuit tometic and logic operations includes instruction Po
ey cin ttn neem
{an arithmetic operation) orto check if they are eqs
1 (a logical operation).
When entire CPU (both CU and ALU) is contained on as
by,
jingle tiny silicon chip, it is called a microprocessor.
Instruction Set
it instructi its instruction set. Most CPUs have
y §
Na
Each word contains the same
Bit1 Bit2 ‘number of bits = word length
Figure 7.3. Organization of a main memory having N words.
‘There is an important difference between address of a memory location and its content. A memory is like a
cabinet having as many drawers as there are addresses in memory. Each drawer contains a word and addres
each word is written on the drawer. If we write or store a word, say 10101010 at address 125, itis like placing
word 10101010 in the drawer labeled 125. Later, reading from address 125 is like looking in that drawer ose
content, which is 10101010. We do not remove the word at an address when we read its content, but its
changes when we store or write a new word in it. Hence, entering data into a storage location is destructive
previous content but retrieving data from a location is non-destructive. The act of entering data into @
location is called memory write operation, and the act of retrieving data from a storage location is called
read operation. Hence, read is a non-destructive operation, and write is a destructive operation.
Why More Bits? 7
ight have heard about 16-bit computers, 32-bit computers, 64-bit computers, etc. They refer to
San eng ({otal number of bits per memory word) of a computer. Word length of small computers is 8, 6
2 bits, whereas that of large computers is 64 bits or more. The obvious question that arises is — “What 5!
advantage of having more number of bits per word, instead of having more words of smaller size (length)
. . sty at it!
this question, imagine a highway with eight lanes and a heavy flow of trafic. If we expasdi
ee Tauee, traffic flow speeds up considerably. “8 bits” is analogous to number of “lanes” on a mi
SE re pid flow of electronic signals, in other words, a faster computer, Hence,
the
more Fa ‘
pote sme bit computer can transfer to and from memory in one minute, a 32-bit computer may trans
few seconds.
move to and from memory as one or more words at a time. Therefore, even if the
Data and ins comparable in speed, computers having smaller word length will be slower in operat
circuits usei i ter is defined as number of bytes that can be stored in its main memory. itjy
a ee of kloytes (KB), which is equal to 1024 (2") bytes of storage, or megabytes (AR
which is equal to 1,048,576 2) bytes of storage, or gigabytes er be jont sa Os Tad 2s
storage ‘omputer having 2 GB of memory is capable of stori $22,147.48
ee or Saran Nocee that 1 KB is about 10° bytes, 1 MB is about 10° bytes, and 1 GB is about 10° bya,
hence, the origin of the prefixes kilo (thousand), mega (million) and giga (billion).
Main Memory Capacity
i i f number of words. In this case,
Sometimes, we also state memory capacity of a computer system in terms of s ~~
specify total number of bits per word along with total number of words. Therefore, a memory with 4096 locations
with each location storing 16 bits is called a “16-bit, 4096-word memory”, or “4 K, 16-bit memory”. Similarly, y
memory having 2'° words with each word of 16 bits is called a “32 K, 16-bit memory”. If word size of a
is 8 bits (equal to a byte), it becomes immaterial whether memory capacity is expressed in terms of bytes oe
words. Hence, a memory having 2'6 words with each word of 8 bits is simply referred to as a 64 K memory (wont
size of 8-bits is implicit here). &
. 4 ts
Memory capacity continues to increase rapidly and it is only a matter of time before we start stating
capacity in terms of terabytes (TB), which is about one trillion (10') bytes. Today, we frequently use GB and TR
to refer to the capacity of secondary storage of computer systems. at
*
Types of Memory Chips '
Memory chips are classified mainly based on their capability to retain stored data when power is tumed off g
interrupted, and how easily stored data can be altered (overwritten). Figure 7.5 shows various types of memo
chips. They are described below,
Random Access Memory (RAM)
When people talk about computer memory, they usually mean the volatile RAM memory. Physically, th
memory consists of some integrated circuit (IC) chips (see Figure 1.1) either on motherboard or on a small cirol
board attached to motherboard. A computer's motherboard usually has flexibility to easily add more memo
chips for enhancing the memory capacity of the system. Hence, if a user decides to have more memory th
his/her computer currently has, he/she can buy more memory chips and plug them in empty memory slots ont
motherboard. Normally, service engineers do this job. Additional RAM chips, which plug into special sockets
motherboard, are known as single in-line memory modules (SIMMS).
RAM chips are of two types - dynamic and static. Dynamic RAM
Periodically “regenerate” or refresh storage charge to retain the sto
storage capacity than dynamic RAMS do, Moreover a static RAM we ji
a as faster, costlier
than dynamic RAM: Due to these reasons, large memories use dynamic RAM, and slate RAM wooo i
specialized applications. The main memory of most computers uses dysarie Rane x :Ne Non-volatile and read-only
Static Dynamic
(SRAM) lanufacturer- User-
nett (RAM) programmed (ROM) —,
PROM EPROM
UVEPROM EEPROM
Figure 7.5. Various types of memory chips.
Read-Only Memory (ROM)
A special type of RAM, called read-only memory (ROM), is a non-volatile memory chip in which data is stored
permanently. Usual programs cannot alter this data. In fct, storing data permanently into this kind of memory is
called “burning in of data” because data in such memory is stored by using fuse-links. Once we burn fuse-links for
some data, it is permanent. We can only read and use data stored in a ROM chip (we cannot change them). This is
the reason why it is called read-only memory (ROM). Since ROM chips are non-volatile, a ROM chip does not
lose its stored data in case of power off or interruption of power. This is unlike a volatile RAM chip. ROMs are
also known as field stores, permanent stores, ot dead stores.
System designers use ROMs mainly to store programs and data, which do not change and are used frequently. A
computer carries out most of its basic operations by wired electronic circuits. However, several higher-level
operations used frequently, require complicated electronic circuits for their implementation. Hence, instead of
building electronic circuits for these operations, designers use special programs to perform them. These programs
are called micro-programs because they deal with low-level machine functions and are essentially substitutes for
additional hardware. Computer manufacturers store these micro-programs in ROMs so that users cannot modify
them,
“A good e3 f micro- is the “system boot program”, which contains a set of start-up instructions that
mcoed wien a sysian is powered onto check ifthe system hardware (like memory, UO devices, et.) is
functioning properly. It looks for an operating system and loads its core part in the volatile RAM of the system to
Produce the initial display-screen prompt. Note that a computer needs this micro-program every time it is
‘switched on, and the computer must retain it even when it is switched off. Hence, the computer's ROM is an ideal
storage for this micro-program.
Programmable Read-Only Memory (PROM)
There mory (ROM) - manufacturer-programmed and user-programmed. A
nuifacturer programe a ou aine in which data is burnt in by the manufacturer of the electronic equipment
in which it 7 used. For example, a personal computer manufacturer may store the system boot program
permanently ipa ROM chip located on the motherboard of each PC manufactured by it. Similarly, a printer
Trarfactier may store the priner controller software in a ROM chip located on the circuit board of each printerGEIB Chapter 7: Processor and Memory.
: data stored in th
i modify the programs OF 5 the
ctured by it, It is not possible for users of such equipment hi ich a user can load and store “read-oniys
ran factured Oy ther hand, auser-programmed ROM is one in Ww system by converting his/her programs tg
eo er data, That iti posible fr # user 10 “eutoia oeh a ROM is known a8 Programa
et g them in a user-programmes ; are stored in a PROM chi
tmicro-programs and storing them in a user-prog ce the user programs r chip,
Raa! Ons Memory (PRON) because a user ean progam it OM Te Te Tied, A special device known
eine ‘prmation init). However, once a user programs
ly be read (it cannot be changeg),
the system can execute them usually in / a
PROM-programmer is used to program a PROM chip (record ied ts ice
PROM chips it bocomes a ROM. That is the information recorded ip ® 00 Sy not power off o¢
PROM is also non-volatile storage, i.e., information stored in it remai
interruption of power.
Erasable Programmable Read-Only Memory (EPROM)
Once information is stored in a ROM or PROM chips re Genie. = Erasable aan Reni Cal
y this problem by allowi reprogram
Moray (EPROM) chip oneones is pen, aIGUnE een change mice ea
to testa system's efficiency with new programs. EPROMS are also useful for those applications in which one may
: nal ly not change but under some unforeseen conditions, one may
like to store a program in a ROM that would normall ut under som ; ions
like to alter it. When an EPROM js in use, the user can only “read” the information stored in it, and the
information remains in the chip until the user erases it.
EPROM chips are of two types - Ultra Violet EPROM (UVEPROM), which requires exposing the chip for some
time to ultraviolet light for erasing information stored in it, and Electrically EPROM (EEPROM), which requires
use of high voltage electric pulses for erasing information stored in it. It is easier to alter information stored in an
EEPROM chip as compared to an UVEPROM chip. EEPROM is also known as flash memory because of the ease
with which a user can alter programs stored in it. Many new /O and storage devices like USB (Universal Serial
Bus) pen drive and MP3 music player use flash memory.
Cache Memory
We saw that use of main memory helps in minimizing the disk-processor speed mismatch to a large extent
because the rate of data fetching by CPU from main memory is abou 100 tines reer than tes fo atghonad
secondary storage like disk. Still the rate at which CPU can fetch data from memory is about 10 times slower than
the rate at which CPU can process data. Performance of processors often gets limited due to this memory
Procestor speed mismatch, Obviously, we can improve the overall system performance greatly by minimising ie
paanoryprocesor speed mismatch. Cache memory (pronounced “cash” memory) is commonly used for ths
pape is a exten fa, imall memory between CPU and main memory (See Figure 71) whose acts
: cessing speed of CPU. It acts asa high-speed buffer between CPU end gn, and
computer systems use it to store temporarily very active data and instructi i eta
memory is faster than main memory, system’s performance i consider’ Processing. Since cache
data and ins emory, Improves considerably when the syst
wrens available in cache that processes need during ther present processing, nsPrimary storage of today’s computer systems has following limitatioris:
1. Limited capacity. It is often necessary to store many millions, sometimes billions, and even trillions, of
bytes of data in a computer. Unfortunately, storage capacity of primary storage of today’s computers is
not sufficient to store the large volume of data handled by most data processing centres. i
2. Volatile. Primary storage is volatile and it loses data stored in it in case of power off or interruption of
power. However, computer systems need to store data on permanent basis for several days, several
months, or even several years.
To overcome the limitations of primary storage, almost all computers use additional memory called auxiliary
memory ot secondary storage. Secondary storage is non-volatile and has lower cost per bit stored, but operates
generally at speeds far slower than that of primary storage. Computer systems use it primarily to store large
volume of data on permanent basi8, which they transfer partially to primary storage, whenever required fot
processing.
Over the years, computer systems have used several devices and media as secondary storage. Many of them sudit
1 rage, Many of them
as punched paper tape, punched cards, and floppy disks have become obsolete now. Figure 8.1 shows the
cones used in today’s computer systems. In this chapter, you will learn about the terminologies, principles of
operation, uses, and trade-offs of different types of secondary storage devices,‘Sequential and Direct-Access Devices [EiZa0]
Secondary storage devices
‘Sequential access Direct access
devices devices
+
‘Magnetic tape
Magnetic disks Optical disks Memory storage devices
Frey
repy Hard CD-ROM WORM CD-RW DVD Flash Memory RAM
sks (DR drive card disk
Zip disk _ Disk pack — Winchester disk
Figure 8.1. Commonly used secondary storage devices and their classification.
SEQUENTIAL AND DIRECT-ACCESS DEVICES
Although there are several different devices that one can use as a secondary storage device, the one selected for a
particular application depends mainly upon how the application needs to access the stored information. There are
two methods of accessing information - sequential or serial access, and direct or random access.
A sequential-access storage device is one in which arrival at a desired storage location is preceded by sequencing
through other locations so that access time varies according to location. That is, we can retrieve information stored
on a sequential-access device only in the same sequence in which it is stored. In case of a sequential-access
device, if we need to access an address that is out of order, we can reach at it only by searching throug all the
addresses stored before it. For instance, we cannot access data stored at the last few locations until we have
traversed all preceding locations in the sequence. This is analogous to a music tape cassette. If 10 songs are
recorded on a music tape, and if we want to listen to (or access) the eighth song, we must first listen to (or access)
the seven songs coming before it. The player may “fast forward” the tape quickly past the first seven songs, but
the first seven songs are still accessed, although, not fully played. In the same way, to access the 28” data record
stored on a sequential-access device a computer must first access (although not process) the first 27 data records.
Sequential access devices are suitable for storing data of such applications, which need to process most (if not all)
data records one after another. Preparations of monthly pay slips, monthly electricity bills, etc., are examples of *
such applications. These applications process data records of every employee or customer at scheduled intervals
(in this case monthly).
Magnetic tape is an example of a sequential-access storage device.
On the other hand, a direct-access or random-access storage device is one in which we can reach and access any
storage location at random, and approximately equal access time is required for accessing each location. This is
analogous to a music CD. If 10 songs are recorded on a music CD, and if we want to listen to (or access) the
eighth song, we need not listen to or fast-forward the seven songs coming before it. All we have to do is selectee
‘storage Swit
[EEE 8: Soot
track number eight on the play’ yer MOV ‘kup arm. ly across the CD to the g
k i directly across 7
ex and the player moves the Plc p
3d starts playing the song Ve
the eighth song begins, an formation in a more direc
nan sn need to access in! te
applications, whic! : at any instance, We may reqy
Dieta er wl ey camps coal PM dae ee
sequential: devices istomer’s savings account. Similarly, find out if seats are avaiibeg
determine the exact balance in a cu < records t0 i
cmuite ia require immediate access to es naa “evice for data storage, accessing
ic flight. In such applications, if we use a sequ nie
Pematon ay take long enough time to cause frustration tothe cust
jitect-access
Magnetic disks, optical disks, and memory storage devices are examples of ditect-ac
storage devices,
MAGNETIC TAPES
Magnetic tape is the most popular storage medium for
Computer systems also use it as a backup storage for data stored
large data sets accessed and processed sequential
on omline'storage devices such as a hard disk
Magnetic tape medium is a plastic ribbon usually ¥4 inch or & inch wide and-50 to 2400 feet long. Its surface
4 coating (such as iron oxide or chromium dioxide) that can record data by magnetization. Data is recorded on
coated surface as tiny, invisible magnetized and non-magnetized spots (representing 1s.and 9s), Tape ribbon it
is stored in reels, ora small cartridge, or cassette.
Like in the case of audio or video tapes, we can erase old data and record new data on magnetic tapes as well.
Wwe record new data on it, it erases old data in the same area automatically. However, we can read stored datg
many times without affecting it. 4
Basic Principles of Operation
Storage Organization |
A tape consists of vertical columns called frames, and horizontal rows called channe i
tracks and used 6-bit BCD code format for data recording (see Figure 8.2) Hence, ee Olde tpt iad
tape by its BCD code 110001. The first six tracks record the 6 bts of BCD ance mee ereseited on thig
batt and the seventh track records |
A parity bit or check bt enables detection of errors that may occur due to loss of at
LY f 3
uring data input or ouput operations. IF the basic code fora character requires an cago & Sting of 6 or 8 bis
Gharactes 1,2, or A in BCD), an addtional 1 bitis added to the check bit location < that eer OF 1 bits (such as
Sven numberof 1 bits. This is an example of even-parity. Similarly, in odé-pariy ot cheek oy i always be an
umber of | bits for representing a characteris odd and its 1, otherwise. The tape in fe, ok bit is O if the total
for an even parity. “Bure 8.2 uses the parity bit
Most modern magnetic tapes have 9 tracks and use the 8-bit EBCDIC code format
ate 7 for data Teco
8.3). The fourth track records parity bit, which produces an odd Parity in this example. Notice thar & °C Figure
letter A by its 8-bit EBCDIC code 11000001. + it represents