Trying to code Hamming and CRC in C