566 B
566 B
Binary Bitwise Operations
Each of the three binary bitwise operations has a different level of precedence:
and_expr ::= shift_expr | and_expr "&" shift_expr
xor_expr ::= and_expr | xor_expr "^" and_expr
or_expr ::= xor_expr | or_expr "|" xor_expr
-
The
&operator produces the bitwise AND of its arguments, which must be integers. -
The
^operator produces the bitwise XOR (exclusive OR) of its arguments, which must be integers. -
The
|operator produces the bitwise OR (inclusive OR) of its arguments, which must be integers.