Binary to Decimal Converter: Base 2 to Base 10, Hex and Octal
Type a binary number made of 0s and 1s. The converter shows the decimal value, the hexadecimal and octal forms, the number of bits and the signed value when the length is 8, 16, 32 or 64 bits.
Estimates only. Check important results before you rely on them.
More Technology & Digital Tools calculators
View all 10You may also need
From related categoriesHow to use this calculator
- Type or paste the binary number.
- Spaces and underscores are ignored.
- Read the decimal value at the top.
- See the hex, octal and signed values below.
The formula
Worked example
The binary number 1011 0101 has bits 1×128 + 0×64 + 1×32 + 1×16 + 0×8 + 1×4 + 0×2 + 1×1 = 181. In hex that is B5 and in octal 265. As a signed 8-bit number it is −75.
Understanding your result
Signed (two's complement) values only show for 8, 16, 32 and 64 bits, since those are common computer word sizes. Long strings are converted exactly, with no rounding.
When to use it
- Check homework on number systems.
- Read bit patterns in programming.
- Convert flags and masks to numbers.
Assumptions and limits
Up to 4,096 bits. Fractions are not supported.
Frequently asked questions
How do I convert binary to decimal?
Multiply each bit by 2 raised to its position, counting from 0 on the right, and add the results.
What is 1010 in decimal?
10.
What is two's complement?
A way to store negative numbers in binary. The leading bit shows the sign.
Can I convert a very long binary number?
Yes, up to 4,096 bits, with no loss of precision.
What is the hex form of a binary number?
Group the bits in fours from the right. Each group is one hex digit.