Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Bits can be mapped to integers by using the binary number system, where each bit represents a power of two. Starting with the least significant bit (LSB) on the right, each bit represents a power of 2 that increases by a factor of 2 as you move left. For example, in a 4-bit binary number, the first bit represents 2^0, the second bit represents 2^1, the third bit represents 2^2, and the fourth bit represents 2^3. So a binary number such as 0101 would represent the integer (1 x 2^0) + (0 x 2^1) + (1 x 2^2) + (0 x 2^3) = 5. Therefore, each distinct combination of bits maps to a unique integer.