Explore Technology
Online Activities
Binary Balance

Click on the weights to move them ON or OFF the scale. Can you add them up to match what's in the pink box?


If you don't see the activity above, please download the latest Flash Player.

You can do it! Pick a combination of these weights, and add up their numbers. With the right combinations, you can make every number from 0 to 31. Each weight is twice that of the next smallest one. We call this sequence of numbers the powers of 2. Computers use electronic switches switching ON and OFF to represent which of these numbers are being added.

Binary numberAdd it upDecimal number
0000111
0001022
000112 + 13
0010044
001014 + 15
001104 + 26
001114 + 2 + 17
0100088

When people talk about computers using zeros and ones, or binary math, they're talking about using the powers of 2 to count with. We can use zeros and ones to write down which weights are ON the scale, and which ones aren't. A "1" means a weight is ON the scale, and a "0" means the weight is OFF the scale. If we wanted to write down one of our numbers in binary, we would write five digits, one for each weight. So, "10000" means the 16 weight is ON, and the others are OFF. So in binary, 10000 equals sixteen, 01000 equals eight, 00100 equals four, 00010 equals two, and 00001 equals one. Can you figure out what 10011 means? How would you write the number 13 down using "0" and "1"? Use the scale activity to help you figure it out!

In a way, the binary number is telling you how many of each of the weights is ON the scale. In this set of weights, we only have one of each kind of weight, so each digit in the binary number is either one or zero. With the binary number 10010, there is one sixteen-weight, and one two-weight ON the scale, for a total of eighteen. With ordinary counting, the set of weights would look like the picture here, and we'd use numbers to say how many of each kind of weight is ON the scale. 27 indicates there are two 10-weights and seven 1-weights ON the scale.

Computers can't count the way people do. We turn switches inside the computer ON and OFF to count numbers, just like we put weights ON and OFF the scale. Programmers think of these ON and OFF switches as ones and zeros. To use ones and zeroes (or patterns of ON and OFF to stand for numbers, we have to use the sequence 1, 2, 4, 8, 16, and so on. We can't use bigger numbers, because we only get one of each weight. Using the powers of 2 lets us get the most possible numbers in the fewest ONs and OFFs, and still represent any number.

This activity shows you how just five things being ON and OFF can let you keep track of 32 different numbers. We could use those five switches to keep track of part of a letter, or part of a dot in a picture. It all depends on what the programmer decides ON and OFF means.

More information about how computers use ON and OFF to represent information can be found at Intel's web site, The Journey Inside.

Measuring with Computers

This is one way to figure out the weight of the mystery box. It always works, but is it the best? Can you think of a way to do it in fewer steps?

  1. Put the biggest weight ON.
  2. If it's too big, take it OFF. If not, leave it ON.
  3. Put the second biggest weight ON.
  4. If it's too big, take it OFF. If not, leave it ON.
  5. Put the middle weight ON.
  6. If it's too big, take it OFF. If not, leave it ON.
  7. Put the second smallest weight ON.
  8. If it's too big, take it OFF. If not, leave it ON.
  9. Put the smallest weight ON.
  10. If it's too big, take it OFF. If not, leave it ON.
You're done! If you followed all the steps, you have the right answer!

That's how computers do it!

Computers go through exactly that set of steps every time they measure something. We call this analog to digital conversion. With the needle on this balance, you can tell whether the box is a lot heavier or just a little heavier than your masses. But a computer can only tell whether it's too much or not enough. The way a computer matches an analog signal may not be the fastest, but it's the best way a computer can do it.

The box in this example is always a round number, but that isn't always the case in real life. Sometimes computers have to measure uneven things. Computers can only be as precise as the binary digits let them be. Sometimes you lose information by converting it to digital form.

Explore:Security Technology | Robots and Computers | Communications Technology | Medical Technology | Household Technology | Online Activities
Teacher Resources | Links | People in Technology
Visit:Vernier Technology Lab | Innovation Station | Supporters