#!/usr/bin/python

#Title: Assignment1---Question11
#Author:Merin
#Version:1
#DateTime:02/12/2018 3:20pm
#Summary:Read 2 numbers to variable a and b and perform all bitwise operations on that numbers.

a=40
b=3
#Binary AND
res=a&b
print "Binary AND of",a,"&",b,"=",res

#Binary OR
res=a|b
print "Binary OR of ",a,"&",b,"=",res

#Binary XOR
res=a^b
print "Binary XOR ",a,"&",b,"=",res

#Binary Ones Complement
res=~a
print "Binary Ones Complement of ",a,"=",res

#Binary Left Shift
res=a<<2
print "Binary Left Shift ",a,"by 2=",res

#Binary Right Shift
res=a>>2
print "Binary Right Shift ",a,"by 2=",res




