Question: Write a program using MIPS (MARS Simulator) assembly language to divide an unsigned integer x, by another unsigned integer y, and produce a quotient and

Write a program using MIPS (MARS Simulator) assembly language to divide an unsigned integer x, by another unsigned integer y, and produce a quotient and a remainder.

Use repeated subtraction to carry out the division. The algorithm is trivial, and does not need much explaination. If x = 25 and y = 9 then you can subtract 9 at most twice from 25 (quotient will be 2) and the remainder after the subtraction will be 7.

The user should be able to enter a number between 0 and 255 after the prompts "Enter x" and "Enter y" are displayed on the screen. The results will be displayed on the screen as "Quotient=" and Remainder="

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!