Error Detection: Parity Checks & Parity Blocks

During data transmission across physical wires, optical fibres, or radio frequencies, electromagnetic interference, power surges, and signal attenuation can cause bits to become corrupted. A 0 may accidentally flip to a 1, or a 1 may flip to a 0.

To prevent corrupted instructions or data from being processed, computer networks use error detection techniques.


Learning Objectives

  • Calculate and verify Even and Odd parity bits.
  • Explain the operational mechanics and critical limitations of single-bit parity checks.
  • Analyze a 2D Parity Block (Matrix Check) to detect and automatically correct a flipped bit.

Single-Bit Parity Checks

A parity check is one of the simplest methods used to check whether data has been corrupted during transmission. Before transmission begins, the sending and receiving devices must agree on the parity protocol: Even Parity or Odd Parity.

An extra bit—the parity bit—is appended to the data bits (typically placed as the Most Significant Bit / MSB or at the end).

1. Even Parity

  • The parity bit is set to 0 or 1 so that the total number of 1s in the byte is an EVEN number ($0, 2, 4, 6, 8$).
  • Example A: Data bits = 1010001
  • Count of 1s: 3 (odd)
  • To make the total count even, Parity Bit = 1
  • Transmitted byte: 11010001 (total of four 1s)
  • Example B: Data bits = 1100011
  • Count of 1s: 4 (already even)
  • Parity Bit = 0
  • Transmitted byte: 01100011 (total of four 1s)

2. Odd Parity

  • The parity bit is set so that the total number of 1s in the byte is an ODD number ($1, 3, 5, 7$).
  • Example A: Data bits = 1010001
  • Count of 1s: 3 (already odd)
  • Parity Bit = 0
  • Transmitted byte: 01010001 (total of three 1s)
  • Example B: Data bits = 1100011
  • Count of 1s: 4 (even)
  • Parity Bit = 1
  • Transmitted byte: 11100011 (total of five 1s)

Verification at Receiver

When the receiver receives each byte, it counts the number of 1s:

  • If Even Parity was agreed, but the received byte contains an odd number of 1s, an error is detected.
  • If Odd Parity was agreed, but the received byte contains an even number of 1s, an error is detected.

The Critical Limitation of Single-Bit Parity

While simple and computationally cheap, single-bit parity checks have two significant drawbacks:

  1. Undetected Errors (Even Number of Flips):
  • If two bits flip during transmission (e.g. 1 flips to 0 AND 0 flips to 1), the total count of 1s remains the same!
  • Any even number of bit errors ($2, 4, 6$) will fool the parity check, allowing corrupted data to pass undetected.
  1. Cannot Locate or Correct Errors:
  • Even when a single bit flips and parity fails, the receiver only knows that an error occurred somewhere in the byte; it has no way of knowing which of the 8 bits flipped. The entire byte must be discarded and retransmitted.

Written practice and self-review

A communications channel uses parity checks to safeguard transmitted binary data.

  1. Explain the critical limitation of a single-bit parity check if multiple bits flip during transmission.
  2. Describe how a 2D Parity Block (using horizontal row parity and vertical column parity) overcomes this limitation to detect and correct a single flipped bit.

Write an explanation before checking the theory. Check that each claim answers the question, uses the correct concept and explains why it applies. Discuss uncertain points with a teacher. The structured exercise below checks specific facts; it does not automatically mark this explanation.

AI Socratic Tutor

All-Access
Sign in or create an account. AI Tutor is an All-Access benefit.
Sign Up

Need guidance? Ask a question or use the hint below.

AI Socratic Tutor is an All-Access Benefit

Unlock step-by-step Socratic hints, algorithm trace table walkthroughs, and error diagnostics for every Cambridge exercise.

You're chatting with an AI tutor, not a person. AI can make mistakes, so double-check its answers.

Exam-Style Check: Parity Blocks & 2D Parity

• Multiple Choice
+25 XP
Question

What is the primary advantage of using a 2D Parity Block (horizontal and vertical parity bits) compared to a simple single-byte parity check?

All-Access Required

Interactive exercises for Module 2 and beyond require an active plan.