3 ms·
Assuming x is a truth value--either 0 or 1--then !x gives the same result as these expressions: 1 - x x ^ 1 (x + 1) & 1 In x ^ 1, ^ is exclusive or, not
by jonsen 17y ago
Assuming x is a truth value--either 0 or 1--then !x gives the same result as these expressions:
1 - x
x ^ 1
(x + 1) & 1
In x ^ 1, ^ is exclusive or, not exponentiation. But exponentiation can also do the trick:
0 ^ x