Program 25:- Write a program to shift input data by 2 bits forwards the right.
Answers
Answered by
3
N = int(input('Enter Number: '))
S = int(input('Enter Number of Bits to be shift Right: '))
print(N, ' >> ',S,' = ', N >> S)
*Output*
Enter Number: 8
Enter Number of Bits to be shift Right: 2
8 >> 2 = 2
Similar questions