Binary / Decimal / Hex Converter
Convert numbers between binary, decimal, and hexadecimal instantly.
Enter any value in any base to see all three conversions with optional octal output.
Binary is base-2 — a number system that uses only two digits, 0 and 1. It’s the native language of computers, which represent all data as combinations of on (1) and off (0) electrical signals. Converting between binary and decimal is a fundamental skill in computer science and digital electronics.
Binary to Decimal conversion: Decimal = Σ (Bit × 2ⁿ)
Each bit position represents a power of 2, starting from 2⁰ at the rightmost position.
Worked example: Binary: 1101 1010
Position values (right to left): 2⁷ 2⁶ 2⁵ 2⁴ 2³ 2² 2¹ 2⁰ = 128, 64, 32, 16, 8, 4, 2, 1
Calculation: (1×128) + (1×64) + (0×32) + (1×16) + (1×8) + (0×4) + (1×2) + (0×1) = 128 + 64 + 0 + 16 + 8 + 0 + 2 + 0 = 218
Decimal to Binary conversion: Divide the number by 2 repeatedly, recording remainders. Read remainders bottom to top.
Example: Convert 218 to binary 218 ÷ 2 = 109 R 0 109 ÷ 2 = 54 R 1 54 ÷ 2 = 27 R 0 27 ÷ 2 = 13 R 1 13 ÷ 2 = 6 R 1 6 ÷ 2 = 3 R 0 3 ÷ 2 = 1 R 1 1 ÷ 2 = 0 R 1 Read remainders upward → 1101 1010 ✓
Quick reference — common values:
- 0000 = 0 | 0001 = 1 | 0010 = 2 | 0100 = 4 | 1000 = 8
- 1111 = 15 | 1111 1111 = 255 (one byte, max)
- One byte = 8 bits | Kilobyte ≈ 1,024 bytes | Megabyte ≈ 1,048,576 bytes
How we build and check this calculator
This calculator runs entirely in your browser, so the numbers you enter stay on your device. The math behind it is written by hand and tested against worked examples and standard references before the page goes live.
SuperGlobalCalculator is independently built and maintained. See how we build and verify our calculators.