Problem 3 Write Code Implement Expression X B C D E F G H K 0 Address Machine 20 Points Q37073092

Problem #3 Write code to implement the expression X = λ-B + C * (D * E-F)/(G + H * K) on a 0-address machine. (20 points)Problem #3 Write code to implement the expression X = λ-B + C * (D * E-F)/(G + H * K) on a 0-address machine. (20 points) Show transcribed image text Problem #3 Write code to implement the expression X = λ-B + C * (D * E-F)/(G + H * K) on a 0-address machine. (20 points)


Solution


X=A-B+C*(D*E-F)/(G+H*K)

The postfix expression of the A-B+C*(D*E-F)/(G+H*K) is
AB-CDE*F-*GHK*+/+

TOS is the top of stack
M[X]

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.