Rotate right the following bit pattern by two bit positions:

    11001100

### A good answer might be:

    00110011

# Rotate Instructions

The rotate instructions are both pseudoinstructions. Each one takes four basic instructions to implement. The shift amount is given in a register or as an immediate operand. the third operand of the instruction.

    rol d,s,t    # d <-- s rotated left by t
                 # (pseudoinstruction)

    ror d,s,t    # d <-- s  rotated right by t
                 # (pseudoinstruction)

Negative immediate operands are not allowed. However, if the third operand is a register it may contain a negative integer. In that case the rotation is the opposite direction.

### QUESTION 15:

Inspect the following:

    li  $t2,-2
    li  $t1,4
    ror $t0,$t1,$t2

What does $t0 hold after the sequence has executed?