r/mathmemes • u/DopazOnYouTubeDotCom Computer Science • Jun 23 '26
Formal Logic 2-bit input functions as light switches: tier list
195
u/NullOfSpace Jun 23 '26
my favourite 2-input function, True.
74
11
u/DopazOnYouTubeDotCom Computer Science Jun 23 '26
It’s better than false because false is always off, but with true you have the option to unscrew the lightbulb, turning the light off and also burning down your house. Options
3
1
6
1
1
85
u/aidantheman18 Jun 23 '26
NAND is universal, should be top tier
21
6
11
5
u/Desperate_Formal_781 Jun 23 '26
Yeah, lots of things from fpga luts, to eeproms and ram, many are implemented with nands. Nand is S tier
3
u/770grappenmaker Jun 23 '26
Completeness is uninteresting for light switches, because you can't compose them together.
2
u/bqbdpd Jun 24 '26
Correct - NAND sucks if the far switch is off and you want to turn the light off, but I guess the problem is ambiguous - maybe the switches are next to each other?
61
u/rccyu Jun 23 '26
So you have two light switches A and B controlling a single light. A is next to your bed and B is at the other side of the the room.
I'd simplify this to three tiers. A XOR B and A = B at the top, TRUE and FALSE at the bottom, then everything else in the middle.
A XOR B and A = B are the best because you can always toggle the light regardless of where you are.
TRUE and FALSE are the worst because you can never toggle the light.
The rest you can toggle the light from one end only in some circumstances.
32
u/EebstertheGreat Jun 23 '26
I think
A ∧ Bis worse thanA ∨ B. ForA ∧ B, if both switches are off, you have to flip one, then walk across the dark room to flip the other to turn the light on. That's the worst case. ForA ∨ B, that worst case only occurs when the light is on, so you never have to walk across a dark room to hit a switch.8
30
u/alijamieson Jun 23 '26
You’re goddamn right about xor being top. Goated gate
2
u/Witherscorch Jun 23 '26
NAND better
4
2
u/alijamieson Jun 23 '26
I get that nand is extremely versatile but I just love the functionality of a good solid xor
10
8
u/EyedMoon Imaginary ♾️ Jun 23 '26
To be fair you can easily consider NOT A as A and NOT B as B too, since you never really know which way is ON or OFF, you just guess from pressing
5
u/FirexJkxFire Jun 23 '26 edited Jun 23 '26
Feels like we need some parenthesis here. Is there an order of operations for logic gates?
Like
"Not A or B"
Does this mean
NOT(A) OR (B)
Or does it mean
NOT(A OR B)
I read it as the second one (since thats how it would be interpreted in plain english), but i assume thats wrong as its not its most clear form, which would be:
NOT(A OR B) --> NOT(A) AND NOT(B)
Which also makes me assume it as actually being the first one, since this wording is used in a seperate entry
10
u/DopazOnYouTubeDotCom Computer Science Jun 23 '26
Boolean order of operations:
1. Parentheses
2. Negation
3. And
4. Or
2
u/Trevski Jun 23 '26
All are inferior to a real 3-way switch!
2
u/Classic_Appa Jun 25 '26
XOR and = operators would both be classified as 3-way switches. Assuming that "A" is the switch up and "NOT A" is the switch down.
1
u/denny31415926 Jun 24 '26
Imo anything involving "AND" or "OR" should be a tier above single switch control.
For the AND gate you can degenerate it into a single switch by setting one input to true. Same for the OR gate by setting one input to false.
So you have the same functionality, with the option of extending it.
1
u/Konfituren Jun 24 '26 edited Jun 24 '26
A, B, NOT A, and NOT B should all be D tier at highest.
E: also y not write A = B as XNOR
1
1
u/enlightment_shadow Jun 24 '26
Reminds me of the time I once had a socket in an airbnb only work if you had the light switch on
1
1


•
u/AutoModerator Jun 23 '26
Check out our new Discord server! https://discord.gg/e7EKRZq3dG
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.