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
Produce a discrete time series y(t i ) by super positioning 5 cosinusoidal components, for your own choice of the amplitudes (a j ) and frequencies (f j ). Add some Gaus

I. The inventory of  records of BeBop Distributing reflected the following for October 2012: Date                      Transaction                              Units

integral dx/root of sinx using beta and gamma functions

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

Two boys A and B are at two diametrically opposite points on a circle. At one instant the two start running on the circle; A anticlockwise with constant speed v and B clockwise wit

a wire of 3mm diameter and 5 m long has a load of 100g suddenly applied to its ends. calculate stress and extension produced. also show that these are twice the static values

Prove that the Lagrangian coef?cient polynomials for p n (x) satisfy ∑ n k=0 l k (x) = 1. Hint: It is only a 3-line proof. Consider the interpolating polynomial for a constan

prove that A=3i+j-2k, B=-i+3j+4k ,C=4i-2j-6k and find the length of the triangle

P=(Fv- ? Av3) (1-e-µ?) P is Power v is velocity of the belt ? is the density of the belt material ? = 1200 kg/m3 A is the cross sectional a

Question Assume the earth is a sphere with a radius of 6,371,000.000 meters. Three points are defined by their latitude and longitude. Point Latitude (N) Longitude (W) A