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
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

how to model equations to determine the amount of oil in a reservior

A paper mill produces two grades of paper viz., X and Y. Because of raw material restrictions, it cannot produce more than 400 tons of grade X paper and 300 tons of grade Y paper i

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)?

Find the quadratic that interpolates f(x) = 2x 3 - x + 1 at the nodes x 0 = 0, x 1 = 2, x 2 = 3, a) by solving a set of three equations for the coefficients of p 2 (x) = a 2

#quExample - Electronics application of 3×3 System of Equations Find the electric currents shown by solving the matrix equation (obtained using Kirchhoff''s Law) arising from this

Determine the missing entries in the following divided difference table and use the result to estimate f(1/2).

How do i perform mann''s test for the weibull distribution

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

A high school counselor needs to specify whether the teenage pregnancy rate at her school is disimilar from the rate nationwide. She knows that the rate nationwide is 15 %. She ran