hamming_similarity function

Hamming Similarity