For two bits, there are 4 possible combinations of them: a | b 0 | 0 0 | 1 1 | 0 1 | 1 That means that there 16 possible truth tables. For each of them we should be able to implement a bit-wise version of it that would work on all of the bit positions.
-
-
Deceptively simple: a|b|c 0|0|1 0|1|0 1|0|1 1|1|0 code: ~b
Show this thread -
This one is hard to even think of a use for: a|b|c 0|0|1 0|1|0 1|0|1 1|1|1 code: (~b) | (a & b)
Show this thread -
An inversion of an earlier simple one: a|b|c 0|0|1 0|1|1 1|0|0 1|1|0 code: ~a
Show this thread -
Another inversion, also probably useless: a|b|c 0|0|1 0|1|1 1|0|0 1|1|1 code: (~a) | (a & b)
Show this thread -
Last one! set all of the bits: a|b|c 0|0|1 0|1|1 1|0|1 1|1|1 code: = ~0
Show this thread -
That's all 16! If you think I need to number them, this thread wasn't for you ;-) just read the right most column as the number MSB to LSB top to bottom. Any good names for any of the un-named ones?
Show this thread
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.