Sub topic 1
Place value: what a digit really means
Every base conversion and digit problem in this tutorial depends on one idea. A digit's contribution to a number depends on the position it sits in. This chapter makes that idea precise, so that later chapters can change the base or add conditions without new theory.
Prerequisites
You should be comfortable with the following:
- Whole-number arithmetic, including long division with a remainder.
- Powers of 10, such as 10² = 100 and 10³ = 1000, and the convention that any number to the power 0 is 1.
- Forming and solving a linear equation in one or two unknowns.
- The meaning of "multiple of" and "remainder when divided by".
Digits versus numbers
A digit is a single symbol. In the decimal system the digits are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. A numeral is a string of digits, such as 7384, that represents a number. The number is the quantity. The numeral is one way to write it.
Two different things are attached to each digit in a numeral:
- Face value is the digit itself. In 7384 the face value of the 3 is 3.
- Place value is the digit's face value multiplied by the value of its position. In 7384 the place value of the 3 is 3 × 100 = 300.
The positions, counted from the right starting at 0, have values 10⁰, 10¹, 10², and so on. This is why the system is called positional. The same symbol means different amounts in different positions.
| Digit | Position (from right) | Value of position | Place value |
|---|---|---|---|
| 7 | 3 | 1000 | 7000 |
| 3 | 2 | 100 | 300 |
| 8 | 1 | 10 | 80 |
| 4 | 0 | 1 | 4 |
The number is the sum of the place values: 7384 = 7000 + 300 + 80 + 4. This sum is called the expanded form.
The general formula
If a numeral has digits dk, d(k−1), …, d1, d0 from left to right, its value is
dk × 10^k + d(k−1) × 10^(k−1) + … + d1 × 10 + d0.
Each digit must satisfy 0 ≤ d ≤ 9. The leftmost digit d_k is normally nonzero, because a leading zero adds nothing: 0074 and 74 are the same number.
The following code computes the expanded form and reads a single digit out of a number by position.
numeral = "7384"
terms = [int(d) * 10**p for p, d in enumerate(reversed(numeral))]
print(terms) # [4, 80, 300, 7000]
print(sum(terms)) # 7384
n = 7384
for p in range(4):
print(p, n // 10**p % 10) # prints 0 4, 1 8, 2 3, 3 7The expression n // 10**p % 10 divides by the position value, which discards everything to the right, and then takes the remainder on division by 10, which discards everything to the left. You will use this two-step idea whenever a problem asks about a particular digit.
Zero as a placeholder
Zero has no value of its own, but it holds a position open. In 5002 the two zeros say "no hundreds and no tens". Without them the numeral would collapse to 52. This role is why 0 is a legitimate digit in every position except the leftmost one of a multi-digit number.
A common CAT trap follows from this. When a problem says "a three-digit number", the hundreds digit runs from 1 to 9, while the tens and units digits run from 0 to 9. Forgetting that the units digit can be 0, or allowing the hundreds digit to be 0, produces wrong counts.
How many digits does a number have?
A number with k digits lies in the range 10^(k−1) ≤ n < 10^k. For example, a 3-digit number lies between 100 and 999. From this you get the count of k-digit numbers:
- 1-digit numbers (1 to 9): 9
- 2-digit numbers (10 to 99): 90
- 3-digit numbers (100 to 999): 900
- k-digit numbers: 9 × 10^(k−1)
The formula works because the first digit has 9 choices and each of the other k − 1 digits has 10. It is the foundation of the digit-counting chapter later in this tutorial.
Three operations on numerals
Place value turns "editing a numeral" into arithmetic. Let n be a whole number and d a single digit.
- Append a digit. Writing d after n gives 10n + d. Appending 5 to 37 gives 375 = 10 × 37 + 5.
- Append a zero. This is the special case d = 0, which gives 10n. Each appended zero multiplies the number by 10.
- Delete the last digit. The result is the quotient n // 10, and the deleted digit is the remainder n mod 10. Deleting the last digit of 375 leaves 37, with remainder 5.
These identities recur constantly. A statement like "a digit is written at the end of the number" is an instruction to use 10n + d.
Writing two- and three-digit numbers algebraically
When digits are unknown, name them with letters and use their place values. Writing "ab" with letters is only a label for the digits. It does not mean a × b.
- A two-digit number with tens digit a and units digit b is 10a + b, with 1 ≤ a ≤ 9 and 0 ≤ b ≤ 9.
- Its reversal is 10b + a.
- A three-digit number with digits a, b, c is 100a + 10b + c, with 1 ≤ a ≤ 9 and 0 ≤ b, c ≤ 9.
Two consequences show why this form is useful:
- The sum of a two-digit number and its reversal is (10a + b) + (10b + a) = 11(a + b), always a multiple of 11.
- The difference is (10a + b) − (10b + a) = 9(a − b), always a multiple of 9.
The reversal chapter develops these results. For now, notice that they follow directly from place value, with no case-by-case checking.
Worked example
A two-digit number equals 4 times the sum of its digits. Find all such numbers.
Write the number as 10a + b. The condition gives
10a + b = 4(a + b)
10a + b = 4a + 4b
6a = 3b
b = 2a.
Since b must be a digit from 0 to 9 and a must be from 1 to 9, the possible values are a = 1, 2, 3, 4, giving b = 2, 4, 6, 8. The numbers are 12, 24, 36 and 48. Check one: 36 has digit sum 9, and 4 × 9 = 36.
A check on the range matters here. The algebra alone allows a = 5 and b = 10, but 10 is not a digit, so that solution is rejected. Always finish a digit problem by applying the digit bounds.
A glimpse of other bases
Nothing in the formula depends on the number 10 except the position values. In base 5 the position values are 1, 5, 25, 125, and the only digits are 0 to 4. So the numeral 213 in base 5 means 2 × 25 + 1 × 5 + 3 = 58. The next chapter builds this out. The point here is that decimal is one choice of base, and place value is the general mechanism.
Common errors
- Confusing face value with place value. The digit 3 in 7384 is worth 300, not 3.
- Counting positions from 1. The units position has exponent 0, not 1. The tens digit has exponent 1.
- Allowing a leading zero. The hundreds digit of a three-digit number is at least 1.
- Treating "ab" as a product. In a digit problem it means 10a + b.
- Forgetting digit bounds. An algebraic solution is valid only if every digit is a whole number from 0 to 9.
Practice
Exercise
What is the place value of the digit 6 in 462,085, and how many 5-digit numbers are there?
Show answer
Counting from the right at position 0, the digit 6 is in position 4 (the ten-thousands place), so its place value is 6 × 10,000 = 60,000. The number of 5-digit numbers is 9 × 10^4 = 90,000.
Exercise
A two-digit number is 18 more than its reversal. The sum of its digits is 8. Find the number.
Show answer
Let the number be 10a + b. Then (10a + b) − (10b + a) = 9(a − b) = 18, so a − b = 2. With a + b = 8, adding the equations gives 2a = 10, so a = 5 and b = 3. The number is 53. Check: 53 − 35 = 18 and 5 + 3 = 8.
Exercise
The digit 4 is written at the end of a number n. The new number is 301 more than n. Find n.
Show answer
Appending 4 gives 10n + 4. The condition is 10n + 4 = n + 301, so 9n = 297 and n = 33. Check: 334 − 33 = 301.