If XOR of n distinct numbers is ANDed over one of the number, the result would be zero Say we Have n distinct numbers

x1,x2,....xn


And we xor the result

xoredResult = x1^x2...^xn


And if we AND(&amp;) with one of the number say x2
We get Zero

xoredResult &amp; x2 = 0


Can we always claim that if the ANDed result is zero that the number is repeated ?
Can this be used to find the first repeated element in a stream of numbers ?
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.