Math Core

Module 3.7 · Number Theory

Number bases

We write numbers in base ten because we have ten fingers. Computers use base two, and clocks use base sixty for minutes and seconds. MATHCOUNTS regularly asks you to convert between bases, do arithmetic in another base, or find an unknown base. Once you see what the digits really mean, all three are routine.

What the digits mean

In base ten, 21432143 means 2⋅103+1⋅102+4⋅10+32 \cdot 10^3 + 1 \cdot 10^2 + 4 \cdot 10 + 3. In base bb, the place values are powers of bb instead.

Definition

Base-b numeral

In base bb, the numeral d3‾ d2‾ d1‾ d0‾\underline{d_3}\,\underline{d_2}\,\underline{d_1}\,\underline{d_0} (written with a subscript, like 214352143_5) means d3⋅b3+d2⋅b2+d1⋅b+d0.d_3 \cdot b^3 + d_2 \cdot b^2 + d_1 \cdot b + d_0. Each digit is a whole number from 00 to b−1b - 1.

Common mistake

Base bb has no digit equal to bb. In base 55 the digits are 00–44 only, so "217352173_5" is not a valid numeral. When a problem asks for an unknown base, the base must be larger than every digit that appears.

Converting to base ten

Multiply each digit by its place value and add.

Worked example: Base five to base ten

Convert 214352143_5 to base ten.

2⋅125+1⋅25+4⋅5+3=250+25+20+3=298.2 \cdot 125 + 1 \cdot 25 + 4 \cdot 5 + 3 = 250 + 25 + 20 + 3 = 298.

Converting from base ten

Find the largest power of bb that fits, see how many times it fits, and repeat with what's left. Alternatively, divide by bb repeatedly and read the remainders from bottom to top.

Worked example: Base ten to base six

Write 200200 in base six.

Powers of 66: 1,6,36,2161, 6, 36, 216. Since 216>200216 > 200, start with 3636.

  • 200=5⋅36+20200 = 5 \cdot 36 + 20, so the 3636s digit is 55.
  • 20=3⋅6+220 = 3 \cdot 6 + 2, so the 66s digit is 33 and the units digit is 22.

So 200=5326200 = 532_6. With repeated division: 200÷6=33200 \div 6 = 33 R 22, 33÷6=533 \div 6 = 5 R 33, 5÷6=05 \div 6 = 0 R 55. Reading the remainders upward gives 532532.

The last digit is a remainder

The units digit of nn in base bb is the remainder when nn is divided by bb. For example, 200=5326200 = 532_6 ends in 22 because 200200 leaves remainder 22 when divided by 66.

Arithmetic in another base

Add column by column just like in base ten, but carry when a column reaches bb instead of 1010.

Worked example: Adding in base seven

Compute 3657+2547365_7 + 254_7. Give your answer in base seven.

  • Units: 5+4=9=1⋅7+25 + 4 = 9 = 1 \cdot 7 + 2. Write 22, carry 11.
  • Sevens: 6+5+1=12=1⋅7+56 + 5 + 1 = 12 = 1 \cdot 7 + 5. Write 55, carry 11.
  • Forty-nines: 3+2+1=63 + 2 + 1 = 6. Write 66.

The sum is 6527652_7. Check in base ten: 3657=194365_7 = 194, 2547=137254_7 = 137, and 194+137=331=6527194 + 137 = 331 = 652_7.

Finding an unknown base

Write each numeral as a polynomial in bb and solve.

Worked example: Solve for the base

In some base bb, (14b)2=232b(14_b)^2 = 232_b. Find bb.

(b+4)2=2b2+3b+2(b + 4)^2 = 2b^2 + 3b + 2, so b2+8b+16=2b2+3b+2b^2 + 8b + 16 = 2b^2 + 3b + 2, which gives b2−5b−14=0b^2 - 5b - 14 = 0, or (b−7)(b+2)=0(b - 7)(b + 2) = 0. The base must be positive, so b=7b = 7. Check: 147=1114_7 = 11, 112=12111^2 = 121, and 2327=98+21+2=121232_7 = 98 + 21 + 2 = 121.

Tip

Always check the answer against the digits. Here the largest digit is 44, and 7>47 > 4, so base 77 is allowed.

Practice

Practice 1

Convert 2135213_5 to base ten.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Convert 11011211011_2 to base ten.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Write the base-ten number 100100 in base three. (Enter the digits as a number, like 12101210.)

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

What is the largest three-digit number in base six, written in base ten?

Practice 5

In what base bb does 34b34_b equal the base-ten number 2525?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Compute 478+36847_8 + 36_8. Give your answer in base eight.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 7

In some base bb, the numeral 121b121_b equals the base-ten number 144144. What is bb?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 8

How many digits does the base-ten number 20262026 have when written in base four?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 9

For how many bases bb with 2≤b≤102 \le b \le 10 does the base-bb numeral for the base-ten number 100100 end in the digit 11?

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Real contest practice

Base problems show up more on MATHCOUNTS and the AMC 10 than on the AMC 8. These AMC 10 problems are a step up, but they use exactly the ideas in this module.