Skip to story
ELI5 Yahaaa

On and off is enough

How Do Computers Count With Only Two Digits?

Binary counts using only 0 and 1, because a switch can only ever be off or on.

1011 Only two digits existEach place is worthdoubleA switch is off or onAny number can still bewritten
Two digits are enough, because each place is worth double.
  1. Step 1 of 5

    A switch has only two states to offer.

    Ten levels?Hard to tell apartreliablyTwo states Off or on, neverconfused

    Electrically it is far easier to tell apart fully off and fully on than ten different voltage levels, so machines use just two.

  2. Step 2 of 5

    Our usual numbers use ten digits and place value.

    Hundreds placeten times thetensTens placeten times theunitsUnits placethe startingvalue

    In 372 the 3 is worth three hundreds, because each place to the left is worth ten times the one before it.

  3. Step 3 of 5

    Binary keeps place value but doubles instead.

    UnitsTwosFours

    Every place to the left is worth twice the one before, so the columns run one, two, four, eight, sixteen and onward.

  4. Step 4 of 5

    Adding up the on columns gives the number.

    1 1011 Read 10112+8 + 2 + 1310That is eleven

    The pattern 1011 has the eight, the two and the one switched on, and those add to eleven. Reading binary is simply adding columns.

  5. Step 5 of 5

    More switches means bigger numbers, fast.

    4 switchesup to 158 switchesup to 255

    Each switch added doubles the range. Eight of them cover 0 to 255, which is why so many computer limits are suspiciously close to that.

    Eight binary digits make one byte and cover 0 to 255, which is why colour values on a screen stop at 255.

The short version

Computers count in binary because a switch is only ever off or on, and place value that doubles each column can still write any number.

Try it yourself

Hold up fingers as binary columns worth 1, 2, 4, 8 and 16. One hand can then count all the way to 31.

Topics