Binary to Decimal Converter
Add up place values to turn 1s and 0s into an ordinary number.
11111111 looks intimidating until you notice it is just eight place values, all switched on: 128+64+32+16+8+4+2+1, which adds up to 255 — a number that shows up constantly in computing for exactly that reason.
Place values in one byte
| Position (from right) | 1st | 2nd | 3rd | 4th | 5th | 6th | 7th | 8th |
|---|---|---|---|---|---|---|---|---|
| Place value | 1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 |
Adding up 10011100
Line the digits up left to right against the place values 128, 64, 32, 16, 8, 4, 2, 1. The digit 1 sits under 128, 0 under 64, 0 under 32, 1 under 16, 1 under 8, 1 under 4, 0 under 2, and 0 under 1.
Add up only the place values with a 1 underneath: 128 + 16 + 8 + 4 = 156. Every binary-to-decimal conversion is this same process — multiply each digit by its place value and add the results, most of which are zero and drop out.
Why 255 keeps showing up
A single byte, 8 bits, can represent 256 distinct values, 0 through 255, and 11111111 — every bit switched on — is the largest of them: 255. That is why so many limits in computing sit at 255 or 256: the maximum value an 8-bit counter, an RGB colour channel or a small header field can hold.
It also causes a specific kind of bug. An 8-bit counter that increments past 255 does not become 256 — it wraps back around to 0, because there is no ninth bit to carry into. The arcade game Pac-Man is a well-documented example: its level counter is stored in a single byte, and at level 256 the value silently overflows back to 0, corrupting the screen into what players nicknamed the kill screen.
Binary to decimal questions
What is the quickest way to convert binary to decimal by hand?
Write the place values 128, 64, 32, 16, 8, 4, 2, 1 above an 8-digit binary number, then add together only the place values that have a 1 underneath them. Every digit that is 0 simply contributes nothing to the total.
Why is 255 such a common number in computing?
Because it is the largest value a single 8-bit byte can hold, produced when every bit is set to 1: 128+64+32+16+8+4+2+1. It turns up as a maximum repeatedly — colour channels, small counters, byte-sized limits.
What happens if an 8-bit counter goes past 255?
It wraps around to 0 rather than becoming 256, since there is no ninth bit available to carry the extra value into. This kind of silent overflow has caused real, documented bugs in older software and hardware.
Does a longer binary number need more place values?
Yes. Each extra bit on the left doubles the next place value — after 128 comes 256, then 512, then 1024, and so on. A 16-bit number simply extends the same table up to 32,768 for the leftmost bit.
Why do binary numbers get padded with leading zeros?
To fill out a fixed size, such as a full 8-bit byte, without changing the value. 1100 and 00001100 both equal 12; the extra zeros on the left just represent place values, like 128 or 64, that happen to be switched off.