This binary converter translates numbers between decimal, binary, hexadecimal and octal — enter a value in any base and get the other three instantly, with the bit pattern shown.

Decimal –
Binary –
Binary (grouped) –
Hexadecimal –
Octal –
Bits needed –

Four Bases, One Number

Number systems differ only in how many digits they use before carrying: decimal carries at 10, octal at 8, hexadecimal at 16, and binary — the computer’s native tongue, built from the two states a transistor can hold — at 2. Hexadecimal survives because it compresses binary beautifully: each hex digit is exactly 4 bits (a “nibble”), so byte values are two tidy hex digits instead of eight 1s and 0s. This converter is part of our Other Calculators collection.

Worked Example (Verified)

2026 in all four bases:

  • Decimal: 2026
  • Binary: 11111101010 (11 bits)
  • Hexadecimal: 0x7EA (7 = 0111, E = 1110, A = 1010 — lay them side by side to see the binary)
  • Octal: 0o3752

Converting by Hand

  • Decimal → binary: repeatedly divide by 2 and record remainders; read them bottom-up. 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1 → 1101.
  • Binary → decimal: add the place values of the 1 bits: 1101 = 8 + 4 + 0 + 1 = 13.
  • Binary ⇄ hex: group binary in fours from the right and translate each group to one hex digit (or split each hex digit into its 4 bits).
  • Powers of two fluency — 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024 — makes all of the above fast; computing people memorize them the way musicians learn scales.

Where You Meet These Bases

  • IP addresses and subnet masks are dotted decimal over binary — see the Subnet Calculator for the bit-level masks at work.
  • Colors: CSS #F43676 is hex — RR GG BB bytes (F4 red, 36 green, 76 blue).
  • Memory and permissions: hex in dumps and addresses; octal in Unix file permissions (chmod 755 = rwxr-xr-x).
  • Scientific notation is base-10’s compression trick; hex is binary’s — our Scientific Notation Calculator covers the decimal side.

Related Tools

Frequently Asked Questions

What is 2026 in binary?

11111101010 — eleven bits. In hex it is 7EA, in octal 3752.

Why do computers use binary?

Because two-state devices (on/off, charged/not) are the easiest and most noise-proof to build. Everything else — text, images, video — is encoding layered on bits.

How do I convert hex to binary?

Replace each hex digit with its 4-bit pattern: A = 1010, F = 1111, 3 = 0011. So 0x3F = 0011 1111.

What does 0x and 0b mean?

Programmer prefixes: 0x signals hexadecimal, 0b binary, 0o octal. They prevent base ambiguity — “10” alone could be ten, two, eight or sixteen.

How many bits is a byte?

Eight — values 0–255, or 0x00–0xFF in hex. The Bits Needed row in the results shows how many bytes a value requires.

Is this binary converter free?

Yes — free, instant, no sign-up.