# Binary Numbers

## Count the Dots #

The binary number system plays a central role in how information of all kinds is stored on computers. Understanding binary can lift a lot of the mystery from computers, because at a fundamental level they’re really just machines for flipping binary digits on and off. There are several activities on binary numbers in this document, all simple enough that they can be used to teach the binary system to anyone who can count! Generally children learn the binary system very quickly using this approach, but we find that many adults are also excited when they finally understand what bits and bytes really are.

## Activity description (PDF) #

### Translations and other versions: #

- Arabic language version
- Bahasa Indonesia Version
- Bosnia and Herzegovina Version
- Chinese Version
- French language version
- German language version
- Greek language version
- Hungarian language version
- Indonesian language version
- Italian language version
- Persian (Farsi) language version
- Polish language version
- Portuguese (Brazil) language version
- Russian language version
- Slovenian Language Translation
- Turkish language version

## Videos #

## Photos #

## Related Resources #

An older version of this activity can be downloaded in PDF format here. The content is similar to the current version, but there’s some extra technical information.

### Binary cards simulators #

- The Computer Science Field Guide has a Binary Cards simulator here. It also has a chapter on Data Representation, aimed at high school age students, that covers many more details of Binary numbers and how they are used to represent data.
- Mordechai (Moti) Ben-Ari from the Weizmann Institute of Science, Israelhas programmed the Binary Numbers Unplugged activity in Scratch which can be downloaded in a zip file of the complete set of activities. Please read the
`ReadMe.txt`

for documentation. - Online interactive binary cards by Jim Maynard.

### More activities and lessons #

- RAFT has an activity for making a string of beads that code a message in binary at Binary Weaving Worksheet.
- National Center for Women & Information Technology (NCWIT)has a learning package called Computer Science-in-a-Box: Unplug Your Curriculum which has detailed lesson plan of this activity.
- Try Engineering has the following activities:
- Give Binary a Try!: which explores how binary codes work, how it is applied by computer engineers to computers and other electronic equipment including clocks. Students learn how to use the code, read binary clocks, and advanced students can build their own binary clock from a kit.
- Mountain Rescue: This is a simple activity to visualize a communication system. In order to do this the students encode, decode, transmit, receive and store messages. They will use a code sheet and flashlight for this process. They will also maintain a storage sheet from which they can retrieve information as and when it is required.

*[Registration and software download required]*The Greenroomresources area using the Greenfoot software has the number representation in binary using cards exercise. You can download and use these with the Greenfoot environment, but you need a login to access the resources. If you are a teacher, you can apply easily to join and use the resources there.- Centre for Innovation in Mathematics Teaching has a teaching package in Binary Coding on it’s resources page developed to teach Codes and Ciphers in their Maths Curriculum. It includes a Teacher Guide, Student Guide, OHP Slides, Lesson Plans. There is also a relevant teaching package on Braille.
- Centre for Innovation in Mathematics Teaching also has teachers' guides in the following topics:
- Computer Science & Engineering for K-12 (cse4k12.org) has the following activities related to binary numbers below:
- Bitmaps Activity where bitmaps are a way of encoding black and white images using binary numbers. A ‘0’ is used to represents a white square in the image and a ‘1’ is used to represent a black square. These worksheets provide a set of 8×8 grids where the student can draw their own black and white images and then write the corresponding binary (and hexadecimal) values.
- Crossbin Puzzles Activity is similar to crossword puzzles except that the clues are hexadecimal numbers, and the answers are binary numbers (‘0’s and ‘1’s) instead of words. Also, once the puzzle is complete, if you fill all the ‘1’ squares with black you will see a small picture or pattern.
- Perfect Shuffles Activity: If you want to take the top card in a deck and shuffle it down to a particular position, all you need to know is the binary representation of the position where you want the card to go. Then you perform a sequence of ‘in’ and ‘out’ perfect shuffles based on the binary number and the card will be shuffled into the desired location.
- Binary Magic Trick: A set of 6 cards for a simple magic trick where you can correctly guess the secret number chosen by a student. Understanding how the trick works requires knowledge of binary
- Octal Dots and Octal Counting Worksheets that teach students to count in octal, and that they can use to practice counting/converting numbers in Octal.
- Counting in Binary worksheet where the student counts from 0 to 111111 in binary (which corresponds to 0 to 63 in decimal).
- Counting in Hexadecimal worksheet helps the student count from 0 to 63 (but in hexadecimal, so it’s really 0 to 4F).
- Counting in Octal worksheet where the student counts from 0 to 77 in octal (which corresponds to 0 to 63 in decimal).
- Number Cards are Playing-card sized cards that can be used to compare the different number systems.
- Converting from Binary to Decimal
- Converting from Decimal to Binary
- Converting from Binary to Octal
- Converting from Binary to Hexadecimal

- The Mathmaniacs web site has a similar activity (lesson 1). It includes a Binary Piano activity which is another great aid for learning binary numbers (a modified version from the University of Canterbury is available here). Mathmaniacs also have a magic trick that can be performed with binary numbers.
- Rick Garlikov has a paper on teaching binary numbers using Socratic dialogue. This approach is very empowering for students, and the general principle can apply to many of the Unplugged activities.
- CS4FN has an activity related to the French Peasant’s multiplication called the The French Peasant’s Lock and Gray Code. The solution to the lock is actually something know to Computer Scientists as Gray Code : a code used in modern digital TV. Whatever, their physical form all the variations of the lock puzzle have the same solution and are logically (and so their solutions algorithmically) identical. Solve one and you’ve solved them all (Computer Scientist’s love pulling that trick with problems!).
- LessonPlanZ has a lesson plan for teaching the Egyptian Multiplication for Grades 9-12.
- Jo Edkins has a collection of different ways to introduce binary numbers below:
- Introduction to Binary
- Adding in Binary
- Multiplying in Binary
- A fun illustrated Binary Counter using animated figures
- Try the Binary Card Game: Based on the binary number system, where you can guess a number from 1 to 63 by having people select cards from a set of 6.
- Binary Card Game Explained
- Binary Card Game, the computer plays against you!

- Learning MATH has a teaching resource on base 2 numbers in three parts below:
- Math Delights has resources for teaching different base numbers by using magic cards based on the binary, base 3, or base 10 representation of numbers. See resources at Magic-Cards (Base 10) Instructions and Base 10 Cards. See also the Mathemagic Card Trick materials at Lesson Plan and a Poster
- TATSUMI Takeo from Tokyo University of Agriculture and Technology has a Kinaesthetic Activity to Demonstrate Analogue to Digital Conversion, where students make creases in paper to represent analogue data and convert them to binary data by following some simple rules. This activity comes with an extension activity for decimal to binary conversion.
- The Peasant Algorithm and Ancient Egyptian Multiplication are tricks for doing multiplication using only doubling. At heart they are really just multiplying binary numbers. For information on how this algorithm is related to binary numbers, please read The Math Forum’s explanation at Russian Peasant Multiplication. See also Jo Edkins’s explanation of Ancient Egyptian Numbers and Multiplication including an online applet to try it.
- NASA Space Place for Kids has some cool resources:
- Steve Oualline has an interesting exercise called Numbers, where one needs to write out all possible numbers that can be derived from the bit patterns 0000 to 1111.
- Susan Addington has developed The Number Bracelets Game to help introduce mathematical patterns.
- The Puzzle Page hosts A Binary Crossnumber Puzzle. This puzzle consists completely of binary numbers, so all the characters needed to fill in the squares will be 0s or 1s. The crossword is a 4×4 square grid, so all numbers will be written in binary, with 4 digits; e.g., 1 will be 0001, 2 will be 0010, and 4, 0100. The NOT operation changes all 0s to 1’s and all 1s to 0s; e.g., NOT(0110) is 1001 and NOT(1010) is 0101.
- Qwerty Zimbabwe has the Binary Puzzle (Colour Contact Puzzle). Designed by van Delft, Pieter and Botermans, Jack. 1997. Denkspiele der Welt. Heinrich Hugendubel Verlag, München.
- Binary Math Circuits All About Circuits has the following resources including some useful worksheets in Binary Math. These can be printed without solutions for classroom exercises. Teacher copy can have the answers revealed. See also their dedicated chapters below (table of contents on the left of pages).
- Scratch Projects User dusseau has a fun game implemented in Scratch for guessing a binary number in 60 seconds for a score with hard and easy levels called the Binary Number Quiz.
- nrich Maths has the following activities with notes and solutions provided:
- BBC h2g2 site has the following resources of interest in Boolean Logic:
- Jeremy Kubica’s Computational Fairy Tales has a fairy tale story Unhappy Magic Flowers and Binary
- DJ Dates has a fun activity to create a Binary Decoder Wheel which provides students with a quick way to lookup a binary number and discover the letter that the binary number represents. In class, I provide students with three printed pieces of cardstock and each student cuts out and assembles their own Binary Decoder Wheel:
- Southwest Educational Development Laboratory has a fun resource for elementary students called Place Value for Elementary Students. These activities reinforce students’ understanding by using rhythm, physical action, and introspection. See also Number Sense and Mathematics Communication in Elementary School. See also Wikipedia: Positional Notation .

### If you want to find out more #

- Wikipedia: Computer Numbering Formats,
- Wikipedia: Binary Numbers
- Wikipedia: Finger Binary.
- Wikipedia: Most Significant Bit
- Wikipedia: Logic Gate
- Wikipedia: Powers of Ten
- Other number systems on Wikipedia:
- Decimal: The decimal numeral system (also called base ten or occasionally denary) has ten as its base. Positional decimal systems include a zero and use symbols (called digits) for the ten values (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) to represent any number, no matter how large or how small.
- Hexadecimal : uses sixteen distinct symbols, most often the symbols 0–9 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a through f) to represent values ten to fifteen.
- Octal: The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to 7. Numerals can be made from binary numerals by grouping consecutive binary digits into groups of three (starting from the right).
- ASCII: The American Standard Code for Information Interchange (acronym: ASCII; pronounced /ˈæski/, ASS-kee)[1] is a character-encoding scheme based on the ordering of the English alphabet. ASCII codes represent text in computers, communications equipment, and other devices that use text.

- Virginia Tech, Dept of Computer Science has a complete module on Number Systems.
- Ron Hale-Evans has a Wiki entry called Binary Numbers System.
- Ken Bigelow has a website Digital Logic that covers most topics related to binary and digital logic.
- Jeremy Falcon has an excellent article on Learning Binary and Hexadecimal.
- Exploring Binary has the following interesting sections on the Powers of 2:
- The Powers of Two: Why are they called powers of two? What is the pattern you see? How is the set described mathematically? What are the set’s components? We will answer those questions in this article.
- 1,073,741,823 Grains of Rice : In the children’s book “One Grain of Rice: A Mathematical Folktale” a girl uses her knowledge of exponential growth to trick a greedy king into turning over his stockpile of rice. Hidden in the story are mathematical concepts related to doubling: powers of two, geometric sequences, geometric series, and exponents. I will analyze the story from this perspective, and then discuss my experience reading it to first and third grade students.
- Exploring Binary Numbers With PARI/GP Calculator: PARI/GP is a sophisticated tool, with several components — yet it’s easy to install and use. I use its command shell in particular, the PARI/GP calculator, or gp for short. I will show you how to use simple gp commands to explore binary numbers.
- Powers Of Two In The Josephus Problem: This formula, you won’t be surprised to hear, has connections to the powers of two and binary numbers. I will discuss my favorite solution, one based on the powers of two.
- Elements of Binary in the NCAA Basketball Tournament: If you’re like me, you also think of powers of two, binary trees, logarithms, laws of exponents, geometric sequences, geometric series, and Bernoulli trials — in short, the elements of binary numbers, binary code, and binary logic.

- Dr. John H. Lienhard has the following interesting articles on the history of different number bases:
- howtoons illustrates counting in binary numbers using cartoons:
- Kerry Redshaw has a website with information on pioneers in the history of computing. The following articles are of interest:
- Binary – So Simple a Computer Can Do It
- What’s So Logical About Boolean Algebra?
- ASCII and HTML – How They Work Together
- Gottfried Wilhelm Leibniz: Gottfried Leibniz laid the modern foundation of the movement from decimal to binary as far back as 1666 with his ‘On the Art of Combination’, laying out a method for reducing all logic to exact statements.

- Hierosolyma Kadathian’s page on Numeric Systems defines number systems, then provides information about binary and the hexadecimal system.
- Math Steps provides a good explanation and teacher resources on Place Values.
- NCETM’s Seconday Magazine has the following articles of interest:
- Focus on…shunting, an article on an application of binary notation in which the challenge is to rearrange railway trucks with as few shunts as possible, provide situations in which a teacher can focus on some particular ways of acting mathematically
- Focus on…perfect shuffles: There are some magic tricks that use pretty elaborate mathematics…and…magicians can perfectly shuffle a deck of cards. Explore the link to Binary numbers in this activity
- Exploring Digital Devices: exploring base 2 numbers

- TI-Basic Developer has a section on Binary, Hexadecimal and Octal Number System which explains these systems and their applications

### Number converters and calculators #

- Binary to Hexadecimal Converter
- Hexadecimal to Binary Converter
- Binary to Decimal Converter
- Decimal to Binary Converter
- Binary to ASCII Converter
- ASCII to Binary Converter
- Hexadecimal to Decimal Converter
- Decimal to Hexadecimal Converter
- Cleave Books has The Number Base Calculator. This calculator can be used to change numbers into a range of different bases.

### Videos #

- Michael Littman has a great video demonstrating Logic Gates using Toys!
- Tim Fiegenbaum, North Seattle Community College has the following videos in digital logic and circuits.
- Video: 9yr Old Sister Hannah Joy Counts Binary on Her Fingers
- Video: A school-house rock style video on binary numbers
- Video: Binary numbers in 60 seconds
- American Public University System’s Channel has a video on Binary Arithmetic: Binary Arithmetic Add – Subtract – Multiply – Divide
- Vi Hart has a Video: Binary Hand Dance, another fun way to introduce Binary!
- How Gangnam Style Broke YouTube – Computerphile
- Daniela Marghitu’s students have programmed this activity at the Robo Camp at Auburn University. Watch the Video: RoboCamp Spring 2010 Robotics And CSUnplugged Binary Numbers Project
- Abdullah Seddiq (MIT Blossoms) has Counting Systems with teacher’s guides and additional resources. This video aims to explain counting systems (Decimal, Binary, Hexadecimal). Students will get to know how to convert numbers between these systems. Also students will learn how to do some byte and bit level operations. They will use a Visual Basic (VB) application that changes colors through logical operation on numbers. See also The Magic Picture: Steganography in Bitmap Files
- Hanan Al Arfaj (MIT Blossoms) has an extension lesson: The Mailman and the Five Packages: Data Packets and Data Transfer Speed with teacher’s guides and additional resources. This video aims to explain the process of data transfer throughout computer systems and the form the data gets transferred into. Prerequisites for this lesson include some knowledge of the concept of digital data and an understanding of file size units (Bits, Bytes, Kilobytes, etc).
- Pete Hawkes demonstrates his Binary Glove , where each finger represents a bit value in a simple binary sequence: 1, 2, 4, 8, and 16. Pressure sensors in the ends of each finger register each bit as on or off.
- Attic Academy has the Basics of Binary
- Rutgers University CS has the Octopus Counting: Watch how each tentacle represents one bit. Eight tentacles = eight powers of 2! A great way to teach students how to learn the basics of binary arithmetic.

### Additional resources #

- Thomas M. Churm has a cool Binary Clock
- Rick Regan reports on The Binary Marble Adding Machine. To learn about the inner workings of this machine, you may visit woodgears workshop site on binary adding machine
- Anthony Liekens gives designs for building an Analog Binary clock

## Curriculum Links #

### Great Principles of Computer Science #

- Recollection

### ACM K12 Curriculum #

- Level I (Grades K2) Topic 11: Understand how 0s and 1s can be used to represent information, such as digital images and numbers.