CIS-2151 Lab Assignment #10: Error Detection Codes

This lab is a work in progress and may change before it is officially published!

Reading: Chapter 6 covers error detection and correction.

In this lab you will investigate the effectiveness of simple error correcting codes using a simulation program.

Imagine a noisy channel over which you are communicating octets of data in 32-octet blocks. Each block thus contains 32*8 = 256 bits. Assume each block is protected by a simple 8-bit checksum. In particular, the octets in the block are added, with carries being ignored, to compute the checksum. For example, the checksum of 0xF1, 0x2C, 0x11 is:

      0xF1 + 0x2C = 0x1D
      0x1D + 0x11 = 0x2E

Thus 0x2E is the checksum for the block (real blocks contain 32 octets, not just 3).

The channel is subject to uncorrelated noise (meaning, noise that affects each bit independently, not in bursts) with some small-ish bit error rate (e. g., 1.0E-3). The bit error rate gives the probability that any particular bit is corrupted by the channel.

On Lemuria, the program checksum allows you to pass data down a simulation of such a channel. It then counts the number of errors in the received data and verifies the checksum. Note that in some cases a block might contain multiple bit errors. In some cases the errors might not be detected by the checksum (e.g., if the errors cancel out).

  1. Run the checksum program using a bit error rate of 1.0E-3 and for block counts of 100, 1000, and 10000. Record the results and comment.

    1. What is the probability, based on your experiments, that a block is received without any error at all? Can you justify this number (hint: consider the meaning of the bit error rate).
    2. Do you see any undetected errors? There should never be any undetected single bit errors. Why would that be?
  2. With a bit error rate of 1.0E-6, about how many blocks can be transmitted without any errors (check by experimenting with the simulation program).

Submit a document to Canvas (PDF preferred, but Word, text, or ODF are all acceptable) containing your answers to the questions above. Be sure to include your name in the file This lab is worth 20 points.


Last Revised: 2023-04-13
© Copyright 2023 by Peter Chapin <pchapin@vtc.edu>