Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Implement the following using MIPs instructions. Do not use any pseudoinstructio

ID: 3875668 • Letter: I

Question

Implement the following using MIPs instructions. Do not use any pseudoinstructions for this problem. Branch to a label "stage2" if $tO is greater than or equal to $t1. 3. 4. Implement the following using MIPs instructions. Do not use any pseudoinstructions for this problem. If $s1 is less than $s2, set $t5 to 4, otherwise set $t5 to 5 Implement the following using MIPs instructions. Do not use any pseudoinstructions for this problem. While $t4 is less than 7, increment t4 by 1 (set $t4 to 0 before the loop starts) 5.

Explanation / Answer

3. bge $t0,$t1,stage2

bge stads for branch if greater than or equal to.

4. bgt $s1,$s2,else #branch to else in case $s1>$s2

addi $t5,$zero, 4 #set t5 to 4

j endif

else: addi $t5,$zero, 5 .  #set t5 to 5

endif:

5. addi $t4,$zero, 0 .  #set t4 to 0

loop: addi $t4,$t4,1 #increment t4 by 1

blt $t4,7,loop # branch to loop if $t4<7