Skip to content
LearnTronics menu

LearnTronics

Statements Become Switches

Tutorial Index

Now connect the words to hardware

This is the bridge that is easy to skip:

statement → true/false → 1/0 → switch state → circuit behavior

Series switches behave like AND

Switch ASwitch BLamp SERIES: A AND B

The lamp has one path. Switch A must be closed AND switch B must be closed before current can reach the lamp.

ABLamp = A AND B
000
010
100
111

Try the AND circuit

Lamp OFF

Parallel switches behave like OR

Switch ASwitch BLamp PARALLEL: A OR B

The lamp has two possible paths. Closing A OR closing B can complete a path. If both close, the lamp is still on.

ABLamp = A OR B
000
011
101
111

Try the OR circuit

Lamp OFF

Negation — NOT reverses the condition

normally closed contact Lamp NOT A: when A is false, the output is true

Negation simply means reversing a logical statement. If A means “the switch is actuated,” then NOT A means “the switch is not actuated.”

A normally closed contact gives us a very visible physical example. In its resting state it conducts. Actuating it opens the path.

ALamp = NOT A
01
10

Try the NOT circuit

Lamp ON

Exclusive OR — XOR

Now we can build the other kind of “or.” XOR means A or B, but not both.

A simple relay/contact version uses two parallel paths. One path says A AND NOT B. The other says NOT A AND B. Either path can light the lamp, but both conditions being the same leaves the lamp off.

What does “ganged” mean?

One input has to operate two contacts at the same time: one normally open (NO) and one normally closed (NC). Those contacts are ganged — mechanically linked so they change state together.

A dashed line on a schematic is commonly used to show that mechanical linkage. It is not an electrical wire.

A = 0 / actuator OFF A = 1 / actuator ON A-NO open A-NC closed dashed line = mechanically ganged A-NO closed A-NC open both contacts move together One actuator controls both contacts. NO and NC contacts always change state together.

So when A changes from 0 to 1, its A-NO contact closes while its A-NC contact opens. The two B contacts behave the same way when B changes.

A-NO B-NC A-NC B-NO A contacts ganged B contacts ganged Lamp Upper path: A • ~B Lower path: ~A • B XOR = (A • ~B) + (~A • B)
ABLamp = A XOR B
000
011
101
110

This is also a good example of why negation matters. XOR can be built from AND, OR, and NOT relationships:

A ⊕ B = (A • ~B) + (~A • B)

Read in words: A AND NOT B, OR NOT A AND B.

Try the XOR relationship

Lamp OFF

The mapping is a choice

A physical switch is simply open or closed. The designer decides which physical state represents logical True or False. For these beginning examples we are using closed = 1/True for normally open contacts because it makes the bridge easy to see.

The important historical bridge

Claude Shannon showed in his MIT master's work that Boolean algebra could be applied systematically to relay switching circuits. That connection between symbolic logic and physical switches became foundational to modern digital circuit design.

Symbol reminder:   ~A = NOT A    A • B = A AND B    A + B = A OR B    A ⊕ B = A XOR B

Try these yourself

Two normally open switches are in series. When does the lamp turn on? Switch ASwitch BLamp SERIES: A AND B
A series path is complete only when both contacts are closed.
Two normally open switches are in parallel. When can the lamp turn on? Switch ASwitch BLamp PARALLEL: A OR B
Either parallel path can complete the circuit.
Why is this bridge important?
The same AND/OR/NOT relationships we expressed in language can be built from physical switching paths.
In an XOR circuit, when is the output true?
ABLamp = A XOR B
000
011
101
110
XOR means one or the other, but not both. Its output is true only when the two input states are different.
What does logical negation do?
ALamp = NOT A
01
10
NOT, or negation, reverses the logical state: NOT 0 = 1 and NOT 1 = 0.

A little deeper

Relay control and ladder logic still make this bridge especially visible. Series contacts express AND conditions, parallel branches express OR conditions, and normally closed contacts can express negated conditions. Combining those simple relationships lets us build XOR and many other functions. The same logic can then be implemented electronically instead of mechanically.