#sample solution
shift_right = 0b1100
shift_left = 0b1
# Your code here!
shift_right = shift_right >> 2
shift_left = shift_left << 2
print bin(shift_right) #3
print bin(shift_left) #4
#check
print int(bin(shift_right), 2)
print int(bin(shift_left), 2)
No comments:
Post a Comment