# Number representation and number systems

> IB Mathematics: Analysis and Approaches HL · Unit 1: Number & Algebra
> Source: https://www.owlsprep.com/study/ib-math-aa-hl-u1-number-representation-and-number-systems/

This module covers positional number systems, conversion between common bases, and basic binary arithmetic. It is a foundational topic for discrete mathematics and all further work in IB AA HL.

**Prerequisites:** Integer arithmetic; Exponent rules for positive integers

## Learning objectives

- Convert between arbitrary number bases, including decimal, binary, and hexadecimal
- Explain the core properties of positional number systems
- Perform basic addition in binary

## Positional Number Systems

**Positional Number System** — A number system where the value of a digit depends on its value and its position. The total value is the sum of each digit multiplied by the base raised to the power of its position index.

*Notation:* $(d_n d_{n-1} ... d_0)_b$

*Example:* $123_{10} = 1 \times 10^2 + 2 \times 10^1 + 3 \times 10^0 = 123$

For any base $b$, there are exactly $b$ distinct digits, ranging from $0$ to $b-1$. All number systems studied in IB AA HL are positional, unlike older non-positional systems such as Roman numerals.

**Check your understanding**

Test your understanding of base rules

1. What is the largest possible digit in a base 7 number system?

   - 5
   - 6
   - 7
   - 8

   *Answer:* 6

   *Why:* Correct! The maximum digit in any base $b$ is always $b-1$. If you chose 7, you confused the base value itself with the maximum digit.

## Conversion Between Bases

There are two core conversion processes: converting from any base to base 10, and converting from base 10 to any other base. Both follow straightforward step-by-step rules.

1. To convert $(d_n...d_0)_b$ to base 10: Expand the positional sum $\sum_{i=0}^n d_i \times b^i$ and evaluate in base 10.
2. To convert a base 10 integer to base $b$: Repeatedly divide by $b$, collect remainders, then reverse the list of remainders to get the final number.

**Worked example:** Convert $213_4$ to base 10, then convert the result to base 5.

1. Step 1: Convert $213_4$ to base 10 using positional expansion:
2. $$2 \times 4^2 + 1 \times 4^1 + 3 \times 4^0 = 2(16) + 4 + 3 = 39$$
3. Step 2: Convert $39_{10}$ to base 5 via repeated division:
4. • $39 \div 5 = 7$, remainder = $4$ (least significant digit)
5. • $7 \div 5 = 1$, remainder = $2$
6. • $1 \div 5 = 0$, remainder = $1$ (most significant digit)
7. Step 3: Reverse the order of remainders to get the final result:
8. $$124_5$$

> **tip**
>
> For fractional numbers, multiply the fractional part repeatedly by the new base, collecting the integer part of each result to get digits after the radix point.

## Binary and Hexadecimal

**Hexadecimal** — Base 16 number system, which uses digits 0-9 for values 0-9, and letters A-F for values 10-15 respectively. It is used to compactly represent binary data in computing.

Since $16 = 2^4$, each hexadecimal digit corresponds directly to 4 binary digits (bits). This gives a shortcut for converting between binary and hexadecimal that avoids converting through base 10.

**Worked example:** Convert $1011010_2$ directly to hexadecimal.

1. Step 1: Group binary digits into groups of 4 starting from the right, add leading zeros to complete the first group:
2. $0101 \quad 1010$
3. Step 2: Convert each 4-bit group to its equivalent hexadecimal value:
4. $0101_2 = 5$, $1010_2 = 10 = A$
5. Step 3: Combine the digits to get the final result:
6. $$5A_{16}$$

## Basic Binary Arithmetic

Addition in binary follows the same process as addition in decimal, except you carry over to the next position when the sum of digits is equal to or greater than 2 (the base), instead of 10.

**Worked example:** Calculate $1011_2 + 1101_2$.

1. Step 1: Align numbers by the right, add starting from the rightmost digit:
2. 1 + 1 = 2 = $1 \times 2^1 + 0$, write 0, carry 1
3. Step 2: Next digit: 1 + 0 + 1 (carry) = 2, write 0, carry 1
4. Step 3: Next digit: 0 + 1 + 1 (carry) = 2, write 0, carry 1
5. Step 4: Leftmost digit: 1 + 1 + 1 (carry) = 3 = $1 \times 2^2 + 1$, write 1, carry 1
6. Step 5: Add the final carry as a new leftmost digit:
7. $$11000_2$$

## Common pitfalls

- **Wrong:** Writing remainders in the order they are calculated when converting base 10 to a new base.
  - Why it fails: The first remainder calculated is the least significant (rightmost) digit, not the most significant.
  - Correct: Reverse the order of collected remainders to get the correct final number, with the last remainder as the leftmost digit.
- **Wrong:** Writing 10 as two digits `10` instead of one digit `A` in hexadecimal.
  - Why it fails: This adds an extra digit that shifts all place values, leading to an incorrect result.
  - Correct: Always represent values 10-15 as single digits A-F when working in hexadecimal.
- **Wrong:** Grouping binary digits from the left when converting to hexadecimal.
  - Why it fails: Grouping from the left shifts all bits to incorrect place values.
  - Correct: Always start grouping from the right (the least significant end) for integer binary numbers.
- **Wrong:** Starting the exponent count at 1 for the rightmost integer digit in positional expansion.
  - Why it fails: This shifts all exponents by 1, leading to an incorrect value when converting to base 10.
  - Correct: The rightmost integer digit always has an exponent of 0, regardless of base.

## Cheatsheet

| Concept | Key Rule |
| --- | --- |
| Max digit in base $b$ | $b - 1$ |
| Convert to base 10 | Expand $d_n...d_0 = \sum_{i=0}^n d_i b^i$ |
| Convert base 10 → new base | Repeated division, reverse remainders |
| Binary → hexadecimal | Group 4 bits from right, 1 hex digit per group |
| Binary addition | Carry 1 when sum ≥ 2 |

## What's next

Number representation is the foundational topic for all work in discrete mathematics and algebra in IB AA HL. The logical thinking skills you practice here will help you solve more complex problems across all units of the syllabus, including sequences, series, and calculus. Mastery of binary and base conversion also prepares you for topics like logic, set theory, and counting principles that appear frequently in Paper 1. This topic also forms the base for any further study of computer science or quantitative mathematics.

- [Sequences and Series](https://www.owlsprep.com/study/ib-math-aa-hl-u1-sequences-and-series/)
- [Exponents and logarithms](https://www.owlsprep.com/study/ib-math-aa-hl-u1-exponents-and-logarithms/)
- [Counting Principles](https://www.owlsprep.com/study/ib-math-aa-hl-u1-counting-principles/)

---

From [OwlsPrep](https://www.owlsprep.com) — free study guides for A-Level, IB, AP and IGCSE, written against the official syllabus. Canonical page: https://www.owlsprep.com/study/ib-math-aa-hl-u1-number-representation-and-number-systems/
