Number System
Understand different number systems and bases
Understanding Number Systems
A number system is a way of representing numbers using digits or symbols. The most common number system in everyday life is the decimal (base-10) system, which uses digits 0-9. However, computers use other systems like binary (base-2) and hexadecimal (base-16).
Decimal System (Base-10)
The decimal system is the standard number system we use daily. Each digit position represents a power of 10:
- Units place: 10⁰ = 1
- Tens place: 10¹ = 10
- Hundreds place: 10² = 100
- Thousands place: 10³ = 1000
Example: The number 2,345 = (2 × 10³) + (3 × 10²) + (4 × 10¹) + (5 × 10⁰)
Binary System (Base-2)
Binary uses only two digits: 0 and 1. Each position represents a power of 2. Computers use binary because it's easy to represent using electrical states (on/off).
Example: The binary number 1011₂ = (1 × 2³) + (0 × 2²) + (1 × 2¹) + (1 × 2⁰) = 8 + 0 + 2 + 1 = 11₁₀
Hexadecimal System (Base-16)
Hexadecimal uses digits 0-9 and letters A-F (where A=10, B=11, C=12, D=13, E=14, F=15). It's commonly used in computing.
Example: The hexadecimal number 2F₁₆ = (2 × 16¹) + (15 × 16⁰) = 32 + 15 = 47₁₀
Conversion Between Systems
Converting from decimal to binary: Divide by 2 repeatedly and note remainders.
Example: Convert 13₁₀ to binary: 13÷2=6 r1, 6÷2=3 r0, 3÷2=1 r1, 1÷2=0 r1. Reading remainders bottom-up: 1101₂
Key Concepts
- Different bases use different digits (0-9 for base-10, 0-1 for base-2, 0-F for base-16)
- Place value is determined by powers of the base
- Conversion uses repeated division or multiplication
- Understanding number systems is crucial for computer science