CS with Seongyeol

When Electricity Learned Logic

In the previous post, we explored why computers represent the world using simple bits of 0 and 1. But if bits were merely stored without being processed, the computer would be nothing more than a simple storage device. The true power of a computer lies in taking these bits and processing them in meaningful ways to produce the results we want.

So how were people able to give meaning to these 0s and 1s and use them as the foundation for logical reasoning?

Boolean Algebra

The foundation can be found in Boolean Algebra, proposed by the 19th-century British mathematician George Boole. Boole created a system that could express human logical thinking clearly and mathematically using just two values, true and false, along with a few basic operations. Among the various operations in Boolean algebra, let’s look at a few representative ones.

  • AND (∧): True only when both A and B are true
  • OR (∨): True when at least one of A or B is true
  • NOT (¬): Flips true and false

For example, consider a car deciding whether to go straight at an intersection. “If the traffic light is green and (∧) there is no (¬) obstacle ahead,” the car goes straight. This judgment is expressed in Boolean algebra as follows:

Go straight = Green light ∧ ¬Obstacle

The key insight of Boolean algebra is that logical decisions can be represented as combinations of Boolean operators like this.

Expressing with 0s and 1s

The two states, 0 and 1, that computers use to represent information turned out to be a perfect means of representing the true and false of Boolean logic. By agreeing that a computer’s 0 means false and 1 means true, people were able to give logical meaning to the simple electrical signals inside a machine.

Thanks to this convention, we can handle Boolean functions, functions that take one or more true/false values as input and produce a true/false result according to defined rules, using 0s and 1s. A table that exhaustively lists the rules of a Boolean function for all possible input combinations is called a truth table. The car’s go-straight decision from earlier looks like this as a truth table:

Go straight
000
010
101
110

Even adding two bits can be expressed as a Boolean function.

SumCarry
0000
0110
1010
1101

When you add 1 + 1, the sum becomes 0 and a carry of 1 is produced, making the binary number 10 (which is 2 in decimal). In this way, even arithmetic operations are reduced to logical combinations of true and false. Inside a computer, countless Boolean functions defined by truth tables perform all decisions and computations.

From Logic to Circuits

But how can we physically take true/false values expressed as 0 and 1 and produce new true/false results? The person who showed a concrete way to connect abstract logic with actual electrical circuits, making computation possible, was the American scientist and mathematician Claude Shannon.

Shannon demonstrated his key insight in his master’s thesis, A Symbolic Analysis of Relay and Switching Circuits, published at MIT in 1937, when he was just twenty-one years old.

He mathematically proved that the principles of Boolean algebra, expressed in 0 (false) and 1 (true), could be directly applied to designing and analyzing electrical circuits that operate with switches (on/off). Thanks to this, electrical circuit design, which had been overwhelmingly complex, could enter the realm of science governed by clear mathematical principles. His master’s thesis is recognized as a pivotal piece of research that opened the door to the digital age.

Wrap-up

We have given logical meaning to simple bits of 0 and 1 through Boolean algebra, defined the behavior of Boolean functions with truth tables, and confirmed through Shannon’s insight that this abstract logic can be implemented as actual electrical circuits.

In the next post, let’s look at the basic building blocks that actually implement this logic: the AND, OR, and NOT logic gates.