(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/shifting.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/expressions.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/comparisons.html| ]]
|
Python Reference Manual
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/contents.html| ]]
|
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/genindex.html| ]]
|
Previous: 5.7 Shifting operations Up: 5. Expressions Next: 5.9 Comparisons
5.8 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.
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/shifting.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/expressions.html| ]]
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/comparisons.html| ]]
|
Python Reference Manual
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/contents.html| ]]
|
|
[[yurttas/PL/SL/python/docs/core-python-programming/doc/20/ref/genindex.html| ]]
|
Previous: 5.7 Shifting operations Up: 5. Expressions Next: 5.9 Comparisons
See About this document... for information on suggesting changes.