Chapter recap
Parity: 1-D detects odd numbers of flips; 2-D (R + C + 1 bits) detects up to 3 and corrects 1. Hamming distance: detect d − 1, correct ⌊(d − 1)/2⌋; Hamming code r with 2ʳ ≥ m + r + 1. Internet checksum: 16-bit 1's-complement sum, send the complement; receiver total = 0xFFFF. CRC: append r zeros, divide by G (degree r), send the remainder; misses only multiples of G; catches bursts ≤ r.
Merged rule card
From 2.2.1 Single-bit vs burst errors; redundancy; 1-D and 2-D parity
- Single-bit vs burst; burst length = first to last damaged bit inclusive.
- Codeword = dataword (k) + r check bits.
- 1-D parity: detects odd numbers of flips only.
- 2-D parity: R + C + 1 check bits; detects all 1–3-bit errors, corrects 1, misses some 4-bit rectangles.
From 2.2.2 Hamming distance: detect d − 1, correct ⌊(d − 1)/2⌋
- d(x, y) = number of 1s in x ⊕ y; d_min = smallest over codeword pairs.
- Detect d_min − 1; correct ⌊(d_min − 1)/2⌋.
- Detect s needs d ≥ s + 1; correct t needs d ≥ 2t + 1.
- Hamming code: smallest r with 2ʳ ≥ m + r + 1.
From 2.2.3 The Internet checksum: compute and verify
- 16-bit words; checksum field = 0 while summing.
- Sum with 1's-complement addition (wrap carries); checksum = complement of the sum.
- Receiver: sum of all words + checksum = 0xFFFF → accept.
- Misses word reordering and compensating errors.
From 2.2.4 CRC: generator polynomial, modulo-2 division, what CRC catches
- G of degree r (r + 1 bits); append r zeros, divide modulo 2, send data + r-bit remainder.
- Receiver divides the whole frame: remainder 0 → accept.
- Undetected ⇔ error pattern E is a multiple of G.
- Catches: all single-bit errors (≥ 2 terms), all odd counts (x + 1 | G), all bursts ≤ r; (r+1)-bursts missed w.p. 2⁻⁽ʳ⁻¹⁾, longer 2⁻ʳ.
Practice questions
- MCQ · 2 marks
CRC of data 11100110 with G = 1001?
- 001
- 110
- 011
- 100
- NAT · 2 marks
Internet checksum (decimal) of the 16-bit words 0x8000 and 0x8001?
Write your answer before opening the key.
- NAT · 1 mark
d_min of {0000, 0111, 1011, 1101}?
Write your answer before opening the key.
- MSQ · 1 mark
Which detect every single-bit error?
- Even parity
- Internet checksum
- CRC with G = 10011
- A code with d_min = 1
- NAT · 1 mark
Check bits of a single-error-correcting Hamming code for 26 data bits?
Write your answer before opening the key.
- MCQ · 1 mark
A CRC with degree-16 generator is guaranteed to detect all bursts of length up to:
- 15
- 16
- 17
- 32
- NAT · 1 mark
Parity bits in 2-D parity over a 5 × 5 block?
Write your answer before opening the key.
- MCQ · 1 mark
Which error is the Internet checksum unable to detect?
- One bit flipped
- Two 16-bit words interchanged
- Last bit flipped
- First bit flipped
- MCQ · 1 mark
A code must correct 3 errors. Minimum d_min?
- 4
- 6
- 7
- 3
- MSQ · 2 marks
With G = 1101, which received strings are accepted?
- 100100001
- 000000000
- 110100000
- 100100000
Answer key
Try the questions first. Open when you are ready to check.
- A — Append 3 zeros (degree 3) and divide 11100110 000 by 1001 modulo 2 → remainder 001; transmit 11100110001.
- B: Bits reversed / arithmetic slip; recheck the XOR steps.
- C: Arithmetic slip in the division.
- D: Arithmetic slip in the division.
- 65533 — 0x8000 + 0x8001 = 0x10001 → 0x0001 + 1 = 0x0002; complement 0xFFFD = 65533.
- 2 — 0111 vs 1011 differ in 2 positions; all others ≥ 2.
- ABC — All three proper methods catch single flips.
- D: d_min = 1 detects nothing.
- 5 — 2⁵ = 32 ≥ 26 + 5 + 1 = 32.
- B — Bursts ≤ r = 16.
- A: Too small.
- C: r + 1 bursts are not guaranteed.
- D: Too large.
- 11 — 5 + 5 + 1.
- B — Addition is order-independent.
- A: Changes the sum.
- C: Changes the sum.
- D: Changes the sum.
- C — 2t + 1 = 7.
- A: Detects 3 only.
- B: Corrects 2.
- D: Corrects 1.
- ABC — Each accepted string is a multiple of 1101 (1101000 shifted is a multiple too).
- D: Remainder 001 ≠ 0.