Convert binary to decimal as you type, with every step shown. This free online converter gives exact results for numbers of any size, and nothing you type leaves your browser.
1 Enter your value
From
To
0x
Examples
2 Your answer
Decimal
dec
Show in other bases
Tap any value to copy it.
See the working
Guide
How it works
Three steps, whether you are reading a memory address, a bit flag or a byte value.
1
Choose what to convert
Pick what you have and what you want: decimal, hexadecimal, binary or octal.
2
Type or paste a value
Write it however you like: 65,535, 0xFF, FFh, with commas, spaces or underscores.
3
Read the answer
It appears as you type, in every other base, with the working shown.
The formulas
A digit's value depends on its position. Every answer here uses one of these rules:
Binary to decimal
decimal = Σ digit × 2position
0b110100011 is 1 × 256 + 1 × 128 + 1 × 32 + 1 × 2 + 1 × 1 = 419, so the answer checks out.
Decimal to binary
divide by 2, keep the remainders
419 ÷ 2 = 209 r 1, 209 ÷ 2 = 104 r 1, …, 1 ÷ 2 = 0 r 1, so 419 is 0b110100011.
Binary to hexadecimal
group the bits in fours from the right
0b110100011 → 0001 1010 0011 → 1, A, 3, so 0b110100011 is 0x1A3.
Decimal to hexadecimal digit chart
The decimal values 0 to 15 are the single hexadecimal digits 0 to F. Click one to add it to the converter.
All conversions
Decimal, hexadecimal, binary and octal converter
One free tool for every direction. Use it as a decimal to hexadecimal converter, convert decimal to binary or octal, or work backwards as a hexadecimal to decimal converter that turns 0x to decimal values. It also converts hexadecimal to binary, binary to hexadecimal and octal to decimal, so it works as a full number base converter and hexadecimal calculator. Pick a conversion to start.
Use this binary to decimal table as a quick binary to decimal chart for common values, from 0 to 65,535.
Binary
Decimal
0
0
1
1
10
2
11
3
100
4
101
5
110
6
111
7
1000
8
1001
9
1010
10
1011
11
1100
12
1101
13
1110
14
1111
15
1 0000
16
10 0000
32
100 0000
64
110 0100
100
111 1111
127
1000 0000
128
1111 1111
255
1 0000 0000
256
10 0000 0000
512
11 1110 1000
1,000
100 0000 0000
1,024
1 0000 0000 0000
4,096
1111 1111 1111 1111
65,535
Help
Questions
Quick answers to what people most often ask about hexadecimal, decimal and binary.
01How do I convert binary to decimal?
To convert binary to decimal, number the digits from the right, starting at 0. Multiply each digit by 2 raised to the power of its position. Add the results together to get the decimal number.
02What is 11111111 in decimal?
0b11111111 in binary is 255 in decimal. Type 11111111 into the converter above to see every step.
03What is 10000000000 in decimal?
0b10000000000 in binary is 1,024 in decimal.
04What is 1010 in decimal?
0b1010 in binary is 10 in decimal.
05What is 1111 in decimal?
0b1111 in binary is 15 in decimal.
06What is 10000000 in decimal?
0b10000000 in binary is 128 in decimal. It is a byte with only its top bit set.
07Why do computers use binary?
Computer hardware stores everything as tiny switches that are either off or on, 0 or 1. Binary is base 2, so it maps directly onto those bits. Decimal is easier for people to read, which is why converting between the two is so common.
08How do I convert binary to decimal in Excel?
Use the BIN2DEC function: =BIN2DEC("11111111") returns 255. It works the same way in Google Sheets. These functions only handle up to 10 input characters, and the binary ones only −512 to 511, so use this converter for larger numbers.
09How do I convert binary to decimal in Python or JavaScript?
In Python, int('11111111', 2) returns 255. In JavaScript, parseInt('11111111', 2) returns 255. Python handles any size; in JavaScript use BigInt for numbers above 2⁵³.
10Does the converter use two’s complement for negative numbers?
No. It keeps the minus sign, so −255 is −0xFF, −0b11111111 and −0o377. Computers usually store negative numbers in two’s complement, where the pattern depends on the width: −1 is 1111 1111 (0xFF) in 8 bits and 0xFFFF in 16 bits. To read a signed value whose top bit is set, subtract 2ⁿ: 0xFF as a signed 8-bit number is 255 − 256 = −1.
11Can I convert binary numbers with a fractional part?
The converter works with whole numbers. By hand, convert the fractional part by multiplying it by the target base again and again and keeping the whole-number part each time. For example, 0.5 × 16 = 8, so 0.5 is 0x0.8 in hexadecimal, 0b0.1 in binary and 0o0.4 in octal.
12How many bits are in a byte?
Eight. A byte holds 0 to 255, which is 0000 0000 to 1111 1111 in binary, 0x00 to 0xFF in hexadecimal and 0o000 to 0o377 in octal.
13Is there a limit to how big a binary number can be?
No. The converter uses exact whole-number arithmetic, so 64-bit, 128-bit and longer binary values convert to decimal with every digit correct, with no rounding.
14What does “bin to dec” mean?
“bin to dec” is short for binary to decimal, which means going from base 2 to base 10: a number written in base 2 is rewritten in base 10. For example, 0b11111111 becomes 255.
15Does this binary to decimal calculator show the working?
Yes. It converts binary to decimal with steps: open “See the working” under the answer to see each digit multiplied by its power of 2. Every answer is also shown in decimal, hexadecimal, binary and octal at once.
16Is this binary to decimal converter free?
Yes. It is free with no sign-up, works online on phones, tablets and computers, and every binary to decimal conversion runs in your browser, so nothing you type is sent anywhere.