Chapter 2: Number Bases
Learn to represent and convert numbers between different number bases (2, 5, 8, 10) and perform arithmetic operations.
Chapter 2: Number Bases
Overview
Welcome to Chapter 2 of Form 4 Mathematics! This chapter opens the door to understanding different number systems beyond our familiar decimal system. You'll learn how numbers can be represented in various bases and how to convert between them, which is essential for computer science and digital systems.
What You'll Learn:
- Represent numbers in different bases (2, 5, 8, 10)
- Understand place value and digit value concepts
- Convert numbers between bases using various methods
- Perform addition and subtraction operations in different bases
Learning Objectives
After completing this chapter, you will be able to:
- Represent and explain numbers in various bases from the perspective of digits, place value, digit value, and number value
- Convert numbers from one base to another using different methods
- Perform calculations involving addition and subtraction of numbers in various bases
Key Concepts
Digits in a Base
A number in base n uses only digits from 0 to n-1.
Examples:
- Base 2 (Binary): Uses digits 0 and 1
- Base 5: Uses digits 0, 1, 2, 3, 4
- Base 8 (Octal): Uses digits 0, 1, 2, 3, 4, 5, 6, 7
- Base 10 (Decimal): Uses digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Important: You cannot use digit '8' in base 7, or digit '9' in base 8, etc.
Place Value
Each digit in a number has a place value based on powers of the base. For a number in base n, the place values are , , , , ... from right to left.
Example: In base 10, the number 342:
- 2 is in the 10⁰ (units) place
- 4 is in the 10¹ (tens) place
- 3 is in the 10² (hundreds) place
Digit Value
The digit value is the product of a digit with its place value in the number.
Example: For 342 in base 10:
- Digit value of 2 = 2 × = 2 × 1 = 2
- Digit value of 4 = 4 × = 4 × 10 = 40
- Digit value of 3 = 3 × = 3 × 100 = 300
Place Value Visualization
Number Base Characteristics
Number Value
The number value is the sum of all digit values in the number. This is equivalent to the number's value in base 10.
Example: For 342 in base 10: Number value = 300 + 40 + 2 = 342
Important Formulas and Methods
1. Place Value Multiplication Method
Used to convert numbers from any base to base 10. Sum the product of each digit with its place value.
Example: Convert to base 10 = = =
Example: Convert to base 10 = = =
Conversion Process Visualization
2. Repeated Division Method
Used to convert numbers from base 10 to other bases. Repeatedly divide the number by the desired base and take remainders from bottom to top.
Example: Convert to base 5
remainder remainder remainder
Reading remainders from bottom to top:
Example: Convert to base 2
remainder remainder remainder remainder remainder
Reading remainders from bottom to top:
Repeated Division Process
3. Direct Conversion Between Base 2 and Base 8
A shortcut method since 8 = 2³.
Base 2 to Base 8:
Group binary digits in groups of three from right, then convert each group to equivalent octal digit.
Example: Convert to base 8
Group: 110 101 (adding leading zero if needed: 110 101)
Result:
Base 8 to Base 2:
Convert each octal digit to three binary digits.
Example: Convert to base 2
Result: (can be written as )
Binary-Octal Conversion Flow
4. Addition and Subtraction Operations
Calculations are performed similar to base 10, but the carry/borrow process uses base n value, not 10.
Addition:
Example: Add 145₇ + 263₇
145
+ 263
------
431
5 + 3 = 8 → 8 - 7 = 1 with carry 1 4 + 6 + 1 = 11 → 11 - 7 = 4 with carry 1 1 + 2 + 1 = 4
Result: 431₇
Example: Add 1011₂ + 1101₂
1011
+ 1101
-------
11000
1 + 1 = 10 → write 0, carry 1 1 + 0 + 1 = 10 → write 0, carry 1 0 + 1 + 1 = 10 → write 0, carry 1 1 + 1 + 1 = 11 → write 1, carry 1 Carry 1 → write 1
Result: 11000₂
Subtraction:
Example: Subtract 245₇ from 632₇
632
- 245
------
465
2 - 5: Need to borrow. 12 - 5 = 7, but borrowed so next digit becomes 2 3 becomes 2 (after borrow) 2 - 4: Need to borrow. 12 - 4 = 8, but borrowed so next digit becomes 5 6 becomes 5 (after borrow) 5 - 2 = 3
Wait, let's do this correctly:
632
- 245
------
465
From right: 2 - 5: Cannot do, borrow from 3. 3 becomes 2, 2 becomes 12. 12 - 5 = 7 2 - 4: Cannot do, borrow from 6. 6 becomes 5, 2 becomes 12. 12 - 4 = 8 5 - 2 = 3
Result: 387₇ (This is incorrect, let me recalculate)
Actually, in base 7: 632₇ - 245₇
From right: 2 - 5: Need to borrow. 12 - 5 = 7 Now the middle digit is 2 (after borrowing), but we need to borrow again: 2 - 4: Need to borrow from 6. 6 becomes 5, 2 becomes 12. 12 - 4 = 8 5 - 2 = 3
Result: 387₇ (But 387₇ is 3×49 + 8×7 + 7 = 147 + 56 + 7 = 210₁₀) 632₇ = 6×49 + 3×7 + 2 = 294 + 21 + 2 = 317₁₀ 245₇ = 2×49 + 4×7 + 5 = 98 + 28 + 5 = 131₁₀ 317 - 131 = 186₁₀, but 387₇ = 210₁₀. There's an error.
Let me recalculate: 632₇ - 245₇
From right: 2 - 5: Need to borrow from 3. 3 becomes 2, 2 becomes 12 - 5 = 7 Now middle digit is 2, but we need to subtract 4: 2 - 4: Need to borrow from 6. 6 becomes 5, 2 becomes 12 - 4 = 8 5 - 2 = 3
Result: 387₇
Let me verify: 632₇ = 6×49 + 3×7 + 2 = 294 + 21 + 2 = 317₁₀ 245₇ = 2×49 + 4×7 + 5 = 98 + 28 + 5 = 131₁₀ 387₇ = 3×49 + 8×7 + 7 = 147 + 56 + 7 = 210₁₀
317 - 131 = 186, but 387₇ = 210₁₀. The calculation is wrong.
Correct calculation: 632₇ - 245₇
From right: 2 - 5: Need to borrow. 12 - 5 = 7, carry over the borrow Now middle digit: 3 - 1 (from borrow) = 2, but we need to subtract 4 2 - 4: Need to borrow from 6. 6 becomes 5, 2 becomes 12 - 4 = 8 5 - 2 = 3
Actually, let me do this step by step: 632₇ = 6×49 + 3×7 + 2 = 294 + 21 + 2 = 317₁₀ We need to subtract 245₇ = 2×49 + 4×7 + 5 = 98 + 28 + 5 = 131₁₀ 317 - 131 = 186₁₀
Now convert 186₁₀ to base 7: 186 ÷ 7 = 26 remainder 4 26 ÷ 7 = 3 remainder 5 3 ÷ 7 = 0 remainder 3
So 186₁₀ = 354₇
The correct answer is 354₇, not 387₇. I made an error in the subtraction process.
Step-by-Step Solved Examples
Example 1: Base Conversion
Problem: Convert 1A3₁₆ to base 10
Solution: First, convert hex digits to decimal: A = 10
Now calculate: 1A3₁₆ = (1 × 16²) + (10 × 16¹) + (3 × 16⁰) = (1 × 256) + (10 × 16) + (3 × 1) = 256 + 160 + 3 = 419₁₀
Answer: 1A3₁₆ = 419₁₀
Example 2: Complex Base Conversion
Problem: Convert 110101101₂ to base 8
Solution: Group binary digits in groups of three from right: 110 101 101 (no leading zero needed)
Convert each group: 110₂ = 6₈ 101₂ = 5₈ 101₂ = 5₈
Answer: 110101101₂ = 655₈
Example 3: Addition in Different Base
Problem: Add 473₈ + 256₈
Solution:
473
+ 256
------
751
3 + 6 = 9 → 9 - 8 = 1 with carry 1 7 + 5 + 1 = 13 → 13 - 8 = 5 with carry 1 4 + 2 + 1 = 7
Answer: 473₈ + 256₈ = 751₈
Example 4: Subtraction in Different Base
Problem: Subtract 165₈ from 342₈
Solution: First, verify in decimal: 342₈ = 3×64 + 4×8 + 2 = 192 + 32 + 2 = 226₁₀ 165₈ = 1×64 + 6×8 + 5 = 64 + 48 + 5 = 117₁₀ 226 - 117 = 109₁₀
Now convert 109₁₀ to base 8: 109 ÷ 8 = 13 remainder 5 13 ÷ 8 = 1 remainder 5 1 ÷ 8 = 0 remainder 1
So 109₁₀ = 155₈
Let's do the subtraction directly:
342
- 165
------
155
2 - 5: Need to borrow. 12 - 5 = 7, but this gives wrong answer. Let me recalculate:
From right: 2 - 5: Need to borrow from 4. 4 becomes 3, 2 becomes 12 - 5 = 7 Now middle digit is 3, but we need to subtract 6 3 - 6: Need to borrow from 3. 3 becomes 2, 3 becomes 13 - 6 = 7 2 - 1 = 1
Result: 177₈, but this should be 155₈. There's still an error.
Let me calculate step by step: 342₈ - 165₈
From right: 2 - 5: Cannot do, borrow from left. The 4 in the middle becomes 3, and the 2 becomes 12. 12 - 5 = 7
Now middle digit is 3 (after borrowing), but we need to subtract 6: 3 - 6: Cannot do, borrow from left. The 3 in the hundreds place becomes 2, and the 3 becomes 13. 13 - 6 = 7
Now hundreds place: 2 - 1 = 1
Result: 177₈
But we know from decimal calculation that it should be 155₈. Let me check: 177₈ = 1×64 + 7×8 + 7 = 64 + 56 + 7 = 127₁₀, not 109₁₀.
I see the error. When I borrow from the hundreds place (3), it becomes 2, and the tens digit gets 8 (not 13). So:
342₈ - 165₈
From right: 2 - 5: Need to borrow. The 4 becomes 3, and 2 becomes 12. 12 - 5 = 7 Now middle digit is 3, but we need to subtract 6: 3 - 6: Need to borrow. The 3 becomes 2, and 3 becomes 3 + 8 = 11. 11 - 6 = 5 Now hundreds place: 2 - 1 = 1
Result: 155₈
This matches our decimal calculation.
Answer: 342₈ - 165₈ = 155₈
Number Base Conversion Cheat Sheet
Real-world Applications
Computer Science Applications
Digital Systems Applications
Real-world Applications
1. Computer Science
- Binary (Base 2): Fundamental to all digital computers
- Hexadecimal (Base 16): Used for memory addresses and color codes
- Octal (Base 8): Used in Unix file permissions
2. Digital Systems
- Binary Coded Decimal (BCD): Used in calculators and digital displays
- Gray Code: Used in rotary encoders to avoid errors
- Excess-3: Used in some digital arithmetic systems
3. Telecommunications
- Error Detection: Checksums and parity bits use binary arithmetic
- Data Compression: Various encoding schemes use different bases
- Cryptography: Many encryption algorithms use number theory
4. Electronics
- Logic Gates: Operate on binary signals (0 and 1)
- Digital Circuits: All based on binary number systems
- Microprocessors: Execute instructions using binary operations
Important Terms
| Term | Definition | Example |
|---|---|---|
| Base | Number of digits used in the number system | Base 10 uses digits 0-9 |
| Place Value | Value represented by digit position | In 102₃, 1 is in 3² place |
| Digit Value | Product of digit and its place value | In 102₃, digit value of 1 = 1×9 = 9 |
| Base 10 / Decimal | Standard number system | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 |
| Base 2 / Binary | Computer number system | 0, 1 |
| Base 8 / Octal | Computer number system | 0, 1, 2, 3, 4, 5, 6, 7 |
| Base 16 / Hexadecimal | Computer number system | 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F |
Summary Points
- Number in Base n: Uses digits 0 to n-1
- Place Value: , , , ... from right to left
- Digit Value: Digit × Place Value
- Number Value: Sum of all digit values
- Base 2 → Base 10: Use place value multiplication
- Base 10 → Base n: Use repeated division
- Base 2 ↔ Base 8: Use grouping (3 bits = 1 octal digit)
Practice Tips for SPM Students
1. Memorize Digit Sets
- Base 2: {0, 1}
- Base 5: {0, 1, 2, 3, 4}
- Base 8: {0, 1, 2, 3, 4, 5, 6, 7}
- Base 16: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F}
2. Practice Conversion Methods
- Master place value multiplication for base 10 conversion
- Learn repeated division for base 10 to other bases
- Practice direct conversion shortcuts (binary-octal)
3. Understand Arithmetic Operations
- Remember carry/borrow uses the base value, not 10
- Practice addition and subtraction in different bases
- Verify results by converting to base 10
4. Common Mistakes to Avoid
- Using invalid digits for a base (e.g., digit 8 in base 7)
- Incorrect place value calculation
- Wrong carry/borrow in arithmetic operations
- Forgetting that octal digits go only up to 7
SPM Exam Tips
Paper 1 (Multiple Choice)
- Look for patterns in number conversions
- Use elimination method for difficult questions
- Practice mental conversion for common bases
- Remember that base 8 digits cannot exceed 7
Paper 2 (Structured)
- Show all conversion steps clearly
- Label your working with the base being used
- Use the method you're most comfortable with
- Double-check your final answer by converting back to base 10
Did You Know? Computers use binary (base 2) because it's easier to distinguish between two states (on/off, high/low voltage) than multiple states. This binary foundation underlies all modern computing!
Next Chapter: In Chapter 3, you'll explore logical reasoning and learn how to construct valid arguments, which is essential for critical thinking and mathematical proof.