Question

textbook solution does not appear correct. Write a MARIE program using a loop that multiplies two...

textbook solution does not appear correct. Write a MARIE program using a loop that multiplies two positive numbers by using repeated addition. For example, to multiply 3 × 6, the program would add 3 six times, or 3 + 3 + 3 + 3 + 3 + 3.

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

Write a MARIE code using a loop that multiplies two positive numbers by using repeated addition:

MARIE code:

ORG Load Store Loop, LoadSum Acde Store Load 200 Counter Counter Const1 Counter Store SkipCond 400 Jump Loopl END1 LoadSum Ou

Description:

ORG Load Store Loop1, Load Add Store Load Subt Store /ORIGIN of the program. Lets assume that program starts at address 200

Add a comment
Know the answer?
Add Answer to:
textbook solution does not appear correct. Write a MARIE program using a loop that multiplies two...
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
  • 1. Rewrite this program (program #1 from last Labwork Assignment) to conform with the calling/callee standards...

    1. Rewrite this program (program #1 from last Labwork Assignment) to conform with the calling/callee standards as presented in call. Write a calling program that invokes your program that conforms to the standards as well Write a MIPS program using a loop that multiplies two positive numbers by using repeated addition. For example, to multiply 3 x 6, the program would add 3 six times, or 3+3+3+3+3+3.

  • 2. Write a Marie program that accepts two positive (inputs) two integers and outputs the sum...

    2. Write a Marie program that accepts two positive (inputs) two integers and outputs the sum of both of the integers and all the numbers in between Write a Marie program that determines the largest of a series of positive integers provided by a user. The user will enter a -1 when she is finished. Up to 10 numbers will be provided by the user. Write a Marie program that accepts two positive integers, multiples them by repeated addition, and...

  • 1. Write a MARIE program that can implement a sum of two products, i.e. using MARIE...

    1. Write a MARIE program that can implement a sum of two products, i.e. using MARIE program to calculate 13*35 + 27*18 (* means multiply) and store the result to a variable Sum. Hint: e.g. following code can be used to initialize the variables A, B, C and D, in which A is 13, B is 35, C is 27 and D is 18 A,       DEC   13    /one of the four input numbers: 13 B,       DEC   35...

  • Can someone carefully explain and answer questions 1, 2, 3, 4 and 5 in detail, please!!! Multiplication can be thought...

    Can someone carefully explain and answer questions 1, 2, 3, 4 and 5 in detail, please!!! Multiplication can be thought of as repeated addition. Three times four is 4 added to itself 3 times. 1) Create an assembly program that multiplies two 8 bit integers (2's complement) together in your PIC, using the repeated summation technique 2) Add a feature to your program that detects if the answer is too big to hold in 8 bit 2's complement notation 3)...

  • Can someone carefully explain and answer questions 1, 2, 3, 4 and 5 in detail, please!!!...

    Can someone carefully explain and answer questions 1, 2, 3, 4 and 5 in detail, please!!! Multiplication can be thought of as repeated addition. Three times four is 4 added to itself 3 times. 1) Create an assembly program that multiplies two 8 bit integers (2's complement) together in your PIC, using the repeated summation technique 2) Add a feature to your program that detects if the answer is too big to hold in 8 bit 2's complement notation 3)...

  • C++ program by using while loop structure. Write an interactive program (C++) to prompt and read...

    C++ program by using while loop structure. Write an interactive program (C++) to prompt and read two float type numbers, Then your program should perform and print the following arithmetic: (use while loop structure to repeat program 2 times. 1) Sum 2)Difference 3) Product 4) Quotient 5) Modulus (use system defined fmod function) You must use system's defined function prototype and/or to create programmer's defined function prototype for each of the above calculation. In addition, create a function called "DISPLAYLINE...

  • Write a program in python that lets a child practice their arithmetic skills. The program should...

    Write a program in python that lets a child practice their arithmetic skills. The program should first ask for what kind of practice is desired: addition(1), subtraction(2), or multiplication (3). Two random numbers will be generated (0 - 9), and the child will have to either add, subtract or multiply them. If the child answers the question correctly, congratulate them, and ask them if they want to play the game again. If the child answers that they DO want to...

  • Write a program to compute the product of two positive integers by repeated addition. Note: You...

    Write a program to compute the product of two positive integers by repeated addition. Note: You are not allowed to use either multiplication or division operator. Understanding the Meaning of Multiplication: Multiplication of whole numbers can be thought of as repeated addition. // not allowed to use multiplication or division operator For example, suppose that a parking lot has 6 rows of parking spaces with 8 spaces in each row. How many parking spaces are in the lot? rows To...

  • Write a MARIE assembly program to read two different positive numbers from the keyboard and output...

    Write a MARIE assembly program to read two different positive numbers from the keyboard and output the smaller number to the screen.

  • 1) Implement a C program that multiplies two matrices with dimension n x m and m...

    1) Implement a C program that multiplies two matrices with dimension n x m and m x r (n, m, r are provided by the user as argument to the main function. The elements of the matrix are generated randomly. Test the program. example: matmult 2 3 4 will multiply two matrices of dimensions 2 x 3 and 3 x 4, the elements are generated randomly. 2) Determine the highest dimension(s) for which the program will crash 3) Please Explain...

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
ADVERTISEMENT