Number Base Systems Explained
Number base systems are fundamental to computing. While we use decimal (base 10) in everyday life, computers use binary (base 2). Hexadecimal (base 16) is popular because it's compact and maps cleanly to binary (4 bits = 1 hex digit).
Base Systems
| Base | Name | Digits | Example (10) |
|---|---|---|---|
| 2 | Binary | 0, 1 | 1010 |
| 8 | Octal | 0-7 | 12 |
| 10 | Decimal | 0-9 | 10 |
| 16 | Hexadecimal | 0-9, A-F | A |
Common Use Cases
- Binary - CPU operations, logic gates, bit manipulation
- Hexadecimal - Memory addresses, color codes (#FF0000), MAC addresses
- Octal - Unix file permissions (chmod 755)
FAQ
Why do computers use binary?
Electronic circuits have two states: on/off, making binary (0 and 1) the natural choice for digital systems.
Why is hexadecimal popular in programming?
Each hex digit represents exactly 4 binary bits, making it compact and easy to convert. 0xFF = 11111111 = 255.