Mikroone - Online Help
SHL R[x], R[y] - Bit - Shift left
Operating Mode
R[x] := R[y] after rotating one position left, with 0 at the end
PC := PC + 1
Description
Rotates all Bits of R[y] one position to the left and fills up with 0 at the end.
Saves result to register R[x].
Status Register
Carry - Bit := first Bit of R[y] before shifting
Zero - Bit := 1 if last 15Bit of R[y] are 0
Binary Command
15 14 13 12 11 |
10 9 8 |
7 6 |
5 4 3 |
2 1 0 |
00100 |
Adr(x) |
-- |
Adr(y) |
--- |
Example
SHL R[3], R[6]
15 14 13 12 11 |
10 9 8 |
7 6 |
5 4 3 |
2 1 0 |
00100 |
011 |
-- |
110 |
--- |
.Note
Arithmetic and Logical Commands always affect the Status Bits Carry and Zero.