Question: Convert from MIPS to Binary. addi $to, $55, -1 add $s3, $to, Szero start For One: slt $to, $s3, Szero bne $to, $zero, endForone add
Convert from MIPS to Binary.

addi $to, $55, -1 add $s3, $to, Szero start For One: slt $to, $s3, Szero bne $to, $zero, endForone add $sl, Szero, Szero start Fortwo: slt $t0, $sl, $s3 beq $to, Szero, endForTwo sli $t2, $s1, 2 add $t2, $t2, $so lw $t3, 0($t2) addi $t4, $t2, 4 lw $t1, 0($t4) slt $t6, $t1, $t3 beq $t6, $zero, overif add $s2, $t3, Szero sw $t1, 0($t2) SW $s2, 0($t4) overif: addi $sl, $sl, 1 j start ForTwo end For Two: addi $s3, $s3, -1 startForOne end For One: addi $to, $55, -1 add $s3, $to, Szero start For One: slt $to, $s3, Szero bne $to, $zero, endForone add $sl, Szero, Szero start Fortwo: slt $t0, $sl, $s3 beq $to, Szero, endForTwo sli $t2, $s1, 2 add $t2, $t2, $so lw $t3, 0($t2) addi $t4, $t2, 4 lw $t1, 0($t4) slt $t6, $t1, $t3 beq $t6, $zero, overif add $s2, $t3, Szero sw $t1, 0($t2) SW $s2, 0($t4) overif: addi $sl, $sl, 1 j start ForTwo end For Two: addi $s3, $s3, -1 startForOne end For One
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
