Python Bitwise AND

Python Program to illustrate bitwise ANDoperator

Sample Input 1 :

1 4

Sample Output 1 :

0

Try your Solution

Strongly recommended to Solve it on your own, Don't directly go to the solution given below.

#write your code here

Program or 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))

			
				
			

Program Explanation

1 & 1 = 1 0 & anything = 0

Comments