I am finding difficulty performing a bitwise & operation between the
If you are trying to perform the bitwise AND operation (using the
& operator) on two integers, there is no need to convert them to strings of their binary representations.
Take this example:
x = 4 # 0b100 y = 5 # 0b101 print(x & y) # => 4, which is 0b100, because 0b100 & 0b101 = 0b100