ROL

ROL 1:

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.

ROL 2:

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:

ROL 3:

Example in IL:

Var1 :BYTE;

LD 2#1001_0011

ROL 3

ST Var1 (* Result is 2#1001_1100 *)