Skip to main content
AMC 10 & 12

Digits & Bases

Base conversion and digit sums, plus the shortcut divisibility tests that let you skip long division entirely.

Base representation

A number written in base bb with digits dkd1d0d_k \cdots d_1 d_0 represents:

dkbk++d1b+d0d_k b^k + \cdots + d_1 b + d_0

To convert a base-10 number into base bb, repeatedly divide by bb and record the remainders (from last to first). To convert the other way, just expand the sum above directly.

Divisibility tests

  • 2: last digit is even.
  • 3: digit sum divisible by 3.
  • 4: last two digits form a number divisible by 4.
  • 5: last digit is 0 or 5.
  • 8: last three digits divisible by 8.
  • 9: digit sum divisible by 9.
  • 11: alternating digit sum (adding and subtracting digits in turn) divisible by 11.

The 3 and 9 tests both work because 101(mod3)10 \equiv 1 \pmod{3} and 101(mod9)10\equiv1\pmod9, so every power of 10 also reduces to 1 — meaning a number is congruent to its digit sum modulo 3 or 9. The 11 test works similarly, since 101(mod11)10 \equiv -1 \pmod{11}.

Worked example

Problem: Convert 237237 (base 10) into base 5.

Solution: Divide repeatedly by 5, tracking remainders:

237=5(47)+2,47=5(9)+2,9=5(1)+4,1=5(0)+1237 = 5(47)+2, \quad 47=5(9)+2, \quad 9=5(1)+4, \quad 1=5(0)+1

Reading the remainders from last to first gives 23710=14225237_{10} = 1422_5. Check:1125+425+25+2=125+100+10+2=2371\cdot125+4\cdot25+2\cdot5+2 = 125+100+10+2=237 ✓.

Practice problems

1.Convert 1011012101101_2 to base 10.

2.Is 4,928,517 divisible by 9?

3.Is 918,082 divisible by 11? (Use alternating digit sum.)

4.Convert 9898 (base 10) to base 7.