Hamming Distance
Count the bit positions where two integers differ. The visual lines up their binary digits, marks each mismatch, and counts the marks.
Count the bit positions where two integers differ. The visual lines up their binary digits, marks each mismatch, and counts the marks.