Hamming codes are used to solve the problem in this note.

hammingcode.pdf