Question: Consider the following MIPS assembly code segment for implementing a loop: Loop: lw $t1, 12($s1); bne $s2, $t1, Done; addi $s1, $s1, 4; j
Consider the following MIPS assembly code segment for implementing a loop: Loop: lw $t1, 12($s1); bne $s2, $t1, Done; addi $s1, $s1, 4; j Loop; sll $t1, $s1, 3; Done: (a) Write the MIPS machine code in hex number for the 1st instruction (lw...). //use: opcode=35, $s1(17), $t1(9) (b) Write the MIPS machine code in hex number for the 2nd instruction (bne...). //use: opcode=5, $t1(9), $s2(18) (c) Write the MIPS machine code in hex number for the 5th instruction (sll...). //use: opcode=0, function_code=0
Step by Step Solution
3.22 Rating (149 Votes )
There are 3 Steps involved in it
The MIPS machine code in hex number for the first instruction is 0x8c090008 Explanation 0x8c is the ... View full answer
Get step-by-step solutions from verified subject matter experts
