Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program in assembly(mips) code to read three numbers. Each number is between 0 and 9. Then, Divide the first two, then multiply the

Write a program in assembly(mips) code to read three numbers. Each number is between 0 and 9. Then, Divide the first two, then multiply the result by the third number. So if the input is:

4 2 2

The program should do this:

4 / 2 = 2

2 * 2 = 4

It should ONLY display the final result, which is 4, I do not need to see anything else other than the final value. So if I test it with input like:

9 2 3

it should display 12

Another example, if the input is:

9 1 3

the program should display 27

*** Input is always 3 numbers

*** Each input number is 2 bytes long. A space followed by a number. The number is between 0 and 9

*** NO DIVISION BY 0. SO THE SECOND NUMBER CAN NOT BE 0 DO NOT WORRY ABOUT THIS CASE (since we did not take if statement yet)

*** Note that 4 is 2 bytes, because it's space 4, and 2 is two bytes, because it's space 2 and 3 is space followed by 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

13th Edition Global Edition

1292263350, 978-1292263359

More Books

Students also viewed these Databases questions

Question

4. What decision would you make and why?

Answered: 1 week ago

Question

3. Review the evidence. Do you believe the testimony presented?

Answered: 1 week ago

Question

1. What are the marketing implications of this situation?

Answered: 1 week ago