Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Based on operations illustrated in Section 2, write a program to evaluate the arithmetic expression X = (AXB-C) + (D + E) Make effective use

image text in transcribed

Based on operations illustrated in Section 2, write a program to evaluate the arithmetic expression X = (AXB-C) + (D + E) Make effective use of the registers to minimize the number of MOVE or LD instructions where possible. All operands are initially in memory. The operand order for divide, DIV, is quotient, dividend, divisor. The operand order for subtraction, SUB, is difference, minuend, subtrahend. (a) Assume a register-to-register architecture with three-address instructions. (b) Assume a memory-to-memory architecture with two-address instructions. (C) Assume a single-accumulator computer with one-address instructions. * Operations can only happen between registers. You have to load operands from memory to registers, and the result from register to memory at the end, using MOVE or LD, ST instructions. #Operations can only happen between memory addresses, you don't have any registers. Try to use minimum amount of instructions, registers, memory accesses and temporary memory locations as possible. Based on operations illustrated in Section 2, write a program to evaluate the arithmetic expression X = (AXB-C) + (D + E) Make effective use of the registers to minimize the number of MOVE or LD instructions where possible. All operands are initially in memory. The operand order for divide, DIV, is quotient, dividend, divisor. The operand order for subtraction, SUB, is difference, minuend, subtrahend. (a) Assume a register-to-register architecture with three-address instructions. (b) Assume a memory-to-memory architecture with two-address instructions. (C) Assume a single-accumulator computer with one-address instructions. * Operations can only happen between registers. You have to load operands from memory to registers, and the result from register to memory at the end, using MOVE or LD, ST instructions. #Operations can only happen between memory addresses, you don't have any registers. Try to use minimum amount of instructions, registers, memory accesses and temporary memory locations as possible

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Successful Keyword Searching Initiating Research On Popular Topics Using Electronic Databases

Authors: Randall MacDonald, Susan MacDonald

1st Edition

0313306761, 978-0313306761

More Books

Students also viewed these Databases questions

Question

1. Give extra points for correct and creative answers.

Answered: 1 week ago