I'm currently learning MIPS and I'm confused about how to turn assembly language into binary. I understand that the basic format is:
opcode(6 bit) rs(5 bit) rd(5 bit) rd(5 bit) shamt(5 bit) funct(6 bit)
The problem is:
sw $t1, 32($t2)
So far, I know:
$t1 = 01001, $t2 = 01010, opcode for sw = 101011, 32 in binary = 100000
The first thing I'm confused about is shamt, or the shift. I learned that it is a 5-bit value, but 32 in binary is represented by 6 bits.
The second thing I'm confused about is the ordering. This is what I have so far, but I don't think it's right because it's not a 32-bit string:
000000 01010 01001 100000 101011
Can someone explain what the correct binary string is for that assembly language instruction?