calculatorkong
Text & Code

Number Base Converter

Convert between binary, octal, decimal and hex.

Binary
Octal
Decimal
Hexadecimal

Positional notation
value = Σ digitᵢ × base^i (i counted from the right, starting at 0)

For example binary 1011₂ = 1·8 + 0·4 + 1·2 + 1·1 = 11. Hex (base 16) uses A–F for 10–15 and is compact for bytes; octal is base 8. To convert to a base, repeatedly divide by the base and read the remainders bottom-up.

Converting between number bases

Different bases represent the same value with different digits. This tool parses your input in the base you choose and instantly shows the binary, octal, decimal and hexadecimal equivalents. It accepts optional prefixes like 0x or 0b and validates that your digits are legal for the selected base.

Binary and hex are everywhere in computing — from RGB colors (#FF8800) to file permissions and memory addresses.

Frequently Asked Questions

What are these number bases? +

Binary (base 2) uses 0–1, octal (base 8) uses 0–7, decimal (base 10) uses 0–9, and hexadecimal (base 16) uses 0–9 and A–F. Computers work in binary and hex.

How do I convert decimal to binary? +

Repeatedly divide by 2 and record the remainders bottom-up — or just type your decimal number here and read the binary result.

Why is hexadecimal used in computing? +

Hex is a compact way to represent binary: each hex digit maps to exactly 4 binary bits, so it's widely used for colors, memory addresses and byte values.

Powered by Calculator Kong ↗

Related Calculators