Hamming Distance February 21, 2006
The Hamming Distance between two words is the number of locations (or indeces, or coordinate) by which they differ; If a code C contains two code words which are displaced by Hamming distance δ and there is no pair of distinct code words with distance less than δ, then δ is called the minimum distance of C, written d(C) = δ
The weight of a code x, w(x) is the number of position not occupied by zero.
For any two binary words x and y,
d(x, y) = w(x + y) = w(x) + w(y) – 2w(x⋅y)
where “⋅” is the bitwise product modulo 2.