The bitwise operators are as follow:
& Bitwise AND
! Bitwise OR
^ Bitwise exclusive OR (XOR)
~ Bitwise complement
| Syntax: |
N value_1 & N value_2 |
|
| Return Value: |
Y result |
|
| Precedence: | 8 (&), 7(!, ^),9 (~) | |
| Description: |
Use these operators for operating on numbers which are treated as a binary number. Where devices are selected according to the bits of a number, the use of these operators allows one bit to be changed without affecting the other bits You can also use the operators AND, OR, XOR and NOT in place of the symbols above, but AND, OR and NOT, (but not XOR) have a differentprecedences (3, 2, and 4 respectively) |
|
| Example: |
|
|