Write a program that implements each of the four linear block coding schemes we discussed: parity, two-dimensional parity, Hamming code, and CRC.
Use the same parameters as in the book. So parity should be 7B/8B, two dimensional parity should be a 7x4 array of bits becomes and 8x5 array, and the Hamming and CRC codes should be 4B/7B. For CRC, use the same divisor that the book uses.
The input file will simply be a set of 1s and 0s (as characters) that your program should process. Your program should ask me whether I want to encode or decode the input, and what coding scheme I want to use.
If I'm encoding, the output should be another file containing the encoded data.
If I'm decoding, the output should be a file with the decoded data, plus an indication on the screen of whether there were any errors in the input, and what code word the errors were in. If possible (such as 2-D parity where there is only one error or Hamming codes), your program should correct the error as well.
Extra credit will be given to anyone who can figure out how to implement the CRC using bit shifting on bit input instead of using byte input.