The Hamming distance between two strings having the same length is the minimum
number of symbol substitutions required to transform one string into the other.
If the strings are given by

We can compute the Hamming distance by visual inspection: the Hamming distance between two strings is simply the number of positions in the strings at which corresponding symbols differ. For example, the Hamming distance between the two strings in the figure below must be equal to 7.