summaryrefslogtreecommitdiff
path: root/progs/a566.py
blob: 4ff83298e420de89cdafae08d7e699981dcfd298 (plain)
1
2
3
4
5
6
7
def hamming_Distance(n1,n2) : 
    x = n1 ^ n2  
    setBits = 0
    while (x > 0) : 
        setBits += x & 1
        x >>= 1
    return setBits