
3.6. Error Detection¶
This lesson, which is adapted from Computer Science Unplugged, uses a card trick to illustrate how extra bits in a binary sequence can be used to detect certain kinds of errors. It reinforces the enduring understanding that a variety of abstractions built upon binary sequences can be used to represent all digital data.
CSP Framework | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||||||||||||||||||||||||||||||||
Enduring Understanding 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. | |||||||||||||||||||||||||||||||||||||||||
Learning Objective DAT-1.A: Explain how data can be represented using bits. | |||||||||||||||||||||||||||||||||||||||||
Learning Objective DAT-1.B: Explain the consequences of using bits to represent data. | |||||||||||||||||||||||||||||||||||||||||
Professional Development
The Student Lesson: Complete the activities for Mobile CSP Unit 3 Lesson 3.6: Error Detection.
Materials
- Playing cards or 0/1 cards are useful for this lesson. Here are some options:
- Set of cards to use on the board (magnetic, large post-it notes or similar that are sticky on both sides)
- Set of cards for groups of 3 students (card stock that has a different color on each side)
- Alternatives (in-person): pennies (heads/tails would be 0/1), 0/1 bit cards, deck of playing cards
- Alternatives (online teaching): Slide where students can move cards into place, Virtual playing cards, the android widget built into lesson.
- POGIL handout
3.6.1. Learning Activities¶
Estimated Length: 45 minutes
- Hook/Motivation (5 minutes): Ask the students: Now that you know that all data in a computer are stored in bits, in sequences of binary 0s and 1s, what might an error look like when you store or transmit some data? When data is corrupted it is said to contain an error.
"When data is stored on a disk or transmitted from one computer to another, we usually assume that it doesn’t get changed in the process. But, sometimes things go wrong and the data is changed accidentally. This activity uses a magic trick to show how to detect when data has been corrupted, and to correct it." -CS Unplugged - Experiences and Explorations (30 minutes):
- Card Trick Demo (5 minutes): Do the error detection card trick with students using a deck of cards or the online widget or virtual playing cards. The CS Unplugged error detection card trick page contains videos of the trick being done. The CS Unplugged error detection card trick pdf explains how the trick is done:
- Have a pile of cards ready. The cards could all be black on one side and white on the other, or you could use a deck of playing cards with the face as the white side and the back as the black side, or some printed 0/1 bit cards
- Ask for a student volunteer to layout a 5 x 5 grid of cards. The cards can be in any order.
- When the student has finished laying out the grid, then casually lay out the additional row and column (the parity bits). When adding a card to each row and column, make sure the number of black cards in that row or column is always even. For example, if the row the student volunteer has made has 1 black cards and 4 white cards, then you add a black card to that row to make the total number of blacks in that row 2, an even number. Simply tell the students you are adding these cards to make the trick 'harder." Do not explain how/why you are really adding the extra cards.
- Ask for another student volunteer to switch out any card and replace it with the opposite color card while you leave the room or look away.
- Come back and do the trick - "magically" spot which card was flipped while you were looking by finding which row and column has an odd number of black cards.
- Ask the students if they have any insight on what you may have done.
- POGIL Activity (25 minutes): Break students into teams of 3-4 and have them complete the critical thinking questions. Make sure students are following their roles and that each student in the group understands the card trick.
- Card Trick Demo (5 minutes): Do the error detection card trick with students using a deck of cards or the online widget or virtual playing cards. The CS Unplugged error detection card trick page contains videos of the trick being done. The CS Unplugged error detection card trick pdf explains how the trick is done:
- Rethink, Reflect and/or Revise (10 minutes): Ask the students to write a reflection in their Google portfolio that describes the error detection card trick, how it is performed, and what they learned about error detection. If time permits, have the students try some interactive exercises.
3.6.2. Professional Development Reflection¶
Discuss the following questions with other teachers in your professional development program.
- How does this lesson help students toward the enduring understanding that the way a computer represents data internally is different from the way the data is interpreted and displayed for the user? [EU DAT-1]
-
I am confident I can teach this lesson to my students.
- 1. Strongly Agree
- 2. Agree
- 3. Neutral
- 4. Disagree
- 5. Strongly Disagree