A Binary Search Game for Kids: Guess It in Seven
Table of Contents

A Binary Search Game for Kids: Guess It in Seven

A binary search game for kids: guess any number from 1 to 100 in seven tries, then race linear against binary search using 32 face-down cards.

Tell a child you can find their secret number between 1 and 100 in seven guesses, every time, and let them try to beat you. They will pick 73, you will say 50, 75, 62, 68, 71, 73, and they will demand a rematch. This binary search game for kids takes ten minutes to teach and then earns its keep with the second half: 32 numbered cards face down on the table, searched two different ways, with the flip count written down. The halving method wins by a factor of six. Then you shuffle the cards out of order and it stops working entirely, which is the most useful part.

Key Takeaways

  • You’ll play guess-the-number both ways, then race linear against binary search on 32 face-down numbered cards, counting flips.
  • It teaches that halving turns a search of 100 into 7 steps, 1,000 into 10 and a million into 20.
  • Best from 8, because the point is the comparison of counts rather than the guessing itself.
  • Then break it: shuffle the cards out of order and binary search fails. Sorted data is the precondition, and that is why computers sort.
  • Record every count on paper. The whole argument lives in two columns of numbers.

What You’ll Need

ItemHow muchWhere to get itIf you don’t have it
Index cards or paper squares32Cut 4 sheets of A4 into 8Playing cards with numbers written on the backs
Marker1StationeryAny pen that shows through less than a marker
Paper for scores2 sheetsAnywhereTwo columns, one row per round
A thick dictionary or catalogue1, 500 pages or moreBookshelfA phone directory, or a long contacts list on a phone
Calculator1PhoneDoubling by hand is better anyway

Time: number game 15 min, card race 25 min, the broken version 10 min Cost: nothing Mess level: low

Do the Experiment: A Binary Search Game for Kids

Step 1 – Play guess-the-number with no strategy

Your child thinks of a number from 1 to 100. You guess, they answer higher or lower. First round, guess badly on purpose: 7, then 12, then 19. Count the guesses and write the number down. Play three rounds like this and keep the counts.

Step 2 – Now swap and demonstrate halving

They pick a number, you guess 50. Whatever they say, you cut the remaining range in half again: 25 or 75. Keep halving. Announce each remaining range out loud: “so it’s between 51 and 100, that’s 50 numbers left.” Record the count. Do three rounds.

Step 3 – Compare the two columns

Bad guessing takes anywhere from 3 to 40 guesses. Halving takes 5, 6 or 7, never more. Put the two columns side by side and ask what the biggest number in each column is. That difference, not the average, is the point.

Step 4 – Make 32 numbered cards and lay them face down in order

Write 1 to 32 on the fronts, then lay them in a row face down, in order, so the numbers are hidden but you both know the row is sorted. This is now a sorted list, exactly as a computer would hold one.

Pick a target, say 23. Linear search: flip cards from the left until you find it. Count the flips. Then reset, pick a new target, and do binary search: flip the middle card, then the middle of whichever half must contain the target. Count those flips. Repeat five times each with different targets and tabulate.

Step 6 – Now shuffle the cards and try binary search again

Shuffle the 32 cards into random order and lay them face down. Try to binary search. It fails immediately: the middle card tells you nothing about which side the target is on, so you end up flipping everything. Let them discover this rather than warning them.

Step 7 – Do it in a dictionary and count the openings

Pick a word and find it by halving: open the dictionary at the middle, decide which half, halve again. Count how many times you open the book. For a 1,000-page dictionary it should take about ten. Then ask how many it would take if the words were in random order.

Step 8 – Build the doubling table

One column for the number of guesses, one for the biggest range you can handle: 1 guess for 2 numbers, 2 for 4, 3 for 8, and on. Ten guesses handles 1,024. Twenty handles over a million. Thirty handles over a billion. Write that out by hand and the whole idea is on one page.

What you should see: Unstructured guessing on 1 to 100 averages somewhere above ten guesses, with occasional disasters past thirty. Halving never exceeds seven and averages close to six. On the 32 cards, linear search averages about 16 flips and sometimes needs 32; binary search never needs more than five. The shuffled version is the moment that makes the lesson stick: binary search goes from five flips to worse than linear, because it provides no information at all.

What’s Actually Going On

Binary search works by eliminating half the possibilities with every question. Start with 100 candidates. After one guess you have at most 50, then 25, then 13, 7, 4, 2, 1. Seven steps. The general rule is that after k guesses at most n/2ᵏ candidates remain, and you are finished when that drops below 1, which happens when k exceeds log₂(n). For 100 numbers, log₂(100) is about 6.64, so seven guesses always suffice and six sometimes are not enough.

That is why the doubling table is so striking. Each additional guess doubles the range you can handle rather than adding a fixed amount. Twenty questions covers more than a million possibilities. This is what computer scientists mean by logarithmic time, and it is the difference between a program that works on a large dataset and one that does not. Searching a million sorted records one at a time averages 500,000 comparisons; binary search needs 20.

Now the precondition, which matters more than the speed. Binary search only works on sorted data, because the whole method depends on the middle element telling you which half to discard. On a shuffled list it collapses, and your 32-card demonstration shows exactly that. This is the real reason computers spend so much effort sorting things: sorting once, at some cost, makes every subsequent search almost free. A dictionary is usable for the same reason, and a drawer of unlabelled keys is not.

Two honest qualifications, because the simple story gets over-told. First, the halving strategy is optimal only when you know nothing about which number is likely. If your kid always picks their own age, guessing that first beats 50. Real systems exploit exactly this kind of knowledge, which is why caches and predictive text work. Second, binary search is not what a search engine does. Finding a word among billions of web pages uses an inverted index, a precomputed list of which pages contain which word, which is a different idea. Telling a child that the simple method they just learned is not the method behind Google is more respectful than letting them assume it is.

CS Unplugged, the University of Canterbury’s long-running collection of computing activities without computers, builds its searching-algorithms unit on this same physical comparison, which is reasonable evidence that the card version survives contact with real classrooms. Jeannette Wing’s account of computational thinking puts this kind of reasoning, about how the structure of data changes what is possible, ahead of learning any programming language.

How to Explain It to Your Kid

Ages 5–8: cut it in half every time

Use 1 to 20 instead of 1 to 100, and say “guess the middle” rather than anything about halving. Let them be the guesser and prompt with “what’s halfway between 11 and 20?” Five guesses always wins on 20. At this age the arithmetic of finding a midpoint is itself the exercise, and the strategy arrives free alongside it.

Ages 9–12: count the flips and tabulate

The number comparison is the whole lesson here, so insist on writing both columns down. Then ask the question that generalises it: “if I had 64 cards instead of 32, how many flips would binary search need?” The answer is six, one more, and getting that from the table rather than from you is the moment the idea lands.

Ages 13+: logarithms and the sorting trade-off

Introduce log₂ properly and have them compute the worst case for 100, 1,000 and 1,000,000, rounding up. Then set the real investigation: sorting 32 shuffled cards takes a while, so when is it worth sorting at all? Have them time sorting the cards, then compare the total cost of one sort plus ten binary searches against ten linear searches. There is a crossover point and they can find it with a stopwatch. That trade-off is a genuine engineering decision made every day.

The question to ask: “I am thinking of a number between 1 and 1,000. How many guesses do you need to be certain of finding it, and how do you know that is enough rather than just usually enough?”

Why Teaching This Early Pays Off

This is the cheapest possible introduction to the idea that how you do something changes how long it takes, by factors that grow with the problem. Most children never meet that idea until they are writing code that is too slow, at which point it arrives as frustration rather than insight.

The specific payoff is logarithmic thinking, which shows up far beyond computing: in how doubling works, in decibels and earthquake scales, in compound interest, in dilution. A child who has built the doubling table has a concrete anchor for all of it. And the sorted-data precondition teaches something subtler and more useful: that preparation changes what is cheap later. That is the argument for labelling, indexing, filing and tidying, and it lands better as a card game than as a lecture about bedrooms.

Keep the claim honest. Ten minutes of guessing games does not make anyone a programmer and there is no evidence it moves school results. What the research supports is narrower: Chi and Wylie’s framework ranks work where the learner produces and compares something above work where they watch, and Alfieri and colleagues found that guided discovery beats both unguided exploration and plain telling. The two tally columns are the produced thing. Your job is to ask what the biggest number in each column is, and then to let them shuffle the deck.

Before You Start: What Parents Should Know

Best age8 and up. A five-year-old enjoys the guessing with a range of 1 to 20, but the value is in comparing counts, which needs the arithmetic to be effortless.
SupervisionLow. You are the scorekeeper and the person who insists both columns get written down.
Real hazardsNone. Cards and paper. Small cut cards are a choking risk for under-3s, so collect them afterwards.
SetupA table long enough for 32 cards in a single row, which is about 1.5 m with index cards. A shorter table means two rows, and two rows break the mental model badly.
Frustration pointStep 5 if the target is near the left end, because linear search wins by luck and the comparison looks wrong. Run five targets, not one, and compare the averages.
Don’tDon’t skip the shuffled version in step 6, and don’t warn them it will fail. Discovering that sorted order is a requirement is worth more than the speed result.

When It Doesn’t Work

  • Binary search takes more than seven guesses on 1 to 100. The midpoint arithmetic slipped. Say the remaining range aloud before every guess: “between 51 and 62” makes the next guess obvious and self-checking.
  • Linear search beats binary search on the cards. The target happened to be near the start. This is a real property of linear search, not an error. Run five different targets and compare averages and worst cases.
  • They argue that they would have guessed luckily. They are right, and that is why the worst case matters more than the average. Binary search guarantees seven; lucky guessing guarantees nothing.
  • The cards get out of order during the race. Number both the front and the back corner so you can restore the row quickly. You will need to reset between every round.
  • The dictionary version wanders. They are flipping too few pages at a time. Insist on going to the middle of the remaining range, not nudging forward a few pages, which is linear search in disguise.

Take It Further

Find the sorting crossover point. Time how long it takes to sort 32 shuffled cards into order. Then time ten linear searches on the shuffled deck, and ten binary searches on the sorted one. Add the sorting time to the binary total. For how many searches does sorting first become worth it? There is a real answer and a stopwatch finds it.

Play twenty questions as a search problem. The classic game is binary search over a space of possibilities, and twenty yes-or-no questions can in principle separate more than a million options. Have them design questions that split the remaining possibilities in half each time, and notice how much harder that is than it sounds.

What to Watch For Over the Next 3 Months

  • Week 4: They use halving on something unrelated, usually finding a page in a book or a scene in a video.
  • Month 2: The word “sorted” starts appearing as a precondition rather than a tidiness request.
  • Month 3: The question worth encouraging is how a computer finds something among billions of items. The honest answer is that it usually does not search at all; it looks up a precomputed index, which is a genuinely different and better idea.

Frequently Asked Questions

Why exactly seven guesses for 1 to 100?

Because each guess halves the candidates: 100, 50, 25, 13, 7, 4, 2, 1. That is seven halvings. Formally the worst case is log₂(100) rounded up, which is 6.64 rounded to 7. Six guesses can only distinguish 64 possibilities, which is not enough for 100.

Does binary search work on an unsorted list?

No, and this is the most important limitation. The method depends on the middle item telling you which half to discard, which is meaningless if the order is random. On a shuffled list you have to check items one at a time. That is why computers sort data before searching it repeatedly.

Is this how a search engine finds web pages?

No. Searching billions of pages uses an inverted index, a precomputed table of which pages contain which words, rather than halving a sorted list. Binary search is how you find one record in a sorted file, which is a narrower and much more common job inside software.

Is halving always the best strategy?

Only when you know nothing about which answer is likely. If your child always picks their own age or their shirt number, guessing that first beats starting at 50. Real systems exploit this constantly, which is how caches and predictive text earn their speed.


About the author

Ricky Flores is the founder of HiWave Makers and an electrical engineer with 15+ years of experience building consumer technology at Apple, Samsung, and Texas Instruments. He writes about how kids learn to build, think, and create in a tech-saturated world. Read more at hiwavemakers.com.


Sources

  1. CS Unplugged, University of Canterbury. “Searching Algorithms.” https://www.csunplugged.org/en/topics/searching-algorithms/
  2. CS Unplugged, University of Canterbury. “Binary Numbers.” https://www.csunplugged.org/en/topics/binary-numbers/
  3. Wing, J. M. (2006). “Computational thinking.” Communications of the ACM, 49(3), 33–35. https://doi.org/10.1145/1118178.1118215
  4. Chi, M. T. H., & Wylie, R. (2014). “The ICAP Framework: Linking Cognitive Engagement to Active Learning Outcomes.” Educational Psychologist, 49(4), 219–243. https://doi.org/10.1080/00461520.2014.965823
  5. Alfieri, L., Brooks, P. J., Aldrich, N. J., & Tenenbaum, H. R. (2011). “Does discovery-based instruction enhance learning?” Journal of Educational Psychology, 103(1), 1–18. https://doi.org/10.1037/a0021017
  6. National Research Council. (2012). A Framework for K-12 Science Education. National Academies Press. https://doi.org/10.17226/13165

Related reading: sorting a deck of cards like a computer does, binary numbers taught with physical activities, and writing a secret message with a Caesar cipher.

Ricky Flores
Written by Ricky Flores

Founder of HiWave Makers and electrical engineer with 15+ years working on projects with Apple, Samsung, Texas Instruments, and other Fortune 500 companies. He writes about how kids learn to build, think, and create in a tech-driven world.