Sub topic 1
Place Value: What a Digit Really Means
Prerequisites
Assume you can add, multiply, divide whole numbers, use powers of 2, 3, and 10, and solve basic linear equations. You should also know that a remainder is what is left after division.
The place-value rule
A positional numeral is a way to write a number in which each digit has a value determined by its position. The position is counted from the right, starting at 0.
In decimal, the base is 10. Each position is worth a power of 10:
\[ 10^0=1,\quad 10^1=10,\quad 10^2=100,\quad 10^3=1000 \]
Therefore,
\[ 5832=5(10^3)+8(10^2)+3(10^1)+2(10^0) \]
\[ =5000+800+30+2 \]
The digit itself is only a coefficient. Its place determines its actual contribution.
Any base
A base-\(b\) numeral uses powers of \(b\), not powers of 10. For example, in base 5, the numeral \(213_5\) means
\[ 2(5^2)+1(5^1)+3(5^0) =2(25)+1(5)+3 =58_{10} \]
The subscript shows the base. If no subscript appears, decimal is usually intended.
A base \(b\) can use only the digits from 0 through \(b-1\). Thus, base 5 permits 0, 1, 2, 3, and 4. The symbol 5 is not a valid digit in base 5.
| Base | Valid digits | Place values from the right |
|---|---|---|
| 2 | 0, 1 | \(1, 2, 4, 8,\ldots\) |
| 5 | 0, 1, 2, 3, 4 | \(1, 5, 25, 125,\ldots\) |
| 10 | 0 through 9 | \(1, 10, 100, 1000,\ldots\) |
| 16 | 0 through 9 and A through F | \(1, 16, 256, 4096,\ldots\) |
In bases above 10, letters represent extra digits. In hexadecimal, A means 10, B means 11, and F means 15.
Reading a numeral from right to left
The rightmost digit is multiplied by \(b^0=1\). Move one place left, and multiply by \(b^1\). Continue increasing the exponent by 1.
For \(3042_5\),
\[ 3042_5=3(5^3)+0(5^2)+4(5^1)+2(5^0) \]
\[ =375+0+20+2=397_{10} \]
The zero still occupies a place. It contributes nothing, but it keeps the other digits in their correct positions.
def from_base(digits, base):
value = 0
for ch in digits:
value = value * base + int(ch, 16)
return value
print(from_base("101101", 2)) # 45
print(from_base("213", 5)) # 58The update value = value * base + digit shifts all earlier digits one place left before adding the next digit.
A quick size check
For a base-\(b\) numeral with \(k\) digits and a nonzero first digit,
\[ b^{k-1}\leq \text{value}<b^k \]
The numeral \(3042_5\) has four digits, so its value must lie between \(5^3=125\) and \(5^4=625\). The answer 397 passes this check.
Exercise
What is the decimal value of 132₄?
Show answer
Expand by place value: 1(4²) + 3(4¹) + 2(4⁰) = 16 + 12 + 2 = 30.