PHP » PYTHON |
login |
register |
about
|
PYTHON Bitwise Operators
is this article helpful?
|
Python replacement for PHP's Bitwise Operators
[
edit
| history
]
a & b #And a | b #Or a ^ b #Xor ~ a #Not a << b #Shift left a >> b #Shift right Bitwise OperatorsBitwise operators allow you to turn specific bits within an integer on or off. If both the left- and right-hand parameters are strings, the bitwise operator will operate on the characters' ASCII values.
<?php
Warning
Don't right shift for more than 32 bits on 32 bits systems. Don't left shift in case it results to number longer than 32 bits. |
more
Recently updated
more
Most requested
more
Last requests
|