Kmeans algorithm using hamming distance