Bitwise Operations : Bitwise Operators : Operator PYTHON TUTORIALS


PYTHON TUTORIALS » Operator » Bitwise Operators »

 

Bitwise Operations


x = 1                0001
print x << 2         # Shift left bits: 0100
print x | 2          # bitwise OR: 0011
print x & 1          # bitwise AND: 0001



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Operator
» Bitwise Operators