Science
Binary Hex Converter
Convert numbers between binary, octal, decimal, and hexadecimal.
💻
Binary Hex Converter
Results
Formula & Methodology
Decimal → Binary: Repeatedly divide by 2
Decimal → Octal: Repeatedly divide by 8
Decimal → Hex: Repeatedly divide by 16
Hex digits: 0-9 then A(10), B(11), C(12), D(13), E(14), F(15)
PHP Functions: decbin(), decoct(), dechex(), bindec()
Decimal → Octal: Repeatedly divide by 8
Decimal → Hex: Repeatedly divide by 16
Hex digits: 0-9 then A(10), B(11), C(12), D(13), E(14), F(15)
PHP Functions: decbin(), decoct(), dechex(), bindec()
About Binary Hex Converter
Our number base converter converts any number between all four common bases — binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) — simultaneously.
Frequently Asked Questions
Binary is a number system that uses only two digits: 0 and 1. It's the fundamental language of computers. Each digit position represents a power of 2 (1, 2, 4, 8, 16...). Binary 1011 = 8+0+2+1 = decimal 11.
Multiply each binary digit by 2 raised to its position (counting from right, starting at 0). Sum all results. Example: 1101 = (1×8) + (1×4) + (0×2) + (1×1) = 8+4+0+1 = 13.
Repeatedly divide by 2 and record remainders. Example: 13÷2=6 R1, 6÷2=3 R0, 3÷2=1 R1, 1÷2=0 R1. Read remainders bottom-to-top: 1101. Or use subtraction method: find largest power of 2 ≤ number, mark 1, subtract, repeat.
Hexadecimal uses 16 digits: 0-9 and A-F (A=10, B=11, C=12, D=13, E=14, F=15). One hex digit represents exactly 4 binary digits (a nibble). Hex is widely used in programming for memory addresses, color codes (#FF5733), and byte values.
Group binary digits into sets of 4 from the right (pad with leading zeros if needed), then convert each group to its hex equivalent. Example: 11101100 → 1110=E, 1100=C → EC (= decimal 236).
Octal uses digits 0-7. Group binary digits in sets of 3 from the right to convert. Octal was historically important in computing (Unix file permissions use octal: chmod 755). Today, hexadecimal is more commonly used.
Hexadecimal compactly represents binary data — 2 hex digits represent exactly 1 byte (8 bits). It's human-readable yet directly maps to binary. Used in debugging (memory dumps), color codes, ASCII values, machine code, and hardware registers.
Related Calculators
🌡️
Science
Temperature Converter
Convert between Celsius, Fahrenheit, Kelvin, and Rankine.
🧪
Science
pH Calculator
Calculate pH, pOH, and classify acid/base strength.
⚗️
Science
Molecular Weight Calculator
Find molecular weight from any chemical formula.
🔐
Science
Hash Calculator
Generate MD5, SHA-1, SHA-256, and SHA-512 hash values.
🔭
Science
Scientific Notation Converter
Convert between standard and scientific notation instantly.