Binary (Base 2): Uses only 0 and 1. Each digit represents a power of 2.
Decimal (Base 10): Standard counting system. Uses digits 0-9.
Hexadecimal (Base 16): Uses 0-9 and A-F. Compact representation of binary.
Octal (Base 8): Uses 0-7. Common in Unix file permissions.
Hexadecimal is widely used in computing because:
| Dec | Hex | Binary | Char |
|---|---|---|---|
| 0 | 0x00 | 00000000 | NUL |
| 32 | 0x20 | 00100000 | Space |
| 48 | 0x30 | 00110000 | 0 |
| 65 | 0x41 | 01000001 | A |
| 97 | 0x61 | 01100001 | a |
| 127 | 0x7F | 01111111 | DEL |
| 255 | 0xFF | 11111111 | ΓΏ |
Each bit position in binary represents a power of 2:
| Bit | Power | Value | Hex |
|---|---|---|---|
| Bit 0 | 20 | 1 | 0x01 |
| Bit 1 | 21 | 2 | 0x02 |
| Bit 2 | 22 | 4 | 0x04 |
| Bit 3 | 23 | 8 | 0x08 |
| Bit 4 | 24 | 16 | 0x10 |
| Bit 5 | 25 | 32 | 0x20 |
| Bit 6 | 26 | 64 | 0x40 |
| Bit 7 | 27 | 128 | 0x80 |