Question: The following MIPS program computes a function of $ 9 and $ 1 0 , and places the result in $ 1 1 . a

The following MIPS program computes a function of $9 and $10, and places the result in $11.
a) Assume that $9 is initially 5, and $10 is initially 12. What value does $11 have after this program is run?
b) Write a mathematical equation that describes this function in terms of $9 and $10.$11=????.
addi $3,$0,3
loop: add $9,$9,$9
addi $3,$3,-1
bne $3,$0, loop
add $11,$9,$10
Assume that an add/addi takes one cycle and a bne takes two cycles. How many cycles does it take to execute the program in problem 1? Don't forget that the program loops several times.
Answer question 2 please
 The following MIPS program computes a function of $9 and $10,

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!