1. What positional notation is
A way of writing numbers in which a digit's contribution to the value depends on where it sits in the string. Each position is worth a power of a fixed integer $b \geq 2$ called the base (or radix) of the system.
The number we write as $2738$ in base 10 doesn't mean "two, seven, three, eight" as a list. It means
$$ 2738 = 2 \cdot 10^3 + 7 \cdot 10^2 + 3 \cdot 10^1 + 8 \cdot 10^0. $$The same digit 7 in the second position from the right is worth $700$; if you slid it one place to the left it would be worth $7000$. Every position is ten times bigger than the one to its right, because the base is ten.
That's the whole idea. The numeral is a compact way of writing a sum, and the position of each digit tells you which power of the base to multiply by. Without positional notation you'd be stuck with something like Roman numerals, where MCMXCIV is just a string of symbols that have to be parsed contextually and that cannot be multiplied or divided on paper without enormous pain.
When the base isn't obvious from context, we write it as a subscript: $1011_2$ means "the numeral $1011$ in base 2", which is decimal $11$. We'll use that convention throughout. A bare numeral with no subscript is understood as base 10.
2. Why base 10 is arbitrary
There's nothing mathematically special about ten. We use it because we have ten fingers. Cultures with a different counting habit produced different bases — the Babylonians used base 60 (which is why an hour has 60 minutes and a circle has 360 degrees), the Maya used base 20, and some Papua New Guinea languages use base 27 by counting body parts.
Any integer $b \geq 2$ works just as well as a base. Base 10 has no closed-form advantage over base 7 or base 12, and it actually loses to base 12 if you care about clean fractions (twelve is divisible by 2, 3, 4, and 6, while ten is only divisible by 2 and 5). The mathematical content of "the number twenty-three" is the same regardless of how you write it; only the spelling changes.
The number is what's real. The numeral is how we write it.
Once you internalize that distinction, switching bases stops feeling exotic and starts feeling like translation — and that's exactly what it is.
3. Binary (base 2)
Binary uses only two digits, $0$ and $1$, called bits. Place values are powers of $2$:
$$ \ldots,\ 2^4 = 16,\ 2^3 = 8,\ 2^2 = 4,\ 2^1 = 2,\ 2^0 = 1. $$So $1011_2$ is
$$ 1 \cdot 8 + 0 \cdot 4 + 1 \cdot 2 + 1 \cdot 1 = 11. $$Binary is the native language of digital computers because the two digits map cleanly onto two physical states: voltage high or low, switch on or off, capacitor charged or discharged. Building reliable electronics that distinguishes between ten different voltage levels is far harder than building electronics that distinguishes between two; binary trades verbosity (numbers get long) for physical robustness.
Read off the value: $16 + 0 + 4 + 2 + 1 = 23$. The opening claim of this page checks out — twenty-three is $10111$ in binary.
4. Hexadecimal (base 16)
Hex uses sixteen digits. The familiar $0\text{–}9$ aren't enough, so the letters $\text{A}, \text{B}, \text{C}, \text{D}, \text{E}, \text{F}$ stand for $10, 11, 12, 13, 14, 15$. Place values are powers of $16$.
| Hex | Decimal | Binary |
|---|---|---|
| $0$ | $0$ | $0000$ |
| $7$ | $7$ | $0111$ |
| $9$ | $9$ | $1001$ |
| $\text{A}$ | $10$ | $1010$ |
| $\text{C}$ | $12$ | $1100$ |
| $\text{F}$ | $15$ | $1111$ |
The reason hex shows up everywhere computers do — memory addresses, color codes, file dumps — is the bridge between binary and hex. Because $16 = 2^4$, every group of four binary digits corresponds to exactly one hex digit. Conversion between binary and hex is mechanical: chunk the binary into 4-bit blocks from the right and rewrite each block as a single hex digit.
$$ \underbrace{1010}_{\text{A}}\,\underbrace{1111}_{\text{F}}\,\underbrace{0011}_{3} = \text{AF3}_{16} $$That collapses a 12-character binary string into 3 hex characters — same information, one quarter the width. For a human reading a hexdump of memory, that's the difference between legible and unreadable.
The general rule: whenever the new base is $b^k$ for some integer $k$, conversion to or from base $b$ is just grouping. Octal $(8 = 2^3)$ groups by 3 bits. Hex $(16 = 2^4)$ groups by 4 bits. Base 32 would group by 5 bits. Anything not of that form (decimal among them) requires real arithmetic to convert.
5. Octal (base 8)
Octal uses the eight digits $0\text{–}7$. Place values are powers of $8$. Since $8 = 2^3$, each octal digit corresponds to exactly three binary digits — the same grouping trick as hex, just with smaller chunks.
$$ \underbrace{101}_{5}\,\underbrace{110}_{6}\,\underbrace{011}_{3} = 563_8 $$Octal was popular in the early computing era, when machines often had word sizes that were multiples of three bits (PDP-8: 12 bits; PDP-11: 16 bits, sometimes grouped in 3s). It's now mostly a historical footnote outside of a few niches — most famously, Unix file permissions like chmod 755, where each octal digit packs three permission bits (read, write, execute).
6. The general base-$b$ system
Pick any integer $b \geq 2$ and you have a base. The digits are the integers $0, 1, 2, \ldots, b-1$ — exactly $b$ of them. A numeral $d_n d_{n-1} \ldots d_1 d_0$ written in base $b$ represents the integer
$$ \sum_{i=0}^{n} d_i \cdot b^i = d_n b^n + d_{n-1} b^{n-1} + \cdots + d_1 b + d_0. $$Three things are doing all the work in that formula:
- Each digit $d_i$ must be in the range $0 \leq d_i < b$. A "digit" $b$ or higher doesn't exist — it gets folded into a carry into the next position.
- The position $i$ counts from the right starting at $0$, so the rightmost digit always contributes $d_0 \cdot 1$.
- The base $b$ controls how quickly place values grow. Larger $b$ means shorter numerals but more digit symbols to memorize.
That's the whole framework. Binary, octal, decimal, hex — and every base you've never heard of — are the same machine with $b$ swapped in.
In any base $b$, the numeral $10$ means the number $b$. So $10_2 = 2$, $10_8 = 8$, $10_{16} = 16$. "Ten" is what we call $10_{10}$ in English, but the spelling $10$ is just "one of the base, plus zero ones" — and which number that is depends on the base.
7. Converting decimal to base $b$
The procedure is repeated division by $b$, reading the remainders bottom-up.
- Divide the decimal number by $b$. Write down the quotient and the remainder.
- Replace the number with the quotient. Divide by $b$ again. Write down the new quotient and remainder.
- Repeat until the quotient is $0$.
- Read the remainders from bottom to top. That string is the base-$b$ numeral.
Convert $23$ to binary:
$$ \begin{aligned} 23 \div 2 &= 11 \text{ remainder } 1 \\ 11 \div 2 &= 5 \text{ remainder } 1 \\ 5 \div 2 &= 2 \text{ remainder } 1 \\ 2 \div 2 &= 1 \text{ remainder } 0 \\ 1 \div 2 &= 0 \text{ remainder } 1 \end{aligned} $$Reading bottom-up: $10111_2$. (Cross-check against §3.)
The reason it works: the first remainder is $23 \bmod 2$, which is the units digit $d_0$. The next quotient $11$ has thrown away that ones-place contribution and shifted everything down by a factor of 2, so its remainder is $d_1$. Each round peels off the next digit.
8. Converting base $b$ to decimal
Easier direction. Just evaluate the place-value sum from §6 directly: multiply each digit by its power of $b$ and add. For $10111_2$:
$$ 1 \cdot 16 + 0 \cdot 8 + 1 \cdot 4 + 1 \cdot 2 + 1 \cdot 1 = 23. $$For longer numerals there's a faster method called Horner's scheme: read the digits left to right, and after each one, multiply the running total by $b$ and add the next digit.
$$ \begin{aligned} 10111_2:\quad &\text{start } 0 \\ &0 \cdot 2 + 1 = 1 \\ &1 \cdot 2 + 0 = 2 \\ &2 \cdot 2 + 1 = 5 \\ &5 \cdot 2 + 1 = 11 \\ &11 \cdot 2 + 1 = 23 \end{aligned} $$Same answer with no exponentiation — just one multiplication and one addition per digit. It's the algorithm calculators and parsers actually use.
9. Arithmetic in non-decimal bases
Addition, subtraction, multiplication, and long division all work in any base. The rules are the same as in decimal — you only change when you carry. In base $b$, you carry to the next column whenever a column sum reaches $b$ (not $10$).
Binary addition
The single-bit addition table is tiny:
$$ 0 + 0 = 0,\quad 0 + 1 = 1,\quad 1 + 0 = 1,\quad 1 + 1 = 10_2\ \text{(write 0, carry 1)}. $$Add $1011_2 + 110_2$ column by column, right to left:
$$ \begin{array}{cccccc} & & 1 & 0 & 1 & 1 \\ + & & 0 & 1 & 1 & 0 \\ \hline & 1 & 0 & 0 & 0 & 1 \\ \end{array} $$Walk through it: $1+0 = 1$. $1+1 = 10_2$, write $0$ carry $1$. $0+1+1 \text{ (carry)} = 10_2$, write $0$ carry $1$. $1+0+1 \text{ (carry)} = 10_2$, write $0$ carry $1$. The final carry becomes a new leading digit. Result: $10001_2 = 17$. Sanity check: $1011_2 = 11$, $110_2 = 6$, and indeed $11 + 6 = 17$.
Multiplication
Long multiplication also transfers directly. The single-digit times tables shrink dramatically in binary (just $0\times 0 = 0$, $1 \times 1 = 1$, etc.), making binary multiplication a sequence of shift-and-add operations — which is exactly what hardware multipliers do internally.
Place-value arithmetic isn't tied to base 10. The algorithms you learned in school — "carry the one", borrow from the next column — encode the abstract structure of positional notation. The only base-specific fact is the carry threshold. Once you change it from $10$ to $b$, every algorithm continues to work unchanged.
10. Bases and fractions
Positional notation extends to the right of the "decimal point" — better called the radix point, since there's nothing especially decimal about it. Positions to the right represent negative powers of the base:
$$ 0.d_1 d_2 d_3 \ldots_{(b)} = d_1 b^{-1} + d_2 b^{-2} + d_3 b^{-3} + \cdots $$So $0.101_2 = \tfrac{1}{2} + 0 + \tfrac{1}{8} = 0.625$. And $0.\text{C}_{16} = 12 \cdot 16^{-1} = 0.75$.
Here's a fact that surprises everyone the first time they meet it: whether a fraction terminates depends on the base. The fraction $\tfrac{1}{3}$ doesn't terminate in base 10 — you get $0.3333\ldots$ forever — but in base 3 it's just $0.1_3$, finite and exact. Conversely, $\tfrac{1}{10}$ is the tidy $0.1$ in decimal but turns into the infinite repeating $0.0\overline{0011}_2$ in binary.
The rule: a fraction $\tfrac{p}{q}$ (in lowest terms) terminates in base $b$ if and only if every prime factor of $q$ also divides $b$. In base 10, $q$'s only allowed prime factors are $2$ and $5$. In base 2, only $2$ — so any denominator other than a power of two will repeat.
Computers store floating-point numbers in binary. The decimal $0.1$ has no exact binary representation — it's a repeating binary fraction that gets truncated to fit in 64 bits. The tiny rounding error means $0.1 + 0.2$ comes out as $0.30000000000000004$, not $0.3$. The bug isn't in the hardware; it's in our expectation that base-10-friendly fractions should be base-2-friendly too.
11. Common pitfalls
In any base $b$, the numeral $10$ is the number $b$ itself, not ten. $10_2 = 2$, $10_5 = 5$, $10_{16} = 16$. The temptation to read "10" as "ten" no matter what base you're in is the single most common source of confusion.
In $1011_2$, the leftmost $1$ is the digit one, but it contributes the value $8$. Beginners often write "the value of the leftmost bit is 1" — true as a digit, false as a contribution. Always say "digit times place value".
Without the base annotated, $101$ is ambiguous: $101_{10} = 101$, $101_2 = 5$, $101_{16} = 257$. When you're working across bases, always mark the base — and double-check that any number someone else writes carries one too.
If you're doing binary addition and you "carry the 1" only when a column hits $10$, you're using decimal carry rules in a binary computation. In base $b$ you carry as soon as a column reaches $b$. The recipe is the same; the trigger is not.
12. Worked examples
Try each one before opening the solution.
Example 1 · Convert $1101_2$ to decimal
Lay out the place values:
$$ 1101_2 = 1 \cdot 2^3 + 1 \cdot 2^2 + 0 \cdot 2^1 + 1 \cdot 2^0. $$Evaluate:
$$ = 8 + 4 + 0 + 1 = 13. $$So $1101_2 = 13_{10}$.
Example 2 · Convert $47_{10}$ to binary
Repeated division by $2$:
$$ \begin{aligned} 47 \div 2 &= 23 \text{ remainder } 1 \\ 23 \div 2 &= 11 \text{ remainder } 1 \\ 11 \div 2 &= 5 \text{ remainder } 1 \\ 5 \div 2 &= 2 \text{ remainder } 1 \\ 2 \div 2 &= 1 \text{ remainder } 0 \\ 1 \div 2 &= 0 \text{ remainder } 1 \end{aligned} $$Reading bottom-up: $47_{10} = 101111_2$.
Check. $32 + 0 + 8 + 4 + 2 + 1 = 47$ ✓
Example 3 · Add $1011_2 + 110_2$ in binary
Line up by rightmost bit and add column by column, carrying whenever a column sum reaches $2$:
$$ \begin{array}{cccccc} & & 1 & 0 & 1 & 1 \\ + & & 0 & 1 & 1 & 0 \\ \hline & 1 & 0 & 0 & 0 & 1 \\ \end{array} $$Result: $10001_2$.
Check in decimal. $1011_2 = 11$ and $110_2 = 6$, so the sum should be $17$. And $10001_2 = 16 + 1 = 17$ ✓
Example 4 · Convert $\text{FF}_{16}$ to decimal
The digit $\text{F}$ stands for $15$. Place values are $16^1 = 16$ and $16^0 = 1$:
$$ \text{FF}_{16} = 15 \cdot 16 + 15 \cdot 1 = 240 + 15 = 255. $$So $\text{FF}_{16} = 255_{10}$. (This is the largest value an 8-bit unsigned integer can hold — which is why hex colour codes like #FFFFFF for white use exactly two hex digits per channel.)
Example 5 · Convert $1101\,1010_2$ to hex by chunking
Group the bits into chunks of four, from the right:
$$ \underbrace{1101}_{?}\ \underbrace{1010}_{?} $$$1101_2 = 8 + 4 + 1 = 13 = \text{D}_{16}$, and $1010_2 = 8 + 2 = 10 = \text{A}_{16}$. So:
$$ 1101\,1010_2 = \text{DA}_{16}. $$Sanity-check in decimal: $1101\,1010_2 = 128 + 64 + 16 + 8 + 2 = 218$, and $\text{DA}_{16} = 13 \cdot 16 + 10 = 208 + 10 = 218$ ✓