If XOR of n distinct numbers is ANDed over one of the number, the result would be zero
It doesn't work, for example if x2 = 0 then xoredResult &amp; x2 = 0 all the time no matter what else the set of numbers contains.

Or for an other example, the set { 1, 2, 3 } xors to zero (so it ANDed by any of its members, or even anything else, yields zero) but contains no repeated elements.