3 Program: Input/Process/Output
• (INPUT) Your program should read in the data bit strings from data1.dat.
• (PROCESS) Your program should generate the Hamming(7,4), Hamming(15,11), or Hamming(31,26)
codewords for the data bit strings.
• (OUTPUT) Your program should write the codewords to a file Codewords.dat
NOTE: Not following this process (reading from a file, process Hamming codeword, and writing
the results to a different file) will result in a failing grade.
4 Input File Format
Input files should use the following format, consisting of data strings of size 4, 11, and 26 bits, one bit string
per line. data1.dat:
1100
11010110101
11110000110
1001
11100010101110110101011111
5 Output File Format
The output file should list the Hamming codewords in the same order as the data in the data1.dat file, one
codeword per line,