← Back to blogBuilding a Computer with Relays · Part 6 of 3

NOT Gate Using a Relay: Claude Shannon and a Complete Boolean Basis

A normally closed relay contact implements logical inversion. Examine the ideal switching model, physical relay limits, and Shannon's 1937 thesis.

Matthias KellerMatthias Keller
4 min read
Chalkboard feature illustration for “NOT Gate Using a Relay: Claude Shannon and a Complete Boolean Basis”

The preceding relay OR gate used parallel normally open contacts. Together with series-contact AND, it supplies two operations in a standard functionally complete basis. The missing operation is complementation.

A circuit containing only AND and OR, with each variable available only in positive form, computes a monotone Boolean function: changing an input from 0 to 1 cannot force the output from 1 to 0. Such a circuit cannot implement NOT. A normally closed relay contact supplies the opposite contact state.

Normally Closed Contact as an Inverter

In a relay with a changeover or Form B contact:

  • the coil released state leaves the NC contact closed;
  • energizing the coil moves the armature and opens that contact.

If coil state is interpreted as input A and lamp state as output Y, the settled logical behavior is:

AY
01
10

Therefore:

Y=A‾Y=\overline{A}

The equivalence is exact only for the ideal binary contact-state model. A physical relay also has specified coil voltage and current, pickup and dropout thresholds, contact ratings, operate and release time, bounce, arcing, heating, and failure modes. Not every relay exposes an NC terminal.

The input coil and output contact circuit can be galvanically isolated; “inversion” describes the mapping between interpreted states, not a claim that the output is the same electrical node or waveform as the input.

Claude Shannon’s Switching-Circuit Thesis

Claude Shannon began graduate study at MIT after degrees in mathematics and electrical engineering from the University of Michigan. While working with Vannevar Bush’s Differential Analyzer, he studied relay-control networks and recognized that Boolean algebra offered a systematic way to represent them.

In a two-valued switching interpretation:

  • series conducting contacts correspond to Boolean AND;
  • parallel conducting paths correspond to Boolean OR;
  • contacts controlled in the opposite sense provide complementation.

Shannon submitted A Symbolic Analysis of Relay and Switching Circuits in August 1937, at age 21. An abridged paper appeared in the Transactions of the American Institute of Electrical Engineers in 1938, and MIT awarded his SM in 1940. The paper addressed analysis, simplification, synthesis, and equivalent switching networks.

Relay and telephone-switching engineering predated the thesis. Shannon’s contribution was not the invention of the relay or the first relay circuit; it was a general symbolic method for a class of switching networks. MIT describes the work as the beginning of modern switching theory. That is more precise than saying all electrical behavior and Boolean algebra are “the same thing.”

Test the DigiSim Model

DigiSim’s example connects a relay’s normally closed contact to a lamp. The simulator evaluates a simplified DC network and delayed relay actuation. It is an interactive model, but it does not reproduce every property of a manufactured relay, including arcing, heating, contamination, tolerances, and wear.

The released coil leaves the NC path conducting; after the coil operates, the path opens.
Open in the Relay Lab

Verify two stable cases:

  1. With the input switch open, the coil is released and the lamp is lit.
  2. With the input switch closed, the coil operates after the modeled delay and the lamp turns off.

During actuation, the selected model may show timing that is absent from the two-row truth table. A hardware design must use the actual relay’s data sheet and a suitable coil driver and transient-suppression circuit.

Why NOT Completes the Boolean Basis

AND and OR alone cannot express a non-monotone function when only positive variables are available. NOT creates complemented literals such as A‾\overline{A}.

AND, OR, and NOT are functionally complete for finite Boolean functions. Given a truth table, one constructive proof is:

  1. For each row whose output is 1, form an AND term that matches that row, complementing variables whose row value is 0.
  2. OR all such terms.

The result is a canonical sum-of-products expression. It may be far from minimal, but it proves expressibility.

Functional completeness is a statement about Boolean functions. A complete computer additionally requires state, sequencing, input/output, and a physical model. Latches and registers need feedback and defined timing; analog and power behavior lie outside a finite truth table.

Takeaway

  • A normally closed relay contact implements NOT in the settled binary model.
  • The coil circuit and contact circuit have separate electrical requirements.
  • Shannon’s 1937 thesis applied Boolean methods to the analysis and synthesis of relay and switching networks.
  • AND, OR, and NOT form a complete basis for finite Boolean functions, not a complete physical computer by themselves.

Next, the buffer gate uses a normally open contact to reproduce a logical state while separating the control circuit from the contact circuit.

Primary Sources

Apply the concept in a simulator model.