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

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

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

Calculus, Ask questioA mass on a spring vibrates. Its position at time t fr...

Ask questioA mass on a spring vibrates. Its position at time t from its starting point is x(t) = 2 cos(t) e t Find the velocity and acceleration at time t. What is the behavior of

Weighted aggregate , The data of the table below give details of the compon...

The data of the table below give details of the components, prices and standard quantities used in making a kind of chemical. Measure  the composite index with 2007 as base year us

Modeling, As an engineering student, the ministry of energy and minerals ha...

As an engineering student, the ministry of energy and minerals has tasked you to help them model equation(s) that can estimate the amount of crude oil in a reservoir. The governmen

Conclusion of the argument, State each of the following arguments in abstra...

State each of the following arguments in abstract form. Recognize the premises and the conclusion of the argument. Then test whether the argument is valid or invalid. Describe how

Monthly payment, Ah Fong borrow RM10 000. The yearly simple interest rate i...

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

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