Bitwise Operators |
|
Bitwise operators used in the Logic Template are operators that operate on the operands as collections of bits.
Six types of bitwise operators are supported:
Operator |
Description |
"~" |
The unary negation operator NOT returns the operand with all bits inverted. |
"<<" |
The binary operator LEFT SHIFT returns the 1st operand with the individual bits shifted, not rotated, to the left by the amount in the 2nd operand. Bits shifted off are lost. Bits shifted in from the right are 0. |
">>" |
The binary operator RIGHT SHIFT returns the 1st operand with the individual bits shifted, not rotated, to the right by the amount in the 2nd operand. Bits shifted off are lost. Bits shifted in from the left are 0. |
"&" |
The binary operator RESTRICTIVE AND returns for each pair of corresponding bits in the 1st and 2nd operand, a 1 if both bits are 1 and a 0 otherwise. |
"|" |
The binary operator INCLUSIVE OR returns for each pair of corresponding bits in the 1st and 2nd operand, a 1 if either bits is 1 and a 0 otherwise. |
"^" |
The binary operator EXCLUSIVE OR returns for each pair of corresponding bits in the 1st and 2nd operand, a 0 if the two bits are identical and a 1 otherwise. |