Posted on July 7, 2021July 7, 2021 Description Submission class Solution { public: int hammingDistance(int x, int y) { int ret = 0; for(int i = 0; i < 32; ++i) { ret += ((x>>i)&1) ^ ((y>>i)&1); } return ret; } }; By Bill0412 Easy LeetCode