Here are the functions for Hamming code 7.4 and Extended Hamming code 8.4
encoding and decoding.
For 7.4 code, one error per 7-bit codeword can be corrected.
For 8.4 code, one error per 8-bit codeword can be corrected
and not less than 2 errors can be detected.