Instructions
Library
akYtec GmbH · Vahrenwalder Str. 269 A · 30179 Hannover · Germany · Tel.: +49 (0) 511 16 59 672-0 · www.akytec.de
50
6.1.4.2 Shift register right (SHR)
Fig. 6.28
The function SHR operates with INT variables. It is used to shift all bits of the operand X
to the right by the N number of bits; vacated bits are zero-filled. The result is set to the
output Q.
Example: right shift of the number 152 (decimal) = 10011000 (binary) by 2 bits
Fig. 6.29
6.1.5 Bit operators
The bit operator treats a value as a series of bits to perform operations on one or more
individual bits of an operand.
6.1.5.1 Read single bit (EXTRACT)
Fig. 6.30
The output value Q (BOOL) of the function EXTRACT is the value of bit N (INT) in the op-
erand X (INT). The bit numbering is zero-based.
Example: reading of the 5th bit from the number 81 (decimal) = 1010001 (binary):
Fig. 6.31
6.1.5.2 Set single bit (PUTBIT)
Fig. 6.32
This output value Q (INT) is the value of the operand X (INT) where the bit N (INT) is set
to the value at the input B (BOOL). The bit numbering is zero-based.










