|&||AND||Sets each bit to 1 if both bits are 1|
||||OR||Sets each bit to 1 if one of two bits is 1|
|^||XOR||Sets each bit to 1 if only one of two bits is 1|
|~||NOT||Inverts all the bits|
|<<||Zero fill left shift||Shift left by pushing zeros in from the right and let the leftmost bits fall off|
|>>||Signed right shift||Shift right by pushing copies of the leftmost bit in from the left, and let the rightmost bits fall off|
# Bitwise operators a = 10 b = 4 # AND operation print(a & b) # OR operation print(a | b) # NOT operation print(~a) # XOR operation print(a ^ b) # right shift operation print(a >> 2) # left shift operation print(a << 2)
bitwise operators in python,
What are bitwise operators in Python?
What is bitwise operator example?
What are bitwise operators used for?
Which is a bitwise operator?
bitwise operators in python exercises,
bitwise operator in python w3schools,
logical and bitwise operators in python,
bitwise not operator in python,
bitwise xor operator in python,
bitwise operators in python ppt,
bitwise right shift operator in python,
bitwise left and right shift operator in python,