CS422 Project: Error Correction and Error Detection

The project is to explore some small extension to concepts we studied in class, i.e., error correction and error detection.

Generally, a team consists of two teammates. If three in a team, it must be justified by additional work and approved by the instructor at least one week before the due date. If you are unable to identify a teammate, send an email to zbo@cs.uccs.edu and your teammate might be assigned by the instructor if feasible. Doing the project by yourself is another option, but there is no extra credit.


Project 1

1. Hamming Method for Error Correction

1.1 Write a program in C or C++ or C# that can convert a bit stream of a packet into a frame by using Hamming coding. The bit stream is the input parameter of the program. For example, given an input parameter as 1001000, the correct output of the frame is 00110010000. See Figure 3-7 in the textbook for more examples. Input bit stream will have 1 to 64 bits.

Some self-testing examples are:
Input 1001000; output 00110010000
Input 1010101; output 11110100101

Some answers you may include in the report:
Input 11111111; output ?
Input 1101001100110101; output ?

1.2 Write a program in C or C++ or C# that can correct a single-bit error of a frame by using Hamming coding and output the packet (raw data). The incoming frame is the input parameter of the program. The output is the bit stream of a packet. For example, given an input parameter as 00110010001 (the correct frame should actually be 00110010000), the output bit stream is 1001000. Input frame will have 3 to 71 bits.

Some self-testing examples are:
Input 00110010000; output 1001000
Input 00110010001; output 1001000
Input 011110110011001110101; output 1101001100110101

Some answers you may include in the report:

Input 11110100101; output ?
Input 111011101111; output ?
Input 11110000101; output ?

2. CRC for Error Detection

Write a program in C or C++ or C# that can convert a bit stream of a packet into a frame by using CRC. The bit stream is the first input parameter of the program, which will have 8 to 128 bits. The generator function is the second input parameter of the program, which will have 4 to 16 bits. For example, if the generator function is x^4 + x + 1, the second input will be 10011. The output should be the transmitted bit stream with its CRC checksum bits; see example in Figure 3-8 in the textbook.

A self-testing example:
Input = 1101011011, generator 10011, output 11010110111110.

Some answers you may include in the report:
Input = 10011101, generator 1001, output ?.
Input = 1101011011011100, generator 1101110111011101, output ?

What to turn in:

For this project you will email zbo@cs.uccs.edu a ZIP file (in the name of P1_Yourlastnames) of all source code, together with a Readme in DOC or PDF (in hardcopy as well) specifying 1) teammates' name and email address; 2) how to compile and execute your code; 3) the self-testing results of your program (say with some screenshot) and any important feature you want to specify (if your program does not work, please notify it clearly); and (4) teammate evaluation data specifying the workload percentage distribution between you and your teammate(s). Each teammate will specify his/her own evaulation data about his/her teammate(s)' workload in the project, say "I did 50% of the work and my teammate did the other 50%; or I did 60% and my teammate did only 40%". If no specification, the default is 50-50. The data can be sent to zbo@cs.uccs.edu separately if preferred.

Note that your source code will be evaluated. The program will perform appropriate error handling. It will display some appropriate message if the user's command fails in any way. Towards this end, document your code carefully. For example, use comments to indicate what the corresponding portions of the code do. You might be asked to give a quick demo in EAS Lab 140 or your own laptop.

If any question, please ask by sending email to zbo@cs.uccs.edu.