Nandish added the comment:
I took print(100>>3), I dropped last 3 bits and added value ‘0’ to first 3
bits. Both manual calculation and python result was correct.
How can << shit operator and >> shit operator work differently , with
different logic ?
Thanks
Nandish
On Wed,
New submission from Nandish :
I verified the following on both Python 2.7 and Python 3.8
I did print(100<<3) Converting 100 to Binary gives 1100100. What I did is I
droped the first 3 bits and added 3 bits with the value '0' at the end. So it
should result as 010, and I con