Back to the 2017 paper

Module 2: Data Link Layer & MAC Sublayer

20177m

Describe how the two-dimensional parity check is able to detect errors. Consider '1100101100110000110100101101' as the data that is to be sent over the network.

Worked SolutionAI Assisted

How Two-Dimensional Parity Check works

Instead of computing a single parity bit for the entire message (simple/1D parity, which misses many multi-bit error patterns), the data is arranged into a grid (rows x columns). A parity bit is computed for every row (across its columns) and for every column (down its rows), and one extra corner bit is computed as the parity of all the row (or column) parity bits, for cross-checking.

This lets the receiver not only detect more error patterns than 1D parity (in particular, it can detect any combination of up to 3 bit errors reliably, and catches many burst errors) but often locate a single-bit error precisely: if exactly one row parity and one column parity mismatch, the error must be at the intersection of that row and column, so it can even be corrected.

Worked example

Data (28 bits): 1100101100110000110100101101

Arranged as a 4 x 7 grid:

Row1: 1 1 0 0 1 0 1
Row2: 1 0 0 1 1 0 0
Row3: 0 0 1 1 0 1 0
Row4: 0 1 0 1 1 0 1

Row parities (even parity — XOR of all bits in that row):

Row1: 1^1^0^0^1^0^1 = 0
Row2: 1^0^0^1^1^0^0 = 1
Row3: 0^0^1^1^0^1^0 = 1
Row4: 0^1^0^1^1^0^1 = 0

Column parities (XOR down each column):

Col1: 1^1^0^0 = 0     Col5: 1^1^0^1 = 1
Col2: 1^0^0^1 = 0     Col6: 0^0^1^0 = 1
Col3: 0^0^1^0 = 1     Col7: 1^0^0^1 = 0
Col4: 0^1^1^1 = 1

Corner bit = parity of the column-parity row 0011110 = 0 (also cross-checks with parity of row-parity column 0110 = 0 — consistent)

Full transmitted block (with parity row and column added):

1 1 0 0 1 0 1 | 0     <- Row1 + its parity
1 0 0 1 1 0 0 | 1     <- Row2 + its parity
0 0 1 1 0 1 0 | 1     <- Row3 + its parity
0 1 0 1 1 0 1 | 0     <- Row4 + its parity
---------------------
0 0 1 1 1 1 0 | 0     <- Column parities + corner bit

Error detection in action: Suppose during transmission the bit at Row2, Col3 flips (0 -> 1). At the receiver:

  • Recomputing Row2's parity now mismatches the received Row2 parity bit.
  • Recomputing Col3's parity now mismatches the received Col3 parity bit.

Since exactly one row and one column disagree, the receiver can pinpoint the error at their intersection — Row2, Col3 — and even correct it by flipping that bit back.

Similar questions

AI LearningWeb Platform

Coursify — Personal AI Course Generator

Struggling with a difficult subject or concept? Turn any engineering topic into a structured course with interactive lessons, quizzes, and research-backed explanations.