Precision unit conversion
Converting between number bases comes up constantly in programming, networking and low-level computing — colour codes, IP subnet masks, memory addresses and byte values are all commonly written in hex or binary rather than decimal.
| Convert | Result |
|---|---|
| Decimal 10 | Binary 1010 / Hex A / Octal 12 |
| Decimal 16 | Binary 10000 / Hex 10 / Octal 20 |
| Decimal 255 | Binary 11111111 / Hex FF / Octal 377 |
| Decimal 100 | Binary 1100100 / Hex 64 / Octal 144 |
Binary (base 2) uses only 0 and 1, and is the native representation computers use internally. Hexadecimal (base 16) uses 0–9 then A–F, and is popular because each hex digit maps neatly to exactly 4 binary bits — which is why colour codes (like #FF0000 for red) and memory addresses are usually written in hex rather than binary or decimal.
The full converter switches instantly between decimal, binary, hexadecimal and octal — handy for programming, networking and computer science coursework.
Open Number Bases converter →Repeatedly divide the decimal number by 2 and record the remainders — reading the remainders in reverse order gives the binary result. The converter does this instantly for any whole number.
Each hex digit represents exactly 4 bits, so a pair of hex digits (00–FF) maps neatly onto one 8-bit colour channel (0–255) — this makes hex a compact, human-readable way to write RGB colour values.
Octal (base 8) is less common today but still appears in Unix/Linux file permission notation (like chmod 755), where each digit maps to 3 binary bits representing read/write/execute permissions.