#Bitwise OPerators

#Not Operator ~
a = -1
print(~a)

# ~n -> -|n + 1|
# ~-n -> |n - 1|

#Bitwise XOR (^)
print(bin(60))
print(bin(30))
print(bin(60 ^ 30))

#Bitwise AND (&)
print(bin(60 & 30))

#Bitwise OR (|)
print(bin(60 | 30))

#Bitwise Shift operators
#Left shift of n is equivalent of multiplying the number by 2**n
print(2 << 2)

#Right shift is equivalent of dividing the number by 2**n
print(8 >> 2)