Perform arithmetic computation, Engineering Mathematics

a.) Give a short sequence of machine instructions for the task "Add the contents of memory location A to those of memory location B, and place the answer in location C". You have available the following instructions:

Load Ri, LOC

Store Ri, LOC

which are the only instructions to transfer data between the memory and the general purpose registers. After operands have been loaded from memory into processor registers, arithmetic computation can be performed, using the instructions:

ADD Ri, Rj, Rk

SUB Ri, Rj, Rk

where i, j, k need not be distinct. Do not change the content of either location A or B.

b.) Suppose now that you have Move and Add instructions available with the formats:

Move LOC1, LOC2

ADD LOC1, LOC2

These instructions move or add a copy of the operand at the second location to the first location, overwriting the original operand at the first location. Either or both of the operands can be in the memory or the general purpose registers. Is it possible to use fewer instructions of these types to accomplish the task of part (a)? If yes, give the sequence.

Posted Date: 3/18/2013 6:01:50 AM | Location : United States







Related Discussions:- Perform arithmetic computation, Assignment Help, Ask Question on Perform arithmetic computation, Get Answer, Expert's Help, Perform arithmetic computation Discussions

Write discussion on Perform arithmetic computation
Your posts are moderated
Related Questions
#how do you estimate the sum a limit using intrgral test


application of mathematics in engineering

Ah Fong borrow RM10 000. The yearly simple interest rate is 10.5%, payable monthly, and the monthly payment is RM200. How much of the 1st payment goes to interest and how much to p

i have a wav file which consists of a number of hammer impact noises. i want to break up each impact into and individual wav file. i want to ignore the first 40ms of the impact and

A Pew Research poll was conducted to investigate opinions about global warming.  The respondents who answered yes when asked if there is solid evidence that the earth is getting wa

This is a pen and paper exercise, you are expected to provide a detailed derivation. Follow the procedure outlined in the lectures for construction of a simple averaging by thr


a restrained steel bar is heated from 20 degrees to 194 degrees and not permitted to expand. the bar is 10mm diameter, determine the thermal stress in the bar

Use Lagrange interpolation to estimate f(3), given that f(1) = 1, f(4) = -3, f(2) = 0 and f(-1) = 3.