Binary and Other Number Systems
Welcome, students π In this lesson, you will explore how numbers can be written in different systems, not just the decimal system you use every day. The decimal system is based on $10$, but computers, calculators, and many coding systems rely on other bases such as $2$, $8$, and $16$. By the end of this lesson, you should be able to explain the key ideas behind different number systems, convert between them, and understand why they matter in real life and in IB Mathematics: Applications and Interpretation HL.
Learning goals:
- Understand what a number system is and why different bases are used.
- Convert numbers between binary, decimal, octal, and hexadecimal.
- Recognize how number systems connect to algebra, technology, and modelling.
- Use clear mathematical reasoning to explain patterns and conversions.
Think of number systems as different βlanguagesβ for writing quantities. The value stays the same, but the symbols and structure change. This is especially important in computing, where binary is the foundation of digital data π».
What Is a Number System?
A number system is a way of representing numbers using a set of digits and a base. In base $10$, the digits are $0$ through $9$, and each position represents a power of $10$. For example, in $472$, the $4$ means $4 \times 10^2$, the $7$ means $7 \times 10^1$, and the $2$ means $2 \times 10^0$.
In general, if a number is written in base $b$, each digit is multiplied by a power of $b$. A number like $a_na_{n-1}\dots a_1a_0$ in base $b$ means
$$a_n b^n + a_{n-1} b^{n-1} + \cdots + a_1 b^1 + a_0 b^0$$
This idea is called place value. It is one of the most important ideas in algebra because it shows how values depend on position and how patterns can be written symbolically.
A base must use digits from $0$ up to $b-1$. For example:
- Base $2$ uses $0,1
- Base $8$ uses $0$ through $7$
- Base $16$ uses $0$ through $9$ and then $A,B,C,D,E,F$
The decimal system is convenient for people because we have $10$ fingers, but other bases can be more efficient for machines or for shortening long strings of digits.
Binary: The Language of Computers
Binary is base $2$, so it uses only two digits: $0$ and $1$. These are often linked to the idea of two states, such as off/on, false/true, or no signal/signal. This makes binary ideal for computers, which store information using electronic circuits.
Each binary digit is called a bit. A group of $8$ bits is called a byte. Binary numbers work exactly like decimal numbers, except that each position represents a power of $2$ instead of a power of $10$.
For example, the binary number $1011_2$ means
$$1 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 1 \times 2^0$$
So,
$$1011_2 = 8 + 0 + 2 + 1 = 11_{10}$$
This notation helps avoid confusion. The subscript tells you the base, so $1011_2$ is not the same as $1011_{10}$.
Example 1: Binary to Decimal
Convert $110101_2$ to decimal.
Write the place values:
$$110101_2 = 1 \times 2^5 + 1 \times 2^4 + 0 \times 2^3 + 1 \times 2^2 + 0 \times 2^1 + 1 \times 2^0$$
$$= 32 + 16 + 0 + 4 + 0 + 1 = 53_{10}$$
So $110101_2 = 53_{10}$.
Example 2: Decimal to Binary
Convert $19_{10}$ to binary.
Use repeated division by $2$:
- $19 \div 2 = 9$ remainder $1$
- $9 \div 2 = 4$ remainder $1$
- $4 \div 2 = 2$ remainder $0$
- $2 \div 2 = 1$ remainder $0$
- $1 \div 2 = 0$ remainder $1$
Read the remainders from bottom to top: $10011_2$.
So $19_{10} = 10011_2$.
This process is useful because it shows how whole numbers can be built from powers of $2$. It also connects to sequences, since the place values follow the pattern $1,2,4,8,16,\dots$, which is a geometric sequence with common ratio $2$.
Octal and Hexadecimal: Shortcuts for Binary
Binary is essential, but long binary strings can be hard for humans to read. That is why octal and hexadecimal are useful.
Octal
Octal is base $8$, using digits $0$ through $7$. Since $8 = 2^3$, each octal digit corresponds to exactly $3$ binary digits. This makes conversion between binary and octal very efficient.
For example, convert $101110011_2$ to octal by grouping into sets of $3$ from the right:
$$101\ 110\ 011_2$$
Now convert each group:
- $101_2 = 5_8$
- $110_2 = 6_8$
- $011_2 = 3_8$
So,
$$101110011_2 = 563_8$$
Hexadecimal
Hexadecimal is base $16$, using digits $0$ through $9$ and $A$ through $F$. It is widely used in computing because $16 = 2^4$, so every hexadecimal digit matches exactly $4$ binary digits.
For example, convert $111100101010_2$ to hexadecimal by grouping into sets of $4$:
$$1111\ 0010\ 1010_2$$
Now convert each group:
- $1111_2 = F_{16}$
- $0010_2 = 2_{16}$
- $1010_2 = A_{16}$
So,
$$111100101010_2 = F2A_{16}$$
Hexadecimal is especially common in color codes, memory addresses, and programming because it compresses long binary values into shorter and easier-to-read forms π¨.
Converting Between Bases Systematically
A strong IB skill is to explain your method clearly, not just give the final answer. You should show how the value is built from place values or how division produces the digits.
General Method: Base to Decimal
If a number is written in base $b$, multiply each digit by the corresponding power of $b$. For example, if
$$243_5$$
then
$$243_5 = 2 \times 5^2 + 4 \times 5^1 + 3 \times 5^0$$
$$= 50 + 20 + 3 = 73_{10}$$
General Method: Decimal to Base
Use repeated division by the target base. Keep recording the remainders until the quotient is $0$. Then read the remainders upward.
This method works for any base. For instance, to convert $45_{10}$ to base $3$:
- $45 \div 3 = 15$ remainder $0$
- $15 \div 3 = 5$ remainder 0`
- $5 \div 3 = 1$ remainder $2$
- $1 \div 3 = 0$ remainder $1$
So,
$$45_{10} = 1200_3$$
You can check this by expanding:
$$1 \times 3^3 + 2 \times 3^2 + 0 \times 3^1 + 0 \times 3^0 = 27 + 18 = 45$$
Why This Matters in Number and Algebra
Binary and other number systems fit naturally into the IB topic of Number and Algebra because they use patterns, structure, and symbolic representation. The place-value system is an algebraic idea because each digit is weighted by a power of the base.
These ideas connect to:
- Sequences and patterns: powers of $2$, $8$, or $16$ create regular growth.
- Algebraic representation: numbers are written as sums of digit terms times powers.
- Numerical modelling: computers use binary to calculate models, store results, and simulate real-world situations.
- Technology-supported interpretation: software often displays data in decimal, but its internal logic may rely on binary or hexadecimal.
For example, if a program stores a measurement, the actual device may represent it in binary, but the user sees a decimal value like $12.75$. Understanding base systems helps explain how digital devices represent and process data.
Common Mistakes and How to Avoid Them
One common mistake is treating digits in every base as if they are decimal digits. For example, in base $2$, the number $102_2$ is invalid because the digit $2$ is not allowed. In base $8$, the digit $8$ is also invalid.
Another mistake is forgetting that the base must be written in the notation. The numbers $1011_2$, $1011_8$, and $1011_{10}$ represent different values.
A third mistake is grouping binary digits incorrectly when converting to octal or hexadecimal. Always group from the right, and add leading zeros if needed. For example, $10101_2$ becomes $010\ 101_2$ when grouped for octal.
Conclusion
Binary and other number systems show that numbers can be represented in many valid ways. The base tells you the value of each place, and the digits must fit the rules of that base. Binary is especially important because it underlies digital technology, while octal and hexadecimal help humans read binary more easily.
For IB Mathematics: Applications and Interpretation HL, this topic builds number sense, strengthens algebraic thinking, and supports technology-based reasoning. When you can convert confidently between bases and explain the method clearly, you are using both mathematical logic and practical communication. That is exactly the kind of skill that matters in modern mathematics π.
Study Notes
- A number system represents numbers using digits and a base.
- In base $b$, place values are powers of $b$.
- Binary is base $2$ and uses only $0$ and $1$.
- A bit is one binary digit; a byte is $8$ bits.
- To convert from base $b$ to decimal, expand using powers of $b$.
- To convert from decimal to another base, use repeated division by the base.
- Octal is base $8$ and matches groups of $3$ binary digits.
- Hexadecimal is base $16$ and matches groups of $4$ binary digits.
- Hexadecimal uses $A$ to $F$ for values $10$ to $15$.
- These systems connect to algebra through powers, patterns, and place value.
- These systems connect to technology because computers use binary internally.
- Always write the base as a subscript, such as $1011_2$ or $F2A_{16}$.
