Hamming Distance
Hamming distance between two bit-strings of equal length is the number of bit positions at which they are different. In other words, Hamming distance is the number of mismatches at the same bit position between two same-length words. For example: Consider two 3-bit code words, 000 and 001. Here, the Hamming distance is 1, as…