The Hamming distance is a metric do determine the number of differences between two strings. For binary strings, it is calculated as the XOR of the two.
The Hamming distance between:
- "karolin" and "kathrin" is 3.
- "karolin" and "kerstin" is 3.
- 1011101 and 1001001 is 2.
- 2173896 and 2233796 is 3.