How to use the binary to decimal converter
- 1Type the binary number in Binary (base 2). Spaces, underscores and a
0bprefix are ignored. - 2Read the answer in Decimal (base 10); hexadecimal and octal appear under Other bases.
- 3Keep Show steps ticked to see each bit's place value in Step-by-step working.
- 4For signed values, set Negative numbers to Two's complement and choose the Bit width.
- 5Press Copy next to any field, or Swap to convert decimal to binary instead.
Example
101101
Decimal: 45 Hexadecimal: 2D Octal: 55
Working: 32 + 8 + 4 + 1 = 45.
Converting binary to decimal by hand
Write the place value above each bit, starting with 1 on the right and doubling as you move left. Then add the place values where the bit is 1.
For 101101:
| Bit | 1 | 0 | 1 | 1 | 0 | 1 |
|---|---|---|---|---|---|---|
| Place value | 32 | 16 | 8 | 4 | 2 | 1 |
| Counts? | 32 | – | 8 | 4 | – | 1 |
32 + 8 + 4 + 1 = 45. The Step-by-step working panel builds this table for any number up to 64 digits.
Place values and powers of two
Each place is a power of two: the rightmost bit is 2⁰ = 1, then 2¹ = 2, 2² = 4, up to 2⁷ = 128 for the eighth bit. An n-bit number can hold values from 0 to 2ⁿ − 1:
| Bits | Largest value |
|---|---|
| 4 | 15 |
| 8 | 255 |
| 16 | 65,535 |
| 32 | 4,294,967,295 |
| 64 | 18,446,744,073,709,551,615 |
The converter uses arbitrary-precision integers, so 64-bit and longer values are exact, not rounded as they would be in a spreadsheet.
Signed numbers and two's complement
Computers store negative integers in two's complement: in an n-bit number, the leftmost bit is worth −2ⁿ⁻¹ instead of +2ⁿ⁻¹. In 8 bits, 11010110 is −128 + 64 + 16 + 4 + 2 = −42, while the same bits read as unsigned are 214.
Set Negative numbers to Two's complement and pick the Bit width (8, 16, 32 or 64). The working then shows the negative top bit. With Minus sign selected, you can instead type -1010 for −10.
Binary fractions
Bits after the point are worth ½, ¼, ⅛ and so on. 10110.101 is 16 + 4 + 2 + 0.5 + 0.125 = 22.625. Every binary fraction ends in decimal, because ½ divides evenly into powers of ten; the reverse is not true (0.1 in decimal never ends in binary).
Common values table
| Binary | Decimal | Note |
|---|---|---|
| 1010 | 10 | |
| 1111 | 15 | largest 4-bit value |
| 10000 | 16 | |
| 1100100 | 100 | |
| 1111111 | 127 | largest 7-bit (ASCII) value |
| 10000000 | 128 | |
| 11111111 | 255 | largest 8-bit value |
| 1111101000 | 1000 |
Is my text private?
This tool runs entirely in your browser. Your text is not uploaded to our servers.
