COA - Unit I Notes
COA - Unit I Notes
Teehiqes
fAypieaton
Ske fucing sydem, deuiediend,
sydem Compilwns ete.
!Progam
Archi teeture
organizat'o)
Von Neu mann a 1g4s. he trposeol thutueto
&tored n The memay duyt eke data 1
Cau be luloded au
dushuetions cau be fetehel
the ep eeon ot a haga,The eseal
the
som memng , and the tetehed suhn lun be deeodeet to Set eb
hewsay daka paths Qud genenate the Getd Conbot gnals.
Cono uit Otputu t
Tnput Unit Procesor
Memny
Conholtad t do au eleebonie cùeuity that daeoded eaeh .fetehd inshueio,
heeesary hausmitted to the
aud genates the heLeYSaruy lonhot Signas dhat ane. also the Conhof Signas
operati oA aud
funetiona tnits to cauy outHhe seguined Jeqwed data Patths.
hespengible to audomatieelly se up the
memeng ahcalyzed, The dlata feteked,
an gnueon a fetehed fom ouU Londs,-he speeuhioy
Snsuehon yde , s k an troduead,
frodued n
Pyocvsed, and finally he iwshuetion eyele
igutioy s Comblehed n aw
gie. ime do do aehi ue
q an a
Aretectre Suppots eet k atArelifaeae.
Von hegmann Theu was chaugs ato ths
Parllel Conputiag
ogizrim acomputa!. Mond-for BoekPlahe Bly
Bayie
Procesor
(ytem
Hav¢ disk Key boad
|Memoy TmporttRolta
Punyoe Regots lay an
The speelal
Sytembw Tshmeion
P MAR
Ttnion
|MeR
IR
Dao
Esecuion| To BR|
unit Data
I|O Modwe
Mam mem0rg
ast
adldes u memoy for the hent leaol or the data
MAR-speeifis te wsilten dto memoy or Aeceiue
to be
MDR- lontens te data
- peufs the þatieula dluice by
Addes Rugintee (T/o AR)waut to omhieate ecthr or head, or
Lrpat-ouput addeYs
is rom botieh e Pu
Lorte
usel for epchange data betoeen Iloteyae
I/o Bfee Registoulo B)-
to be fetehd.
Pe- (otins the cdds 4 De heot Umtuchon
Data- Procainy
iV) lothut
4.
CA Sedes to th ose attibts qa sytem uibe. toa gammo
Or Put auothern det, -fhose. atti butu that haue. a cdieet impat
-The. Tnsheioy Set Arehifechuye
(TSA) dlinu iwsthuioy -fnmat, dtuellon oeodes a
Tntuellom aud dada Memony. TKe <tle et poetd Entmehions
On he deqitens ad Memg) Amd
And au Atgnthm trw onboll ing
Tatulon eyeeuion
Code
main
memay
Sytem
Bus CPU ALU
Conbl
SqwncingLogic
Conbouit
Reygiled dodo)
Contof
Memay
5.
Exbande
Code aoeeueh eaehMemony
Cotaln
Fnuetiord
tomunoe
uo
Shuekure
the Tsianpit A-LU.
Twe is bit. The Conpo
(ACma
ALogie
cireta
opcode
20-b)+ aloo I4s Conbolnit
ebgtid both MeR
perati
has Conss
tuehion. data I
om fig:AAdes a As
toy binay lon
o
be Tasfaou wd
looo
sigu oplode lode Addrs
omed eaeh etion Tnyutios Stg o
23
bit
frmat
nsuetto audFirmt AddrnS
auda loeati Tnput-ut
a Tsheios t
39- 39 ae
and, memony
nan
-bit 2
loyists store
bjt
addes Yalue lellel
heye.
B-bt A asods,
that wod
operatig
oay
et dyjiedbe bus Data A4dey
opai (onbo duig
Addrunavalae, 32-bjt
Ôn rouides liesDatüoelaitic major Gnpae wsite Read shueludes
nneion
Iterco
Memoy Signals Insuekon
the fa Vaious more Inte
ond wnes othu lorputero
atim
we us eah data aso ees
bu Sytem asadeu'
lonneeion
TRmding and hand
Knoun h deuels
o roui Heae Bs- grop
be wuchon then Cau Às
CPU
(Mw)
Componet o tontain
dnam des data uyed he as a ot ealad
atormed. the pouth the Sehames
Conbod loud" eah data adenes Dota
ation toeyde hutnd lomputo
boceAOY
dwsti or Data
(PouBor, numaeu abu.
eotian
lopla dungnae bu that
Adees mouing - Adds
ws betscensi4nals buses Read
dMes Comuni t
dota mut on ì Mémoy, y8tem g SigndlConbol
! Addes
ens mulameougy adata dtfnt Cons
syden hat the ds data a cation M
hm aecs16-bit AddusBus ) hienar
pos Modwe
olleeiulySoLee aedeen z/0) lonheeting o
The augats bweonynd
modeles chy. buscs mulplePerthay
the s
dota oY dong (one bytem
eallel A
itobuste olestinahim
both Know
memoy eud
bit bus
that pat, lnes that
timinA Stfunaldata
8-bit
þer Modle 32 lonneets
athat -fr is
Command as moule. dine.dines, ytem
gnals Aelales eh oata lonecs Jeueral da
deey al data bua a
he tue onponuats bus
ni'The est ed bus tist .
busa det meens
deu'ees. can
s
RoL CONT |Bus
Bus
Bus
Ankite
RequytBus
KBuy y
Conholus Lihes
mmeationik hat|Bw
Corponnti
Conett Shord Anbitaion
chabning
aiay
Poling
Busra Abiaio bus
Zndahuudut
Regutig
Mod! Modal
modulo
mod
loadentoblaea eah a
q duing oe. nalhble
fou ata bit
on
thabus, ead ine d
R3R+ Ro R3 R3&
tl RI-R2.RI+R2
oTE- IOite
micaochetinsfoyoem
dekignation
Syntlie Azith 4.Athmetie 3, elasted
2, Atmetie Kead.Taage
Memay
1- Shiyt Logie þund This Addes
TiMemy
he
meie data
The aThe iuto adds Calleol "The
mi Seed Data ae DRMLAR
memo4usite bR. Reeid:
Cordent s
dtion
tim
piroopenatina,-
als Contentb
Gro
mieocertios sinto uth danoted "Tbueran
so Comleinent Detoniphorn ain bM
codemet euatons mieospotions- Lword t head
four the neny
o bythe Registeuspenati Memony by i
raiom RI catdeta Shume. opeRction
M speerted, inmaion
the
the +R2 umeni Adds Seleetd on
uth londts aeagene gerias'3toed
. Adds
a Contts Regotew RI
hanitel Adde omae reuers baeieket
e ús in cmdthe wo A
ented shyt deta in bythe denoted
han, bit Regotes. A hem memoy fom
on mioro Aa. R| folocutingTh
R2(i'
R2s
toSeubhacion stred he lokng a
(negate) dnto addes 0rd
ofaaion.Manpulat by
et R3 u Addnes
cotent
u'e sheaion emny
aicth The te Memoy is
Complement) n
and a , ds memny denotedtond
hiteqenee dnaement Ragos oàdata mino
vsmeMoy in
Aau & lword deten
operati Stoed ofeacims au ARme a
data to
s. hae bythe
elementay Lod that M M. the
add Ratlol0+} ons otside
leewmotand. i egioter wrd
and z
a CARI. M
letteM.
Ragsted. y the Ticwsenslopenthon3.
sht inbut
ninoope cpention is
to
mtrnd
lhen
M=0,
Then l0|o
R]ER!=
Cohem AB+AB'
AB= bytu Bj Binay
Addee!
Binag then The
Regoe Mode nazy
Addition
çneluding o|"| Ra
m=1, M=
A
Tnument input
o, Adte-ubtxetrr-
The The and
ollo = ekt ekt m a
lonbl Subhatioy
epcusi Puiay
beeome Às FA
tHeerakon.a fA
ne
-oh A o
S Te
addea operatibg =
Subactor. Subhuet 0, FA
S
and te. A2.
HA A2
4ig: ith Can A -fig:
4-brt a FA
’ each be -B
BO| 4-bjt 4-bit
HA FA Cornbined can
binay =
ful- be biny
's S S
Band Addu Bo
dore So
a
imemente doe! tto Adder Ao
HA Ao - Bo
co| Subtuetor FA A+B+)
So one
Ao
Resut Commoy
M
A-B.
.
cireut
Anhmhieet
eic
funeisnTase
Seleet
Sleet s
A Ao
B)
A)D
= DD=
At
D=A+}y+Cim Ag
p=A
D=A tt| =A
h Add
SubhaeborwuOtierospeaten
Subtrat
Denemet 2 3 So
TnhementA A So So 43
u MOX MUX
bi MUX MuX
ahmetie
Y2
FA FA CA FA
ekt. C3 Co
Lcot
- Do
bi 3.
A dyeot
tundhon
Brolaan Tath Logic
y+Xy=fY P6
= S
Fo0 let taqioheas.
thm
Tallecxeduive-oR
he mi
o3 oooperatons
fnr RI= as
je 2 So binany These.
ieocpetattos
(ogi)
Sntevn b j0|o
fumefiow
nd
caralions
Vanlasles
from Miecoperaion mieroche|aP:
io
R2= R14 shueify
hieh Tuo 11oo, RI osidotbinay
alldHhs Vaiale:
R2n
às
Then
Symbolsed
1 cheraions
each
ean
A
Nclea RIR2
o1o.
AB
E= be bjt
E
A
clouad by fr
Cd
on
So the tha
stngo
1 staemet degutes
AND
Sheation o
sepanatey bit
siorel
and
is
ottwrs to Te Aaitinehie
Jhamalns AnAn-to An There.
An -The The
unehauget The S=o-piusive
oveftew Ahmeie Ex.Auhete Ahnehie the ash|RRt
Imhi Remains AikmeheAsilhmutie debigaion
ynbol
nqt Signbi! ve
theShittk ayt
dlyp
tha bit
or theee
The Shit eime ghut-
Rop bit ob sh onul Shitt hgt Shiyt Cau be
t
biRight mberbitNlu Rgt types
VçunR»- let sken -
Cas Rn dn Alhmetie
lostawdinsut has
leaudiwdes yt ds
a syt-lt-R
-igtBshyt Aetmethie
Ro itis multiis bescnplion Shtleo
hauges
be mibnootatim Shijte!
yed s he The
lost. mHpid Sifn
efla a Sigo, he to
utovas oito bìtlast o
bjt humbtre
bit a the
detet wel Bign logie,
by wn le
aen Ro,cuhel chageol nehanged Ex!
au The o
loy bi hat
bi ied naynumbeu
a. r
ah ttom The chh inclae the.
Shfs aud |arLound
Sh.
meho beeaus i'gt,
Ry, all shij 2.
by
hif- Siged a aud
other by The
The The
si'gn tuwo
awhmeie
l Sgn Abit No 2.binay
o (neluding ends
ettoo. Aeusal to
The the nube
lett. ulhet
number
bignbit)
lod
e
The The ThGtenerd
Reghee is
Prouidiga
deeode haat-Theieulabus orjanizatien,
tuO epeeteig the
Asihmetie
SELD
Reyoten Salein otput hegitesdashuins
ELostLo oPR Ry Rs R2 RI buse Registe
3 unes Load thameru The that eies ot
eachA cund loghe
Cowbowor(b)d SEL deteds St
nd
3 iwhuts
oPR fath ecees eaeh 3egste
B. unt thet
ativatis
5 bethoeen muH'paae hat stores
Daggm
Block(a) JheTt o te
conneched ALU eo
the ne ditexedit
JABus data maiony to ms
Seleet
A the
he
ym to busatm
u
egstU ne eqe
the two oygqhi dat
the a
MUX
outfut
doadotput zaton wsed
puB
llipes cperaten:
mieeodpuratns ding
bus tr
buw Inpu for
and pubs,
s (mux)to seen epeeutionThe
theinput Seleeted
Thus data
SELB c
Y u f
by The form the
a
ApidtoContaln ord,-
TheeCon t. g. AmaughThe R2-R3
R|4
The P The Rytshl R4
Delodez LUA
MUX Mux Conhd
r
loanfle, mitrocpulon
thee
Vaetees B A
the bik dincienenaim
Selety
Seleetoy mt to unit
seleioneaeh, Seeor
penyrmgiters dhat
ae þrolde Ry RG Ra
SELAfSELB
SELD
oPR
cuto
R|. (SELA)
CsEL
cud spetes
Saleeor copR
B)
The aud RS R3
a 4
enbjnazy binay
pto lon opuratim
3 ALU
sELA | (SELD): o to TSEA None
NoeTSFA RG
eld þlaee
dhe
t plaee
sectio seheton by
wmd SHLA TSFA||NCA
speerty hs epU
ouide Selaeiug OR
ELetELo| . to the dheRIR2t R3
Content bws
SELD a tue avputo the vaiattes
lontet ooo\|\0)0 (00100o1
pauti Coyistiewlethe
bi. syotem Conheond
elaemieoopton anttmatie The
The ot c
PA he disues
R3ttotheVarioud
fowe
lu-biConteudtthe R2 olo)o
uit tDo |o
addition, uto
iuto
folloDig Componeto
conhelds. and bls heintormaom
bus CTamjew A)
heis AtB G
Three ouput A.
wrd
CD seleetor hs
mbinad
sten ielas The tod
bus inþuk: Syotem
Resultis (a=G4).
Centains
6bib TnThet
opertinPoP ofNoTE- Dea aud Ihe SP tohen Regut
SAack!.
e The. SPThe Staek dn
efettonPuSH ean a
Bue ne G4 s TaO
2egtotht þoito Sueh
The Register loit bit SP= euoetly organization
aecomodate -Word
a
Regoteu Re\eu
o-[Snee I11 shercHons maymr
t (DR) I|),and Staek, the
daa tu
Te dop do that
EMPTY FULL
holda eut y |||| Tthe ta holds
Pop storecl aneremeued
ublsp=o) The Staek The em dhestaek A
efunatim thecdds
Staek
the s 1=|000
Six Steek.
u As Pinte in item
The data deastS/qitieantbikcet
et MCSP]DR Setdauemewed l,Taeby ae The (L|Fo)
to b StoredJat
(sP=o) Couyok Ssteelk Then tol, I oo0 the
to , taek. for
be when b
|PuLLEptyut
]Then d
then atmas (Ful he n nsertion he e
¢ Tnuemut
wale wlen Slorage
adds.
he tI) The The Steek sthe
(smphy41) the
Senement Poine
stade folo Staek Stielk ane
at di
dajce
staelss
taek eheek
Pll. dito
Mak using on is is deletion cald
ud
elk
topPoite Eoty. or fll. em
cthcheck
e mierocpeations; mat DR tthet
fhe head A
enpty. th a a
Staek la stacs
ateed Stores
tShaek Staek. sp) ot C 2
te m
|63 Po
Mot data Addeys
the nteSP). jormti
full,
emþty s o staek,
on
Aetton =3
33 -1+2)= Steþ3.Shep2.Steþl:
(3) ubpede theopeands
oytee The plaees espeibna.
evaluatiyg
anidbmetieRevse
pcst}ix xnotaion Ey
x3* steha, Comyut sore
comþute
2valuae Sttomre.is e
Th 3umProcuet Conyider
[ e nottioA
Raue the tuis Peish
(4+s)9 pauemhei
raluateThe
Evauat opnat The The wugi
Tuo
the t6] Veles produet
hoel Prodetaithmehe
notaionNotion
Nleed pocluek.
gvey +6 dite batre et
A1, toas e*D AB Leaeh
ap he Th esperin ,-
peyi staek"Use Th
=|2
3 33 Cadelet
Put
B=2, baeket, A
eMeRYeshorand 9pynotahon
otaion(RPH)
posti 6hrctr staelk
on C=3, 0athten
avasnto
(3 4 The
*
5+þosti
AstcoE+e*P Peish B+e*D A
lommon
ositenongahizati
D=y,E=5,
3
inaly,+*. Then, Then,
) *6
+U*6) htation Agt AB+ hotain
naix athmette
betan on
RPN* Feb |C* a
ug " (ReN, notaion
uuth DE+*+ The vey
steds, 0lpneon DE peanda)abtecthue
he blacs þsiond
+7
(Polish
P
Steek . tespentoy neteticn) tor
PROCESsOR DESIGN
253
:
notation
E)
polishC* A*[B+
C*(D+
E)]
D+
PROCESSOR
ORGANIZATION reverse
B* F*(G+
H)
A*(
to B+ h
infixA*
Solved
Examples from (b) ))E*(FG*
d) =(AB*)+(CD*)+(EF*)
CE*) +) *] *+) /
expressions =(AB*
CD*
+)+(EF*) CE* * + EFG* *+* +*
+ CE*+*
A*(BD*+CE* EFG* *+*+ C(DE+)]
[B+
A* FGH
+
EF* A*(BD* EFG* A*[B+ A*[BCDE+*+]
CDE
+*]
F*(GH+)
B*[CD*+
+ +*+*
ABD* B*[CD*
B*(CD* EFG* +*
ABCDE+*
+*
ABCDE+*
G)] F CD*+ ABD* BCD*
FGH+* *+
FGH FGH
+* *+
FGH
arithmetic E+(F* E* B+ B+ + G)] ABCD* ABCDE
F D+ AB* E) A* A* AB* AB*
E* C* E*(F*=A+A+ A+ =A+
D+ D+ C* = D+ = = = = = = A*[B+
C*(D+
E)]
followin8 B+ = =
iscellaneous C* B"(C* A* B* D+ F*(G+
H)
B+ A*( B=[C*
the A* A+ (a)
Solution. B+
Convert (c) A* A+
1Example (a)
(b) (c) (d)
su
the
show
:notation and
notation
notation
infix
polish
to
notation*+*+*
BCDEFG+
A polish
reverse
ORGANIZATION
COMPUTERpolish
-+
BCDE*/
A reverse
into
reverse expression into
6)+ 8]
(3+4)[102+
8] expression
+* 8] =(34+)(1026+
*8+)
+ =(34+)[10(26+)
+
8] =(34+)[1026+
*+ *
from(b) + +* G)+*G)* G 6) *8+
(d) F)+ F)+ F) F) G)*+*+*
BCDE(F+
A +* result:
G)* F+F+ arithmetic +
expressions -+ + E)) E/ D+(E/ G) F+ 4)[10(2 1026+
D-(E|
C)D-(E/ E* E*
-/ E)/ E)
E)*-/ E)/-+ E)) D* D( +
F+
numerical
given
E) D+ E)) D* C)) E*(F E* D+ D+
B-(C/( E* =(3+
D+ D+ A/(B-C* (D*A(B-C/( C)/
C)- D+
BC(D+ C* numerical the
+
=34
arithmetic BC(D+ A(B-C+ D* =(A/(B* BCD( B(C*C*
-| B(C* BC(B(C/ B* A/(B* A/(B* B+
A(B++ convert
the
BCDE+* A+ A( +* A A A A* evaluating
EF/+ A A A A
BCDE+*-|
A = = = = = = = = EF/+ = = = BCDEFG+*+*
= = = = = = following
folloving we
D- -+
A
BC*/ BCDE*/ D- First
for
(a) BC*/ the
the operations
Solution.
Solution.
CoM0ertA A
Convert
(a) (c) A A Example3
Example
2 (b) (c) (d)
254
E G M E N T
ADD Au nesett AccuSingle i) (1 1.
D PusH PUSH
D C PU
SH
PusH A Intenediate Tuo AnAn
huek, Seslt. al Chenere Single giner
opratns
the mulodor(Ac) Addsoperaion
ovgarizati'on- asden peratnA(cumlator
the Aceu addhus
ToS A-
B deeond
iter mulaker deten
<-AtB)
To
SD TOS ToSA A
Tos4 a ieldl Code
tadone STo RE X ADD
SToRET
LoAD 8C
Load AJenisteu
Ths
(Ro hu that Jiatd
ADD MUL organization Gzyni
Oganizaten- do
ree though
regam Thes dengmat
Anotndtenporaybchoeen
T D for zatioh- thnt
muL.The AetM[B]Ac Ri5)
Act(AT Mtoend al
dit es
peeity
ional
ns.The the MO)t Ac evaluate, data - a
ue memoy assma, r.- Zevo ne aue memtry
MUL PusH au AC Modeoþode tr
mani
Adehess
Addnsheehiona Ad ayt
addes locatim dndiret. foi
ad Aegutv thatthepuaio des dtdus a
To X=(A+)
s PoP on
¬-(c+D) nstuetions
and
ial eque Ae
fid or t
a loe
insuetios, tr c How Adtes pmcusor
Contains f ettm
* th e fy memony (etD) ew,
fuue
(A use
te) ser an bit
nsbuion) opeand.ing digt
howeue) 4the dmliade
the ed (oielRs).
dedt
(iDecole To MUL AADD Thce
euthea thInstutoy y (1) (i) auKna eqister ND
Tytdion modesl MoV MUL AND Mov
ule Feteh Atesng MoV -Atdys
Éreete Te -Addaes
addningr
fesperands
te RIX,
R2
, RI,A,
B
te boyie X,RI RL,R2 Ra,D RI,
nteetag Instuion
The yele memy
A a
Enhous.
oeraon Inshutions
Tntution. R2{-[C] M R4
mode hat mD]
are M[A] and R2-MCc]+
tom is To
a eah
rmeitygthe ehsen
the
dieel eyele
x=(A+B) oY
Memoy ndwted a
-(orptus
Fshueti addres memoy
duvug iuto %the
thre
comute-he *fiald chend (e
on. vauous (C+
add Rrogam
The. mejor addhos M[AJ can eaeh
D)
addressig ipauy odn
Aeldeueion pheyu, Conh symbdigeddenthes
the dte eithe dd
anit mads
iuehon depeudet s bheran do
,
go we a shety
thoy' Sheucd A atProcesar
Memog
Thace -Addes Insthtions lorputus se each adduM Hald to sputy
eth a roesor segiste or a memay cheand
XLA tA) C+ D)
ADD RI, A, B
AND
MUL X, Rl, R2
Prowho
Two- Adheys Tnhactos . eaeh addes ald Cau Speuty ether a
+(C+ D)
Aegiteroa memag rd X= (A+8)
MoV RI, A RI4 MA] MA] Anes dhe peand t Memey e
Mov R2,G R24- M[]
AND Ra,D
MoV X,RI
fs
lt
right
255
DESNGN
rROCESSOR
T E M G
256
polish
the instruction
X instructions
given = = = = =
notation =
AB-CDE*AB-*((CDE*
AB-* AB-* AB-* (A- ORGANIZATION
COMPUTER
TOS E -C
-TOS -DTOS TOS BTOS-A
TOS expression ACACAC M[CJAC
- AC - ACM[TR]
ACAC M[A]AC
¢- R2/M[FJ
R1 R2 R24- R2M[CJ R2
4- R2
M[X]AC
- AC/M[F] M[X] + AC M[X] M[X] R2
4- R2 R1R1
(CDE*-
((CDE*- B)*(((C-
((C- ¢- - - : ¢ 4- 4 4- 4- 4-
-A of :
AC
AC/M[G] AC AC
*E M R1
R2/M R2 R2 MR1[A] M
the stack [D] AC [D]
- F/G/* - * - AC - R1 * - * -
B is F/ DE*)/ D* M[TR] M[X] M[B] R2[G] M[X] M[EJ M[B]
given -)/ computer,
organized
G)F)/ E)
F)/
G) F)/ /
expression. G) G) F)
/
G)
zero-dd
using
Now
expressionthe
must
reverebe
in
Example 5
(b) (a) Solution. Write
Using Using (a) (c) (b) (a)
Using Using Using Using a MUL
program POP XMUL DIV PUSH GDIV PUSH F SUB
MOV R1
X,DIR1,V R2ADD MULR2, KMOVR2, HR1,ADD R2MULR2, C SUBR2, FMULR2, EMOVR2, DRI,SUB BMOVRl, A two DIV ADD MUL ADD MUL SUB MUL SUB three Given
R2 X,R2, R2, R1, R2, R2, R2, R1, a a a a
address address expressiongeneralgeneralgeneralgeneral to
, R1, G, H,R2, R2, R2, D, A, evaluate
G
X= X(A-
R2 R2 K E B register
instruction R2 C Finstruction (A- register registerregister
arithmetic
ORGANIZATION
PROCESSOR
G+
H*
B)+ iscomputer
K computer computer
computer G+
H*
K B) TOS TOS TOS TOS TOS-D
*E
+ M[X]
TOS TOS TOS
: C*(D" C*(D»
M[X] R1
- Rl R2 R2
M[H]R2
4- R1 R2 R3 R2M[D] R2 M[AJR1
4- R1 ¢- M[X] R2 R2 R1 R2 R2 R2 Rl : expression:
4- 4 4 -R2 4- 4- 4- - 4- - 4- 4- (A((C G (C F C-
E- with with with with E-
R1/R2 R2 R2 R1 RI
R2
+ R2 M[B] R1 M R1 R2 R2 M[D] M[A] - D
- [G] M[H] F) zero one two three F) - -
D *
+ * + - * R1/R2 + * - B) D
R2 M[CJ M[F] * - E
M[G] M[K] M[F] M[E] + * R2 addressaddressaddress * * E)/F
R2
M[K] M[E] M[B] address E)/F)/G
(((C
instruction.
instruction.instruction. -D
instruction.
*
E)/F)/G)
257
DESIGN
PROCESSOR
4 Z m M m
258
Now, Converted (d)
POPX DIV ADD MUL PUSH PUSH
K PUSH
H GADD MUL using Using (c)
SUB PUSH FMUL PUSH E
PUSH PUSH
D CSUB PUSH B Using
PUSH A
STORE XDIV LOAD
X TRMUL LOAD
K HADD TRSUB LOAD
zero BSTORE
A TRMUL CSUB FMUL E
into zero LOAD D
one-address
address reverse
address
X
polish
instruction = = instruction
TOS - AB-CDE* instruction,
M[X]TOS TOS TOS TOS TOS TOS TOS
TOS TOS TOS TOS TOS AB-+
CDE*F*
TOS TOS TOS TOS-B TOS-A (A-
AB-+C*(DE*- F) notation
-H GH
K* ACAC
- HK*G+ M[X]AC
- M[TR] ¢--M[HJ COMPUTER
ACACAC ACAC AC ORGANIZATION
ACACAC
-C G+
H*K B) M[TR]AC
-
AG'+
*
K H G A F D : 4- - -
4-AC 4- - 4- 4- - :
- * E D C -B
A F-*+
K - * *D + C*(D» +using
: AC/M AC AC M
H B (D E- E ACACAC M
* [AJ [D]
G+
H*
K B * + - * - *
+ + *E
[X] M[K]
C* K C* F GHK* E-
stack-organized M[TRJ M[B] M[C] M[F] M[EJ
- ABCD*
F-*+
(D*E- (D F) C*(DE*
AB-+F-)
F)
GHK*+
+
* /
E GHK* +
-
F) F)
computer,
the
expression
must
he
3-This totain
heran th Au 9. 5. 3.
Etheetie
Aachs = wtutien.
puwioy
itho Thawsia Rugoter *anfeyaue
ZnpdlednInbiatRsde
Èr', Tastuehien astath TrdtyadRetatne.
AddsMade Audo
The
Inhuetion t NRM
del mo Mode
Cont intie3es MT Cempl
PUsH emnt Addin Cnt
MovA,M
et AC
when b,08 y
4mov To Mede Ando
Regten tu thr H., S<Aeeu The
A,B, atres deguto ADD mulator dtum
A). operands
AM eot
indo B tiald wdh B RI, "aret
LoRAeRI) 3 ae mede
Aeeumator 08H
sþaeities CRIER3) CMA
valat.
sfeeihad
an4
A. a aipbhy
Reyotes proesor 0y0
Ishuehon
-
Addes
epeand sgste, T
Memoy Inshuetions
Tnshuatim.
,
ReguleNo. The
,Eu,
& 7-Tndiet (Ri)Add 5 b
Relat Aikolkae the
Acld Dlreet
lotcodk adt addhes
Addus Adras Auto Addaes
Addaes the
m].
Ac+ Ae
iald
made!. eert un
ieda 200 operqud mole
the
’ - Absplut (
chenad Memoy
tees 2 Regolens or cnshucion. i The
Memoy Auto e
Addus
et The.
Ri ddynig
Boo to decemt
cpenand
plement ield
MemoyGperant que
Addaey
omude
desde Ra
paintes Tnshuetion
549 502
end
mode!. (E4)
Pasny Colins
Addes Addns
farameted he
oeard albletua
Memoy
T N E M
Base-Register
Addressing 272
Indexing
Difference
For Advantages :
type
operand.
register
in e obtain
thindex An In register k-bit While, requires Indisplacement
moved This instruction A
Beside
frequently
used.
also torelative
The register An The specified Some base
other this some addressing base-register references E
access between
index distance e e
base difference instruction address, register references
10). addressing
Relative entire
computers the
mode, in from addressing
Relative Relative
these to indirect
mode. and updation
processors,
register holds computers,
explicitly Theregister other
the register effective to
this used one memory
modes, Indexing between
index the any relative
assumed obtain
is
operand a lies processors, memory mode addressing
base addressing, are
addressing baseholds specify does iscontent one it with
in as a
address. explicitly. a relatively address
two address. the among register special
not t h e is to the
of single a used
addressing
modes
in address an and index
way index N segment
new thiseffective
to isresults
more the beginning
include of programmers exploits ORGANIZATION
COMPUTER
index
Base-register many processor that an areas tobase hold the generally it
is canregister segment-base base
array used and
both registerregister index In relocate near
designates.
content ina
number processor an be ofthis to
address. a
address. locality of
registers address base to
stored to the address address register
to incremented 2* another.
case, th e used
with shorter
relocate address
containimpicity words has program address of
relative
Addressing if of
in are registers, of register a instruction
field, is given
N the In base address
memory. are memory
the used the which
a added be this in and branch-type
: field to todata referenced. neW register
autoincrementprograms the indexan the the is memory the
the
rather index accesscontains case, field
of any instruction array to number
flexibility used memory being
address function the address
the one thein
than number. consecutive in oniy 1s
in address which e.g. added instructions
instruction memory
executed.
memory, of of segment.
part in tsolely
he to
theWhen , field (will instruction.
or the convert available
autodecrement part choose
1s value to
of processor value. implemented of
way asoperands. and programs the the be
while gives the index of of e
address discussed i.e.,
instruction. they this the The the registers a instruction
the if than
indexing register
a are register
register. mode addressindex instruction to most
displacement base and that
If implicity part in
modes computed. there
into an value as regictev data gives Chapter memory
15 A can While index of nf of
Us Dase the the base avs s the
a be is for
a
NUMERICAL
EXAMPLE Addressing
Stack
followsmode,
: the After stored
address
Considera implicitly locations This automaticatly
the ofThe decrementeddecrements
Aut
Aut
oo
immediately
X[K-1],
decr
followed
incremment
ent Or
accessTo
InF g F stack. stack requiisrementmode,
i.e.,
i.e.,AC an InHere, the ContentContentContent
of at
direct immediate
address, instruction is 200 field similar
500. effective two-word operate Usingwhichare mode the a
implied of of andequal after some table
theSo increment
address an
processor PC the this of content
to
so to on addressing of
500mode, or addressand index has address
instruction
(or the
computers
operand 500. themode,
accessed in before) data
mode, is implicit value register of by
executed,the register
register (Here, top or
loaded the part the e
thdecrement COMPUTER
aINSTRUCTIONS
orMode
200 of is its
AC 800 stored the AC 500 second mode the first"LOAD machine another incorporates reference array
XR (for is the "last-in indirectregister
value
effective into operand R1 stored
at is is fetching word stack. of
location AC word not
accumulator 100. 400. is
TO form is after an
elements
i.e., at instructions
first-out" used mode to
applicable. that is
specifies
201). AC" address
address the of each a X[K
(in i.e., impicit to special
500 instruction) stored excent +1]
this 500 to AC the manner. access data sequentialy
can
500)
(EA =
i.e., the is receives
bethe need
201)
(EA = case, is operation at addressing. or
800 taken loaded memory. thataccess. be
location not
address the Items defined,
is include the that
loaded effective as into code so
the operand. 200 are A register that
partof AC and and appended stack
automaticallyBecause
into operand a addressing a
address can mode 201 memory
the the beFor is is reference
a incremented o it
accumulator rather calculated each of(Fig. reserved
tO is
instruction is operation 1s reference, t
201). 7.3 )
increment modes a to
possible e cotuo
than with oP blOCK X[K]
as that 273
DESIGN
PROCESSOR or is
N E M
C
Figure7.3
274
F F
i.e., the In F
effective In loaded Numeriçal
register Therefore, In
content register indirect
into
address Example
indirect
of mnode, effective
the AC
address 100XR
= 400R1
=
AC 200PC
=
in i.e.,
memory for
mode, the
this Addressing
addressmode,
operand
AC 700 case. ORGAN|ZATION
COMPUTER
location the AC 400 AC 300
=the
800 Modes. 800 702 600 500 Address
effective is effective 400 399 202 201 200
at in
and
400 register
is the
address
(i.e., the LoadAC
to
R1 operand instruction
Next
Address500 =
content
700) and is 300 Memory
400)
(EA = 800)
(EA = 325 900 800 700 450
(EA stored
is 400 at
loaded = location
of Not is in
the loaded Mode
applicable) the
into
register memory
800
the into
is
accumulator R1 AC. 300. at
i.e., There address
So,
400.
is 300
500.
Al, So, no is
9fble
Note the
7.3 Following
nine F F F F F
Decrement
that, Auto
Increment
Auto
Addressing
Indexed
AddressingRegister
Indirect
Relative Mode
Register Mode Immediate
ModeIndirectDirect
Mode ModeNurnerical
location
execution The incremented The
Base-register operand the In address Content
instruction In
addressing table instruction the the
mode autodecrement autoincrement
indirect-addressing relative-addressing
=500
Exarnple 7.3 399, located or
field of localied PC
modes lists i.e., the
to mode +
401 and 200 and
specifies instruction. at
the 450.
gives 600 the =702. the
: aftermode INSTRUCTIONS
at COMPUTER
values mode
content
i.e., 200
address
the AC 450 AC 700
the AC 900 AC 325 The
decrement is the and mode,
mode of execution the same
900 mode, operand
the Thus,
is of 201. part
399 400 600 702 400 800 500 201 same
of effective the result loaded the the
index ofthe
address effective atthe
accumulator the of as 702 effectivethe
as into content
content the the register
address indexed instruction.
is
used. reqister
instruction. the address 325.
=399)
(EA 400)
(EA = 600)
(EA = 702)
(EA = address
of
and ACof
accumulatoI i.e., so PC
addressing AC
register indirect
the is EAthe is
iswillAfter is
300 800 500
loaded =500+
450 700 900 325 700 400 operand sum
loaded obtained
be
R1 mode accessing
mode. AC. of 202.
with to 100 with
loaded the So, after
399 except =600.
the address operana
the the
contentsprior adaing
into that Ihus, two-WOru
errecuve
to part 3e.
AC R1 275
the ue
for at 1s O1
e
DESIGN
PROCESSOR