Chapter 2

Error Detection Methods

Understand how parity checks, checksums, echo checks and check digits spot errors when data is sent from one device to another.

Why errors happen

When data travels through cables or the air it can be corrupted by interference, so bits may flip from 0 to 1 or from 1 to 0. Error detection methods let the receiving device check whether the data arrived correctly and, if not, ask for it to be sent again. No single method is perfect, so systems often combine several of them to give a good chance of catching mistakes before the data is used.

Parity checks

A parity check adds one extra parity bit to each byte. With even parity the parity bit is set so that the total number of 1s is even; with odd parity the total is odd. If the receiver counts the 1s and the total is wrong, an error is detected.

Example

Using even parity, the data bits 0110100 contain three 1s, so the parity bit must be 1 to make the count even (four).

Other methods

  • Checksum — a value calculated from the data is sent with it and recalculated at the other end; if the two disagree, an error occurred.
  • Echo check — the received data is sent back to the sender to be compared with the original.
  • Check digit — an extra digit added to numbers such as barcodes and ISBNs, calculated from the other digits so that a mistyped number can be spotted at once.

Remember

  • A single parity check cannot detect two bit errors that cancel out.
  • ARQ (automatic repeat request) asks for corrupted data to be resent.

Stuck on this topic? A verified JomKelas tutor can walk you through it.

Find a verified tutor