132
After executing LSL once, the lowest bit is filled with 0; the last bit is stored in carry flag.
LSL meaning and operation are the same to SHL.
After executing LSR once, the highest bit is filled with 0; the last bit is stored in carry flag.
LSR and SHR are different, LSR add 0 in the highest bit when moving, SHR all bits are
moved.
< Logic shift left > < Logic shift right >
LSL D0 K4
D.
n
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
SM22
1 SM22
※
※
Highest
bit
Lowest
bit
Move left
Highest
bit
Lowest
bit
After
executing
once
M0
N bits
LSR D0 K4
D.
n
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
SM22
0SM22
※
※
Highest
bit
Lowest
bit
Move right
Highest
bit
Lowest
bit
After
executing
once
M1
N bits
4-7-3.Rotation shift left [ROL], Rotation shift right [ROR]
1. Summary
Cycle shift left or right
Rotation shift left [ROL]
Rotation shift right [ROR]
Shift right or left times