How Number Base Conversion Works
A number base (or radix) determines how many unique digits are used to represent numbers. The decimal system uses 10 digits (0-9), binary uses 2 (0-1), and hexadecimal uses 16 (0-9, A-F).
Converting to Decimal
Each digit is multiplied by the base raised to its position power. For example, binary 1011 = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11 in decimal.
Converting from Decimal
Repeatedly divide by the target base and collect remainders. Read the remainders from bottom to top to get the result. For example, 11 ÷ 2 gives remainders 1,1,0,1 → 1011 in binary.
Common Number Systems
- Binary (Base 2) - Used in computers; only 0s and 1s
- Octal (Base 8) - Used in Unix file permissions
- Decimal (Base 10) - Standard human counting system
- Hexadecimal (Base 16) - Used in programming, colors (e.g., #FF5733)
- Duodecimal (Base 12) - Historical system, highly divisible