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

Calculate the sequence from aitken’s method, Values from the iteration x = ...

Values from the iteration x = cos(x) are: x 0 = 0.8, x 1 = 0.696707, x 2 = 0.766959, x 3 = 0.720024, x 4 = 0.751790, x 5 = 0.730468. a) Calculate the sequence {y n } fr

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

Galerkin Mrthod, Solve differential equation of Y" = 0 using the Galerkin m...

Solve differential equation of Y" = 0 using the Galerkin method and considering 0 = x= 3 given that: h = 0cm when x = 0m and h = 10cm when x = 3m.

Six years time, A young couple requires RM30000 for an overseas trip which ...

A young couple requires RM30000 for an overseas trip which they want to make in six years time. How much they have to invest now at 18% p.a. compound interest compounded monthly, t

All.., Ask question #Minimum 100thank you words accepted#

Ask question #Minimum 100thank you words accepted#

Draw parallel lines with slope, Draw parallel lines with slope +1.05; one p...

Draw parallel lines with slope +1.05; one passes through (0,a), and the other passes through (0,b). Suppose φ is a harmonic function between the two lines, with φ = 0 on the line t

Electrical, The P.D. at the feeder end of a two wire d.c. distributor is 6...

The P.D. at the feeder end of a two wire d.c. distributor is 600 volts. Two loads are connected to the distributor at distances of 600 feet and 1000 feet from the feeder end and t

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

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