ZeroDigitsCompress
DRAFT

Incorrect

In integer numbers, decimal digits with value `0` take less storage than decimal digits with other values

Correct

Correction
Here is what's right.

Numbers are stored in binary two’s complement representation. An int uses 32 bits of storage, and, when using two’s complement notation, these 32 bits can represent numbers between -2^31 (-2147483648) … +2^31-1 (2147483647).

The numbers are not represented in BCD (binary-coded-decimal) representation, where each decimal digit would take up exactly 4 binary bits.

The numbers also are not encoded in some compressed form (e.g., that digits of value 0 would take less space than digits of other values.

Language

Java

Concepts

Stay up-to-date

Follow us on  twitter to hear about new misconceptions.