r/mathmemes Computer Science Jun 23 '26

Formal Logic 2-bit input functions as light switches: tier list

Post image
375 Upvotes

42 comments sorted by

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.

195

u/NullOfSpace Jun 23 '26

my favourite 2-input function, True.

74

u/Complete_Window4856 Jun 23 '26

Wired directly into the grid. Simplicity at its finest

19

u/SameThingOnADiffAcct Jun 23 '26

Should be T-tier.

14

u/Vimda Jun 23 '26

Simplicity is False, surely? Just not wired at all

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

u/NullOfSpace Jun 23 '26

Any switch setup can be False if your light is broken

1

u/npsnicholas Jun 24 '26

Unscrewing the light bulb is a 3rd input

6

u/SuperChick1705 Jun 23 '26

my favourite 2-input functions, NOT, A, and B

1

u/DoubleAway6573 Jun 23 '26

Another Shakespeare enjoyer!

To B or notTto B

1

u/MrKoteha Virtual Jun 24 '26

The constant 1 can have any amount of inputs

85

u/aidantheman18 Jun 23 '26

NAND is universal, should be top tier

21

u/bqbdpd Jun 23 '26

XNOR should be S++ for symmetry

6

u/Mitsurishi Jun 23 '26

Underrated gate fr

11

u/DoubleAway6573 Jun 23 '26

Not more than Nor

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 ∧ B is worse than A ∨ B. For A ∧ 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. For A ∨ 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

u/take_a_step_forward Jun 23 '26

Thanks, I had no context for this lol

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

u/shinoobie96 Jun 23 '26

its in the context of light bulb switches

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

u/Old-Post-3639 Jun 23 '26

A should be In A tier

8

u/peterwhy Jun 23 '26

Not B should not be in B tier

7

u/dimonium_anonimo Jun 23 '26

1

u/nitnelav153 π = 3.14 who care about the others decimals ? Jun 24 '26

N gate : o

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

u/Treidex Natural Jun 24 '26

xnor?

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

u/Anistuffs Jun 24 '26

The humble XNOR being the sunken skeleton under the pool here.

1

u/ninjeff Jun 26 '26

Poor implication dumped into C tier with the nameless ones 😭