Question: Write a program to evaluate the arithmetic expression [X=(A+B-C) times(D-E)] Make effective use of the registers to minimize the number of MOVE or LD instructions

Write a program to evaluate the arithmetic expression

\[X=(A+B-C) \times(D-E)\]

Make effective use of the registers to minimize the number of MOVE or LD instructions where possible.

(a) Assume a register-to-register architecture with three-address instructions. The operand order for subtraction, SUB, is difference, minuend, subtrahend.

(b) Assume a memory-to-memory architecture with two-address instructions.

(c) Assume a single-accumulator computer with one-address instructions.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Logic And Computer Design Fundamentals Questions!