Understanding Number Bases
What Is a Number Base?
A number base (or radix) is the number of unique digits used to represent numbers. Base-10 (decimal) uses digits 0-9. Base-2 (binary) uses 0-1. Base-16 (hexadecimal) uses 0-9 and A-F.
Common Number Bases
Binary (base-2) is fundamental in computing. Octal (base-8) is used in Unix file permissions. Decimal (base-10) is the everyday system. Hexadecimal (base-16) is used for memory addresses, colors, and data encoding.
How Conversion Works
To convert from any base to decimal, multiply each digit by its positional weight (base^position) and sum. To convert from decimal to any base, repeatedly divide by the target base and collect remainders.
Positional Notation
In base-b, the number dₙdₙ₋₁...d₁d₀ equals dₙ×bⁿ + dₙ₋₁×bⁿ⁻¹ + ... + d₁×b + d₀. For example, 1A hex = 1×16 + 10 = 26 decimal.
Applications
Binary is the language of computers. Hex simplifies binary representation (4 binary digits = 1 hex digit). Base-64 encodes binary data as text. Base-36 provides compact alphanumeric identifiers.