What is the difference between 100 and 0100 in binary?

Apr 30, 2018 at 2:22pm
I convert 4=100 in binary but converter converts 4=0100. In shifting, 4>>2=1. So, coverter is right, 4=0100. Because 100>>2=000 but 0100>>2=0001. Where am I doing wrong? Why 4 don't equal to 100?
Apr 30, 2018 at 2:32pm
100>>2=000

If you shift the bit pattern 100 two steps to the right you end up with 001.
Apr 30, 2018 at 3:36pm
Thanks a lot!
Apr 30, 2018 at 3:39pm
Just to be explicit, there is no difference between 100 and 0100 in binary.

Just like there's no difference between 100 and 0100 in decimal.
Topic archived. No new replies allowed.