Why is Boolean complement not the same as integer cancellation?

49 Views Asked by At

Looking at a computer-science book, I see that a + -a = 0 (inverse property in integer ring), and that a & ~a = 0 (Boolean complement).

But these are not given as equivalent (or shared properties. But on the face of it, they seem to be.

Why are they not equivalent?

1

There are 1 best solutions below

1
On

In set theory, you do not have this.

$$ A - B = A - C \implies B = C;$$ This merely tells you $A\cap B = A\cap C$. Outside of $A$ it tells you nothing. The same thing happens in logic.