Clarification on Hamming distance