Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal instantly.
About this tool
Positional number systems represent values using a fixed number of symbols (the base, or radix) where each position has a weight equal to a power of the base. Decimal (base 10) uses digits 0–9. Binary (base 2) uses only 0 and 1 — the natural language of digital electronics, where each digit represents one bit. Octal (base 8) uses digits 0–7 and was historically common in Unix systems for representing file permissions. Hexadecimal (base 16) uses digits 0–9 and letters A–F, providing a compact representation of binary data.
The relationship between binary and hexadecimal is particularly useful: each hex digit corresponds to exactly 4 binary bits (a nibble), and each byte (8 bits) corresponds to exactly 2 hex digits. This makes hexadecimal the standard for expressing memory addresses, color values, hash outputs, and binary protocol data — it is far more compact and readable than binary while maintaining a direct mapping.
To convert from any base to decimal, multiply each digit by the base raised to its position power (rightmost position is 0) and sum the results. For example, binary 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11. To convert from decimal to another base, repeatedly divide by the target base and collect the remainders from bottom to top. Understanding base conversion is fundamental to low-level programming, network addressing, and debugging binary protocols.