Convert

Precision unit conversion

Number Base Conversion (Binary, Decimal, Hex, Octal)

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.

Reference table

ConvertResult
Decimal 10Binary 1010 / Hex A / Octal 12
Decimal 16Binary 10000 / Hex 10 / Octal 20
Decimal 255Binary 11111111 / Hex FF / Octal 377
Decimal 100Binary 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.

Use the live converter

The full converter switches instantly between decimal, binary, hexadecimal and octal — handy for programming, networking and computer science coursework.

Open Number Bases converter →

Common number bases questions

How do I convert decimal to binary?

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.

Why is hexadecimal used for colour codes?

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.

What is octal used for?

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.