Reference programming Example in IL: LD 1 SHL 1 ST Var1 (* Result is 2 *) 7.2.5.2 SHR Bitwise right-shift of an operand: A:= SHR (IN, N)A, IN and N should be of the typeBYTE, WORD or DWORD. IN will be shifted to the right by N bits and filled with zeros on the left. Please note, that the amount of bits, which is regarded for the arithmetic operation, is pretended by the data type of the input variable! If the input variable is a constant the smallest possible data type is regarded. The data type of the output variable has no effect at all on the arithmetic operation. Example in ST: Example In IL: LD 32 SHR 2 ST Var1 (* Result is 8 *) 7.2.5.3 ROL Bitwise rotation of an operand to the left:
A:= ROL (IN, N)A, IN and N should be of the typeBYTE, WORD or DWORD. IN will be shifted one bit position to the left N times while the bit that is furthest to the left will be reinserted from the right. Please note, that the amount of bits, which is regarded for the arithmetic operation, is pretended by the data type of the input variable! If the input variable is a constant the smallest possible data type is regarded. The data type of the output variable has no effect at all on the arithmetic operation. TX1200 202 Version: 1.3