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.
Guided Activity (10 min)
Represent Values as a Light Switch
- 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.).
- Invite students to share their ideas with the class.
- 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?
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 "Cisco Binary Game" (or optionally paper worksheets) to practice binary/decimal conversion.
- Slide 12 (Hexadecimal): If you are planning to have the students work on 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.
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)
Introduction
- 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:
- Have the students play the Cisco Binary Game. http://forums.cisco.com/CertCom/game/binary_game_page.htm You could also have the students teach a friend how to play the game, or create a quiz to determine if the friend has learned the basics of the binary number system. To ensure progress, you could have the students show you and/or a partner when they have reached a particular level of the game.
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.
- How is text converted to hexadecimal format?
http://cs10kcommunity.org/forum/lessons-share-encourage-active-learning
Text to hexadecimal conversion tool - http://www.string-functions.com/hex-string.aspx
- Where are hexadecimal numbers used to represent digital data? Colors!
Color Conversion Website: http://rapidtables.com/convert/color/index.htm
- How are picture files saved with hexadecimal format?
http://cs10kcommunity.org/forum/lessons-share-encourage-active-learning
- Color Chart of 216 Web-safe Colors in hexadecimal form - http://www.w3schools.com/html/html_colors.asp
Wrap-Up (5 min)
Journal
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.
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:
- http://www.instructables.com/id/How-to-Weave-on-a-Frame-Loom/step2/Warp/
- 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.
The Extension section above gives a variety of outside activities, some of which are appropriate for verbal and others for tactile learners.
- Instead of flashlights, the same task can be done with large cards that are black on one side and white on the other.
- 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¤tbook=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:
Binary and Hexadecimal Easter eggs - http://searchengineland.com/googles-easter-eggs-for-binary-octal-hexadecimal-114800?utm_campaign=tweet&utm_source=socialflow&utm_medium=twitter
Alternative presentation for Gifted Students doing Decimal to Hexadecimal Conversion:
For decimal number x:
- Get the highest power of 16 that is less than the decimal number x:
- 16n < x, (n=1,2,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:
- dn = int(x / 16n)
- Calculate the difference Δ of the number x and the hex digit dn times the power of 16, 16n:
- Δ = x - dn × 16n
- Repeat step #1 with the difference result until the result is 0.
Example
Convert x=603 to hex:
n=2, 162=256 < 603
n=3, 163=4096 > 603
So
n = 2
d2 = int(603 / 162) = 2
Δ = 603 - 2×162 = 91
n = 1, x = Δ = 91
d1 = int(91 / 161) = 5
Δ = 91 - 5×161 = 11
n = 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
http://csunplugged.org/binary-numbers
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 such as https://www.youtube.com/watch?v=o7SqlLXcK0Q.