Question

1 - Use the MARIE simulator to help you create the code for the following: SUM...

1 - Use the MARIE simulator to help you create the code for the following:

SUM = 0
for X = 1 to 10 do
SUM = SUM + X

Preloading the values will be needed.
For example, you need to preload the value of 0 to a location somewhere so you can set SUM to 0.
What is the value of AC after the program executes?

2- How would you write a MARIE program to multiply 2 numbers (unsigned)?
If one number is much bigger than the other, would that change how you write the program?
(You do not need to write the actual assembly code for this question.
You just need to describe how you would do it)
Hint: 6 x 20 = 20 + 20 + …20 (6 times) = 6 + 6 + 6 + …. +6 (20 times)

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.Use the MARIE simulator to help you create the code for the following:

AC contains 55 at last

sum, DEC 0 -> assigning 0 to sum

2.How would you write a MARIE program to multiply 2 numbers (unsigned)?
If one number is much bigger than the other, would that change how you write the program?
(You do not need to write the actual assembly code for this question.
You just need to describe how you would do it)

Answer:

If one number is much bigger than the other, would that change how you write the program? No, It does'nt change.

Here is the code:

Add a comment
Know the answer?
Add Answer to:
1 - Use the MARIE simulator to help you create the code for the following: SUM...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT