Specifications
SIMATIC Instructions
9-119
S7-200 Programmable Controller System Manual
C79000-G7076-C233-01
Rotate Right Byte, Rotate Left Byte
The Rotate Right Byte and Rotate Left Byte
instructions rotate the input byte value (IN) right or left by
the shift count (N), and load the result in the output byte
(OUT).
If the shift count (N) is greater than or equal to 8, a
modulo-8 operation is performed on the shift count (N)
before the rotation is executed. This results in a shift
count of 0 to 7. If the shift count is 0, a rotate is not
performed. If the rotate is performed, the value of the last
bit rotated is copied to the overflow bit (SM1.1).
If the shift count is not an integer multiple of 8, the last bit
rotated out is copied to the overflow memory bit (SM1.1).
The zero memory bit (SM1.0) is set when the value to be
rotated is zero.
Rotate right byte and rotate left byte operations are
unsigned.
Error conditions that set ENO = 0: SM4.3 (run-time),
0006 (indirect address)
These instructions affect the following Special Memory
bits: SM1.0 (zero); SM1.1 (overflow)
Inputs/Outputs Operands Data Types
IN VB, IB, QB, MB, SMB, SB, LB, AC, *VD, *AC, *LD BYTE
N VB, IB, QB, MB, SMB, SB, LB, AC, Constant, *VD, *AC, *LD BYTE
OUT VB, IB, QB, MB, SMB, SB, LB, AC, *VD, *AC, *LD BYTE
L
A
D
S
T
L
OUT
ROR_B
EN
IN
N
OUT
OUT
ROL_B
EN
IN
N
OUT
RRB OUT, N
RLB OUT, N
F
B
D
ENO
ENO
222 224
333
221