
This project is an encoder and decoder for the Hamming (7,4) code with automated single-bit error correction. Therefore, any multi-bit error are wrongly decoded. However, single-bit errors are corrected and the occurence of an error is reported by the scheme.
Input 7 selects between encode (0) and decode (1) operation. Output 7 reports the correction of a single-bit error in decode operation and is ignored for encoding. Inputs andd outputs 0-6 for the code word as described in the info.yaml.
For encoding, set the four data bits and observe the output word. For decoding apply a valid codeword with less than 2 errors and observe the correct output word.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | Encode: Ignored, Decode: Parity 1 | Parity 1 | |
| 1 | Encode: Ignored, Decode: Parity 2 | Parity 2 | |
| 2 | Encode: Data 1, Decode: Data 1 | Data 1 | |
| 3 | Encode: Ignored, Decode: Parity 3 | Parity 3 | |
| 4 | Encode: Data 2, Decode: Data 2 | Data 2 | |
| 5 | Encode: Data 3, Decode: Data 3 | Data 3 | |
| 6 | Encode: Data 4, Decode: Data 4 | Data 4 | |
| 7 | Mode Selection, Encode: 0, Decode: 1 | Encode: Ignored, Decode: Single-Bit Correction Occured (1) |