Overview
Common number systems and their uses
| positional system | Abbreviation/Mark | cardinality | Number range | Common Uses |
|---|---|---|---|---|
| binary | Bin /0b |
2 | 0–1 | Computer low-level languages, logic circuits, machine code |
| Octal | Oct /0o |
8 | 0–7 | Early Unix system permission representation; simplified binary representation |
| Decimal | Dec | 10 | 0–9 | Common number systems in daily life and mathematics |
| hexadecimal | Hex /0x |
16 | 0–9 + A–F | Memory address representation, color codes (such as those in web pages #FF5733), debugging, and reverse engineering. |
| Ternary | - | 3 | 0–2 | Theoretical research, such as balanced ternary (used in some advanced computing architectures). |
| Base 64 | Base64 | 64 | A–Z, a–z, 0–9, +, / | Data encoding for transmission (such as email and image encoding) |
| Sixty-binary | Base62 | 62 | A–Z, a–z, 0–9 | Short link, unique ID generation |
| Base 36 | Base36 | 36 | 0–9, A–Z | URL compression, database encoding |
| 256 base | - | 256 | 0x00–0xFF (bytes) | Byte operations in binary files, images, audio, and network protocols |
Why is it a power of 2?
Since computers are based on switches (high and low levels), it is naturally most efficient to use powers of 2 (such as 8, 16, 256) to represent data.
Hexadecimal ≈ Binary compressed format
A hexadecimal digit can represent 4 binary digits and is often used to represent binary data in shorter lengths.
Base64 and Base62
It is not a "positional system" but a "coding method" that is widely used in network transmission and encryption.
II, octal, decimal, and hexadecimal base comparison table
| Decimal (Dec) | Binary (Bin) | Octal (Oct) | Hexadecimal (Hex) |
|---|---|---|---|
| 0 | 00000 | 0 | 0 |
| 1 | 00001 | 1 | 1 |
| 2 | 00010 | 2 | 2 |
| 3 | 00011 | 3 | 3 |
| 4 | 00100 | 4 | 4 |
| 5 | 00101 | 5 | 5 |
| 6 | 00110 | 6 | 6 |
| 7 | 00111 | 7 | 7 |
| 8 | 01000 | 10 | 8 |
| 9 | 01001 | 11 | 9 |
| 10 | 01010 | 12 | A |
| 11 | 01011 | 13 | B |
| 12 | 01100 | 14 | C |
| 13 | 01101 | 15 | D |
| 14 | 01110 | 16 | E |
| 15 | 01111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 17 | 10001 | 21 | 11 |
| 18 | 10010 | 22 | 12 |
| 19 | 10011 | 23 | 13 |
| 20 | 10100 | 24 | 14 |
| 21 | 10101 | 25 | 15 |
| 22 | 10110 | 26 | 16 |
| 23 | 10111 | 27 | 17 |
| 24 | 11000 | 30 | 18 |
| 25 | 11001 | 31 | 19 |
| 26 | 11010 | 32 | 1A |
| 27 | 11011 | 33 | 1B |
| 28 | 11100 | 34 | 1C |
| 29 | 11101 | 35 | 1D |
| 30 | 11110 | 36 | 1E |
| 31 | 11111 | 37 | 1F |