Convert the following assembly language statement into hex representation: lw $T3, 16($S0)
Convert the following hex representation into a MIPS assembly language statement. 016A8022 hex
1) lw $t3, 16($s0) => LW base rt offset => LW $s0 $t3 offset => 100011 10000 01011 0000000000010000 converting 100011 10000 01011 0000000000010000 to hexadecimal Converting 10001110000010110000000000010000 to hexadecimal 1000 => 8 1110 => E 0000 => 0 1011 => B 0000 => 0 0000 => 0 0001 => 1 0000 => 0 So, in hexadecimal 10001110000010110000000000010000 is 0x8E0B0010 Answer: 0x8E0B0010 2) Converting 016A8022 to binary 0 => 0000 1 => 0001 6 => 0110 A => 1010 8 => 1000 0 => 0000 2 => 0010 2 => 0010 So, in binary 016A8022 is 00000001011010101000000000100010 => 000000 01011 01010 10000 00000 100010 => SPECIAL $t3 $t2 $s0 0 SUB => SPECIAL rs rt rd 0 SUB hence the instruction is sub $s0, $t3, $t2 Answer: sub $s0, $t3, $t2
Get Answers For Free
Most questions answered within 1 hours.