BitwiseOperators - Python Wiki - 0 views
-
x << yReturns x with the bits shifted to the left by y places (and new bits on the right-hand-side are zeros). This is the same as multiplying x by 2**y.
-
x >> yReturns x with the bits shifted to the right by y places. This is the same as //'ing x by 2**y.
-
x & yDoes a "bitwise and". Each bit of the output is 1 if the corresponding bit of x AND of y is 1, otherwise it's 0.
- ...5 more annotations...