Number bases

Binary to Decimal Converter

Convert base-2 and base-10 in both directions, with a live per-bit view plus hex and octal. Binary input accepts only 0 and 1.

base 2
base 10
Hex
Octal
Base-2 ↔ base-10, with hex and octal views.

How to convert binary to decimal

To convert a binary (base-2) number to decimal (base-10), add up the place values of every digit that is a 1. Reading right to left, the columns are 1, 2, 4, 8, 16, 32 and so on — each twice the one before. The per-bit cells above light up green for every 1, so you can see which place values are being summed.

For example, 101010 has 1s in the 32, 8 and 2 columns: 32 + 8 + 2 = 42. Type into either box and the other updates instantly — the binary field accepts only 0 and 1, and the decimal field only digits 0–9.

Binary to decimal table

BinaryDecimalHex
110x1
1020x2
10040x4
100080x8
1010100xA
101010420x2A
111111112550xFF

Hex and octal at a glance

The same value is shown in hexadecimal (base-16, prefixed 0x) and octal (base-8, prefixed 0o) below the inputs. Hex packs four binary digits into a single character, which is why colour codes and memory addresses use it. Octal groups three bits at a time and still appears in Unix file permissions. All four views describe the exact same number — only the base differs.

Worked example: reading 11001010 by hand

Take the eight-bit number 11001010. Write the column values above it from the right — 128, 64, 32, 16, 8, 4, 2, 1 — and add up only the columns with a 1 above them: 128 + 64 + 8 + 2 = 202. That is the whole method: every binary digit is worth twice the one to its right, and the decimal value is simply the sum of the "on" columns. Type 11001010 into the binary box above and the bit cells light up on exactly those four columns.

Why computers count in binary

A binary digit maps cleanly onto the two states a circuit can hold reliably — off or on, low or high voltage. Using just 0 and 1 makes hardware simpler and far less error-prone than trying to distinguish ten separate voltage levels for decimal. Everything else — text, images, sound, this very page — is ultimately stored as long runs of these two digits, which is why converting between binary and decimal is such a common first step when you look under the hood.

Where binary numbers show up in everyday computing

Converting decimal to binary by hand

Going the other way is just as mechanical: repeatedly divide the decimal number by 2, write down each remainder, then read the remainders from bottom to top. For 202 that is 202 ÷ 2 = 101 remainder 0, 101 ÷ 2 = 50 r 1, 50 ÷ 2 = 25 r 0, 25 ÷ 2 = 12 r 1, 12 ÷ 2 = 6 r 0, 6 ÷ 2 = 3 r 0, 3 ÷ 2 = 1 r 1, and 1 ÷ 2 = 0 r 1. Reading the remainders upward gives 11001010 — back where we started. The Decimal box above does exactly this the moment you type, showing the result in the bit cells so you can check your working. The same doubling pattern is why so many computing limits come in powers of two — 256, 1,024, 65,536 — rather than round decimal numbers, since each extra bit doubles the range of values you can store.

Frequently asked questions

How do you convert binary 101010 to decimal?

Add the place values of each 1: 101010 has 1s in the 32, 8 and 2 columns, so 32 + 8 + 2 = 42. The per-bit cells above show this visually.

Why does the binary box reject some keys?

Binary is base-2, so only the digits 0 and 1 are valid. Any other character is stripped automatically as you type. The decimal box likewise accepts only 0–9.

What do the 0x and 0o prefixes mean?

They label the base: 0x marks a hexadecimal (base-16) number and 0o marks an octal (base-8) number. They are conventions used by most programming languages.

Can I convert decimal back to binary here?

Yes — this converter is two-way. Type a number into the Decimal box and its binary form appears above, with the bit cells and hex/octal views updating too.

Why do computers use binary instead of decimal?

Binary needs only two states — off and on — which a circuit can store and read reliably. Distinguishing ten voltage levels for decimal would be far more error-prone, so hardware sticks to 0 and 1.

What is the largest number 8 bits can hold?

Eight bits (one byte) range from 00000000 to 11111111, which is 0 to 255 in decimal — 256 distinct values in total. That is why each part of an IPv4 address maxes out at 255.

Popular searches

People reach this tool searching for:

binary to decimal converterbinary to decimalconvert binary to decimalbinary to decimal calculatordecimal to binarybase 2 to base 10

Related tools