Lesson Summary


A bit is a single unit of information. Bits are the fundamental building blocks of digital computing.  There are many different ways to represent a single bit physically, and collections of bits can be combined to represent everything from numbers to electronic books, to control programs for interstellar probes. In this lesson, students will learn how bits are stored and how they can be used to represent information. Students will further explore how numbers can be represented in binary form, how to convert numbers between these different forms, and how they are used by different applications.

This lesson should be repeated with increasing levels of expectations.  The first time this lesson is taught the emphasis is on binary and conversion to decimal, and representation of letters and colors using binary - ASCII and RGB colors.

The second time it is taught should be during Unit 2.  The previous topics should be reviewed with the emphasis this time on conversion to hexadecimal and representations of decimal values to support the idea of different number types in Python.

The final time it should be taught - perhaps at the beginning of the Internet Unit - the emphasis should be on comparing binary and hexadecimal values without converting them to binary. This should support students understanding of the formatting and use of internet packets.



  • Understand the abstraction of a "bit" and how bits can be used to represent different kinds of information.
  • Be able to convert numbers between decimal, binary, and hexadecimal forms.
  • Be able to identify formats used to represent numbers, pictures, audio, and video data.
  • Understand how these forms of bit representation are used in modern technology.
  • Be able to use software to extract information stored in a computer.


Session One

  1. Getting Started (5 min) - Jacquard loom
  2. Guided Activity (10 min) - Light bulb abstraction of bits
  3. Interactive Teacher Presentation (25 min) - "It's Just Bits"
  4. Wrap Up (10 min) - Binary conversions worksheet

Session Two 

  1. Getting Started (5 min) - Journal and completing a worksheet
  2. Guided Activity (20 min) - Conversions (two options: Binary Game or hexadecimal conversions)
  3. Real-World Connections (20 min)
  4. Wrap-up (5 min) - Journal

Session Three - New for 2020-2021

  1. Getting Started (5 min) - Journal data representation strategies
  2. Guided Activity 1 (20 min) - Use software to extract information from a web site.
  3. Guided Activity 2 (20 min) - Use software to obtain and extract information from a table
  4. Wrap-up (5 min) - Journal

Optional Activities

  • Homework - Generate conversion worksheets using http://www.worksheetworks.com/math/numbers/systems.html 
  • (30 min) Web-quest to explore different ways of physically representing bits.
  • Four research activities on:
    • Charles Babbage and Ada Lovelace
    • Hollerith's Tabulation Machine
    • Qbits
    • Weaving with the Jacquard Loom


Parts of this lesson were adapted from code.org.

Learning Objectives

CSP Objectives

  • EU DAT-1 - The way a computer represents data internally is different from the way the data is interpreted and displayed for the user. Programs are used to translate data into a representation more easily understood by people.
    • LO DAT-1.A - Explain how data can be represented using bits.
    • LO DAT-1.C - For binary numbers: a. Calculate the binary (base 2) equivalent of a positive integer (base 10) and vice versa. b. Compare and order binary numbers.
  • EU DAT-2 - Programs can be used to process data, which allows users to discover information and create new knowledge.
    • LO DAT-2.A - Describe what information can be extracted from data.
    • LO DAT-2.D - Extract information from data using a program.
    • LO DAT-2.E - Explain how programs can be used to gain insight and knowledge from data.

Math Common Core Practice:

  • MP1: Make sense of problems and persevere in solving them.
  • MP2: Reason abstractly and quantitatively.
  • MP4: Model with mathematics.
  • MP8: Look for and express regularity in repeated reasoning.

Common Core Math:

  • N-Q.1-3: Reason quantitatively and use units to solve problems

Common Core ELA:

  • RST 12.1 - Cite specific textual evidence to support analysis of science and technical texts, attending to important distinctions the author makes and to any gaps or inconsistencies in the account.
  • RST 12.2 - Determine central ideas and conclusions in the text
  • RST 12.3 - Precisely follow a complex multistep procedure
  • RST 12.4 - Determine the meaning of symbols, key terms, and other domain-specific words and phrases
  • RST 12.7 - Integrate and evaluate multiple sources of information presented in diverse formats and media
  • RST 12.10 - Read and comprehend science/technical texts
  • WHST 12.1 - Write arguments on discipline specific content
  • WHST 12.2 - Write informative/explanatory texts, including the narration of historical events, scientific procedures/experiments, or technical processes
  • WHST 12.8 - Gather relevant information from multiple authoritative print and digital sources, using advanced searches effectively; assess the strengths and limitations of each source
  • WHST 12.9 - Draw evidence from informational texts to support analysis, reflection, and research

NGSS Practices:

  • 5. Using mathematics and computational thinking

Key Concepts

The students will...

  • Understand the abstraction of a "bit" and how bits can be used to represent different kinds of information.
  • Be able to convert numbers between decimal, binary, and (optionally) hexadecimal forms.
  • Be able to identify formats used to represent numbers, pictures, audio, and video data.
  • Understand how these forms of bit representation are used in modern technology.
  • Be able to extract information from webpages using software.

Essential Questions

  • How can computing and the use of computational tools foster creative expression?
  • How are vastly different kinds of data, physical phenomena, and mathematical concepts represented on a computer?
  • How can computational models and simulations help generate new understanding and knowledge?
  • How are number values converted across decimal, binary, and hexadecimal representations?
  • How are digital colors represented with hexadecimal codes?
  • What is the algorithm to convert a number to or from hexadecimal with another number system?

Teacher Resources

Student computer usage for this lesson is: required

For the Student

  • Journal
  • Option: Access to a web browser with Flash to play the Binary Game: http://www.crazygames.com/game/binary-game
  • Option: Access to a web browser and collaborative file creation/sharing site, such as Google Documents, to complete a web quest 

For the Teacher

In the Lesson Resources folder:

  • Presentation: JustBits
  • BinaryConversionWorksheet
    • Give these directions to students during the lesson
  • AdditionalResource_bin2dec
  • AdditionalResource_BinaryWorksheet
  • AdditionalResource_binmagic
  • For Lecture:
    • HexBinaryExamples
    • HexDecimalExamples
  • Hexadecimal worksheets:
    • Worksheet: HexConversionsWorksheet
    • Homework: HexConversionsHomework
  • Answer Keys:
    • HexConversionsWorksheetKEY
    • HexConversionsHomeworkKEY

Available on the Web for Teachers:

Lesson Plan

Session One

Getting Started (5 min)

Jacquard loom: early computer programming

The teacher will introduce the "Jacquard Loom," an early machine that made use of punch cards to make complicated textiles.

  • View the video: http://www.youtube.com/watch?v=lwozgRPLVC8 (2:35) Summary: Developed in 1801 by Joseph Jacquard--this loom used punch cards to structure a series of operations. This loom is considered to be an important to the development toward computer programing.
  • If you have punch cards, pass them around while students are watching the video.

Guided Activity (10 min)

Represent Values as a Light Switch

  1. Instruct students to answer these questions with an elbow partner:
    • Using a single light switch, how can you represent the value 0? 1?
    • If you have two light switches (connected to two different lights in the same room), how many values can you represent? Describe how you would represent each value (numbers, symbols, etc.).
  2. Invite students to share their ideas with the class.
  3. Engage the entire class with the following questions. Show the various combinations.
    • If I add a third switch, how many values can I represent?
    • How many values can I represent with four switches? Do you notice a pattern?
    • What is the minimum/maximum values that can be represented with a fixed number of switches? Make the connection: when the computer stores values as on/off switches it can store a range depending on the number of bits (light switches) from all off (0's) to all on (1's)

Teaching Tip: Guiding the students toward understanding that the number of switches determines how many numbers can be represented. The pattern is 1 switch = 2 (or 21) numbers, 2 switches = 4 (or 22), 3 switches = 8 (or 23), etc.

Interactive Teacher Presentation (25 min)

Use the "JustBits" presentation in the lesson folder to explore different ways to represent bits, and different ways in which bits can be used to store different kinds of information.

General Presenting Tips:

  • Throughout the presentation, the slides have questions on them that the students should be thinking about. Try to ensure that students are actively considering these questions and that they understand how to answer them before moving on.  
  • You may wish to call on students randomly, have everyone write down an answer, or have students suggest different answers that you write on the board and then have the class work on.  (Note: Incorrect answers are a great opportunity to diagnose and remedy conceptual errors. Remember, there are no "bad answers," just ones that reveal different levels of understanding.)

Presentation Guide:

  • As you go through the slides, discuss how the different uses of bits relates to the representation of bits. Eight bits can be interpreted in many ways:  as an unsigned integer from 0 to 255, as a signed integer from -127 to 128, as a single ASCII character, or as a red, green, or blue color value associated with a pixel in a screen display.
  • Emphasize to the students that a "bit" is just an abstraction. It refers to the value of a single piece of information stored in an "on/off", "zero/one", or "yes/no" format.  Similarly, any given interpretation a collection of bits as information is an abstraction that lets us move from "a bunch of bits" to "data and information."  
  • Slide 5 (Storing Bits): If you are planning to do the optional web quest to explore different bit representations, you could encourage students to think about different ways that bit could be stored, to get them thinking about that question.
  • Slide 11 (Conversions): This is a fairly quick introduction to binary/decimal conversions.  You may wish to spend some time at the board working through more examples.  Students will have an opportunity later in the class to use the "Binary Game" (or optionally paper worksheets) to practice binary/decimal conversion.
  • Slide 12 (Hexadecimal): For hexadecimal number conversions, you may wish to spend a bit of extra time on this slide to make sure they understand the concept more clearly.
  • Practice Problems, Slide 18: Give the students a few minutes to start working on the first problem, then lead the class in a brief discussion to make sure they’re approaching it correctly.
    • They should be multiplying the number of pixels (600 * 400 = 240,000) by the number of bytes (3 bytes in a pixel) by the number of bits in a bite (8 bits in a byte).
    • The total number of bits = (240,000 * 3 * 8) = 5,760,000 bits.
    • CD answer: 44,100 samples/second * 16 bits/sample = 705,600 bits/second.
    • One 3-minute song = 705,600 bits/second * 60 seconds/minute * 3 = 127,008,000 bits. 
  • Slide 19: Represent data and instructions in binary. Possible answers could use 4 bits per number and 2 bits per operator such as ( 00 for +, 01 for -, 10 for *, 11 for /) as follows: 
    • 9 + 4 as 1001 00 0100

    • 11 – 3 as 1101 01 0011

    • 2 * 5 as 0010 10 0101

    • 15 / 5 as 1111 11 0101

Say: In this course, we will use the Python programming language.  In Python the size of an integer we represent is not limited to 32 or 64 bits as some programming languages.  Python integers are limited in size only be the memory space the computer has. The exam reference sheet produced by the College Board for this course invisions integers the same way that Python does - only limited in size by the computer's memory.

Wrap Up (10 min)

Converting between decimal and binary

Use the "BinaryConversionWorksheet" in the lesson folder (from Code.org) to let students explore (individually or in pairs/small groups) how to build an algorithm for converting binary to decimal. As you progress through the activity, answer questions as they arise, or ask students to explain how they arrived at the answer to check for understanding.

Other extensions and activities that may be useful:

  • List the numbers from 0 to 15. Show students how they are represented in binary. Practice representing the grade level of various students in binary.
  • Show an algorithm for converting binary to decimal.
  • Show an algorithm for converting decimal to binary.
  • Convert an IP-V4 address from decimal to binary.


Session Two 

Getting Started (5 min)


  • Have students describe what they know about representing numbers in binary code from the previous lesson (journal or discussion). (You may want to put a few conversion problems on the board as an entry check.)
  • Complete any remaining problems in the "Student Activity Guide: Converting Decimal to Binary."

Guided Activity: Conversions (20 min)

Option 1: 

Option 2:

  • If your students are comfortable with binary/decimal conversions, you could have them also master hexadecimal conversions.  (See "HexBinaryExample"s and "HexDecimalExamples" in the Lesson Resources folder for specific directions and suggested examples and/or the PowerPoint slides in the lesson folder.)
  • You may want to add additional examples or have students come to the board to show their work as you go through the different types of conversions.  (See the "HexConversionWorksheet" for distribution of those additional practice problems done during class.)

Extension: If you want to give your students more practice problems for in-class practice or homework, you can use the worksheet generator at http://www.worksheetworks.com/math/numbers/systems.html

Real World Connections (20 min)

How are text, colors and images saved in hexadecimal format? Select some of the following to present and discuss with the class.

  1. How is text converted to hexadecimal format?
    Ascii to Hexadecimal conversion chart
    Text to hexadecimal conversion tool - http://www.string-functions.com/hex-string.aspx

  2. Where are hexadecimal numbers used to represent digital data? Colors!
    Color Conversion Website: http://rapidtables.com/convert/color/index.htm

  3. How are picture files saved with hexadecimal format?

  4. Color Chart of 216 Web-safe Colors in hexadecimal form - http://www.w3schools.com/html/html_colors.asp
  5. Floating point numbers (decimals/fractions) are also represented in binary. Challenge students to think of how 2.5 would be written in binary (place values are in powers of 2, so to the right are 2-1 (one half), 2-2 (one quarter), 2-3 (one eighth) etc. So, 2.5 decimal = 10.1 binary ; 3.25 decimal = 11.01 binary; 4.75 decimal = 100.11 binary. See if they can figure out the pattern. Notice that 1/10 is impossible to represent accurately this way, causing any number of complications.

Wrap-Up (5 min)


Students should consider the following prompt, and record their thoughts in their journals:

  • Why is the abstract idea of an image stored in a jpeg file useful even though it hides important details about the actual file format?  When a user takes a digital photograph, they capture a digital image in their camera. Assuming the pictures are in the jpeg format, explain the difference between the abstract idea of an image and what is actually stored by the camera. 
  • Alternative question: Now that you have seen hexadecimal, what other number systems might be useful in computer science?  Give advantages and disadvantages of each. 


Session Three - New for 2020-2021

Getting Started (3 min)


Have students discuss with elbow partners then add to their journals a description of how the computer represents a collection of bits as:

  • a word
  • a color
  • a picture


Guided Activity: 

Herding Bits Activity 1 (20 min)

Open Google Drive and create a new Google Sheet.  Copy the URL of this New York Times article into cell A1. We will use the software in Google Sheets to find the author of this article and then you will use it to find the author(s) of two other New York Times articles of your choice.


Find how the New York Times identifies the author of its articles.


View the New York Times article on the web page.

Highlight the name of the author, right click and select inspect (the element) that contains the author’s name.

Find the itemprop property in the element and verify that it is assigned the same value as in the formula below.



Configure and use the IMPORTXML function in Google Sheets.


Copy the formula above into cell H1 and press enter.

Verify that the name of the author is displayed in cell H1.

Working with elbow partners identify two other New York Times articles and use this technique to have the software in Google Sheets round up the author of each article.


Herding Bits Activity 2(20 min)

Sometimes the information is contained in a larger structure (herd) called a table. This time we will use the software in Google Sheets to copy a table from a web page then use the table values to find information.


Collect the bits contained in the World’s Tallest Buildings table found on Wikipedia. 

Copy the URL from the link above to cell A1 on a new Google Sheet.

Copy the formula below into cell A3 to herd the bits from the second table on the web page to your spreadsheet.


Copy the table values to a new sheet.

Select lines 3 through the end of the table and copy them to the clipboard (ctrl-c).

Create a new Google Sheet.

Use ctrl-space-c to paste the values into the new sheet starting at cell A2. 

Select column D and use the Data menu to sort the data into alphabetical order by country name.


Find the three countries with the most buildings listed among the world’s tallest buildings.

Discuss with elbow partners what other tables might be interesting to scrape from the internet.  Try and find one of those tables online and herd those bits into a spreadsheet.


Wrap-Up (5 min)

Elbow partners share the results of their attempts with the class students should explain in thirty seconds:

What table they tried to find.

Their success at scraping or herding the bits.

What information they might extract fromt their table.



Guidance for Practice Questions - Question Set 1

Questions in the AP Classroom Question Bank may be used for summative purposes. 

Sixty of the 80 questions are restricted to teacher access.  The remaining 20 questions are from public resources. 

Questions are identified by their initial phrases.

A computer program uses 3 bits to represent int...

An online store uses 6-bit binary sequences to ...



Optional Activities

Activity 1 - Collaborative Web-Quest (20 min)

Part 1 - Exploring Physical Bit Representations

  • Group students into small teams. Assign each team to research how computers represent bits with one of the following:
    • Punch cards
    • Magnetic polarity
    • Electrical voltage
    • Light intensity
  • Students can record their findings in a common file such as a Google doc, so that all students can edit and see the combined results of the research. Encourage students to create and/or add images that more completely illustrate what they have learned.

Teaching note: The research and writing activity in this lesson presents an opportunity to talk about copyright laws and emphasize that copied content must be credited to the rightful author or organization. 

Part 2 - Sharing the research

  • Allow students in each group to briefly share the most important details about what they learned about their assigned topics. If more than one group researched the same topic, they can report to the class as one team.
  • Encourage the class to ask questions.
  • Ask students if they know of any additional ways to represent bits.

Teaching note: Model writing skills through a variety of writing opportunities and prompts. Encourage students to write complete sentences that clearly communicate their ideas.


Activity 2 - Charles Babbage and Ada Lovelace

  • Have each student research the machines designed and programmed by Charles Babbage and Ada Lovelace. How did these machines represent bits? Investigate Babbage's and Lovelace's intellectual roles in creating their designs.
  • Communicate your learning in any effective format. Consider images, a collage, a recording, a screen play script, or a compare-and-contrast chart of the contributions to computer science of both Babbage and Lovelace.
  • Student should prepare to discuss their findings with the class.

Activity 3 - Hollerith's Tabulation Machine

  • Have each student research the machines that were designed by Herman Hollerith. How did these machines represent bits? What was the purpose of the machines? How did his device change history?
  • Predict how history might have been different if Hollerith hadn't created this device.
  • Student should prepare to discuss their findings with the class.

Activity 4 - Learn about Qbits

  • Have each student research "Qbit" and how it is used in quantum computing. Be particularly attentive to the vocabulary used to describe this technology. What implications does it have for the future of computing? Report your findings in any effective format.
  • Student should prepare to discuss their findings with the class.

Activity 5 - Weaving

  • Have each student create a small weaving project by following the directions shown in the video about the Jacquard loom:
  • Students respond to this prompt in their journals:
    • How did the invention of the Jacquard weaving loom change society? (consider technologically, economically, socially) Compare these changes to those brought by a recent innovation in computing technology. Be sure to speculate on the long-term impact and significance of these inventions.


Options for Differentiated Instruction

The Extension section above gives a variety of outside activities, some of which are appropriate for verbal and others for tactile learners.

  1. Instead of flashlights, the same task can be done with large cards that are black on one side and white on the other.
  2. If you have the space for a physical activity, have two (or more) teams (of 4 or 5 students each) line up.  
    • Each student represents a bit, with the student on one end being the bit in the 1's place, the next student representing the 2's place, the next the 4's place, etc.   
    • The students start in a standing position, which represents neither 1 nor 0. To represent a 1, the student's arms must be stretched straight overhead; to represent a 0, the student must squat down.  
    • You then call a number (one that can be represented using that many bits).  The two teams then race to get their team to represent that number. The first team to have it correct gets a point. They normalize (all stand with no arms up) and a new number is called.  
    • Ask them about patterns they find during the game.  (The 1's place student should notice that if the number is odd, their arms are up, but if the number is even, they are squatting.  The student representing the highest bit should notice that their arms are up if the number is larger than or equal to their place value.)

Note: If there are students in the class with physical limitations who are unable to stand, stretch, or squat, the game can be modified appropriately: 

  • Have the students play the game seated, with a card in their lap. (It represents neither a 1 nor a 0 when in their lap.) They will hold up a black side (to represent 0) or a white side (to represent 1) when a number is called.


Visual - Decimal, Binary, Octal, and Hexadecimal Number Systems Video -   http://whyu.org/whyUPlayer.php?currentchapter=3&currentbook=1&youtubeid=5sS7w-CMHkU

OR - https://www.youtube.com/watch?v=_oaBT-TndCs

Kinesthetic - Hexadecimal Drum Machine - http://www.mathsisfun.com/games/hex-drums.html 

Auditory - Hexadecimal File Music - https://www.youtube.com/watch?v=fyBf4Y2mVzs

Extension Activity 1. Students that have mastered the conversion techniques can peer-tutor students [one-on-one] that are having difficulty solving the conversions.

Extension Activity 2. Students can observe their computer’s network interface card (NIC) MAC address in hexadecimal, and convert the MAC address to binary and decimal. 

See algorithms of number system conversions:

      - http://www.schooltube.com/video/04a13760ada644a2a7d4/Bin2Dec2Hex%20-%20Lesson%203%20-%20Converting%20a%20hexadecimal%20number%20to%20binary



Alternative presentation for Gifted Students doing Decimal to Hexadecimal Conversion:

For decimal number x:

  1. Get the highest power of 16 that is less than the decimal number x:

  2. 16n < x, (n=1,2,3,...)

  3. The high hex digit is equal to the integer if the decimal number x divided by the highest power of 16 that is smaller than x:

  4. dn = int(x / 16n)

  5. Calculate the difference Δ of the number x and the hex digit dn times the power of 16, 16n:

  6. Δ = x - dn × 16n

  7. Repeat step #1 with the difference result until the result is 0.


Convert x=603 to hex:

n=2, 162=256 < 603

n=3, 163=4096 > 603


= 2

d2 = int(603 / 162) = 2

Δ = 603 - 2×162 = 91

= 1, x = Δ = 91

d1 = int(91 / 161) = 5

Δ = 91 - 5×161 = 11

= 0, x = Δ = 11

d0 = int(11 / 160) = 1110 = B16

Δ = 11 - 11×160 = 0

(d2d1d0)  = 25B

Answer: x = 60310 = 25B16


Learn to Count in Binary and Hexadecimal - http://webelfin.com/webelfindesign/counthex.html


ADDITIONAL/ALTERNATE FORMATIVE ASSESSMENT MATERIAL or Class Activity if time permits - from unplugged.com


Brainstorm reasons for storing and communicating secret messages.  Challenge students to think of both helpful and problematic reasons.  Students record at least two of each.

View steganography presentation.  Presentations are available on YouTube.

Evidence of Learning

Formative Assessment

Assessment Questions:

  • Describe the pattern for even and odd numbers that you see in the binary number system. Speculate on why this pattern exists.
  • Why is the binary number system used in computers?
  • Why is the Jacquard loom important in the history of computing?
  • How are bits represented in punch cards?
  • How are bits represented magnetically?
  • How are bits represented with voltage?
  • How are bits represented with light?
  • Are students correctly answering questions in the Getting Started activity: Represent values with a light switch? On the Student Activity Guide: Converting Decimal to Binary?
  • Decimal, binary, and hexadecimal value conversions:
    • Write the step-by-step process needed for the following number conversions:
      • hexadecimal to binary
      • binary to hexadecimal
      • hexadecimal to decimal
      • decimal to hexadecimal
    • Assign a sequence of consecutive hexadecimal numbers - one to each person.  After they have converted them to decimal and to binary, have them compare to find patterns in their answers.
    • Distribute worksheets so all students practice conversions of all types.  See "BinaryConversionWorksheet" and "HexConversionWorksheet"

Summative Assessment

Journal check - questions presented as described in the lesson plan


  • Why is the binary number system used in computers?
  • Describe the pattern you observe for even and odd numbers in binary. Why do you think this pattern emerges?
  • What other patterns do you see in binary numbers?
  • Convert the ages of your family members to binary. How many bits are needed to express the ages?
  • Describe an algorithm for converting decimal numbers to binary.
  • Describe an algorithm for converting binary numbers to decimal.

Getting Started section: questions on converting between bases and describing the purpose of hexadecimal numbers.