00FF needs the 2 zeros to make sure that this is a SIGNED number, proving that it is positive by using the two zeros.
The cafebabe doesn't have that since it is a negative number. We found that out because of the lack of zeros at the end.
Finally, the point of the long (though im not sure of that one) is to set the idea that there are unseen zeros stretching backwards, thus giving us a positive number.


  1. You don't, it's just to show that leading 0s are ignored as far as I can tell
  2. int is a 32-bit signed integer: if you exceed 2^31, the highest-value bit gets set but is interpreted as a minus. In short, you have an overflow.
  3. If you add "l", the variable is a long which uses 64 bits, so the overflow doesn't happen

Related Query

More Query from same tag