• lud@lemm.ee
    link
    fedilink
    English
    arrow-up
    12
    ·
    edit-2
    26 days ago

    XNOR (Exclusive NOR) is the opposite of XOR (Exclusive OR)

    A way to remember XOR is “must have one or the other but not both” XNOR is the opposite so it’s “must have both or none” so both inputs must be 1 or 0.

    XNOR or XOR is very common in homes with staircases so that you can turn on and off the light in the staircase regardless of which floor you are on.

    If you google staircase switches, you will be told that they mostly use XOR but according to the wiring diagrams they use XNOR.

      • lud@lemm.ee
        link
        fedilink
        English
        arrow-up
        10
        ·
        edit-2
        26 days ago

        My bad. It’s “must have both or none”

      • lud@lemm.ee
        link
        fedilink
        English
        arrow-up
        7
        ·
        edit-2
        26 days ago

        Wiring a staircase switch is actually very easy, you pretty much just need two wires going from one switch to another and then a light.

        Your light switches also has to be three way switches but afaik most switches in my country are that, so you can pretty much use any switch.

        • A_Union_of_Kobolds@lemmy.world
          link
          fedilink
          English
          arrow-up
          4
          ·
          26 days ago

          I was gonna say lol that’s a fancy way of describing three-ways

          Fun fact, you can put as many 4-ways in between those 3-ways as you want, or as many as your electrician will agree to anyway. You can switch the same light from a dozen spots if you really want to.

        • RamblingPanda@lemmynsfw.com
          link
          fedilink
          English
          arrow-up
          2
          ·
          26 days ago

          I understand it now, but I’ll have it forgotten in five minutes. I’m a software engineer, this here is dark magic to me. Well, not this, but more complicated stuff. I envy you all for your big, juicy brains.

          • lud@lemm.ee
            link
            fedilink
            English
            arrow-up
            3
            ·
            edit-2
            26 days ago

            Oh, I am no electrician. I an IT admin.

            Being an electrician would be pretty high on the list of things to do if I weren’t allowed to work in IT though. Seems fairly fun.

      • lud@lemm.ee
        link
        fedilink
        English
        arrow-up
        3
        ·
        edit-2
        26 days ago

        No, AND won’t match 0,0 while XNOR will. An AND switch would be useless for a staircase.

        AND also won’t match 1,0 or 0,1 while XOR does.