Why xor equation is true?

48 Views Asked by At

Why is

$$(a \oplus b)+(b \oplus c) \geq (a \oplus c)$$

true for any non-negative integers $a$, $b$, and $c$?

Also $\oplus$ works on binary string more details

1

There are 1 best solutions below

0
On BEST ANSWER

The only chance for this to be false, is if the right hand side equals $1$ and the left hand side equals zero. Well, if the right hand side is $1$, either $a$ or $c$ is non-zero, but not both. So $a\ne c$. Then, since $b$ is either $0$ or non-zero, one of the terms on the left hand side is equal to $1$, so the statement is true and always true.

UPDATE

Since it has been made clear "why integers," just convert to binary and this argument works bitwise, and thus for all $a,b,c$ binary.