Lesson 5: Catching Flipped Bits — Noise, Even Parity Checks, and End-of-Unit Assessment

Time: 50 minutes

Unit: Binary, Pixels, Logic Gates, and Packet Switching | Previous: Lesson 4

Goal

Add an even-parity check bit to 8-bit bytes, detect single-bit transmission errors, explain why two simultaneous bit flips in the same byte escape 1-bit parity, and complete the 5-part End-of-Unit Assessment.

Materials

Steps

1. Opening (5 min): What If Static Flips a 0 to a 1?

Ask the class: - "Suppose a hospital or spacecraft sends the 8-bit number 00000101 (5 milligrams or 5 degrees), and a burst of radio static on the wire flips the leftmost bit from 0 to 1 (10000101 = 133!). How can the receiver tell that a bit was flipped without already knowing the secret number?"

2. Main Activity (15 min): The Even-Parity Check Bit

Demonstrate how adding one extra check bit (a 9th bit called the Even Parity Bit) catches any single-bit flip (or any odd number of bit flips):

The Even-Parity Rule

Before sending an 8-bit data byte, the sender counts how many 1s are in the 8 data bits: - If the number of 1s in the 8 data bits is already even (0, 2, 4, 6, or 8), set the 9th Parity Bit = 0 so the total number of 1s across all 9 bits stays even. - If the number of 1s in the 8 data bits is odd (1, 3, 5, or 7), set the 9th Parity Bit = 1 so the total number of 1s across all 9 bits becomes even.

Worked Example 1: Computing the Parity Bit

8 Data Bits Count of 1s in Data Even or Odd? 9th Bit (Even Parity Bit) Complete 9-Bit Frame Sent Total 1s Sent
01000001 ('A') 2 ones Even 0 01000001 0 2 (Even)
01000011 ('C') 3 ones Odd 1 01000011 1 4 (Even)

Worked Example 2: Checking Incoming Frames at the Receiver

When the receiver gets a 9-bit frame, it counts the total number of 1s across all 9 bits: - Received Frame X: 01001001 0 → Count of 1s = 3 (Odd!). Since every valid frame was sent with an even number of 1s, an odd total signals that an odd number of bits (1, 3, 5...) flipped during transmission: ERROR DETECTED — discard and request re-send! - Crucial limitation ("No Error Detected" ≠ Proof of Zero Errors): What if lightning flips two (or 4, 6, 8) bits inside the same 9-bit frame? Changing an even count by +2, 0, or -2 keeps the total even, so a single parity bit cannot detect an even number of bit flips. Therefore, a passing (even) parity check means no error was detected, not absolute proof that zero bits changed!

3. Student Practice Tasks (5.1 – 5.8) (10 min)

  1. Task 5.1: Find the Even Parity Bit (0 or 1) to append to the 8-bit data byte 00110101.
  2. Task 5.2: Find the Even Parity Bit (0 or 1) to append to the 8-bit data byte 10110101.
  3. Task 5.3: A receiver uses even parity and receives these four 9-bit frames. Which ones have a detected error?
  4. Frame A: 01010101 0
  5. Frame B: 11001010 1
  6. Frame C: 00000000 0
  7. Frame D: 10000000 0
  8. Task 5.4: What if the Parity Bit itself (the 9th bit) gets flipped by static during transmission while the 8 data bits are untouched? Will the receiver still detect an error? Explain why.
  9. Task 5.5: Assuming at most one bit flipped in a 9-bit frame, explain why a single 9th parity bit can tell you that a bit flipped, but cannot tell you which of the 9 bits flipped.
  10. Task 5.6 (2D Grid Parity Puzzle): Arrange three 4-bit data rows into a grid with an even Row Parity bit at the right end of each row and an even Column Parity bit at the bottom of each data column:
  11. Row 1: 1 0 1 0 | 0
  12. Row 2: 0 1 1 0 | 1
  13. Row 3: 1 1 0 0 | 0
  14. Col Parity: 0 0 1 0 Assume that at most one bit in the entire diagram flipped during transmission, and in fact exactly one data bit inside the 3 × 4 data grid flipped. Check the row sums and column sums to pinpoint the exact (Row, Column) of the flipped bit.
  15. Task 5.7 (Error Rate Ratio): Out of 500 transmitted packets, 15 packets fail their parity check and must be re-sent. Write the error rate as a simplified ratio (failed : total) and as a rate per 100 packets (percentage).
  16. Task 5.8 (Overhead Comparison): Adding 1 parity bit to every 8 data bits creates 9 total bits per byte. What is the ratio of check bits to data bits (1 : 8) and data bits to total bits (8 : 9)?

Complete Answer Key (Tasks 5.1 – 5.8)


End-of-Unit Synthesis Assessment (20 Points Total — 20 Minutes)

Instructions for Students

Answer all 5 problems (4 points each = 20 points total). Show your place-value additions, intermediate gate values, or unit-rate steps clearly.

Problem 1: Doubling Cards & 8-Bit Binary (4 points)

Problem 2: ASCII Characters & Bitmap Pixel Ratios (4 points)

Problem 3: Logic Gates & Truth Table (4 points)

A solar battery charger turns ON (Output = 1) according to the logic circuit: Output = S AND (NOT F) where S = 1 when Sunlight is detected (0 when dark), and F = 1 when the Battery is already Full (0 when not full). - (a) [3 pts] Write out the 4-row truth table for (S, F) = (0,0), (0,1), (1,0), (1,1), showing the intermediate column NOT F and the final Output column. - (b) [1 pt] Explain in plain English which single row turns the charger ON and why.

Problem 4: Packet Switching & Network Unit Rates (4 points)

Problem 5: Even-Parity Error Detection (4 points)


End-of-Unit Assessment Answer Key & Scoring Guide (20 Points)

Vocabulary

Differentiation

Safety

No physical hazards in this unplugged lesson.

Teacher notes