Hamming distance
Bit sampling for Hamming distance.