Convert between binary (base-2), decimal (base-10), hexadecimal (base-16), and octal (base-8) number systems instantly. Essential for programmers, students, and anyone working with computer science, networking, or electronics.
Different number systems are used in computing, electronics, and mathematics. Computers use binary (base-2) internally. Programmers often use hexadecimal (base-16) for memory addresses and color codes. Octal (base-8) was once common in Unix systems. Understanding conversion between these systems is a fundamental programming skill.
Binary uses only 0 and 1. Each position represents a power of 2: 1, 2, 4, 8, 16, 32, 64, 128... Binary 1010 = 1x8 + 0x4 + 1x2 + 0x1 = 10 decimal. All computer data is ultimately stored as binary bits. 8 bits = 1 byte. 1 KB = 1,024 bytes = 8,192 bits.
Hex uses 0-9 and A-F (A=10, B=11, C=12, D=13, E=14, F=15). Each hex digit = 4 binary bits (a nibble). Used for HTML colors (#FF5733), memory addresses (0x1A2B), and machine code. FF hex = 255 decimal = 11111111 binary.
Octal uses digits 0-7. Each octal digit = 3 binary bits. Unix file permissions use octal: chmod 755 = binary 111 101 101 = rwxr-xr-x. Less common today but still used in Linux/Unix systems.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 255 | 11111111 | 377 | FF |