Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Computer Engineering Expert

Question

(1) RUN

Attached file "add_two_numbers.mas" is a MARIE program to do plain addition of two number already stored in memories (Num1, Num2).

Answer is stored at Result and also put in Output window
(the Output Register).

RUN the program and confirm that it works in your downloaded copy of the MARIE Simulator.

(2) MODIFY (Make another program based on that one)

Copy that file and rename copy "Add_Four_if_result_positive.mas".

Change that program in two ways-

(a) Make it add four numbers (Num1, Num2, Num3, Num4) in its place of the two it originally handled.

(b) Include a decision before storing and outputing result. If value of the result is not positive (so zero or negative), set
Result value to the value ZERO (0).

So, program will implement this kind of logic-

Result = Num1 + Num2 + Num3 + Num4;
If (Result < 1) Result = 0;
Output Result;

This will require figuring out how SkipCond instruction works and whether to give it a Hex operand of 000, 400, or 800.

 

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M9132636

Have any Question?


Related Questions in Computer Engineering

Question suppose that in responding to interrupts from an

Question : Suppose that in responding to interrupts from an I/O device the processor consumes 1000 cycles in performing the context switch required to transfer control to the interrupt handler. Servicing the device reque ...

On microsoft word what would be the advantage of using the

On Microsoft word, what would be the advantage of using the dialog box over setting various tabs directly on the ruler line? In what types of typing tasks would you find using the ruler line helpful?

Assignmentnbspon information systems audit and

Assignment  on Information Systems audit and controls Assignment purpose: Elaborate on the different types of control that are applied in a hospital (Preventive, detective and corrective control). Evaluate the logical an ...

Whats your answer about the equilibrium change from an

What's your answer about the equilibrium change from an event which decreases both demand and supply? You don't need to provide graph here. Just describe the curve shifts and how the equilibrium price and equilibrium qua ...

Calculate the energy of one photon of blue light that has a

Calculate the energy of one photon of blue light that has a wavelenght of 425 nm and red light that has a wavelenght of 740 nm. Use E = hv and C = frequency x wavelenght(v). And determine which photon has highest energy.

Create login form to enter user name and a password textbox

Create login form to enter user name and a password textbox to enter password, and write procedure to simulate the process of triggering the login process after hitting the Enter Key.

1 select one of the topics listed below and discuss

1. Select one of the topics listed below and discuss it. Describe an application that you have to solve by using at least 2 Excel functions. It can be Math, Statistics, Engineering, Financial, etc. Explain what Excel fun ...

There is a lot of information about how relevant this type

There is a lot of information about how relevant this type of thick clients is still. What are the advantages/disadvantages of these type of connections?

Consider the following reactionpcl 5 g -----gt pcl 3 g cl2

Consider the following reaction PCl 5 (g) -----> PCl 3 (g) + Cl2 (g) Kc = .0420 The concentrations of the products at equilibrium are [PCl3] = 0.120 M and [Cl2] = 0.160 M. What is the concentration of the reactant, PCl5, ...

C programmingneed help with a c program arrayrearrangec

***C PROGRAMMING*** Need help with a C program array_rearrange.c that rearranges an integer array. The array will be split into two sets of integers one by one. A new array will be created by append the first set to the ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As