Lesson 4 of 8 · Number Theory
Units Digits & Base Representation
Two applications of the same underlying idea: a number's digits depend entirely on remainders. The units digit is just the number mod 10, and a base-b representation is nothing but repeated division with remainder. Both turn questions about impossibly large numbers into small, quick computations.
Mark your status for this lesson:
Learning objectives
- Find the units digit of a large power using its short repeating cycle.
- Handle sums and products of large powers by tracking each term's units digit separately.
- Convert fluently between base 10 and any other base, including hexadecimal.
- Solve for an unknown base, and verify the result is valid given the digits used.
The core idea
The units digit of a number is exactly that number mod 10 — so every units-digit question is a modular arithmetic question in disguise. Powers of any fixed base have units digits that cycle with a short period (1, 2, or 4), so finding a huge power's last digit means reducing the exponent mod the cycle length, never computing the power itself.
Base representation is the same idea generalized: writing n in base b means expressing n as a sum of powers of b, where each digit is a remainder from repeated division. Every digit must be strictly less than the base — that constraint is what makes "solve for the base" problems solvable.
Units-digit cycles
Only the base's own units digit matters. The cycles: 0,1,5,6 stay fixed (period 1); 4 and 9 alternate (period 2); 2, 3, 7, 8 have period 4. So reducing the exponent mod 4 always suffices.
Base-b representation
(dₖdₖ₋₁⋯d₁d₀)_b = dₖbᵏ + dₖ₋₁bᵏ⁻¹ + ⋯ + d₁b + d₀
Every digit dᵢ satisfies 0 ≤ dᵢ < b. To convert from base 10, divide repeatedly by b and read the remainders bottom-up.
Power towers
For a tower like a^(b^c), reduce the exponent b^c mod the cycle length of a's units digits (usually 4) — never attempt to evaluate the tower itself.
Worked example 1 — Units digit of a large power
Problem
Find the units digit of 8²⁰²⁵.
Key insight
The units digits of powers of 8 cycle with period 4: 8, 4, 2, 6.
Solution
2025 mod 4 = 1, which matches the first entry in the cycle. Units digit: 8.
Takeaway
When the reduced exponent is 0, use the last entry in the cycle, not the first — that's the most common slip here.
Worked example 2 — Converting to another base
Problem
Write 87 in base 4.
Key insight
Divide repeatedly by 4 and read the remainders from bottom to top.
Solution
87 = 21(4) + 3, 21 = 5(4) + 1, 5 = 1(4) + 1, 1 = 0(4) + 1. Reading remainders upward: 1113₄.
Takeaway
Verify by converting back: 1(64) + 1(16) + 1(4) + 3 = 87. Always worth the five seconds.
Worked example 3 — Units digit of a sum
Problem
Find the units digit of 3¹⁰⁰ + 2¹⁰⁰.
Key insight
Find each term's units digit independently, then add and take the units digit of the result.
Solution
Powers of 3 cycle 3,9,7,1 and 100 mod 4 = 0, so 3¹⁰⁰ ends in 1. Powers of 2 cycle 2,4,8,6, so 2¹⁰⁰ ends in 6. 1 + 6 = 7 — units digit 7.
Takeaway
Never add the full numbers. Units digits combine independently under addition and multiplication.
Worked example 4 — Solving for an unknown base
Problem
In some base b, 52_b = 32 in base 10. Find b.
Key insight
Expand the base-b expression algebraically, then solve the resulting equation.
Solution
5b + 2 = 32 → 5b = 30 → b = 6. Check validity: the digits used are 5 and 2, both less than 6, so base 6 is legitimate.
Takeaway
Always confirm the base exceeds every digit used — a solved value that's too small is not a valid answer.
Strategy notes
Only the base's units digit matters
The units digit of 13⁴⁷ is identical to that of 3⁴⁷ — everything above the ones place is irrelevant. Strip the base down to its last digit before doing anything else.
Reducing the exponent mod 4 always suffices for units digits
Every units-digit cycle has length 1, 2, or 4 — all of which divide 4 — so reducing the exponent mod 4 works universally, even when the actual cycle is shorter.
Common mistakes
Using the first cycle entry when the reduced exponent is 0
If exponent mod 4 = 0, the answer is the fourth (last) entry in the cycle, not the first — because the cycle is indexed from exponent 1, not 0.
Using a digit greater than or equal to the base
In base b, every digit must be strictly less than b. A "solution" like base 4 for the number 57₄ is impossible — 5 and 7 are not valid base-4 digits.
Reading conversion remainders in the wrong order
When converting by repeated division, the first remainder is the last (rightmost) digit. Reading them top-down instead of bottom-up reverses the whole number.
Practice
20 questions across four difficulty tiers, each with a single numeric
answer. For base-conversion questions, enter the digit string as a number
(e.g. 100 for 100 in base 5). Up to three tries per question
before the solution is shown.