Hamming encoder/decoder