GNU Info

Info Node: (python2.1-ref.info)Binary bit-wise operations

(python2.1-ref.info)Binary bit-wise operations


Next: Comparisons Prev: Shifting operations Up: Expressions
Enter node , (file) or (file)node

Binary bit-wise operations
==========================

Each of the three bitwise operations has a different priority level:

     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 yields the bitwise AND of its arguments, which must be
plain or long integers.  The arguments are converted to a common type.

The `^' operator yields the bitwise XOR (exclusive OR) of its
arguments, which must be plain or long integers.  The arguments are
converted to a common type.

The `|' operator yields the bitwise (inclusive) OR of its arguments,
which must be plain or long integers.  The arguments are converted to a
common type.


automatically generated by info2www version 1.2.2.9