go to previous page   go to home page   go to next page hear noise

Answer:

sll   $11,$11,26    # left shift $11 by 26 places

Program So Far

Bit position 5 contains the right-most bit of the six-bit opcode. It must be shifted into position 31, and 31-5 = 26.

Here is a run of the program so far. The source code is seen at the right in the window.

SPIM picture of the Registers

Great! Now we have the correct bit pattern placed in the correct 6-bit field. Only one problem: it's in the wrong register. The instruction is supposed to be in register $25.


QUESTION 18:

Think of an assembly instruction that will put the opcode into register $25. Here is a start:

or   $25,,    # move opcode into target register

go to previous page   go to home page   go to next page