Upload
navis-nayagam
View
218
Download
0
Embed Size (px)
Citation preview
8/9/2019 UNIT I EC2303 Computer Architecture
1/29
UNIT I
INTRODUCTION
1. Give the organization of IAS computer with it Intruction et.
The IAS machine was the first electronic computer built at the Institute for Advanced
Study (IAS), in Princeton, New Jersey, SA! It is sometimes called the von Neumann machine,
The IAS computer has the followin" features,
• Stored#Pro"ram concept
• $ain memory stores both data and instructions
• Pro"ram %ontrol unit (P%), interprets the instructions in memory
• &ata Processin" unit (&P) is responsible for e'ecutin" binary instructions!
This is also nown as data#path or e'ecution unit
• Input and output (I*) e+uipment operated by the control unit
!emor"#
The basic unit of information in the IAS computer is a -#bit word, which is the standardunit of information stored in a memory location or transferred in one step between the %P and
the main memory $! The si.e of the main memory is / - bit words and a secondary stora"e of
01/ words based on electromechanical ma"netic drum technolo"y was provided for bul stora"e! 2ach location in $ can be used to store either a sin"le -#bit number or else a pair of
3-#bit instructions!
8/9/2019 UNIT I EC2303 Computer Architecture
2/29
Data $ormat#
IAS Num%er $ormat
The IAS4s number format is fi'ed#point, meanin" that it contains an implicit binary pointin some fi'ed position! Numbers are usually treated as si"ned binary fractions lyin" between #0
and 50, but they can also be interpreted as inte"ers!
2'amples of IAS4s binary format are
-00-0----- ---------- ---------- ---------- 6 5 -!7038
0--00----- ---------- ---------- ---------- 6 # -!7038
Intruction $ormat#
IAS Intruction $ormat
2ach memory location is capable of storin" two 3- bit instructions! If $(9) denotes the
-#bit memory word with address 9, then $(9, -:0;) denotes the half word consistin" of bits -throu"h 0; of $(9) , also called as left instruction and $(9, 3-:= 'Intruction %uffer regiter() A= 'A**reregiter( and P% '&rogram Counter(!
8/9/2019 UNIT I EC2303 Computer Architecture
3/29
The &P has the necessary component, the A? which contains the circuits that perform
addition, multiplication, etc@ The &P has the &= 'Data regiter(, A% 'Accumu+ator( and $(mu+tip+ier ,uotient( re"isters!
Regiter#
Intruction regiter 'IR(: It is one of the maBor components of P% and contains the 7#bitopcode instruction bein" e'ecuted!
Intruction %uffer regiter 'I-R(: The IAS fetches two instructions at a time from memory, so
it contains a second re"ister, the instruction buffer re"ister for holdin" a second instruction!
A**re regiter 'AR(: It holds the address of a data operand to be fetched from or sent to main
memory!
&rogram Counter '&C(: contains the address of the ne't instruction to be fetched from memory!
Data regiter 'DR(: &ata re"ister normally contains a word to be stored in memory, or issued to
receive a word from memory!
Accumu+ator 'AC( an* mu+tip+ier ,uotient '!(: The accumulator is a special re"ister
normally used for arithmetic operations and holds the end result of the operation! The $ is a
special re"ister used for multiplication and division operation!
Intruction Set#
The IAS computer has around
8/9/2019 UNIT I EC2303 Computer Architecture
4/29
Intruction Set of IAS
Intruction /0ecution#
The IAS fetches and e'ecutes instructions in several steps that form an instructioncycle! The IAS fetches two instructions in an instruction cycle! 2ach instruction cycle consists of
two sub cycles!
$etch c"c+e# The opcode of the ne't instruction is loaded into the I= and the address portion is
loaded into the A=! This instruction may be taen from the I>=, or it can be obtained frommemory by loadin" a word into the &=, and then down to the I>=, I=, and A=!
/0ecute c"c+e: The control circuitry interprets the opcode and e'ecutes the instruction bysendin" out the appropriate control si"nals to cause data to be moved or an operation to be
performed by the A?!
8/9/2019 UNIT I EC2303 Computer Architecture
5/29
. 2ow wi++ "ou *etect an* correct error *uring *ata tranmiion3
2rrors are common in computation due to various factors lie manufacturin"
defects and environmental effects! Such errors fre+uently appear when information is bein"
transmitted between two relatively distant points within a computer or is bein" stored in a
memory unit! CNoiseD in the communication lin can corrupt a bit ' that is bein" sent from A to
> so that > receives´ x instead of '! To "uard a"ainst errors of this type, the information can
be encoded so that special lo"ic circuits can detect, and possibly even correct, the errors!
A "eneral way to detect or correct errors is to append special chec bits to every word!
*ne popular techni+ue employs a sin"le chec bit c- called parity bit! The parity bit is appended
to an n#bit word 9 6 ('-, '0,!!!, 'n#0) to form the (n 5 l)#bit Eord 9F6 ('-, '0,!!!, 'n#0, c-)! >it c- is
assi"ned the value - or l that maes the number of ones in 9 F even, in the case of even#parity
codes, or odd, in the case of odd#parity codes! In the even#parity case, c - is defined by the lo"ic
e+uation
c-6 '-⊕ '0
⊕ ,!!!, ⊕ 'n#0 '1(
where ⊕ denotes 29%?SIG2#*=, while in the odd#parity case
Ć 0 6 '-⊕ '0
⊕ ,!!!, ⊕ 'n#0
Suppose that the information 9 is to be transmitted from A to >! The value of c - is
"enerated at the source point A usin", say, (0), and 9F is sent to >! ?et > receive the word 94
6 ('4-, '40,!!!, '
4n#0, c
4-)! > then determines the parity of the received word by re#computin" the
parity bit accordin" to (0) thus:
cF- 6 '4-
⊕ '40⊕ !!! ⊕ '4n#0
/rror *etection an* correction +ogic
8/9/2019 UNIT I EC2303 Computer Architecture
6/29
The received parity bit c4- and the reconstituted parity bit cF
- are then compared! If c4-
≠ cF-, the received information contains an error! In particular, if e'actly 0 bit of 9
F has been
inverted durin" the transmission process (a sin"le#bit error), then c 4- ≠
cF-! If c4- 6 c
F-, it can be
concluded that no sin"le#bit error occurred!
The possibility of multiple#bit errors is difficult to detect! Hor e'ample, if a - chan"es to 0
and a 0 chan"es to - (a double error), then the parity of 94 is the same as that of 9F and the error
will "o undetected! The parity bit c- therefore provides sin"le#error detection! It does not detect
all multiple errors@ much less provide any information about the location of the erroneous bits!
The parity#checin" concept can be e'tended to the detection of multiple errors or to the
location of sin"le or multiple errors! These "oals are achieved by providin" additional parity bits
of which checs the parity of some subset of the bits in the word 9 F! >y appropriately
overlappin" these subsets, the correctness of every bit can be determined!
4. /0p+ain *ifferent 5in* of a**reing mo*e with an e0amp+e.
The purpose of an address field is to point to the current value G(9) of some operand 9 used by
an instruction! This value can be specified in various ways, which are termed as addressin"
modes! The addressin" modes of 9 affect the followin" issues:
• The speed with which G(9) can be accessed by the %P
• The ease with which G(9) can be specified and altered
Access speed is influenced by the physical location of G(9)#normally the %P
re"isters or the e'ternal memory $! The most commonly used addressin" modes are
0! Absolute (or) &irect Addressin"
3! Indirect Addressin"
a. PC relativeb. Base relative
c. Indexed
8! Auto#inde'in"
a. Pre-Decrement Modeb. Post-Increment Mode
1! =e"ister $ode
a! Register-direct b. Register Indirect Mode
c! Register Indirect with offset Mode
1. Absolute (or) Direct Addressing:
8/9/2019 UNIT I EC2303 Computer Architecture
7/29
The correspondin" operand field contains the address 9 of the stora"e location
containin" the re+uired value as part of the instruction
/0# !O6/ A) 7
The instruction copies the contents of memory location 9 to the A re"ister!
2. Indirect Addressing:The instruction contains the address E of a stora"e location which in turn contains
the address 9 of the desired operand
/0# !O6/ A) 87
3. Immediate Addressing:
Ehen data 9 is constant, its value can be placed in the operand field! There is no
memory fetch re+uired for an immediate addressin" mode!
/0# !O6/ A) 9:
4. Relative Addressing:
In absolute addressin", it is re+uired for the complete operand address to appear inthe instruction operand field! In relative addressin", the operand fields contain a relative
address, also called an offset or displacement &! 2ach operand is associated with a sin"le
address re"ister = from a set of "eneral#purpose re"isters, and effective address A is
computed by addin" & to the contents of = that is
A #; R'A4( appearin" in an assembly lan"ua"e
instruction indicates that the contents of the desi"nated address re"ister A< should be
decremented automatically before the instruction is e'ecuted! This process is called pre=
*ecrementing!
8/9/2019 UNIT I EC2303 Computer Architecture
8/29
Similarly 'A4(
8/9/2019 UNIT I EC2303 Computer Architecture
9/29
② Arithmetic intruction# It performs operations on numerical data!
③ Bogica+ intruction# It includes >oolean and other non#numerical operations!
④ &rogram=contro+ intruction: It includes branch instructions, which chan"e the
se+uence in which pro"rams are e'ecuted!
⑤ Input=Output 'IO( intruction# It causes information to be transferred between the
processor or its main memory and e'ternal I* devices!
8/9/2019 UNIT I EC2303 Computer Architecture
10/29
Bit of common intruction t"pe
8/9/2019 UNIT I EC2303 Computer Architecture
11/29
. @rite hort note on evo+ution of computer.
!echanica+ /ra#
The Difference /ngine# In the 0;th century %harles >abba"e desi"ned the first
computers to perform multistep operations automatically, that is, without a human intervenin" in
every step! The technolo"y used was entirely mechanical! >abba"e4s first computin" machine,
which he called the &ifference 2n"ine, was intended to compute and print mathematical tablesautomatically, thereby avoidin" the many errors occurrin" in tables that are computed and
typeset by hand! The &ifference 2n"ine performed only one arithmetic operation: addition!
Kowever, the method of (finite) differences embodied in the &ifference 2n"ine can calculate
many comple' and useful functions by means of addition alone!
The Ana+"tica+ /ngine: >abba"e conceived a much more powerful computin" machine
that he called the Analytical 2n"ine! This machine is considered to be the first "eneral#purpose
pro"rammable computer ever desi"ned! The overall or"ani.ation of the Analytical 2n"ine is
outlined in the followin" fi"ure! It contains in rudimentary form many of the basic features found
in all subse+uent computers! The main components of the Analytical 2n"ine are a memory called
the store and an A? called the mill@ the latter was desi"ned to perform the four basic arithmetic
operations! To control the operation of the machine, >abba"e proposed to use punched cards of a
type developed earlier for controllin" the Jac+uard loom! A pro"ram for the Analytical 2n"ine
was composed of two se+uences of punched cards: operation cards used to select the operation to
be performed by the mill, and variable cards to specify the locations in the store from which
inputs were to be taen or results sent!
/+ectromechanica+ /ra#
A later innovation was the use of electric motors to drive the mechanical components,
thus main" calculators CelectromechanicalD and "reatly increasin" their speed! Another
important development was the use of punched cards to sort and tabulate lar"e amounts of data!
8/9/2019 UNIT I EC2303 Computer Architecture
12/29
The punched#card tabulatin" machine was invented by Kerman Kollerith and used to process the
data collected in the 077- nited States census! In 07;1 Kollerith formed a company to
manufacture his electromechanical e+uipment! This company subse+uently mer"ed with several
others and in 0;3 was renamed the International >usiness $achines %orp! (I>$)! In Lermany,
the 1 was built in 0;abba"eMs wor! nlie previous computers, the
0 used binary, instead of decimal, arithmetic! The 2arvar* !ar5 I was constructed by I>$! in
0;abba"e4s machines, the $ar I employed decimal
counter wheels for its main memory! It could store seventy#two 3abba"e4s dream!
/+ectronic Computer#
A mechanical computer has two serious drawbacs: Its computin" speed is limited by
the inertia of its movin" parts, and the transmission of di"ital information by mechanical means
is +uite unreliable! In an electronic computer, on the other hand, the Cmovin" partsD are
electrons, which can be transmitted and processed reliably at speeds approachin" that of li"ht
(
8/9/2019 UNIT I EC2303 Computer Architecture
13/29
placed in the 2&GA%4s main memory! The instructions were then transferred one at a time from
the main memory to the %P for e'ecution! 2ach instruction had a well#defined structure of the
form,
A1 A A4 A O&
The above instruction means, Perform the operation *P (addition, multiplication, etc!) on thecontents of main memory locations or CaddressesD A0 and A3 and then place the result in memory
location A
variant of this instruction format implements conditional branchin", where the ne't instruction
address is either A$, which had earlier constructed the Karvard $ar I,
introduced its first electronic stored#pro"ram computer, the E:1, in 0;8esides their use of
vacuum tubes in the %P, first#"eneration computers e'perimented with various technolo"ies for
main and secondary memory! The @hir+win* introduced the ferrite#core memory in which a bit
of information was stored in ma"netic form on a tiny rin" of ma"netic material! Herrite cores
remained the principal technolo"y for main memories until the 0;O-s!
The earliest computers had their instructions written in a binary code nown as
machine +anguage that could be e'ecuted directly! $achine#lan"ua"e pro"rams are e'tremely
difficult for humans to write and so are very error#prone! A substantial improvement is obtained
by allowin" operations and operand addresses to be e'pressed in an easily understood symbolic
form called Aem%+" +anguage! Assemblers were used to convert Assembly lan"ua"e to
machine lan"ua"e before it can be e'ecuted!
The econ* generation#
%omputer hardware and software evolved rapidly after the introduction of the first
commercial computers around 0;8-! The vacuum tube +uicly "ave way to the transistor, which
was invented at >ell ?aboratories in 0;O, and a second "eneration of computers based on
transistors superseded the first "eneration of vacuum tube based machines! ?ie a vacuum tube, a
transistor serves as a hi"h#speed electronic switch for binary si"nals, but it is smaller, cheaper,
sturdier, and re+uires much less power than a vacuum tube! Similar pro"ress occurred in the field
of memory technolo"y, with ferrite cores becomin" the dominant technolo"y for main memories
until superseded by all#transistor memories in the 0;O-s! $a"netic diss became the principal
8/9/2019 UNIT I EC2303 Computer Architecture
14/29
technolo"y for secondary memories, a position that they continue to hold! Hloatin" point number
formats and supportin" instructions were introduced in I-! E:? to facilitate numerical
processin"! It also introduced input#output processors (I*Ps), or channels, which are special#
purpose processin" units desi"ned e'clusively to control I* operations! Another important
development was the introduction of CKi"h levelD pro"rammin" lan"ua"es, which are far easier
to use than Assembly lan"ua"es! Ki"h level lan"ua"es such as %*>*?, H*=T=AN were
developed durin" second "eneration! In the early days, all pro"rams or Bobs were run separately,
and the computer had to be halted and prepared manually for each new pro"ram to be e'ecuted,
this mode of system mana"ement is termed batch processin"! ?ater operatin" systems were
desi"ned to enable a sin"le %P to process a set of independent user pro"rams concurrently, a
techni+ue called multipro"rammin"! It reco"ni.es that a typical pro"ram alternates between
pro"ram e'ecutions! $ultipro"rammin" attempts to eep a %P and any available I*Ps busy by
overlappin" %P and I* operations!
The thir* generation#
Third "eneration is traditionally associated with the introduction of inte"rated circuits
(I%s)! I%s allowed lar"e numbers of transistors and associated components to be combined on a
tiny piece of semiconductor material, usually silicon! Perhaps the most si"nificant event of the
third#"eneration period was reco"nition of the need to standardi.e computers in order to allow
software to be developed and used more efficiently! I>$ developed what was to be the most
influential third#"eneration computer, the System
8/9/2019 UNIT I EC2303 Computer Architecture
15/29
typical#limited hardware and software facilities, and small physical si.e, $ost important, their
low cost made them suitable for many new applications, such as the industrial process control
where a computer is permanently assi"ned to one particular application! The &i"ital GA9 series
of minicomputers introduced in 0;O7 brou"ht "eneral#purpose computin" to many small
or"ani.ations that could not afford the hi"h cost of a mainframe computer!
6BSI /ra#
Since the 0;1-s the dominant technolo"y for manufacturin" computer lo"ic and
memory circuits has been the inte"rated circuit or I%! This technolo"y has evolved steadily from
I%s containin" Bust a few transistors to those containin" thousands or millions of transistors@ the
latter case is termed very lar"e#scale inte"ration or G?SI! G?SI allows manufacturers to fabricate
a %P, main memory, or even all the electronic circuits of a computer, on a sin"le I% that can be
mass#produced at very low cost! This has resulted in new classes of machines ran"in" from
portable personal computers to supercomputers that contain thousands of %Ps!
The inte"rated circuit was invented in 0;8; at Te'as Instruments and Hairchild
%orporations! It +uicly became the basic buildin" bloc for computers of the third and
subse+uent "enerations! An I% is an electronic circuit composed mainly of transistors that is
manufactured in a tiny rectan"le or chip of semiconductor material! The I% is mounted into a
protective plastic or ceramic paca"e, which provides electrical connection points called pins or
leads that allow the I% to be connected to other I%s, to input#output devices lie a eypad or
screen, or to a power supply! An inte"rated circuit is rou"hly characteri.ed by its density, defined
as theQ number of transistors contained in the chip! As manufacturin" techni+ues improved over
the years, the si.e of the transistors in an I% and their interconnectin" wires shran! The earliest
I%s contained fewer than 0-- transistors and employed small#scale inte"ration or SSI, The terms
medium#scale, lar"e#scale, and very#lar"e scale inte"ration ($SI, ?SI and G?SI) are applied to
I%s containin" hundreds, thousands, and millions of transistors, respectively! The boundaries
between these I% classes are loose, and G?SI often serves as a catchall term for very dense
circuits!
Around 0;O- it became possible to manufacture all the electronic circuits for a pocet
calculator on a sin"le I% chip! This development was +uicly followed by sin"le#chip &=A$S
and microprocessors! The first microprocessor, Intel4s --, which was introduced in 0;O0, was
desi"ned to process #bit words! >y 0;;- manufacturers could fabricate the entire %P of a
System
8/9/2019 UNIT I EC2303 Computer Architecture
16/29
CPU
Main Memory
M
Instructions
Data
CPU
Main Memory
MM
Cache
Memory
CM
Instructions
Data
External Memory M
The Primary function of %P is to e'ecute se+uences of instructions, that is, pro"rams
which are stored in an e'ternal memory! The pro"ram e'ecution is therefore carried as follows:
0! The %P transfers the instructions and, their input data (*perands) from main memory to
re"isters in the %P!
3! The %P e'ecutes the instructions in their stored se+uence e'cept when the e'ecution se+uence is
e'plicitly altered by a branch instruction!
(=A$)! The %P is si"nificantly faster than $, that is, the read or write to %P re"isters is 8 to
0- times faster than it can read or write to a =A$!
$igure 1.1 &roceor memor" communication without Cache
To remedy this situation, many computers have a cache memory %$ positioned between
the %P and main memory as in figre !."!
$igure 1. &roceor memor" communication without Cache
The cache %$ is smaller and faster than main memory and may reside, wholly or in part,
on the same chip as the %P! The cache is desi"ned to be transparent to the %P4s instructions
and it permits the %P to perform a memory load or store operation in a sin"le cloc cycle!
The %P communicates with the I* devices in the same way as it communicates with the
main memory! The I* devices are associated with addressable re"isters to which the %P can
load or store a word! If the I* data transfers are implemented by memory#referencin"
instructions, it is called as memor#-ma$$ed I%! Some computers employ I* instructions that are
distinct from memory referencin" instructions! These instructions produce control si"nals to
which I* ports, but not memory locations, respond! The second approach is sometimes called as I%-ma$$ed I%
c( Uer an* Supervior mo*e#
The pro"rams e'ecuted by "eneral purpose computers fall into two broad "roups: user
pro"rams and supervisor pro"rams! A user or application pro"ram handles a specific application,
such as word processin"! A supervisor pro"ram, on the other hand, mana"es various routine
aspects of computer system on behalf of its users@ it is typically part of the computer4s operatin"
InstructiData
8/9/2019 UNIT I EC2303 Computer Architecture
17/29
system! 2'amples of supervisory functions are transferrin" data between secondary and main
memory! In normal operation the %P continually switches between bac and forth between user
and supervisor pro"rams!
The %P is desi"ned such that it can receive re+uests for supervisor services directly
from secondary memory units and other I* devices! Such a re+uest is called an interr$t. Ehen
an Interrupt occurs, the %P suspends the current e'ecution and transfers to an interrupt handlin"
pro"ram called Interrupt Service =outine!
*( C&U operation#
$igure 1.4 Overview of C&U %ehavior
The flowchart in fi"ure 0!< summari.es the main functions of a %P! The se+uence of
operations performed by the %P in processin" an instruction constitutes an instrction c#cle! Ehile
the details of the instruction cycle may vary with the type of instruction, all instructions re+uire two
maBor steps: a fetch step durin" which a new instruction is read from the e'ternal memory $ and an
e'ecute step durin" which the operations specified by the instruction are e'ecuted!
e( Accumu+ator=%ae* C&U#
The %P or"ani.ation proposed by Gon Neumann and his collea"ues for the IAS computer is the
basis for most subse+uent desi"ns! It comprises a small set of re"isters and the circuits needed to
e'ecute a functionally complete set of instructions! In many early desi"ns, one of the %P re"isters,
the accumulator played a central role, bein" used to store an input or output operand in the e'ecution
of many instructions!
The instructions are fetched by the pro"ram control unit P%, whose main re"ister is
the pro"ram counter P%! They are e'ecuted in the data processin" unit &P, which contains an n#bit
8/9/2019 UNIT I EC2303 Computer Architecture
18/29
arithmetic#lo"ic unit (A?) and two data re"isters A% and &=! $ost instructions perform the
operation of the form
90:6 f i (90, 93)
Ehere 90 and 93 denote %P re"isters (A%, &=, or P%) or an e'ternal memory
location $(adr)! The operation f i performed by the A? are addition, subtraction, shiftin" and lo"icaloperations! $emory addresses are stored in two address re"isters in the P%: the pro"ram counter
P%, which stores the address of the ne't instruction to be e'ecuted, and the "eneral purpose addressre"ister A=! The instruction fetched from memory is placed in Instruction =e"ister (I=)!
The two essential memory addressin" instructions are the load and store!
The load instruction for our sample %P is
AC#;!'a*r(
This transfers a word from the memory location with address adr to the accumulator!
The correspondin" store instruction is
!'a*r(#;AC
This transfers a word from the accumulator to a memory location! The correspondin"
store instruction is
f( Architecture e0tenion#
There are many ways in which the basic desi"n of accumulator based %P can beimproved! $ost %P4s contain the followin" e'tensions, which si"nificantly increases their
performance and ease of pro"rammin"!
i( !u+tipurpoe regiter et for toring *ata an* a**ree#
There are additional re"isters for storin" instructions and data! These are called as
"eneral purpose re"isters! The third "eneration I>$
8/9/2019 UNIT I EC2303 Computer Architecture
19/29
$igure 1. A t"pica+ C&U with genera+ regiter organization
g( Intruction Set#
$igure 1. Intruction et for the genera+ C&U organization
The above fi"ure "ives the possible instruction set for our simple accumulator based %P!
The above 0- instructions have the flavor of the instruction sets of some recent =IS% machines,
which demonstrate that small instruction sets can be both complete and efficient!
Type
Program
DataProcess
DataTransf
8/9/2019 UNIT I EC2303 Computer Architecture
20/29
E. Draw an* e0p+ain the *ifferent t"pe of *ata repreentation.
a( -aic $ormat#
The basic items of information handled by a computer are instructions and data! &ata can
be further subdivided into numerical and non#numerical! &ue to the importance of numericalcomputation, computer desi"ners have paid a "reat deal of attention to the representation of
numbers! Two main number formats have evolved fi'ed#point and floatin"#point! Non#numerical
data usually tae the form of variable#len"th character strin"s encoded in one of the severalcodes lie AS%II code!
The %aic information t"pe
%( @or* Bength#
Information is represented in a di"ital computer by means of binary words, where a
word is a unit of information of some fi'ed len"th n. An n- bit word allows up to 3n different
items to be represented! Hor e'ample, with n 6 ! Ee can encode the 0- decimal di"its asfollows:
: 6 ---- 1 6 ---0 6 --0- 4 6 --00 6 -0--
6 -0-0 F 6 -00- E 6 -000 6 0--- ? 6 0--0
To encode alphanumeric symbols or characters& 7#bit words called b#tes are commonlyused! As well as bein" able to encode all the standard eyboard symbols, a byte allows efficient
representation of decimal numbers that are encoded in binary! A byte can store two decimal di"its
with no wasted space! $ost computers have the 7#bit byte as the smallest addressable unit of information in their main memories! The %P also has a standard word si.e for the data it pro#
cesses. Eord si.e is typically a multiple of 7, common %P word si.es bein" 7, 01,
8/9/2019 UNIT I EC2303 Computer Architecture
21/29
c( Storage or*er#
An important aspect of data representation is the way in which the bits of a word areinde'ed! Ee will usually follow the convention illustrated in the followin" Hi"ure, where the
ri"ht#most bit is assi"ned the inde' - and the bits are labeled in increasin" order from ri"ht to left!
The advanta"e of this convention is that when the word is interpreted as an unsi"ned binaryinte"er, the lower order inde'es correspond to the numerically less si"nificant bits and the hi"h#
order inde'es correspond to the numerically more si"nificant bits!
!S- BS-
Bitt+e=en*ian %"te format
The above word Ei can be written as > i,-, >i,0, >i,3, >i, i,- is assi"ned
the lowest address is called little-endian storage convention& it assi"ns the lowest address to byte-!The alternative stora"e scheme, in which most si"nificant byte > i,< of word Ei is assi"ned the
lowest address and the least si"nificant byte > i,- is assi"ned the hi"hest address is called big-
endian storage convention! In other words, the bi"#endian scheme assi"ns the hi"hest address to byte -!
!S- BS-
-ig=en*ian %"te format
*( Tag#
In the von Neumann computer, instruction and data words are stored
to"ether in main memory and are indistin"uishable from one anotherRthis is
called the stored pro"ram concept! An item pluced at random from memory cannot be identified as an instruction or data! &ifferent data types such as fi'ed#point and
floatin"#point numbers also cannot be distin"uished by inspection! To identify the
information types, a "roup of bits are associated with each information word is called a
ta"4 that identifies the word4s type! The ta" may be considered as a physicalimplementation of type information found in some hi"h#level pro"rammin" lan"ua"es!
*ne of the earliest machines to use ta"s was >urrou"hs >18--O8-- series, whichemployed a
8/9/2019 UNIT I EC2303 Computer Architecture
22/29
Tagge* wor* format of -urrough -F::HE:: erie
In selectin" a number representation to be used in a computer, the followin" factors should be
taen into account:
• The number types to be represented@ for e'ample, inte"ers or real numbers!
•The ran"e of values (number ma"nitudes) liely to be encountered!
• The precision of the numbers, which refers to the ma'imum accuracy of the representation
• The costs of the hardware re+uired to store and process the numbers!
The two principal number formats are fi'ed point and floatin" point
$i0e*=&oint# Allow a limited ran"e of values and relatively have simple hardware
re+uirements!
$+oating &oint# Allow a much lar"er ran"e of values, but re+uires costly hardware!
$i0e* =&oint Num%er#
i( -inar" Num%er# The fi'ed#point format is derived directly from the ordinary decimal representation of
a number as a se+uence of di"its separated by a decimal! The di"its to the left of the decimal
point represent an inte"er@ the di"its to ri"ht represent a fraction! This is $ositional notation in
which each di"it has a weight accordin" to its position relative to the decimal point! If i' 0, the ith
di"it to the left (ri"ht) of the decimal point has wei"ht 0- i#0 (0-#i)! Thus the five#di"it decimal
number 0;3!O< is e+uivalent to
0 ' 0-35; '0-053 ' 0--5 O '0-#05< '0-#3
$ore "enerally, we can assi"n wei"hts of the form r i
& where r is the base or radix thenumber system, to each di"it! The most fundamental number representation used in computers
employs a base#two positional notation! A binary word of the form
b N U!b
8/9/2019 UNIT I EC2303 Computer Architecture
23/29
=epresents the number ∑¿i= M
N
e bi"i
Suppose that an n#bit word is to contain a si"ned binary number, one bit is reserved to represent
the si"n of the number, while the remainin" indicates its ma"nitude!
ii( Signe* Num%er#
a( Signe* !agnitu*e Repreentation#
Suppose that both positive and ne"ative binary numbers are to be represented by an
n#bit word 'n#0 'n#3 'n#
8/9/2019 UNIT I EC2303 Computer Architecture
24/29
desi"ned for unsi"ned numbers! $ultiplication and division are more difficult to
implement if twos#complement code is used instead of si"n ma"nitude!
/0ceptiona+ con*ition#
If the result of an arithmetic operation involvin" numbers is too lar"e or small to be
represented by n bits, overflow or nderflow is said to occur! It is "enerally necessary to
detect overflow and underflow, since they may indicate bad data or a pro"rammin" error!
*verflow can occur only when addin" two numbers of the same si"n!
A related issue in computer arithmetic is rond-off error& which results from the fact that
every number must be represented by a limited number of bits! An operation involvin" n#
bit numbers fre+uently produces a result of more than n bits! =etainin" the n most
si"nificant bits of the result without modification is called trncation. %learly the
resultin" number is in error by the amount of the discarded di"its! This error can be
reduced by a process called ronding. *ne way of roundin" is to add r B3 to the number
before truncation, where r * is the wei"ht of the least si"nificant retained di"it! Hor
instance, to round -!
8/9/2019 UNIT I EC2303 Computer Architecture
25/29
iv( 2e0a*ecima+ Co*e#
The he'adecimal number format uses a base of radi' r 601 and the use of 01
di"its, consistin" of decimal di"its -U!; and numerical values 0-, 00, 03, 0, %, &, 2 and H!
Hor e'ample the unsi"ned he'adecimal number 3HA-% has the interpretation
63 ' 01 5 H ' 012
am'le:
0!- ' 0-07
0!-# $antissa
07#e'ponent
0-#baseHloatin" Point number is stored as a word ($,2) consistin" of a pair of si"ned
fi'ed point number a mantissa $, which is usually a fraction or an inte"er and 2
which is an inte"er!2'tra mantissa di"its are included in a floatin" point processin" circuits# These
are called "uard bits to reduce appro'imation error! Luard bits are removed
automatically from the end result!
%( Norma+ization an* %iaing#
Norma+ize*#The mantissa is said to be normali.ed, if the di"it to the ri"htof the radi' point is not .ero! Normali.ation restricts the ma"nitude W$W of a
fractional binary mantissa to the ran"e
X Y W$W Z 0
8/9/2019 UNIT I EC2303 Computer Architecture
26/29
-ia# The floatin" point e'ponents should be coded in e'cess code where
the e'ponent field 2 contains an inte"er i!e!, desired e'ponent value plus ! The
+uantity / is called bias, and the e'ponent encoded in this way is called a biasede'ponent or characteristic!
c( Stan*ar*#
Institute of 2lectrical and 2lectronics 2n"ineers (I222) sponsored a
standard format for
8/9/2019 UNIT I EC2303 Computer Architecture
27/29
Data and ontrol:
Sing+e function circuit
A simple re"ister#level system shown above forms a sin"le action, in this case, the add
operation :6 A 5 >!
$ore complicated systems perform several different operations! Such a multifunction
system is "enerally partitioned into a data#processin" part, called a datapath, and a controllin"
part, the control unit, which is responsible for selectin" and controllin" the actions of the
datapath!
8/9/2019 UNIT I EC2303 Computer Architecture
28/29
!u+tifunction circuit
The e'ample shown in the above fi"ure, control unit % selects the operation (add, shift,
and so on) for the A? to perform in each cloc cycle! It also determines the input operands to
apply to the A? and the destination of its results! It is easy to see that this circuit has the
connection paths necessary to perform the followin" data#processin" operations, as well as manyothers!
:6 A5>@
> :6 A#>@
?ess obvious operations that can be performed are the simple data transfer :6 >, which
is implemented as :6 - 5 >@ the clear operation > :6 -, which is implemented as > :6 > # >@
and the ne"ation operation > :6 - # >!
2ach of the fore"oin" operations re+uires % to send specific control si"nals, indicated
by dashed lines in the above fi"ure, to various places in the datapath! Hor instance, to e'ecute the
subtraction :6 A # >, the controller % must send select si"nals to the A? to select its subtractfunction@ it must send select si"nals to the multiple'er that connects re"ister A to the A?4s left
port@ and it must send a Cload dataD control si"nal to the output re"ister !
An e'ample of a lar"e multifunction system is a computer4s %P! Its control unit, which
is responsible for the interpretation of instructions, is called the pro"ram control unit or I#unit!
The %P4s datapath is also called the 2#unit!
A descri'tion language:
2DB '2ar*ware Decription Banguage() provide both behavioral and structural
descriptions at the re"ister level! There is often a close correspondence between the elements of
an K&? description and hardware components and si"nals in the system bein" described! Hor
e'ample, the statement :6 A 5 > describes the circuit of a sin"le function! In this interpretation,
5 represents the adder! The input connections to the adder from re"isters A and > are inferred
from the fact that A and > are the ar"uments of 5, while the output connection from the adder to
re"ister is inferred from :6!
Design %ec#ni*ues:
Liven a set of al"orithms in instructions, to desi"n a circuit usin" a specified set of
re"ister#level components while satisfyin" certain cost and performance criteria uses a heuristic
approach due to lac of appropriate mathematical tools
The followin" "eneral approach can be followed to the re"ister#level desi"n problem,
Step1: &efine the desired behavior by a set of se+uences of re"ister#transfer operations, such that
each operation can be implemented directly usin" the available desi"n components! This
constitutes an algorithm +, to be e'ecuted
8/9/2019 UNIT I EC2303 Computer Architecture
29/29
Step: Analy.e +, to determine the type of components and the member of each type re+uired
for the data path DP !
Step4: %onstruct a bloc dia"ram for DP usin" the components identified in step 3! $ae the
connections between the components so that all data paths implied by +, are present and the
"iven performance#cost constraints are met!
Step: Analy.e +, and DP to identify the control si"nals needed! Introduce into DP the lo"ic
or control points necessary to apply these si"nals!
Step: &esi"n the control unit C for DP that meets all the re+uirements of +,.
StepF: Gerify, typically by computer simulation, that the final desi"n operates correctly and
meets all performance#cost "oals