Question: onsider the following MIPS loop with $s 2 and $t 1 initialized to 0 and 1 0 , respectively. LOOP: slt $t 2 , $

onsider the following MIPS loop with $s2 and $t1 initialized to 0 and 10, respectively.
LOOP: slt $t2, $0, $t1
beq $t2, $0, DONE
subi $t1, $t1,1
addi $s2, $s2,2
j LOOP
DONE:
Which of the following options are correct? Select all that apply.
The value of $s2 after the given codes execution would be 20.
The number of MIPS instructions executed after the code has finished is 50.
If $t1 was initialized to N, the number of instructions executed would have been 5N.
If $t1 was initialized to N, the number of instructions executed would have been 5N+2.
Status: [object Object]
1 point

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 Programming Questions!