views:

30

answers:

1

I have a question, which is kind of confusing

Write the MIPS instruction whose machine language encoding is:
0000 0011 0001 1001 0100 0000 0010 1010
Your answer must use register names (like $t0) not numbers; and must specify
any immediate as a signed integer in decimal.

The answer, in the back has something to do with slt. Can someone explain, WHAT exactly the question is asking, and what the answer is?

thanks

+2  A: 

Assembly instructions have a representation for the machine as bits, that's the one you are given.

They also have a textual representation to make it easier for humans to read and write them, that's the one you are asked.

You need to understand how to extract the parts of the textual representation from the binary one. With slt you are on the right track, it remains to find the registers or constants used in the instruction. You ought to have some MIPS instruction reference that specifies what the bit pattern of this instruction means.

starblue