Grade 8 · Unit 13 · Challenge

Bases and factor counts, Grade 8

2 lessons, nine practice problems and an answer key with worked solutions. Free to read here and to print.

Get the PDFs

Lesson 1

Every whole number is a sum of different powers of 2 in exactly one way; writing 1 for 'used' and 0 for 'not used' is base 2.

16 8 4 2 1 1 0 1 0 1 21 − 16 = 5 5 − 4 = 1 1 − 1 = 0 16 + 4 + 1 = 21
  1. Each weight is double the one before: 1, 2, 4, 8, 16.
  2. To balance 21, take the biggest weight that fits: 16. Still to make: 21 − 16 = 5.
  3. 8 is too big for 5. Take 4: 1 is left. 2 is too big. Take 1: nothing is left.
  4. Write 1 under each weight you used and 0 under the others: 10101. That is 21 in base 2.
  5. Check: 16 + 4 + 1 = 21. No other choice of these weights makes 21.

Worked example

A bag weighs 45 g. Which of the weights 1, 2, 4, 8, 16 and 32 g balance it, and what is 45 in base 2?

  1. Take the biggest weight that fits: 32. Still to make: 45 − 32 = 13.
  2. 16 is too big. 8 fits: 5 left. 4 fits: 1 left. 2 is too big. 1 fits: 0 left.
  3. Used: 32, 8, 4 and 1. Write 1 for used and 0 for not used, from 32 down to 1: 101101.
  4. Check: 32 + 8 + 4 + 1 = 45.

Answer: 32 + 8 + 4 + 1; 45 is 101101 in base 2.

Other ways to do it

21 ÷ 2 = 10 … 1 10 ÷ 2 = 5 … 0 5 ÷ 2 = 2 … 1 2 ÷ 2 = 1 … 0 1 ÷ 2 = 0 … 1 10101

Halve and keep the remainders

Divide 21 by 2 again and again, and write each remainder: 1, 0, 1, 0, 1.

Read the remainders from the last one back up to the first: 10101.

9 3 1 2 1 0 2 × 9 + 1 × 3 + 0 × 1 = 21

The same idea in base 3

In base 3 the places are worth 9, 3 and 1, and each place may be used 0, 1 or 2 times.

21 = 2 × 9 + 1 × 3 + 0 × 1, so 21 is 210 in base 3.

Compare: Both base-2 ways give 10101. Taking the biggest weight first is quick for small numbers and shows which weights to use; halving needs no list of powers, so it wins for big numbers. The same two ways work in any base. On a two-pan balance a weight can also sit beside the object, where it takes away: with weights of 1, 3 and 9 g, a 5 g object balances with 9 on the other pan and 3 + 1 beside the object, because 5 + 3 + 1 = 9.

Lesson 2

Zeros at the end come from pairs of prime factors 2 and 5; a product like 30! has at least as many 2s as 5s, so count the 5s.

10 = 2 × 5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 5 5 5 5 5 5 5 6 + 1 = 7
  1. Each zero at the end is one factor 10, and 10 = 2 × 5.
  2. Blue dots mark the even numbers: far more 2s than we need. The 5s decide.
  3. Every multiple of 5 brings one 5: 30 ÷ 5 = 6 of them.
  4. 25 = 5 × 5 brings a second 5: one more.
  5. 6 + 1 = 7 fives, so 30! ends in exactly 7 zeros.

Worked example

100! means 1 × 2 × 3 × … × 100. How many zeros are at the end of 100!?

  1. Count the 5s in the product. Multiples of 5 up to 100: 100 ÷ 5 = 20, one 5 each.
  2. Multiples of 25 bring a second 5: 100 ÷ 25 = 4. 125 is past 100, so no number brings a third.
  3. 20 + 4 = 24 fives, and there are more than enough 2s to pair with them.

Answer: 24 zeros

Other ways to do it

30 ÷ 5 → 6 30 ÷ 25 → 1 6 + 1 = 7

Divide again and again

30 ÷ 5 = 6 multiples of 5. 30 ÷ 25 = 1 (drop the remainder): one multiple of 25.

Add the answers: 6 + 1 = 7.

5 = 10 = 2 × 15 = 3 × 20 = 4 × 25 = 30 = 6 × 5 5 5 5 5 × 5 5 1 + 1 + 1 + 1 + 2 + 1 = 7

Split each multiple of 5

Write every multiple of 5 up to 30 as a product.

Count the 5s: 5, 10, 15, 20 and 30 have one each and 25 has two, 7 in all.

Compare: All the ways count 7 fives. Splitting each number shows where every 5 comes from and is fine up to 30; dividing by 5, 25, 125 … does the same count in one line, and it is the way to go for 100! or 1000!.

Practice problems

Nine problems, from warm-up to hard. The printed sheet leaves room to work.

  1. Warm-up

    Write 13 in base 2.

  2. Warm-up

    Six lamps show a number in base 2: an orange lamp is on (1) and a white lamp is off (0). The number under each lamp is what that lamp is worth. What number do the lamps show, written the usual way (in base 10)?

    32 16 8 4 2 1
  3. Warm-up

    20! means 1 × 2 × 3 × … × 20. How many zeros are at the end of 20!?

  4. Two steps

    Omar wants a set of weights that can balance every whole number of grams from 1 to 100. The weights all go on one pan and the object goes on the other. What is the smallest number of weights he needs?

  5. Two steps

    50! means 1 × 2 × 3 × … × 50. When 50! is written as a product of primes, how many times does the prime 3 appear?

  6. Two steps

    The four cards hold numbers from 1 to 15. Ben's secret number is on cards ①, ③ and ④, but not on card ②. What is his number?

    ① 1 3 5 7 9 11 13 15 ② 2 3 6 7 10 11 14 15 ③ 4 5 6 7 12 13 14 15 ④ 8 9 10 11 12 13 14 15
  7. Hard

    Lucas has four weights: 1 g, 3 g, 9 g and 27 g, one of each, and a balance with two pans. A 20 g bag sits on the left pan, as in the picture. He may put weights on either pan and may leave weights off. When the pans balance, how many grams of weights are on the left pan, beside the bag?

    20 1 3 9 27
  8. Hard

    Mia multiplies all the even numbers from 2 to 100: 2 × 4 × 6 × … × 100. How many zeros are at the end of her product?

  9. Try it this way

    Use the halving way (divide by 2 again and again and keep the remainders) to write 100 in base 2.

Answer key

Show the answers and worked solutions
  1. 1101
    1. 13 − 8 = 5, then 5 − 4 = 1; 2 does not fit; 1 − 1 = 0.
    2. Used 8, 4 and 1; skipped 2.
    3. 13 is 1101 in base 2. Check: 8 + 4 + 1 = 13.
  2. 43
    1. The lamps that are on are worth 32, 8, 2 and 1 (the pattern is 101011).
    2. 32 + 8 + 2 + 1 = 43.
  3. 4
    1. Zeros come from 2 × 5, and there are fewer 5s than 2s.
    2. Multiples of 5 up to 20: 5, 10, 15, 20. None of them is a multiple of 25.
    3. That is 4 fives, so 20! ends in 4 zeros.
  4. 7
    1. With 1, 2, 4, 8, 16 and 32 (6 weights) every number up to 63 can be made; add 64 and every number up to 127 can be made.
    2. So 7 weights are enough.
    3. 6 weights are never enough, whatever they weigh: each weight is on the pan or off it, which gives at most 2 × 2 × 2 × 2 × 2 × 2 = 64 different totals, and one of them is 0. That is fewer than 100 totals.
    4. The smallest number is 7.
  5. 22
    1. Multiples of 3 up to 50: 50 ÷ 3 gives 16.
    2. Multiples of 9: 5. Multiples of 27: 1. (81 is past 50.)
    3. 16 + 5 + 1 = 22, so the prime 3 appears 22 times.
  6. 13
    1. Card ① holds the numbers that use a 1, card ② those that use a 2, card ③ those that use a 4 and card ④ those that use an 8.
    2. On ①, ③ and ④ but not ②: the number is 8 + 4 + 1, which is 1101 in base 2.
    3. 8 + 4 + 1 = 13. Check: 13 is on cards ①, ③ and ④ and is missing from card ②.
  7. 10
    1. Without the 27 the weights total only 13, less than 20, so the 27 must go on the right pan.
    2. Now the right pan is 27 − 20 = 7 heavier. The rest must give the left pan 7 more than the right: 9 + 1 on the left and 3 on the right, because 10 − 3 = 7.
    3. Check: left 20 + 9 + 1 = 30, right 27 + 3 = 30. Balanced.
    4. Nothing else works: with 1, 3 and 9 the only way to make a difference of 7 is (9 + 1) − 3.
    5. The left pan holds 9 + 1 = 10 g of weights.
  8. 12
    1. Every factor is even, so 2s are plentiful; count the 5s.
    2. Even multiples of 5 up to 100: 10, 20, … 100. That is 10 numbers with one 5 each.
    3. 50 and 100 are multiples of 25, so each brings one more 5: 10 + 2 = 12. (No factor is a multiple of 125.)
    4. Check another way: taking a 2 out of each of the 50 factors leaves 1 × 2 × … × 50 = 50!, which holds 10 + 2 = 12 fives.
    5. The product ends in 12 zeros.
  9. 1100100
    1. 100 → 50 r 0 → 25 r 0 → 12 r 1 → 6 r 0 → 3 r 0 → 1 r 1 → 0 r 1.
    2. Read the remainders from last to first: 1100100.
    3. Check: 64 + 32 + 4 = 100.

Print this unit

The lesson, the problem set and the answer key are free PDFs, in English and Chinese. Tap a sheet to see it in full, or get the PDFs by email.

Get the PDFs

This curriculum is also in the Luchi app, with answers checked and progress tracked. Get the app

How this curriculum was made and checked · Free to print for your family or your class.