Beruflich Dokumente
Kultur Dokumente
Modes
Guided By :Prof. M P Patel
Presented By :1) Harshit Bhayani – 170010107002
2) Vishal Patel – 170010107040
3) Vraj Patel – 170010107041
:
A D D R1 , A , B R1 M[ A ] + M [ B]
A D D R2 , C, D R2 M[ C] + M [ D ]
MU L X , R1 , R2 M[ X ] R1 * R 2
T he adv anta ge of thr ee - addr ess for ma t is tha t it resu lts in shor t
p r o grams w h en ev aluating a r ith me tic e x p r es sions .
T he disadva ntage is th at th e b inar y- cod ed ins truc tions requ ire too
man y b its to s p ecify th r e e a d d re sse s .
An examp le of a commer cial co mputer that uses three- address
in s truc tion is th e Cyb er 1 7 0.
:
Two address instructions are the most common in
commercial computers. Here again each address field
can specify either a processor register or a memory
word. The program to evaluate X = (A + B) * (C + D)
is as follows:
MOV R1, A R1 M[A]
ADD R1, B R1 R1 + M[B]
MOV R2, C R2 M[C]
ADD R2, D R2 R2 + M[D]
MUL R1, R2 R1 R1 * R2
MOV X, R1 M[X] R1