4 ms·
One idea would be to let {0, 1} be the integers mod 2. Then, AND is multiplication (i.e., a AND b = a b, since a b = 1 iff a = b = 1), NOT is inversion (i.e., N
by obastani 7y ago
One idea would be to let {0, 1} be the integers mod 2. Then, AND is multiplication (i.e., a AND b = a b, since a b = 1 iff a = b = 1), NOT is inversion (i.e., NOT a = 1 - a), and OR follows from the previous two definitions (i.e., a OR b = 1 - (1 - a) (1 - b) = a + b - a b).
To get complex values, we can consider the Gaussian integers [1] mod 2. Then, we have (1 + i) (1 + i) = (1 + i + i - 1) = 0 + 2 i = 0. So these integers are a ring where there are nonzero elements that multiply to 0.
[1] https://en.wikipedia.org/wiki/Gaussian_integer https://en.wikipedia.org/wiki/Gaussian_integer