Attic › Mathematics › Claude Shannon

Shannon showed that electrical switches can do logic

About Boolean algebra

In his 1937 master's thesis (published as a paper in 1938), "A Symbolic Analysis of Relay and Switching Circuits", Shannon proved that simple electrical switches can perform all the operations of mathematical logic. Consequently, a circuit of switches can solve any problem that can be written as a set of logical rules.

At MIT, Shannon worked on the Differential analyser, an early analog computer built by Vannevar Bush. The machine used spinning shafts and gears to calculate equations, but its complicated ad hoc circuits of electromechanical parts controlled how it worked. A relay is an electrically operated switch that uses a magnet to open or close a path for electric current. Telephone exchanges also used thousands of these switches to route calls.

In the 19th century, the English mathematician George Boole had developed Boolean algebra, a mathematical system of logic. In Boolean algebra, every statement is either true (represented by 1) or false (represented by 0). Statements combine through three basic logical operations: AND, OR, and NOT.

Shannon realized that an electrical switch has the exact same two-state structure as a statement in Boole's logic. He matched the physical parts of a circuit to logical operations in three steps:

1. States: An open switch that stops current (or a wire with no voltage) represents 0 (false). A closed path that lets current flow represents 1 (true).

2. AND (series connection): When two switches are connected one after the other in a single line, current flows only if switch X and switch Y are both closed. In Boolean algebra, this is written as X · Y.

3. OR (parallel connection): When two switches are connected side by side on separate branches, current flows if switch X or switch Y is closed. In Boolean algebra, this is written as X + Y.

4. NOT (inversion): A relay can be wired so that turning its input on pulls the switch open and turns the output off. This reverses the state, changing 1 to 0 and 0 to 1.

Because algebraic equations and switch circuits obey the exact same rules, engineers no longer had to design circuits by intuition. An engineer could write down what a circuit needed to do as an equation, use the laws of Boolean algebra to simplify the equation to its shortest form, and then build the circuit directly from the simplified equation. This reduced the number of expensive parts needed.

Most importantly, Shannon showed that these basic switching circuits—now called logic gates—can do more than route telephone calls. Because numbers can be written in base-2 (using only 1s and 0s), switches that perform logic can also add, subtract, compare values, and make decisions. Every processor in a modern computer is a network of microscopic switches operating by the rules of Shannon's thesis.

Fact-checked against Claude Shannon on Wikipedia

Part of the Mathematics syllabus: Computation, Information, and Strategy

See it on the timeline of Computation, Information, and Strategy