Checksums, Echo Checks & Check Digits

While parity checks are ideal for low-level serial communication, modern computer systems use more robust techniques for verifying large data transmissions and human data entry.


Learning Objectives

  • Explain the operational mechanics of Checksums during data transmission.
  • Explain the operation and limitations of Echo Checks.
  • Explain how Check Digits are calculated and applied to detect human data entry and transposition errors.
  • Contrast error detection in data transmission with data verification in manual input.

1. Checksums

A checksum is a numerical value calculated from a block of digital data to verify that the data has not been corrupted during transmission or storage.

How a Checksum Works:

  1. Calculation at Sender:
  • Before data transmission, the sender runs a predefined mathematical algorithm over the block of data (e.g. summing all byte values, or applying a cyclic redundancy check).
  • If the sum exceeds the maximum value that fits in the allocated checksum field (e.g. 255 for an 8-bit checksum), the value is divided by 256 and the remainder (or modular sum) is retained.
  1. Transmission:
  • The calculated checksum value is appended to the packet trailer and transmitted alongside the data block.
  1. Recalculation at Receiver:
  • Upon receiving the packet, the receiver runs the identical mathematical algorithm on the received data block.
  1. Comparison:
  • The receiver compares its newly calculated checksum with the checksum value received in the packet trailer:
  • Values Match: No error was detected. Different data can have the same checksum.
  • Values Differ: An error occurred in transmission (bits flipped); the receiver rejects the data and requests retransmission.

2. Echo Checks

An echo check is a straightforward verification technique where the receiver bounces data back to the sender.

How an Echo Check Works:

  1. Device A sends a block of data to Device B.
  2. Device B receives the data and immediately echoes (transmits back) a copy of the received data to Device A.
  3. Device A compares the echoed copy with its original copy:
  • If they are identical, Device A confirms that Device B received the data accurately.
  • If they differ, Device A retransmits the data.

Limitations of Echo Checks:

  • Inefficient Bandwidth Usage: Every byte of data must be sent across the channel twice, cutting effective network throughput in half.
  • Ambiguity of Error Location: If Device A finds a mismatch in the echoed data, it cannot determine whether the error occurred during the initial transmission (Device A $\to$ B) or during the echo return trip (Device B $\to$ A). Even if Device B received the data perfectly, a glitch on the return trip causes unnecessary retransmission.

3. Check Digits

Unlike checksums, parity checks, and echo checks (which detect errors introduced by physical transmission channels), check digits are designed to detect human data entry errors.

A check digit is an extra digit calculated from the preceding digits of a numerical code and appended as the final digit. Common examples include:

  • ISBN-13 (International Standard Book Number on book covers)
  • EAN-13 and UPC barcodes on commercial packaging
  • Bank account numbers and credit card numbers (Luhn algorithm)

What Errors Do Check Digits Catch?

Check digits are specifically engineered to catch common manual typing and scanning mistakes:

  1. Mistyped Digits: Entering a wrong digit (e.g., typing 7 instead of 1).
  2. Transposition Errors: Accidentally swapping two adjacent digits (e.g., typing 48 instead of 84). This is the most frequent human typing error.
  3. Omitted Digits: Accidentally leaving out a digit (e.g., typing a 12-digit barcode instead of 13 digits).
  4. Extra Digits: Accidentally entering a duplicate or extra digit.

Check Digit Calculation Example (Modulo-10 Weighting)

A simplified barcode weighting algorithm demonstrates the mechanism:

  1. Preceding digits are multiplied alternately by weights (e.g. alternating weights of 1 and 3).
  2. All weighted products are summed together.
  3. The sum is divided by 10 (Modulo 10) to find the remainder.
  4. If the remainder is zero, the check digit is zero. Otherwise subtract the remainder from 10. Equivalently: (10 - remainder) MOD 10.
  5. When a barcode scanner reads the code, it repeats the calculation. If the calculated check digit does not match the final digit, the cash register emits an error beep and rejects the scan.

Summary Comparison

Technique

Where Applied

What Introduces the Error

Typical Errors Caught

Checksum

Data transmission & file downloads.

Electrical noise, packet corruption.

Flipped bits, lost bytes in transit.

Echo Check

Interactive terminals, serial connections.

Transmission line interference.

Inconsistencies during transmission.

Check Digit

Point-of-sale barcodes, manual form entry.

Human keyboard typing, optical scan errors.

Transposed digits (35 $\to$ 53), mistyped numbers.

Written practice and self-review

Candidates frequently confuse a Check Digit with a Checksum.

Compare the two techniques by explaining:

  1. The context and location where each is used.
  2. The specific types of errors each technique is designed to detect.

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.

Application: Check the reasoning

+30 XP

Application: Check the reasoning

  1. Which checks human data-entry codes: check digit or checksum? [Space 1]
  2. Which compares a calculated value for a transmitted data block? [Space 2]
  3. Does matching an additive checksum prove no data changed: yes or no? [Space 3]
Word Bank / Available Cards (Drag into spaces or tap to place)
All-Access Required

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