Python Bitwise AND

Description

Python Program to illustrate bitwise ANDoperator
Sample Input:
1 
4
Sample Output:
0

Solution

num1=int(input("Enter your First Number:"))
num2=int(input("Enter your Second Number:"))
num=num1&num2
print("After Bit Wise And: {}".format(num))

Explanation

1 & 1 = 1
0 & anything = 0