I am a bit confused, what is the difference between 0x0002
and 0x02
. I am trying to understand the FAT boot sector, and I am stuck as I don't understand why these two values are interpreted differently. When I paste both values in a hex to decimal converter it returns 2 in both cases, rightly so.
Why are these values interpreted differently by the operating system, and what is the effect of leading zeros on hexadecimal numbers.
I just discovered that the values in the FAT are stored in little endian, thus 0x0002
is reverted to 0x0200
which is 512
in base 10. 02
is just 2 in base 10.