IB MYP Extended Mathematics · Number
Number bases
1Place value and bases
Our everyday number system is base 10 (decimal, or denary). It uses ten digits, 0 to 9, and each place is worth ten times the one to its right: units, tens, hundreds, thousands.
$3\,406 = 3 \times 10^3 + 4 \times 10^2 + 0 \times 10^1 + 6 \times 10^0$
Any whole number greater than 1 can be a base. In base $b$:
- there are $b$ digits, from 0 to $b - 1$;
- the place values are powers of $b$: …, $b^3$, $b^2$, $b^1$, $b^0$.
The base is shown as a subscript: $243_5$ means "2, 4, 3 in base 5". Read it as "two four three", not "two hundred and forty-three".
Base 10 is a habit, probably from counting on ten fingers. Other cultures have used base 20 and base 60, and base 60 survives in our 60 minutes and 360 degrees. Computers use base 2.
Check yourself
Which digits are used in base 5?
Show the answer
0, 1, 2, 3, 4
Base b uses the b digits from 0 to b − 1.
2Converting to base 10
To change a number from another base into base 10, multiply each digit by its place value and add.
Convert 243₅ to base 10
- Place values in base 5: 25, 5, 1.
- $2 \times 25 + 4 \times 5 + 3 \times 1$.
- $= 50 + 20 + 3 = 73$.
Convert 1011₂ to base 10
- Place values in base 2: 8, 4, 2, 1.
- $1 \times 8 + 0 \times 4 + 1 \times 2 + 1 \times 1$.
- $= 11$.
Convert 1203₄ to base 10
- Place values: 64, 16, 4, 1.
- $1 \times 64 + 2 \times 16 + 0 \times 4 + 3 \times 1 = 64 + 32 + 3 = 99$.
Write the place values above the digits before you start. It prevents most errors.
Check yourself
What is 110₂ in base 10?
Show the answer
6
1 × 4 + 1 × 2 + 0 × 1.
3Converting from base 10
Two methods work for any base.
Repeated division: divide by the base again and again, recording the remainders. Read the remainders from bottom to top.
Convert 45 to base 2
- 45 ÷ 2 = 22 remainder 1.
- 22 ÷ 2 = 11 remainder 0.
- 11 ÷ 2 = 5 remainder 1.
- 5 ÷ 2 = 2 remainder 1.
- 2 ÷ 2 = 1 remainder 0.
- 1 ÷ 2 = 0 remainder 1.
- Reading upwards: $101101_2$.
- Check: 32 + 8 + 4 + 1 = 45.
Place values: find the largest power of the base that fits, and work down.
Convert 100 to base 5
- Powers of 5: 125, 25, 5, 1. The largest that fits is 25.
- 100 ÷ 25 = 4 exactly, with nothing left over.
- So the digits are 4 (twenty-fives), 0 (fives), 0 (units): $400_5$.
To convert between two bases that are not 10, go through base 10: convert $243_5$ to 73, then 73 to the new base.
Check yourself
What is 13 in base 2?
Show the answer
1101₂
13 = 8 + 4 + 1, so the digits are 1, 1, 0, 1.
4Binary and hexadecimal
Binary (base 2) uses only 0 and 1. It suits computers because a circuit has two states: off and on. Each binary digit is a bit, and 8 bits make a byte.
- The place values are 1, 2, 4, 8, 16, 32, 64, 128.
- One byte can store values from 0 to 255: $11111111_2 = 255$, giving 256 different values.
- $n$ bits can represent $2^n$ different values.
Hexadecimal (base 16) needs sixteen digits, so the letters A to F stand for 10 to 15: A = 10, B = 11, C = 12, D = 13, E = 14, F = 15.
Convert 2F₁₆ to base 10
- Place values: 16 and 1.
- $2 \times 16 + 15 \times 1 = 47$.
Hexadecimal is a compact way to write binary, because one hex digit equals exactly four bits ($16 = 2^4$).
Convert 11010110₂ to hexadecimal
- Split into groups of four from the right: 1101 and 0110.
- 1101 = 13 = D. 0110 = 6.
- Answer: $\text{D6}_{16}$.
- Check in base 10: 13 × 16 + 6 = 214, and 128 + 64 + 16 + 4 + 2 = 214.
Hexadecimal appears in colour codes (FF0000 is pure red: 255 red, 0 green, 0 blue) and in memory addresses.
Check yourself
What is the hexadecimal digit for the decimal number 12?
Show the answer
C
A = 10, B = 11, C = 12.
5Arithmetic in other bases
The methods of column arithmetic work in every base. The only change is when you carry: in base $b$, you carry when a column reaches $b$.
Binary addition facts: 0 + 0 = 0; 0 + 1 = 1; 1 + 1 = 10 (write 0, carry 1); 1 + 1 + 1 = 11 (write 1, carry 1).
1011₂ + 110₂
- Units: 1 + 0 = 1.
- Twos: 1 + 1 = 10. Write 0, carry 1.
- Fours: 0 + 1 + 1 (carried) = 10. Write 0, carry 1.
- Eights: 1 + 1 (carried) = 10. Write 0, carry 1.
- Sixteens: the carried 1.
- Answer: $10001_2$.
- Check in base 10: 11 + 6 = 17, and $10001_2 = 16 + 1 = 17$.
34₅ + 23₅
- Units: 4 + 3 = 7, which is one five and 2 left. Write 2, carry 1.
- Fives: 3 + 2 + 1 = 6, which is one twenty-five and 1 left. Write 1, carry 1.
- Answer: $112_5$.
- Check: 19 + 13 = 32, and $112_5 = 25 + 5 + 2 = 32$.
Patterns in bases make good investigations. In base 10 a number is even if its last digit is even. In binary a number is even exactly when its last digit is 0. Multiplying by the base adds a zero on the end in every base: $101_2 \times 10_2 = 1010_2$, which is 5 × 2 = 10.
Check yourself
What is 1₂ + 1₂ in binary?
Show the answer
10₂
Two in binary is one "two" and zero units.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera