dark mode light mode Search Menu

Count Dots, The Orange Game, Santa’s Dirty Socks

Denise Krebs on Flickr

Computer Science Unplugged has a bunch of fun projects to teach kids, students, parents, and any adult the basics of computer science. Instead of boring lectures, all projects are hands on. You learn by doing. These projects can be done in a classroom, of course. But they also make great summer projects for bored kids and interested parents with time on their hands on a weekend.

Here are three projects that might be fun to try. There are many more at the CS Unplugged website.

Count the Dots (Binary Numbers)

Here’s a fairly quick explanation of this project:

This is an easy place to start learning computer science hands on. With printer paper or similar and a pen or stickers, create 5 cards with dots (or stickers) on them. The first card has 16 dots or stickers. The second card has 8 dots, third card 4 dots, fourth card 2 dots, and the fifth card has 1 dot.

Lay the cards or pages face up on a table. Can you see how the dots on one card relate to another? You’ll quickly realize numbers are doubled. If you organize the cards from most dots to least dots, you’ll see 16 divided by 2 is 8, the second card. Probably you will want to organize your cards, from left to right, with the most dots on the left and in order. So your far left card has 16 dots, your far right card 1 dot.

Next, try to create numbers with cards. For example, how would you pick your cards to create the number 26?

The card with 16 dots and the card with 8 dots would get you to 24. Your card with 2 dots would get you to 26. So turn over the unused cards, the card with 4 dots and the card with 1 dot. If the cards we use to create the number 26 are represented with a 1, and the cards we don’t use are 0, then 16 + 8 + 2 means our five cards translate to 11010, reading from left to right. The cards with 4 dots and 1 dot we do not use and, therefore, are represented with a 0. So 11010 translates to 16 + 8 + 0 + 2 + 0 = 26. The number 11010 is a five byte number that represents 26.

Can you quickly tell what the binary number 00001 represents? Or 00011? It’s 1 (0 + 0 + 0 + 0 + 1 = 1) for the 00001 and 3 (0 + 0 + 0 + 2 + 1 = 3) for 00011.)

You can play any number of games this way. Turn cards up and ask yourself what total number they represent. Or pick a number and try to find a combination of cards that add up to your number, starting from the left with the card that has the most dots (16). If your number is less than 16, you begin with the card with 8 dots, of course.

Binary numbers are interesting because computers, including the one you’re using now to read this page, turn everything into binary numbers, from adding up numbers to displaying dots on a screen that make up letters, web browsers, and so on. It’s all with binary numbers as a foundation. Instead of dots, however, your computer uses electricity on and off as zero and 1. The combination of zeroes and ones in a specific order make up numbers which translate to everything your computer does.

Even more interesting, if you’ve ever heard a fax machine screech, you’ve heard binary numbers. Faxes use sound and no sound to represent zero and one. Except the sounds are so fast to us they sound like screeching.

The activity page at CS Unplugged has lots more great background on binary numbers, base 2 numbers, and how computer use binary numbers to do everything. I’ve also included a link below to a binary number magic trick which looks fun.

The Orange Game (Routing and Deadlock)

This game requires at least five people, two oranges (or tennis balls or objects) per person, one sticker for each orange and person, and a pen. The game teaches how to co-operate as a group to solve a problem.

To begin, each person is assigned a number of letter which is written on a sticker stuck on themselves and two of the oranges. The oranges are distributed randomly to the group who sit in a circle, two oranges per person, one in each of their hands. The last person has only one orange with their other hand empty.

The goal is for each person is to have oranges with their letter in both of their hands. There are only two rules:

  1. Only one orange can be held in one hand.
  2. An orange can only be passed to an empty hand.

There are no winners in the game because the goal is to have everyone with their oranges in their two hands. However, if one or more people stop when they have their two oranges, they create a deadlock which others have to resolve. Co-operation is the only way to pass oranges to empty hands until everyone has their oranges with their letters.

A variation on this game is to add a third rule: no talking. You can play this game with more than five people and, if so, arrange your group in a square or other connected shape.

Here is how the game is described at the CS Unplugged site:

Santa’s Dirty Socks

Oh my God, Santa has packed up all the wrapped gifts, got the sleigh ready, and he realizes one pair of his dirty socks is in one of the presents stacked high on the sleigh. Let’s also assume every gift is the same pair of skates (Santa’s on a budget and got a deal on skate materials.)

How do you find his crusty sock without opening every wrapped present?

Let’s start with one obvious hint: every box should weigh the same. Each box is the same size and contains the same pair of skates.

Can you figure out a way to solve this problem quickly?

What if you have 10 boxes and you put 5 on one side of a scale and the remaining 5 boxes on the other side of the scale? If there is no pair of socks in all 10 boxes, the two sets of 5 boxes should weigh the same and balance, shouldn’t they?

Let’s apply this idea to all of Santa’s wrapped gifts. And let’s assume, of course, we have a scale that can hold thousands of boxes easily and quickly.

If Santa has 10,000 boxes, we start by splitting them into two groups of 5,000 boxes and weigh them together. One set of boxes should be heavier than the other because one box has Santa’s dirty socks. So we put aside the light group of 5,000 boxes. We know the dirty socks are in that group.

We repeat this process until we find the box with the crusty socks. If we start with 1,024 boxes, how many times would we have to split the boxes and weigh them?

Here’s the process:


It would take 10 steps to get to 2 boxes with one box weighing slightly more than the other box. Did you know sorting 1 billion identical boxes and weighing them would only take 30 steps? Don’t believe me? Get a piece of paper and do the math.

Here’s how it works:

This simple algorithm, or set of rules, is a classic sorting mechanism used in computer science. What’s really interesting is taking any number other than 1,024. Let’s say you start with 10,000 identical boxes. At some point, you will have an uneven number of boxes in your two groups. You’ll have one box extra. So you’ll have to account for the extra box at least once as you sort your way to find Santa’s dirty socks.

Learn More

Computer Science (CS) Unplugged


CS Unplugged Book (Teachers Edition)

Includes all the exercises and context to help anyone learn.

Count the Dots (Binary Numbers)


The Orange Game (Routing and Deadlock)


Santa’s Dirty Socks


Kid Krypto


20 Guesses