|
|
|
|
|
|
|
|
|
|
|
|
|
Bit shift operations:
logical |
|
|
|
|
000000 |
00000 |
01001 |
01010 |
00011 |
000010 |
|
R-type |
|
|
b31-26 |
b25-21 |
b20-16 |
b15-11 |
b10-6 |
b5-0 |
|
|
opcode |
$rs |
$rt |
$rd |
shamt |
function |
|
|
|
logical shift: 0's
shifted in |
|
|
|
# bits |
|
|
right |
|
|
|
|
|
|
|
|
srl $rd, $rt, shift_amt |
# R[d] <-- R[t]
>> shift_amt |
const |
|
|
srlv $rd, $rt, $rs |
|
# R[d] <-- R[t]
>> R[s] |
|
var |
|
|
|
|
|
|
|
|
|
|
1110 |
0000 |
0000 |
0000 |
0000 |
0000 |
0000 |
|
|
|
|
|
|
|
|
|
|
|
|
|
0111 |
0000 |
0000 |
0000 |
0000 |
0000 |
0000 |
0010 |
|
|
|
|
|
|
|
|
bits of $rt are shifted
to the right by the number of bits given in shift_amt |
|
|
or by value in register
$rs |
|
|
0's are shifted into most
significant bit |
|
|
if shift_amt, $rs is unused |
|
|
|
|
|
What is the instruction
above? |
|
|
|
|
|
|
|
|
|
|
|
|
|
|