Curriculum Library

Number Base System

Study this topic with organised learning content and related resources.

SS1 First Term Week1

Lesson Note

INTRODUCTION

Number bases are the languages of numbers. While we use base ten (decimal) in everyday life, many devices and computer systems use other bases such as binary (base two), octal (base eight) and hexadecimal (base sixteen). Understanding how numbers are written, converted and manipulated in different bases is essential for mathematics, science, engineering and computer science. This lesson will explore the principles of number base systems, show how to convert between bases, handle fractional parts, perform arithmetic in non‑decimal bases and see how these concepts apply to real‑world computing tasks.

MAIN CONTENT

Definition and Notation of Number Bases

In a positional number system, each digit’s value depends on its position and on the base $b$. A number $d_{n-1}d_{n-2}\dots d_{1}d_{0}$ in base $b$ represents

$$ \sum_{k=0}^{n-1} d_{k}b^{k} $$

where each $d_{k}$ satisfies $0 \le d_{k} < b$. For example, $1011_{2}$ means $$1\cdot2^{3}+0\cdot2^{2}+1\cdot2^{1}+1\cdot2^{0}$$.

Worked Example

Convert $1011_{2}$ to decimal.

Step 1: Write the positional expansion

$$1011_{2}=1\cdot2^{3}+0\cdot2^{2}+1\cdot2^{1}+1\cdot2^{0}$$

Step 2: Evaluate the powers of two

$$2^{3}=8,\; 2^{2}=4,\; 2^{1}=2,\; 2^{0}=1$$

Step 3: Multiply and sum

$$1\cdot8+0\cdot4+1\cdot2+1\cdot1 = 8+0+2+1 = 11$$

Answer: $1011_{2}=11_{10}$

Practice Questions

1. Convert $1100_{2}$ to decimal.

2. Convert $321_{5}$ to decimal.

Answers: 1) $12_{10}$, 2) $$3\cdot5^{2}+2\cdot5^{1}+1\cdot5^{0}=75+10+1=86_{10}$$

Converting Numbers from Base 10 to Base b

To convert a decimal integer to base $b$, repeatedly divide by $b$ and record the remainders. The remainders read in reverse give the digits of the target base.

Worked Example

Convert $45_{10}$ to base $3$.

Step 1: Divide 45 by 3 → quotient 15, remainder 0.

Step 2: Divide 15 by 3 → quotient 5, remainder 0.

Step 3: Divide 5 by 3 → quotient 1, remainder 2.

Step 4: Divide 1 by 3 → quotient 0, remainder 1.

Step 5: Read remainders upwards: $1\,2\,0\,0_{3}$

Answer: $45_{10}=1200_{3}$

Practice Questions

1. Convert $27_{10}$ to base $4$.

2. Convert $100_{10}$ to base $5$.

Answers: 1) $123_{4}$, 2) $400_{5}$

Converting Decimal Fractions Between Bases

A fractional part $\sum_{k=1}^{m} d_{-k}b^{-k}$ is converted by multiplying by $b$ and taking the integer part as the next digit. Repeat with the new fractional part.

Worked Example

Convert $0.1011_{2}$ to decimal.

Step 1: Multiply by 2 → $0.1011\times2 = 1.0110$ → integer part 1.

Step 2: Multiply fractional part 0.0110 by 2 → $0.0110\times2 = 0.1100$ → integer part 0.

Step 3: Multiply 0.1100 by 2 → $1.1000$ → integer part 1.

Step 4: Multiply 0.1000 by 2 → $0.2000$ → integer part 0.

Step 5: Sum the powers of two: $$1\cdot2^{-1}+0\cdot2^{-2}+1\cdot2^{-3}+0\cdot2^{-4}=0.5+0+0.125+0=0.625$$

Answer: $0.1011_{2}=0.625_{10}$

Practice Questions

1. Convert $0.101_{3}$ to decimal.

2. Convert $0.75_{10}$ to base $2$.

Answers: 1) $$1\cdot3^{-1}+0\cdot3^{-2}+1\cdot3^{-3}=1/3+0+1/27=10/27$$, 2) $0.75_{10}=0.11_{2}$

Arithmetic Operations in Non‑Decimal Bases

Addition, subtraction, multiplication and division follow the same rules as in decimal, but carry or borrow occurs when a partial sum exceeds the base.

Worked Example

Add $1011_{2}$ and $110_{2}$.

Step 1: Align digits:

```

1011

+ 0110

```

Step 2: Add from right:

$1+0=1$ → write 1.

$1+1=2$ → write 0, carry 1.

$0+1+carry1=2$ → write 0, carry 1.

$1+0+carry1=2$ → write 0, carry 1.

Step 3: Write final carry: 1.

Result: $11001_{2}$

Answer: $1011_{2}+110_{2}=11001_{2}$

Practice Questions

1. Subtract $1010_{2}$ from $1101_{2}$.

2. Multiply $11_{2}$ by $10_{2}$.

Answers: 1) $101_{2}$, 2) $110_{2}$

Binary, Octal, Hexadecimal Systems and Their Use in Computing

Computers store data in binary. Octal and hexadecimal are convenient shorthand notations. Each hexadecimal digit represents four binary digits (bits). For example, $255_{10}$ equals $11111111_{2}$, which groups into $1111\,1111$, giving $FF_{16}$.

Worked Example

Convert $255_{10}$ to hexadecimal.

Step 1: Divide 255 by 16 → quotient 15, remainder 15.

Step 2: 15 in hex is $F$.

Step 3: Write remainder $F$ and quotient $F$ → $FF_{16}$.

Answer: $255_{10}=FF_{16}$

Practice Questions

1. Convert $1023_{10}$ to binary.

2. Convert $7A_{16}$ to decimal.

Answers: 1) $1111111111_{2}$, 2) $$7\cdot16^{1}+10\cdot16^{0}=112+10=122_{10}$$

Practical Applications and Examples

Base systems enable efficient data representation, error detection, and communication protocols. For instance, IP addresses use dotted decimal notation derived from binary, and cryptographic keys are often expressed in hexadecimal.

Worked Example

Encode the ASCII character 'A' (decimal 65) in binary, octal, and hexadecimal.

Step 1: Binary of 65 → $1000001_{2}$.

Step 2: Octal: group binary into threes → $010\,000\,001$ → $101_{8}$.

Step 3: Hexadecimal: group binary into fours → $0100\,0001$ → $41_{16}$.

Answer: 'A' = $1000001_{2}$ = $101_{8}$ = $41_{16}$

Practice Questions

1. What is the binary representation of decimal 42?

2. Convert $C3_{16}$ to decimal.

Answers: 1) $101010_{2}$, 2) $$12\cdot16^{1}+3\cdot16^{0}=192+3=195_{10}$$

SUMMARY

Number base systems are foundational for mathematics and technology. We learned how to write numbers in any base, convert between bases, handle fractional parts, and perform arithmetic operations in non‑decimal systems. Binary, octal and hexadecimal systems are especially important in computing, allowing compact representation of data and efficient processing. Mastery of these concepts equips students to understand computer architecture, digital electronics and many areas of applied mathematics.

EVALUATION

1. Convert $1111001_{2}$ to decimal.

2. Convert $123_{5}$ to base $2$.

3. Convert $0.3125_{10}$ to base $4$.

4. Subtract $10101_{2}$ from $11010_{2}$.

5. Multiply $2F_{16}$ by $3_{10}$ and give the result in hexadecimal.