Methods of error detection

Computer Science · Data transmission. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Computer Science topics

The idea

Data can be changed while it travels, for example by electrical interference. Bits can be flipped, lost or added. The receiver therefore needs a way to check that what arrived is what was sent.

Most methods work the same way. The sender calculates something extra from the data and sends it too. The receiver does the same calculation and compares. If the two do not match, there is an error and the data is sent again.

A parity check, a checksum and an echo check are for transmission. A check digit is for data entry, such as typing or scanning a bar code or ISBN.

Rules to remember

Common mistake

Students count only the seven data bits when checking a received byte. Count all eight bits, including the parity bit.

Worked example

A system uses odd parity. Two bytes arrive: 1101 0110 and 0110 0110. Which one contains an error?

  1. Count the 1s in 1101 0110: 1 + 1 + 0 + 1 + 0 + 1 + 1 + 0 = 5. Five is odd, so this byte passes.
  2. Count the 1s in 0110 0110: 0 + 1 + 1 + 0 + 0 + 1 + 1 + 0 = 4. Four is even.
  3. With odd parity an even count means a bit has been changed.

Answer: The byte 0110 0110 contains an error.

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Keep going

← Types and methods of data transmissionEncryption →Take a Computer Science test