Number Base Converter
Convert between binary, octal, decimal, and hexadecimal
Frequently Asked Questions
How do you convert a decimal number to binary?
Repeatedly divide by 2 and record the remainders from bottom to top. For 13: 13÷2=6 R1, 6÷2=3 R0, 3÷2=1 R1, 1÷2=0 R1 → binary 1101. Alternatively, the converter does this instantly — type 13 in the decimal field and binary 1101 appears automatically.
What is hexadecimal and where is it used?
Hexadecimal (base 16) uses digits 0–9 and letters A–F, where A = 10 and F = 15. It is widely used in computing because each hex digit maps exactly to 4 binary bits, making it compact. Hex appears in memory addresses, color codes (#FF5733), and machine code representations.
How does octal (base 8) differ from binary and hexadecimal?
Octal uses digits 0–7 and each octal digit maps to exactly 3 binary bits. For decimal 255: binary = 11111111, octal = 377, hex = FF. Octal was historically used in early computing systems but is less common today. It is still seen in Unix file permission modes (e.g., chmod 755).
Can this converter handle negative numbers or fractions?
No. The converter works with non-negative integers only. Negative numbers and fractional parts require additional notation (e.g., two’s complement for negative integers, radix point for fractions) that are outside the scope of this tool. Enter only whole positive numbers for accurate conversion.
Why do computers use binary instead of decimal?
Electronic circuits are most reliably built with two states — on and off, representing 1 and 0. This makes binary the natural language of digital hardware. Hexadecimal is a human-friendly shorthand since each hex digit represents exactly 4 bits, reducing the number of characters needed to express binary values.