Page 1 of 1

In this task you are required to write a MIPS program to compute the sum(+), difference (-), product(*), quotient (/) an

Posted: Sat Feb 19, 2022 3:21 pm
by answerhappygod
In This Task You Are Required To Write A Mips Program To Compute The Sum Difference Product Quotient An 1
In This Task You Are Required To Write A Mips Program To Compute The Sum Difference Product Quotient An 1 (69.52 KiB) Viewed 43 times
In this task you are required to write a MIPS program to compute the sum(+), difference (-), product(*), quotient (/) and remainder (%) of two integers A and B. The data A, B will be input from the keyboard and the results will be displayed on the screen. In addition, these five results will be stored back in the memory with the variables named "resultl", "result2”, “result3", "result4” and “results” respectively. Sample Input and Output Name: Eddie Yung ID: 12345678 What is the value of A? 10 What is the value of B? 3 A+B = 13 A-B = 7 A B = 30 A/B: Quotient = 3 A/B: Remainder = 1 (1) The value of A and B should be stored in $t0 and $t1 respectively. (2) The sum, difference, product, quotient and remainder should be stored in the variables “resultl”, “result2", "result3", "result4” and “results” respectively. (3) Save the file as lab3.asm (4) Assemble the program by clicking Run → Assemble (5) Run the program by clicking Run → Go Remarks: Please check different values of A and B (e.g. 10, 3; 60, 2; 70, 55, etc.)