Finding errors: parity, checksums and echo checks Cambridge IGCSE Computer Science revision

Not started

Learn it

In plain words

Data travelling along a wire or through the air can be damaged by interference. A 1 can become a 0, bits can go missing, extra bits can appear. The receiver needs a way to notice.

All three methods here work the same way underneath: send a little extra information along with the data, so the receiver can test whether what arrived still makes sense.

6 things to know

  1. Interference during transmission can cause data loss, data gain and data change.
  2. Parity check: one bit in each byte is a parity bit. With even parity it is set so that the byte has an even number of 1s. With odd parity, an odd number. The receiver counts the 1s. If the count is wrong, there is an error.
  3. A parity check cannot spot an even number of changed bits in one byte, and cannot say which bit is wrong.
  4. Parity block check: bytes are sent in a block with an extra parity byte, giving a parity bit for every row and every column. One wrong bit shows up in both its row and its column, so it can be located.
  5. Checksum: a value is calculated from the data and sent with it. The receiver does the same calculation. If the two values differ, there is an error.
  6. Echo check: the receiver sends the data back to the sender, which compares it with what it sent. If they differ, there was an error (in one direction or the other).

Worked example

A system uses even parity. The byte 01101101 is received. Has an error occurred?

  1. Count the 1s in the byte: there are five.
  2. Five is an odd number, but with even parity every byte should hold an even number of 1s.
  3. An error has been detected.

Tips and tricks

  • Count the 1s, including the parity bit itself. You are checking whether the count is even or odd, not adding up place values.
  • A parity check that passes does not prove the data is right. Two changed bits cancel out. Say "no error detected", not "no error".
6 questions, about 2 minutes.

It lands in your notebook with its questions as flashcards.

Finding errors: parity, checksums and echo checks: 6 questions and answers

These are the quiz’s questions. Do the quiz first, then come back here for the ones that got you.

  1. In even parity, how many 1s should each byte contain?
    • exactly eight
    • an odd number
    • an even number (the answer)
    • none

    The parity bit is set to make the total even.

  2. A system uses even parity. Which byte contains an error?
    • 11000011
    • 10101010
    • 11100000 (the answer)
    • 11111111

    It has three 1s, which is odd. The others have four, four and eight.

  3. Which kind of error can a simple parity check miss?
    • one bit changed
    • two bits changed in the same byte (the answer)
    • three bits changed in the same byte
    • any single bit changed

    Two changes leave the count of 1s even or odd, just as it was.

  4. In a checksum, what does the receiver do?
    • sends the data back to the sender
    • recalculates the value and compares it with the one sent (the answer)
    • counts the 1s in each byte
    • asks the user to check the data

    Different values mean the data has changed.

  5. Which method sends the received data back to the sender for comparison?
    • parity check
    • checksum
    • echo check (the answer)
    • check digit

    The data is "echoed" back.

  6. What can a parity block check do that a single parity bit cannot?Stretch
    • encrypt the data
    • locate the bit that is wrong (the answer)
    • compress the data
    • prevent interference

    The wrong bit sits where the failing row meets the failing column.

Still stuck on this one?Ask in the Papermunch Discord, or help someone else who is. Discord is for ages 13 and up.Join the server

Things you can type

Or go straight to

Or browse a shelf