R-types Continued
Shifting instructions also have 3 operands
shamt is used, but rs is unused
(op:funct) rd, rt, shamt
sll 0 0 # shift left
srl 0 2 # shift right
sra 0 3 # arith right
Example: srl $7, $3, 12 # Logical right shift
Previous slide
Next slide
Back to first slide
View graphic version