In: Computer Science
6. What is the MIPS machine language binary code for these three instructions?
lw $t0, 1200($t1) #Temporary reg $t0 gets A[300]
add $t0, $s2, $t0 #Temporary reg $t0 gets h+A[300]
sw $t0, 1200($t1) #Stores h+A[300]$t0 back into A[300]
Please find the answer below.
Please do comments in case of any issue. Also, don't forget to rate
the question. Thank You So Much.
LW $t0 0x04B0 $t1
Instruction format is as below
Hence
Binary: 10001101001010000000010010110000
Hex: 0x8d2804b0
2)
ADD $t0 $s2 $t0
Binary: 00000010010010000100000000100000
Hex: 0x02484020
3)
SW $t0 0x04B0 $t1
Binary: 10101101001010000000010010110000
Hex: 0xad2804b0