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.:- M9717888

Have any Question?


Related Questions in Computer Engineering

Refer to the figure on the previous page now assumed host a

Refer to the figure on the previous page. Now assumed Host A has a file that has been broken down into 2001 packets, of size 20Kb each. How long would it take to transmit the file if each link has a capacity of 10Mbs, pr ...

Scenario 1 19500 ascii characters are transmitted over a 3

Scenario 1: 19,500 ASCII characters are transmitted over a 3 Mbps circuit. The protocol uses 8-bits to encode each ASCII character, and adds an additional parity bit to help detect errors. Calculate the transmission effi ...

Question suppose users share a 1 280 kbps link also suppose

Question : Suppose users share a 1, 280 kbps link. Also suppose each user requires 64 kbps when transmitting, but each user transmits only 10% of the time. (See the discussion of statistical multiplexing in Section 1.3.) ...

Systems analysis projectpersonal trainer inc owns and

Systems analysis project Personal Trainer, Inc. owns and operates fitness centers in a dozen Midwestern cities. The centers have done well, and the company is planning an international expansion by opening a new "superce ...

One state lottery has 1100 prizes of 1 145 prizes of 10 20

One state lottery has 1,100 prizes of $1; 145 prizes of $10; 20 prizes of $75; 5 prizes of $285; 2 prizes of $1,080; and 1 prize of $2,300. Assume that 24,000 lottery tickets are issued and sold for $1. 1)  What is the l ...

Assignmentthe smurfware smurfscanner is a new biometric

Assignment The SmurfWare SmurfScanner is a new biometric authentication device to keep non-Smurfs out of the Smurfland network. The biometric device is being dubbed the SmurfScanner by Papa Smurf. The SmurfScanner is a h ...

Why is formative evaluation importantprovide at least three

Why is formative evaluation important? Provide at least three reasons for using it. What is the difference between formative and summative evaluation? Provide any two types formative evaluation and two types of summative ...

What are the three most significant aspects of threat which

What are the three most significant aspects of threat which will continue to evolve for the next 20 years?

Kelly and jennifer are roommates kelly loves listening to

Kelly and Jennifer are roommates. Kelly loves listening to rock music and uses the radio in their common area to play it. Jennifer, on the other hand, prefers the peace and quiet around the common area. Answer the follow ...

Research the web for an example of a startup using a cloud

Research the Web for an example of a startup using a cloud infrastructure. What were the main reasons for choosing a cloud infrastructure? What alternatives did the startup have? Answer should be at least 1 page long dou ...

  • 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