HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Detecting Errors in Transmitted Data
  1. 1Why errors happen and the parity check
  2. 2Parity blocks, checksums and echo checks
  3. 3Check digits and automatic repeat query
  1. Computer Science
  2. /Detecting Errors in Transmitted Data
  3. /Parity blocks, checksums and echo checks

Course 2.2·Lesson 2 of 3

Parity blocks, checksums and echo checks

One parity bit says that something is wrong but not where. This lesson shows the parity block check, which can find the wrong bit. Then it shows the checksum, which checks a whole block with one value, and the echo check, which sends the data back.

about 25 min1 simulation1 practice question
Lesson 2 of 3Show all lessonsHide
Detecting Errors in Transmitted Data
  1. 1Why errors happen and the parity check
  2. 2Parity blocks, checksums and echo checks
  3. 3Check digits and automatic repeat query

Try the code and the simulations beside the lesson.

The parity block check

Data is usually sent as a block of several bytes. Each byte has its own parity bit. After the block, the sender adds one more byte, the parity byte. Each bit of the parity byte is the parity bit for one column of the block.

A grid of bits with eight columns, numbered 1 to 8, and five rows: bytes 1 to 4 and the parity byte. Column 1 holds the parity bit of each byte, and the block uses even parity. Row 3 is marked as having an odd number of 1s and column 5 is marked the same way. The bit where row 3 and column 5 cross is circled as the wrong bit.

Now every row and every column can be checked. Suppose one bit flips on the way.

  1. The receiver checks each row (each byte). One row has the wrong parity.
  2. The receiver checks each column, including the parity byte. One column has the wrong parity.
  3. The wrong bit is where that row and that column cross.

In the picture the block uses even parity. Row 333 has an odd number of 1s, and so does column 555. So the bit in row 333, column 555 is wrong. Because a bit can only be 000 or 111, the receiver can even correct it by flipping it back.

A parity block check is stronger than a single parity bit, because it can locate one wrong bit. Some patterns of several errors can still slip through, for example four flipped bits at the corners of a rectangle.

The checksum

A checksum checks a whole block with one value.

  1. Before sending, the sender works out a value from the block of data, using an agreed method. This value is the checksum.
  2. The checksum is sent with the block.
  3. The receiver works out the checksum again from the data it received, using the same method.
  4. If the two checksums match, no error is found. If they are different, an error has occurred, and the receiver asks for the block to be sent again.

There are many checksum methods. The exam question tells you the method when it wants a calculation. In this course we use a simple one: add the bytes, and keep the remainder after dividing the total by 256256256. A byte holds 000 to 255255255, so the checksum fits in one byte.

Example: the block is 727272, 105105105, 333333 and 200200200. The total is 410410410, and 410−256=154410 - 256 = 154410−256=154. The checksum is 154154154.

A simple checksum can miss errors. If one byte goes up by 555 and another goes down by 555, the total is the same. Real systems use cleverer methods, but the steps of the check are the same.

The echo check

An echo check works like reading a message back to a friend.

  1. The sender sends the data.
  2. The receiver sends the same data straight back to the sender.
  3. The sender compares the data that came back with the data it sent.
  4. If they are the same, no error is found. If they differ, an error has occurred, and the data is sent again.

The echo check has two drawbacks. Every piece of data crosses the link twice, which takes time. And if the copies differ, the sender cannot tell whether the error happened on the way out or on the way back. The data may have arrived correctly the first time.

Practise with new numbers

Try it in Python

The program works out the checksum of a block of four bytes. One byte changes on the way, and the receiver's checksum no longer matches. Then it runs an echo check on the same data.

Read it first. Then run it. Do the two checksums match?

1. Change the received block so that byte 1 goes up by 4 and byte 3 goes back to 33 and then down by 4. Does the checksum see the error now?

2. Which line shows the comparison that the sender makes in an echo check?

Common mistakes

  • Saying the receiver sends the checksum back. In a checksum, the receiver works the value out again and compares. Sending data back is the echo check.
  • Saying the echo check is done by the receiver. The sender does the comparing.
  • Forgetting the parity byte. A parity block check needs the parity bits of the columns as well as of the rows.
  • Saying a checksum catches everything. Errors that cancel in the total slip through.

Remember these

  • Parity block: a parity bit for each row and a parity byte for the columns; the wrong bit is where the bad row and the bad column cross.
  • Checksum: sender works out a value and sends it with the block; receiver works it out again; a difference means an error.
  • Echo check: receiver returns the data; sender compares; a difference means an error.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. In a parity block check, what does each bit of the parity byte check?
  1. In an even parity block, row 222 and column 666 both have an odd number of 1s. What does the receiver do?
  1. A block holds the bytes 909090, 180180180 and 404040. Use the method of this lesson to find the checksum.
  1. In a checksum method, what happens if the two checksums do not match?
  1. Give one drawback of an echo check.

Enroll free in Detecting Errors in Transmitted Data

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (4)

A block of four bytes uses even parity. The first bit of each byte is its parity bit…Medium · High School (9–10) · by StemPy Lab
A block holds the four bytes 87, 142, 203 and 61…Medium · High School (9–10) · by StemPy Lab
The block of bytes 87, 142, 203 and 61 is sent with its checksum, worked out as the total bmod 256…Hard · High School (9–10) · by StemPy Lab
Next: lesson 3Check digits and automatic repeat query
← Detecting Errors in Transmitted Data
← Why errors happen and the parity checkCheck digits and automatic repeat query →

Discussion (0)

Log in to join the discussion.

Loading…

1 Python program
5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

A computer sends the byte 01001101 to a device using an echo check…Easy · High School (9–10) · by StemPy Lab