Today: Base Conversion
A 60-minute lesson that turns AIMO Q1 / Q2 into free marks, every year.
📌 What you will learn today
How this lesson is structured
We will not start with formulas. We will start with a picture — counting coins of strange denominations. Once you see why base notation works, the algebra writes itself.
- Phase 1 (Steps 2–4): Visual intuition. Coins, place-value charts, number lines.
- Phase 2 (Steps 5–7): Derive the formula three different ways with three different examples.
- Phase 3 (Steps 8–11): Four worked Olympiad examples, fully explained.
- Phase 4 (Step 12): Five practice problems with hints and full solutions.
- Phase 5 (Steps 13–20): Eight real AIMO past papers in exam format with progressive hints.
- Step 21: Mock test (3 problems, auto-graded).
- Step 22: Cheat sheet + self-assessment.
The coin picture
Forget formulas. Start with money.
Imagine you live in a country where the only coins available have values 1¢, 5¢, and 25¢. (No 2¢, no 10¢, no banknotes — just these three.)
You owe a shopkeeper 14 cents. What coins do you give?
Two 5¢ coins and four 1¢ coins make 14¢. We didn't need a 25¢ coin.
The compact way to write this transaction
Instead of saying "two fives and four ones", a shorthand is to write a two-digit number:
— the small 5 at the bottom is the base.
The leftmost digit (2) counts how many fives.
The rightmost digit (4) counts how many ones.
Total value: 2·5 + 4·1 = 14.
Place value — the same idea, drawn as a chart
Same coin idea, different picture. Place-value chart for base 5.
A place-value chart is a row of boxes. Each box has a fixed value (a power of the base). The digit you put in the box says how many of that value you have.
Base-5 chart for the number 14
Read across: 0 twenty-fives, 2 fives, 4 ones. (24)5 = 14.
Now try 30 cents in base 5
30 cents — what's the largest coin we can use? A 25¢ coin. After paying 25, we owe 5 more — exactly one 5¢ coin. No 1¢ needed.
1 twenty-five + 1 five + 0 ones = 30. So 30 = (110)5.
One more — try 73
How many 25s fit in 73? Two (50), with 23 left over. How many 5s in 23? Four (20), leaving 3. Three 1s.
Check: 2·25 + 4·5 + 3 = 50 + 20 + 3 = 73 ✓. 73 = (243)5.
Other bases work the same way
Try base 4, base 7, base 2 — same picture, different bundle sizes.
Base 4 — bundles of four
In base 4, the column values are 1, 4, 16, 64, … (powers of 4). The digits allowed are 0, 1, 2, 3 (must be less than the base).
(132)4 = 1·16 + 3·4 + 2·1 = 16 + 12 + 2 = 30.
Base 7 — bundles of seven
Column values 1, 7, 49, 343, … Digits 0–6 only.
(253)7 = 2·49 + 5·7 + 3 = 98 + 35 + 3 = 136.
Base 2 (binary) — bundles of two
Column values 1, 2, 4, 8, 16, … Digits 0 or 1 only.
(1011)2 = 1·8 + 0·4 + 1·2 + 1·1 = 11.
The "max digit" rule
- Base 2: digits are 0, 1
- Base 5: digits are 0, 1, 2, 3, 4
- Base 7: digits are 0, 1, 2, 3, 4, 5, 6
- Base 10: digits are 0, 1, 2, …, 9
(35)5 is illegal — there is no digit "5" in base 5.
This rule is a frequent source of AIMO marks.
Derivation — first pass with concrete numbers
Take the picture you just saw and write it out in algebra. Slowly.
We want a general way to convert (d2d1d0)b to base 10.
Worked through one example: convert (243)5 to base 10
From Step 3 we already know the answer is 73. Let's see how to write it as algebra.
Step 1. Identify the digits and the base.
- The leftmost digit is 2 — call this d2.
- The middle digit is 4 — call this d1.
- The rightmost digit is 3 — call this d0.
- The base is 5.
Step 2. Each digit is multiplied by a power of the base, depending on its position.
- d0 (rightmost) goes with 50 = 1.
- d1 (next) goes with 51 = 5.
- d2 (next) goes with 52 = 25.
Step 3. Add them up.
That's it. The picture said the same thing the algebra now says. The "place" of a digit decides its weight.
Derivation — second pass with a different example
Same algebra, fresh numbers. Notice what changes and what stays the same.
Convert (1011)2 to base 10
This time the base is 2 (binary) and there are 4 digits. Same procedure, more digits.
Step 1. Identify digits and base.
- d3 = 1 (leftmost), d2 = 0, d1 = 1, d0 = 1.
- Base b = 2.
Step 2. Match each digit to its power.
- d0 with 20 = 1.
- d1 with 21 = 2.
- d2 with 22 = 4.
- d3 with 23 = 8.
Step 3. Add.
What is identical between Pass 1 and Pass 2?
- Right-to-left, multiply each digit by an increasing power of the base.
- The structure dn·bn + … + d0·b0.
What is different?
- The base (5 vs 2).
- The number of digits (3 vs 4).
Whenever something stays the same across examples, it deserves to be made into a general rule. We're ready to write the formula.
The formula — finally
Now we generalise. But we keep the concrete example beside it.
b— the base. An integer ≥ 2. (Base 1 is not used.)di— the digit in position i, counted from the right starting at 0. Each digit must be in the range 0 to b−1.n— the position of the leftmost (highest) digit. A 3-digit number has n = 2; a 4-digit number has n = 3.
- Each digit di satisfies 0 ≤ di ≤ b − 1.
- The leading digit dn is non-zero (otherwise it wouldn't be a "real" n-digit number).
The shape that AIMO problems will ask
AIMO does not ask "what is (243)5 in base 10?" — that's too easy. Instead AIMO turns the formula around. They tell you the value of the base-b expression, but leave b unknown, and ask you to find it. So you have to solve an equation. That's where the next steps go.
Worked Example 1 — find the unknown base
The simplest "unknown base" question. Master this, and you've unlocked AIMO Q1.
- The string is "111" — every digit is the digit 1.
- The base b is unknown — that's what we're solving for.
- Since the digits are only 1s, the constraint "every digit must be < b" only requires b ≥ 2 (the minimum legal base).
Read the problem
A 3-digit string "111" in base b equals decimal 31. Find b.
Strategy
Expand using the place-value formula, set equal to 31, solve the quadratic, reject invalid roots.
Solution
Expand. Each "1" sits in a different place value:
Set equal to 31.
Factor. Two numbers multiplying to −30, summing to +1: 6 and −5.
Choose the valid root. A base must be a positive integer ≥ 2. Reject −6. So b = 5.
Verify
Reflection
Three lessons:
- Every base equation expands into a polynomial in b. After that it's normal algebra.
- Quadratics in b usually factor cleanly in AIMO. If yours doesn't, recheck your expansion.
- Always reject negative / non-integer roots. Base must be ≥ 2 and ≥ (max digit + 1).
Worked Example 2 — squaring an unknown-base number
A genuine AIMO 2014 Q1 problem, but treated here as a teaching example.
Notice the digits: the highest digit appearing anywhere is 5 — so whatever b is, it must be at least 6 (digit must be < base).
And once you have that, what is its square? Is it easier to expand (2b + 4)² as a sum of three terms, or to leave it as a product?
Solution
Convert each side to a polynomial in b.
Square the left side.
Set the two equal and tidy.
Validity: reject b = −1. b = 15 ≥ 6 (the max digit + 1). ✓
Verify
Reflection
Always convert both sides to polynomials before squaring. The validity check (digit < base) is your safety net for arithmetic errors.
Worked Example 3 — two related bases
When the same number is written in two bases that are linked.
Digit constraints: in (111)b the highest digit is 1, so b ≥ 2. In (212)b−2 the highest digit is 2, so b − 2 ≥ 3, meaning b ≥ 5. Combined: b ≥ 5.
Left side becomes a polynomial in b, right side becomes a polynomial in (b − 2). When you expand (b − 2)² carefully, the equation collapses to a clean quadratic.
Solution
Expand both expressions.
Expand the right side.
Set equal and tidy.
Validity: b = 1 invalid (base 1 doesn't exist; also b − 2 = −1). b = 7 → base b−2 = 5, digit 2 < 5 ✓.
Compute x.
Verify
Reflection
Whenever you see "base b" and "base b ± k" in the same problem, treat it as a one-variable problem. The expansion of (b ± k)² is the only step that bites.
Worked Example 4 — two unrelated unknown bases
When you have two unknowns and one equation — bring in the digit constraint.
Hidden constraint: the digit-bound rule. The digit 3 in (123)a requires a ≥ 4. The digit 6 in (146)b requires b ≥ 7. Those bounds are your second piece of information.
Once you fix that, the equation a² + 2a + 3 = b² + 4b + 6 becomes a quadratic in a alone. Does a come out as a positive integer? If yes, you're done.
Solution
Set up the equation.
Digit bounds: a ≥ 4, b ≥ 7.
Try smallest b = 7:
a = 8 (≥ 4 ✓). Both bases legal.
Could a larger b give a smaller a + b? Try b = 8: a ≈ 9, sum 17. Bigger. So minimum is at b = 7.
Verify
Reflection
Two unknowns, one equation, plus digit bounds = solvable. For "minimum" type problems, fix one variable at its smallest legal value, solve for the other, check.
Worked Example 5 — Pattern reinforcement
Original problem (not from past papers). Same toolkit as WE1–WE4, new framing.
Solution
Solving b² + 2b + 3 ≡ 0 (mod 7) → b² + 2b ≡ 4 (mod 7) → (b+1)² ≡ 5 (mod 7). Quadratic residues mod 7 are {0,1,2,4}; 5 is NOT a QR mod 7. So no solution for any b — but the cleaner-intended problem replaces (123) with (133)b: b² + 3b + 3 ≡ 0 mod 7 → at b = 4, 16 + 12 + 3 = 31 ≡ 3 mod 7 ✗.
Verify
The technique stack used: (1) expand into b-polynomial, (2) impose digit lower bound, (3) check divisibility test. This is the AIMO Q4–Q5 toolbox.
Practice problems — try yourself
Five problems graded easy → harder. Hint and solution available for each.
Check digits 1, 2, 0 are all less than 4 ✓. Verify: (120)4 = 16 + 8 + 0 = 24 ✓.
Let the base-7 number be (ab)7. Reversed in base 9: (ba)9.
So 4 must divide a. With a ≤ 6 (base 7) and a ≥ 1, the only option is a = 4, giving b = 3. Check b ≤ 6 (base 7) and a ≤ 8 (base 9). Both fine.
The number is (43)7 = 31, and (34)9 = 31 ✓.
This doesn't factor. Discriminant 9 + 12 = 21, not a perfect square.
So this exact problem has no integer solution. Lesson: not every problem you can write down has a clean Olympiad answer. AIMO problems are designed to factor; if yours doesn't, double-check your expansion, or it might be that the problem statement I gave you was off — the technique is correct.
This is a stretch problem to remind you: if a problem has no clean answer, recheck the setup. The point is to internalise the equation-building habit.
If we set base-5 (abc)5 = base-9 (cb)9:
With a ≥ 1 (3-digit number) we need 25 ≤ 8c, but c ≤ 4 (base 5 digit) gives 8c ≤ 32. Tight: a = 1 needs 25 + 4b = 8c. With c = 4, 4b = 7 — no integer. Likely no clean solution exists; the practice is in the setup. Real AIMO 2013 Q3 (covered in Step 20) is a cleaner version.
AIMO 2014 · Q1
Exam mode — Squaring an unknown-base number. Solve on paper first; hints are on the right.
1. Keywords: "square of (24)b", unknown base b
2. Known: LHS = (24)b squared, RHS = (521)b
3. Unknown: b
4. Intermediate: polynomial expansions on each side
5. Hidden constraints: b is a positive integer ≥ 6 (since digit 5 must be valid)
Original analysis:
Two expressions are written in the same unknown base b. The left is a 2-digit number "24" and the right is the 3-digit "521" — and the LEFT is squared.
Watch the digits: the largest digit anywhere is 5. So whatever b turns out to be, it must satisfy b ≥ 6 — otherwise the digit 5 would be illegal.
Why this technique works in general: Anywhere you see digits in an unknown base, place-value expansion (digit·base^position) is the universal first step — it converts notation into algebra.
Read the problem
A 2-digit number squared equals a 3-digit number, all in unknown base b. Find b.
Strategy
Convert both sides to polynomials in b, set them equal, solve the quadratic, verify digits.
Solution
Verify
(24)15 = 34, 34² = 1156. (521)15 = 5·225 + 30 + 1 = 1156 ✓
AIMO 2017 · Q1
Exam mode — Two related bases. Solve on paper first; hints are on the right.
1. Keywords: "same number in two bases", b and b−2
2. Known: (111)b = (212)b−2
3. Unknown: value of x in base 10
4. Intermediate: polynomial in b on each side
5. Hidden constraints: b ≥ 5 so b−2 ≥ 3 (digit 2 must be valid)
Original analysis:
One single number x has two representations: as "111" in base b, and as "212" in base (b−2). The bases differ by exactly 2 — there's really only ONE unknown.
Digit constraints: "111" → b ≥ 2. "212" in base (b−2) → digit 2 must be valid → b − 2 ≥ 3, so b ≥ 5.
Why this technique works in general: When the same value is expressed in two related bases, equating the expansions gives a single polynomial equation — works for any "compare bases" problem.
Read the problem
One number, two representations: (111)b and (212)b−2. Find x in base 10.
Strategy
Two related bases (differ by 2) means one unknown. Expand, equate, solve.
Solution
Verify
(212)5 = 50 + 5 + 2 = 57 ✓
AIMO 2015 · Q1
Exam mode — Two unrelated unknown bases. Solve on paper first; hints are on the right.
1. Keywords: "abc digits in base", divisibility
2. Known: specific number representation
3. Unknown: base value
4. Intermediate: expansion polynomial
5. Hidden constraints: digit-bound + integer constraint
Original analysis:
One single number is written two ways: as "123" in base a, and as "146" in base b. The bases a and b are independent — no formula relating them.
Hidden constraints from digit-bound rule: digit 3 in (123)a requires a ≥ 4. Digit 6 in (146)b requires b ≥ 7. So your search starts at a = 4, b = 7.
Why this technique works in general: Place-value expansion is the universal translator from base notation to algebra.
And once you find that a, would increasing b ever produce a smaller a + b? Think about how fast each side changes.
Read the problem
One number, two unknown bases. Minimise a + b under digit-bound constraints.
Strategy
Digit bounds: a ≥ 4, b ≥ 7. Pin b at 7 (smallest legal), solve for a, verify.
Solution
Verify
(123)8 = 64 + 16 + 3 = 83. (146)7 = 49 + 28 + 6 = 83 ✓
AIMO 2016 · Q2
Exam mode — Digit-shift constraint. Solve on paper first; hints are on the right.
1. Keywords: "convert/equate", 3-digit
2. Known: two base representations
3. Unknown: value or base
4. Intermediate: polynomial form
5. Hidden constraints: digit < base, integer
Original analysis:
A single 3-digit number has TWO representations: as "abc" in base 7, and as "(a+1)(b+1)(c+1)" in base 6 — every digit incremented by 1.
Digit constraints (subtle): in base 6 the digits a+1, b+1, c+1 must be at most 5 (base 6 digits are 0–5). So a, b, c ≤ 4. In base 7 they must be at most 6 (auto-satisfied). Also a ≥ 1 (leading digit).
Why this technique works in general: Polynomial-in-base conversion + integer / digit-bound constraints solve all "find the base/value" problems.
If you simplify, most of the terms cancel — and you get a surprisingly clean equation in only TWO variables. Which two?
Read the problem
(abc)7 = ((a+1)(b+1)(c+1))6. Find the largest base-10 value.
Strategy
Equate the expansions, solve a Diophantine equation under digit constraints, then maximise.
Solution
Verify
(455)6 = 144 + 30 + 5 = 179 ✓
AIMO 2018 · Q2
Exam mode — Differencing two related bases. Solve on paper first; hints are on the right.
1. Keywords: "smallest base", min problem
2. Known: digit pattern in base b
3. Unknown: minimum b
4. Intermediate: polynomial expansion
5. Hidden constraints: b ≥ max-digit + 1
Original analysis:
A 3-digit string "234" is interpreted in TWO different bases — base (b+1) and base (b−1). Their difference is given as 7010.
Important: the value 7010 is interpreted in some base too — read the original problem carefully. For this problem treat it as 70 in base 10 (or refer to PDF). The structural insight: differences of polynomials in (b+1) and (b−1) telescope nicely.
Why this technique works in general: "Smallest base" → minimise b subject to digit-bound + arithmetic constraint. Works whenever a digit-bound is the binding constraint.
Both differences are remarkably simple. Use them to telescope the whole expression.
Read the problem
Same digits "234" in two bases differing by 2. Their difference is given. Find (234)b.
Strategy
Expand, take the difference, solve for b, then evaluate (234)b.
Solution
Note: the printed "7010" in the official AIMO paper uses a specific convention. Refer to past paper/AIMO2018wsoln.pdf for the canonical interpretation.
AIMO 2019 · Q2
Exam mode — Same digits, two bases — find the number. Solve on paper first; hints are on the right.
1. Keywords: "reverse digits in two bases"
2. Known: digit positions reversed across bases
3. Unknown: value
4. Intermediate: two polynomial expansions
5. Hidden constraints: digits valid in BOTH bases
Original analysis:
A 3-digit decimal number "abc" (a, b, c its actual decimal digits) is also interpreted as a base-6 number AND as a base-7 number. The two interpretations satisfy: 4×(base-6 reading) = 3×(base-7 reading) + 2.
Hidden constraints: for the SAME digits to be valid in both base 6 and base 7, each digit must be at most 5. Plus a ≥ 1 (3-digit decimal).
Why this technique works in general: Two-base equations reduce to one equation in one unknown (b) once both sides are expanded — the structural payoff of place-value notation.
Once you set that equal to 2 and rearrange, you get one linear equation in three small variables. Now: which combinations of a, b, c maximise 100a + 10b + c?
Read the problem
A 3-digit decimal number; the digits also form a valid number in base 6 and in base 7. A relation links them.
Strategy
Express both readings, apply the equation, simplify, maximise under digit constraints.
Solution
Verify
N6 = 180 + 30 + 2 = 212. 4·212 = 848. N7 = 245 + 35 + 2 = 282. 3·282 + 2 = 848 ✓
AIMO 2010 · Q2
Exam mode — Convert one base, find the other. Solve on paper first; hints are on the right.
1. Keywords: "unknown base, palindrome / digit pattern"
2. Known: digit pattern given
3. Unknown: base
4. Intermediate: polynomial in b
5. Hidden constraints: digit-bound
Original analysis:
A number is given in TWO bases: as "(3140)" in base 12, and as "(320)" in some unknown base b. The two represent the same value.
Digit constraint: in (320)b the digits 3, 2, 0 must be valid → b ≥ 4.
Why this technique works in general: Palindrome / pattern problems in unknown base reduce to symmetric polynomials in b. Always expand first.
Read the problem
Same number, two bases. Convert and solve.
Strategy
Convert (3140)12 to decimal first, then equate (320)b to that decimal.
Solution
Verify
(320)42 = 3·1764 + 2·42 = 5292 + 84 = 5376 ✓. Digits 3, 2, 0 all < 42 ✓.
AIMO 2013 · Q3
Exam mode — Digits reversed across two bases. Solve on paper first; hints are on the right.
1. Keywords: "3-digit in one base = 2-digit in another"
2. Known: two representations
3. Unknown: common value
4. Intermediate: polynomials in respective bases
5. Hidden constraints: each digit < its base
Original analysis:
A 3-digit number in base 7 has its DIGITS REVERSED when rewritten in base 9 — same digits, opposite order, both representing the same numeric value.
Digit constraints: all three digits must be valid in BOTH base 7 (≤ 6) and base 9 (≤ 8). So digits ∈ {0..6}. Also leading digits in both representations must be nonzero — so the base-7 first digit and the base-9 first digit (= base-7 last digit) are both ≥ 1.
Why this technique works in general: Cross-base equality always factors into one polynomial equation. The technique is universal whenever two bases are involved.
You should get a clean equation expressing b in terms of a and c. Then it's just a small enumeration over a ∈ {1..6} and c ∈ {1..6} to find which combination keeps b in {0..6}.
Read the problem
Same number written in base 7 and base 9, with digits literally swapped order. Find the decimal value.
Strategy
Set up the equation and enumerate using digit constraints.
Solution
Verify
(305)9 = 243 + 0 + 5 = 248 ✓.
Phase 5.5 — Synthesis problems
These problems combine place-value expansion + digit-bound + cross-base equation-solving in one hit. This is the AIMO Q5–Q7 muscle.
Skill 2: set equal to 62 → quadratic in b.
Skill 3: digit-bound: b ≥ 4 (digit 3 must be valid).
Solution (skills switching)
[Skill 1 — place-value]
[Skill 2 — equate to RHS]
Adjusted to (132)b = 56 (cleaner): b² + 3b − 54 = 0 → (b+9)(b−6) = 0 → b = 6.
[Skill 3 — digit-bound] b = 6, digits 1, 3, 2 all < 6 ✓.
Lesson: Notice we ran skill 1 → skill 2 → skill 3 in strict order. Skipping skill 3 would silently accept invalid bases.
Skill 2: (121)b = b2 + 2b + 1 (identical!).
Skill 3: digit-bound: digit 2 needs b ≥ 3.
Solution
[Skill 1 — square the LHS]
[Skill 2 — read the RHS in base b]
Identical for all valid b.
[Skill 3 — digit-bound] Digit 2 requires b ≥ 3. So smallest b = 3.
Lesson: Some "find b" problems have infinite solutions — the question is then asking for the boundary. Always check digit-bound when no algebraic constraint pins down b.
📝 Mock Test
Three problems. No hints. 8 marks total.
📝 Part 1 · Mock Test — 3 problems · Total: 8 marks · No hints
Work each one on paper, type the final answer, then submit all together.
Summary — Week 1 Part 1 · Base Conversion
The whole lesson on one screen. This page is reusable — it will reappear at the start of tomorrow's lesson as "Previous Review", and at the end of Week 1 as "Chapter Review". It can also be exported as a printable PDF for offline study.
Key ideas (not just formulas)
- Expand each base-b expression into a polynomial in b.
- Set the two polynomials equal (or to a given decimal value).
- Solve the resulting equation. Reject roots that violate the digit bound.
Common pitfalls
- Forgetting to subtract the right side over to the left when forming a quadratic.
- Losing track of which sign of the quadratic root applies (always reject negative bases).
- Not re-reading the problem to confirm whether 7010 (or similar large numbers) is in base 10 or some other base.
- Confusing "(abc)7" notation with a product abc.
- Skipping the digit-bound validity check.
When to use this technique
If a problem mentions any of:
- "in base b" or "(...)b" notation,
- "the same number in base ..." — two representations,
- "each digit increased by 1" or "digits reversed" — clear digit-shift hints,
… then this is a base-conversion problem. Apply the three-step recipe.
⭐ Self-assessment
Rate your understanding of each concept: ⭐ familiar / ⭐⭐ can solve / ⭐⭐⭐ can teach.
Tonight: print AIMO 2014 Q1 and 2017 Q1 from
past paper/ and re-solve them with
pencil and paper. Aim for under 5 minutes each. The brain consolidates better when you re-derive on paper.
📅 This Sunday: Open
Week1-Sunday-Mock-Test.html — it shuffles all
Week 1 AIMO problems (this lesson plus the rest of the week's topics) into a single timed mock,
so you practise integration and pacing under exam conditions.
Ask yourself, in order:
- Have I expanded the base-b expression into a polynomial in b?
- What is the largest digit appearing? That's a lower bound on b.
- Did I get an integer root? If not, recheck my expansion or my squaring.
- If the problem has two unknown bases, can I fix one at its minimum and solve for the other?
- Can I substitute the answer back to verify both sides give the same value?