Answer to Question #40634 in Programming & Computer Science for thj

Question #40634
Evaluate the expression: a=(b +c)* d – e in 3 and 0-Address Machines.
1
Expert's answer
2014-05-23T13:41:21-0400
Evaluate the expression: a = (b+ c) * d – e
Solution:


3-Address Machines
add R1 b c
mul R1 R1 d
sub a R1 e
return
DEF






Let`s show DEF:
a def byte(4)
b def byte(4)
c def byte(4)
d def byte(4)
e def byte(4)












0-Address Machines
push e
push d
push c
push b
add
mul
sub
pop a
return
DEF

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS