Perform arithmetic computation, Engineering Mathematics

Assignment Help:

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.


Related Discussions:- Perform arithmetic computation

Matlab, i have a wav file which consists of a number of hammer impact noise...

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

Draw concentric circles, Draw concentric circles of radii a and b, each cen...

Draw concentric circles of radii a and b, each centered at z=id (on the imaginary axis). Suppose φ(x,y) is a harmonic function inside the washer defined by these circles. The circl

Harmonic function, Let z 0 = a + ic, z 1 = b + id, z 2 = -id, and z =...

Let z 0 = a + ic, z 1 = b + id, z 2 = -id, and z = [z 0 + z 1 ]. Let z 0 be the apex of the wedge with one ray passing through z 1 and the other passing through z 2 , and

Calculate the cost of manufacturing, A manager has determined the cost C, i...

A manager has determined the cost C, in dollars, for manufacturing is C(q) =85log 10 (10+q/2) for manufacturing, where q is the number of units produced in a given day. (a

Trigonometric functions, definition of trigonometric function #Minimum 100...

definition of trigonometric function #Minimum 100 words accepted#

Numerical integration, There are many situations which call for the replace...

There are many situations which call for the replacement of an integral by a sum, or vice versa. In the former case the highest accuracy is sometimes required. This means that in t

Investigate the output of advertising agencies, In an article in Marketing...

In an article in Marketing Science , Silk and Berndt investigate the output of advertising agencies. They describe ad agency output by finding the shares of dollar billing volume

Geometric construction of numerical integration, The integral has a...

The integral has an exact answer, viz., sinc(pfT). As T®¥ the sinc function tends to zero. Divide the region from -T/2 to T/2 into N equal parts and sum the rectangles on b

Vector, for what values of (a,b) does the point P (0,a,b) lie on the line t...

for what values of (a,b) does the point P (0,a,b) lie on the line through Q (1,-1,4) and R (2,3,5)?

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd