I'm trying to understand what is the logic or mechanism used in 3 way or 4 way switches, in order for all swtches to work so that no matter the position of each switch, the lights go on or off without any other switch affecting the others.

So, are they internally using any logic gate that work connecting each swtich, or is it using any kind of flip flop latch or anything like that?

Sorry for this question that might look stupid, but I am trying to learn electronics by myself and came up with this question.

  • 1
    \$\begingroup\$ They are simply inclusive OR switches wired in series to behave as EXclusive OR toggle switches. (XOR = A*B + A!*B!) both high or low \$\endgroup\$ Nov 25, 2019 at 2:40
  • \$\begingroup\$ What Dave Tweed says - noting that you can use ALL DPDT switches for any number of positions, if desired. (Switch slightly more complex, only one part to stock). \$\endgroup\$
    – Russell McMahon
    Nov 25, 2019 at 3:29
  • 3
    \$\begingroup\$ People upvoting Dave's excellent answer should presumably upvote the question which lead to it unless there is some good reason not to. No? \$\endgroup\$
    – Russell McMahon
    Nov 25, 2019 at 3:30
  • 1
    \$\begingroup\$ For visitors to this question - more home wiring info is available over on HomeImprovement.SE. \$\endgroup\$
    – JPhi1618
    Nov 25, 2019 at 16:03

3 Answers 3


A "3-way" switch is SPDT. A "4-way" switch is DPDT inside. They're used like this:


simulate this circuit – Schematic created using CircuitLab

The 4-way switch is simply crossing the connections, or connecting them straight through — sort of an XOR function.

If you only need two switches, just connect SW1 and SW2 directly to each other. If you need 3 or more switches, add any number of 4-way switches in between as shown.


enter image description here

Hot or not

Here is how they work; it is simplicity itself. You have 2 traveler wires. One is hot, and one is not. Any 3/4 way switch alternates which one is hot or not.

At the ends, an SPDT will do the trick.

However in the middle, you need to exchange the travelers. This is done by a reversing switch.

A reversing switch isn't quite a DPDT. But you can make one out of a DPDT by wiring an "X" connecting the non-common terminals, then attaching the wires to the one side of the "X" and of course the commons.

enter image description here

Mains wiring gotchas

The usual place people get into trouble with 3-ways in household wiring is failing to properly identify the travelers. These live on the 2 "traveler" or non-"common" terminals, and in North American practice are colored brass. Notably, physical position of the terminals on the switch is meaningless; every switch is different. I like to use yellow wire or mark the wires with yellow tape. Doing so makes working with 3-ways easy; failing to do so makes it a nightmare. Most homes are wired in cable, and so you get a box with a 3-way and other stuff going on, and you have 9 wires with every one being black, white or red. What a tangle!

enter image description here

man, I really shoulda marked those travelers with yellow tape...

  • 1
    \$\begingroup\$ Could you please add citations for the images you copied into your answer? Thanks. \$\endgroup\$ Nov 25, 2019 at 13:11
  • \$\begingroup\$ @ElliotAlderson They are from here diy.stackexchange.com/a/145189/47125 and here diy.stackexchange.com/q/110572/47125 \$\endgroup\$ Sep 23, 2020 at 5:48
  • \$\begingroup\$ Interesting to see how things vary around the world. Here in the UK the positions of the terminals are generally the best guide to which terminal is which (the labelling varies between manufacturers and we don't use different colored terminals here). \$\endgroup\$ Sep 23, 2020 at 17:39
  • \$\begingroup\$ @peter yeah in the US, the only thing you can count on is screw color. \$\endgroup\$ Sep 23, 2020 at 20:22

Normally (excluding stuff like intelligent dimmers), the switches are just switches.

What American electricians refer to as a "3 way switch" and British electricians refer to as a "2 way switch"* is what electronics guys would call a SPDT switch. It has three terminals, one of which is a "common" which depending on the position of the switch connects to one of the other two terminals.

There are two main wiring arrangements that can be used to control a light from multiple locations.

The first system and the easiest to understand is the system described in Dave's and Harper's answers. The permanent live is fed into the common terminal of one switch, the live to the light is fed. from the common terminal of the other switch. The other terminals of the switches are connected together by the "travellers". If the two switches are switched to the same traveller the light is on, if they are switched to different travellers the light is off.

The second system, which is the norm in the UK nowadays and which Americans call "California 3 way" or "coast 3 way", is to connect all three terminals of the switches together. Permanent live is taken from one non-common terminal and switched live is taken from the other. If both switches are switched to the permanent live line or both are switched to the switched-live line then the light is off. If one switch is switched to permanent live and the other to switched live then the light is off.

Which system is more convenient depends a lot on the design of your wiring accessories, if your accessories can only take one wire per terminal (which I understand is the norm in America), then the first system means less splicing. On the other hand if your accessories can take multiple wires per terminal (as is the norm in the UK) then the second system can avoid the need to splice.

To expand to more than two locations we use what American electricians call a Four way switch and British electricians call an intermediate switch. This swaps the travelers over and can be used to extend either of the above two systems.

There is also a third system, known by american as "Carter 3 way" but it is dangerous and should not be used. In this system the switches are used to switch between live and neutral. If the light gets two lives or two neutrals it is off, if it gets one of each it is on. This arrangement has several safety problems. Firstly it can leave the light "off but live". Secondly depending on the switch design it can lead to arcs between live and neutral. Thirdly in the case of ES lampholders it can leave the shell of the lamp live.

* Americans use the term "two way switch" to reffer to a simple on-off switch.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.