Home › Unit Converters › Binary to Decimal Converter

Binary to Decimal Converter

Use this free binary to decimal converter to turn a binary number into decimal — and into hexadecimal and octal at the same time. Flip the direction and it converts decimal back into binary just as easily. The tool shows the full working, digit by digit, so it is handy for students, programmers and anyone checking a value by hand. It handles very long binary numbers exactly, up to 1,024 bits.

10
Hex: A • Octal: 12 • 4 bits
1010 = 1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 10

How to use this converter

Step 1: Pick the direction. Binary → Decimal is selected for you.
Step 2: Type or paste your number into the box — 1010 is filled in as an example. For binary, use only the digits 0 and 1.
Step 3: Click Convert, or just type — the answer updates as you go.
Step 4: Read the result. The big number is the converted value, the next line shows the same value in hex and octal, and the last line shows the step-by-step working for shorter numbers.

Decimal, binary and hex table

DecimalBinaryHex
000
111
2102
51015
810008
101010A
151111F
161000010
3210000020
64100000040
100110010064
1281000000080
25511111111FF
256100000000100
5121000000000200
100011111010003E8
102410000000000400

How it works

Binary is a base-2 number system. It uses only two digits, 0 and 1, and each position in a binary number is worth a power of two instead of a power of ten. Reading from the right, the positions are worth 1, 2, 4, 8, 16, 32, 64 and so on — each one double the one before it.

To convert binary to decimal by hand, write each digit over its position value and add up the ones where the digit is 1. The converter does exactly this and prints the working for numbers up to 20 bits, so you can follow every step. For longer inputs it still gives the exact decimal, hex and octal values, because it uses whole-number arithmetic with no rounding at all.

Binary to decimal: add each bit times its power of two — the rightmost bit is ×1, then ×2, ×4, ×8, doubling each step left  |  Decimal to binary: keep dividing by 2, write down each remainder, then read the remainders from last to first  |  8 bits = 1 byte = 0 to 255

Computers store everything in binary because a single wire or memory cell is either on or off — a 1 or a 0. Hexadecimal (base 16) is popular with programmers because one hex digit stands for exactly four binary digits, so long binary strings become much shorter: 11111111 in binary is simply FF in hex, and both are 255 in decimal.

The swap button flips the direction, so the same box works as a decimal to binary converter. If you type a letter or a digit that does not belong in the chosen system, the tool tells you plainly instead of showing a wrong answer.

Worked example

Convert the binary number 1101 into decimal.

Step 1: Write the position values over the digits. From the right they are 1, 2, 4 and 8, so the digit 1 on the far left sits over 8.
Step 2: Multiply each digit by its position value: 1×8 = 8, 1×4 = 4, 0×2 = 0, 1×1 = 1.
Step 3: Add the results: 8 + 4 + 0 + 1 = 13.
Step 4: Read the answer — 1101 in binary is 13 in decimal, and D in hex.

That is exactly what this converter shows for 1101. Going the other way, 13 divided by 2 gives remainders 1, 0, 1, 1 read from last to first — 1101 again.

FAQ

What is 1010 in binary as a decimal number?

1010 in binary is 10 in decimal. The digits sit over 8, 4, 2 and 1, and the ones in the 8 and 2 places add up to 10.

What is 11111111 in decimal?

11111111 in binary is 255 in decimal. All eight bits are 1, so you add 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. It is the largest value one byte can hold.

How do I convert a decimal number to binary?

Keep dividing the number by 2 and note each remainder. When you reach 0, read the remainders from last to first. For 13: 13÷2 leaves 1, 6÷2 leaves 0, 3÷2 leaves 1, 1÷2 leaves 1 — reading back gives 1101.

Why do computers use binary?

A computer chip works with tiny switches that are either on or off. Binary matches that perfectly: 1 means on and 0 means off. Every number, letter, photo and song is stored as patterns of these two digits.

What is hexadecimal and why is it shown?

Hexadecimal is base 16, using digits 0 to 9 and letters A to F. One hex digit equals exactly four binary digits, so it is a short way to write binary values. 255 in decimal is FF in hex and 11111111 in binary.

How many bits are in a byte?

A byte has 8 bits. With 8 bits you can make 256 different patterns, which stand for the numbers 0 to 255.