How to convert binary to decimal
Each position in a binary number is worth twice the one to its right. For an 8-bit number:
| 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|
| 1 | 0 | 1 | 1 | 0 | 1 | 0 | 1 |
Add the values above every 1: 128 + 32 + 16 + 4 + 1 = 181. That's the whole method, and it works for any length: just keep doubling the place values to the left.
A faster way for long numbers: doubling
Read the digits from left to right, starting with 0. For each digit, double your running total and add the digit. For 1011: 0×2+1 = 1, 1×2+0 = 2, 2×2+1 = 5, 5×2+1 = 11. It's easy to do in your head and never needs a table of powers of 2.
Signed binary and two's complement
Computers store negative whole numbers using two's complement. The leftmost bit gets a negative place value, so in 8 bits it's worth -128. That makes 01111111 the largest positive value (127) and 10000000 the most negative (-128). The same bits can therefore mean two different numbers, which is why the converter asks how to read them. To go the other way, including negative numbers, use the decimal to binary converter.
Binary to hexadecimal is often a quicker route for long numbers; see binary to hex. A chart of 0 to 255 is on the binary numbers page.