A number system is a way to represent numbers using a consistent set of symbols. In digital electronics, numbers are represented in different bases because digital circuits only understand binary (0 and 1).
Types of Number Systems
- Binary Number System (Base 2)
- Symbols: 0, 1
- Each digit is called a bit.
- Example:
1011in binary- Value = (1×2³) + (0×2²) + (1×2¹) + (1×2⁰) = 8 + 0 + 2 + 1 = 11 (decimal)
- Used in: Digital circuits, computers, memory addressing.
- Decimal Number System (Base 10)
- Symbols: 0,1,2,3,4,5,6,7,8,9
- This is the common number system humans use.
- Example: 345 = (3×10²) + (4×10¹) + (5×10⁰)
- Octal Number System (Base 8)
- Symbols: 0–7
- Used as a shorthand for binary numbers (3 bits = 1 octal digit).
- Example: 57₈ = 5×8¹ + 7×8⁰ = 40 + 7 = 47 (decimal)
- Hexadecimal Number System (Base 16)
- Symbols: 0–9, A–F (A=10, B=11… F=15)
- Used as a shorthand for binary numbers (4 bits = 1 hex digit).
- Example: 2F₁₆ = 2×16¹ + 15×16⁰ = 32 + 15 = 47 (decimal)
- Commonly used in programming and memory addressing.
Conversions Between Number Systems
- Binary → Decimal:
Multiply each bit by 2ⁿ (n = position from right, starting at 0). - Decimal → Binary:
Divide the number by 2 repeatedly and record remainders in reverse order. - Binary ↔ Octal:
Group binary digits in sets of 3 from right to left → convert each group to octal. - Binary ↔ Hexadecimal:
Group binary digits in sets of 4 from right to left → convert each group to hex.
Practical Applications
- Memory addressing: Computers use binary and hex to store data.
- Digital circuits: Logic gates process binary inputs.
- Microcontrollers and CPUs: Registers store data in binary.
- Networking: IP addresses are represented in binary and hex.
💡 Quick Tip: Always remember grouping rules for conversion:
- Binary → Octal: group in 3s
- Binary → Hex: group in 4s