Powers of 2 Reference

PowerDecimalBinaryHexUse
2⁰111
2⁴161000010Hex digit
2⁸2561000000001001 Byte max+1
2¹⁰1,024100000000004001 KB
2¹⁶65,53610000Port range
2²⁰1,048,5761000001 MB
2³²4,294,967,296IPv4 addresses

How Binary Works

Each digit in binary represents a power of 2, reading right to left: 2⁰=1, 2¹=2, 2²=4, 2³=8. The binary number 1011 means: 1×8 + 0×4 + 1×2 + 1×1 = 11 decimal.

To convert decimal to binary: Repeatedly divide by 2 and record the remainders bottom-to-top. 13 ÷ 2 = 6 R1, 6 ÷ 2 = 3 R0, 3 ÷ 2 = 1 R1, 1 ÷ 2 = 0 R1 → 1101.

Hexadecimal and Binary

Each hex digit maps to exactly 4 binary digits: F = 1111, A = 1010, 0 = 0000. This makes conversion trivial. The hex color #FF8000 in binary is 11111111 10000000 00000000 — pure orange in RGB.