Hardware - Logic, Gates, & Circuits

Home > Lecture Notes > Hardware

Switches and Circuits

Basic circuit with 1 switch: Figure 1

A switch is said to be "closed" when it joins the two terminals and completes the circuit, otherwise it is "open."


Circuit using 2 switches in series: Figure 2

The circuit is only complete (i.e. the bulb illuminates) when both switches are closed. If we labeled one switch "P" and the other switch "Q;" and accepted the notion that a particular condition was TRUE when the switch was closed and FALSE when the switch was open; and also said that a third condition "S" was TRUE when the light illuminated; then we could say that when P AND Q are TRUE, S is TRUE; otherwise S is FALSE.

The AND truth table describes 2 switches wired in parallel:


Circuit using 2 switches in parallel: Figure 3

Using the same assumptions and labeling as the circuit described above, if our switches are wired in parallel then we can say that our third condition "S" is TRUE (the light is illuminated) when P OR Q are TRUE; S is FALSE only when P and Q are both false.

The OR truth table describes 2 switches wired in parallel:

[ TOP ]

Controlling Switches With Relays

Figure 4

Rather than physically move switches to complete circuits a relay similar to the basic telegraph relay developed by Samuel F.B. Morse in 1844 can open and close the switches. Note that we can use a common power source by connecting our positive and negative terminals. Finally, we can further simplify the drawing by assuming a common "ground" ("earth" in non-American English) for the negative terminals and use "V" (voltage source) for our positive terminal. The power source for the relay can be the output of another circuit!


Relay opens circuit : Figure 5

In all the previous examples the circuit was open by default; closing the switch or applying power to the relay completed the circuit. It is also possible to have our circuit closed by default and application of power to the relay opens the circuit. If the switch on the relay is labeled "P" then when P is TRUE the bulb is extinguished; we could say that the bulb is FALSE, or NOT P.

The NOT truth table:

[ TOP ]

From Relays to Gates

Figure 6

Having simplified the wiring of the relays, we can further simplify the drawing of the circuit using the standard notation for logic gates. Shown here is an AND gate which duplicates the functionality of the switches wried in series from Figure 2.

[ TOP ]

Revised: 26 JAN 2002 11:25