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 *)