Add Hamming distance.