another simple one: a|b|c 0|0|0 0|1|1 1|0|0 1|1|1 code: = b
-
Show this thread
-
time for XOR, the one I screwed up: a|b|c 0|0|0 0|1|1 1|0|1 1|1|0 code: a ^ b
1 reply 0 retweets 2 likesShow this thread -
next comes OR: a|b|c 0|0|0 0|1|1 1|0|1 1|1|1 code: a | b
1 reply 0 retweets 2 likesShow this thread -
NOR, common in electronics, rare in code: a|b|c 0|0|1 0|1|0 1|0|0 1|1|0 code: ~( a | b )
1 reply 0 retweets 1 likeShow this thread -
Bitwise equality: a|b|c 0|0|1 0|1|0 1|0|0 1|1|1 code: ~(a^b)
1 reply 0 retweets 0 likesShow this thread -
Deceptively simple: a|b|c 0|0|1 0|1|0 1|0|1 1|1|0 code: ~b
1 reply 0 retweets 0 likesShow 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)
2 replies 0 retweets 0 likesShow 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
2 replies 0 retweets 0 likesShow 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)
3 replies 0 retweets 0 likesShow 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
1 reply 0 retweets 1 likeShow 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?
-
-
Replying to @colmmacc
Not sure if these are “definitive” but https://en.wikipedia.org/wiki/Bitwise_operation … has a table that gives concise names to all 16 (why yes, I am indeed exciting enough to have already looked this up in the past)
0 replies 1 retweet 4 likesThanks. Twitter will use this to make your timeline better. UndoUndo
-
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.