Shift Operators


Source Code

number  =int(input("Enter Number : "))
print("Shift Operator Example ")
print("Right Shift ",number,">>1"," Result = ",number>>1)
print("Left Shift ",number,"<<1"," Result = ",number<<1)
To download raw file Click Here

Output

Enter Number : 5
Shift Operator Example
Right Shift  5 >>1  Result =  2
Left Shift  5 <<1  Result =  10