ChipFACTORYFoundations
Apply now
Foundations/STAGE 02
Foundations Track/STAGE 02
25 min first-principles journey
SECTION 2

How can we make electricity make a decision?

The Core Question

“Can we build a circuit that makes simple decisions?”

In Section 1, we discovered how physical voltage maps to 0 and 1. But static values on wires cannot compute. Computation requires choice: “If A is true AND B is true, activate C.” In this section, we will construct physical logic gates, discover universal circuits, translate human sentences into mathematics, and minimize hardware.

Pedagogy: Slide 1 & 2Interactive Discovery

Can Electricity Make a Decision? The Birth of the Truth Table

Before introducing mathematical symbols or logic gates, we look at physical switches. A truth table is simply a complete map of what a circuit does for every possible input combination.

Physical Switches:
Current State:⚡ Circuit Complete (ON)
1. Physical Circuit RealitySeries Connection
9V+-SW A (1)SW B (1)💡 Path closed: Current flows through Switch A AND Switch B

If either switch is open, the conductive path is broken and no electrons reach the light bulb. The lamp only turns on when both Switch A AND Switch B are closed.

2. The Truth Table DescriptionExhaustive Map
Switch ASwitch BOutput Lamp (Y)Physical State
000DARK
010DARK
100DARK
111ILLUMINATED

Notice the highlighted row. As you toggle physical switches, the truth table maps the electrical input combination directly to the resulting output state.

0 = Open Switch (LOW / False), 1 = Closed Switch (HIGH / True). The truth table exhaustively documents circuit behavior.
2.1Series Switch Logic

Can a circuit answer “AND”?

An AND condition means an outcome happens ONLY when all required criteria are met simultaneously. For example, a car engine starts only if the key is turned ON AND the brake pedal is pressed down.

What does “both conditions must be true” mean?

It means the output is strictly dependent on the simultaneous presence of both signals. If even a single requirement is missing, the entire operation fails.

Can we build a circuit that behaves this way?

Yes. Placing two switches in series (one right after another) forces electric current to traverse both conductors to reach the output load.

What should happen for every possible input?

For (0,0), (0,1), and (1,0), the circuit path remains broken and the output is 0. Only for input (1,1) is the circuit complete, producing an output of 1.

How can we describe its behavior?

Mathematically, we write Y = A · B (or Y = AB). In schematics, we represent it using the standard D-shaped AND gate symbol.

Pedagogy: Slide 2Interactive Discovery

2.1 The AND Gate: All Conditions Must Be Met Simultaneously

An AND condition means an outcome occurs ONLY when all required criteria are met simultaneously. Electrically, this is built using switches connected in series.

Input Signals:
Output (Y):Y = 0 (FALSE / LOW)
1. Physical Series SwitchesHardware
+3.3VA (1)B (0)Lamp Y

Electrical charge must traverse Switch A AND Switch B in series to illuminate the lamp.

2. Schematic Logic Gate SymbolSymbolic
A=1B=0ANDY=0

The classic flat-backed, curved-front D-shape denotes an AND gate in international schematics.

3. Truth Table MappingBehavior
ABY (Output)
000
010
100
111

Row 4 is the only state where the output is 1, matching the physical condition where all switches are closed.

4. Boolean Algebra EquationMathematics
Y = A · B
Current evaluation: 1 · 0 = 0
Multiplication notation: Multiplying by 0 always yields 0; only 1 · 1 yields 1 (concatenation AB).

George Boole used algebraic multiplication (dot notation or concatenation AB) to describe the AND operation mathematically.

Boolean Equation: Y = A · B (or Y = AB). Output is 1 only when A = 1 AND B = 1.
2.2Parallel Switch Logic

What about “OR”?

An OR decision produces a positive result if at least one condition is true. For example, a house alarm turns on if the front door is opened OR the back window is opened.

What if either condition should be enough?

In hardware, we connect two switches in parallel (side-by-side). Electricity can reach the output through Path A OR Path B.

What happens when both are true?

In digital logic, OR is “inclusive”. If both switches are closed (1 and 1), current flows through both paths and the outcome is still TRUE (1).

What happens when neither is true?

When both switches are open (0 and 0), no current can cross either branch, so the output remains 0. Mathematically, Y = A + B.

Pedagogy: Slide 3Interactive Discovery

2.2 The OR Gate: Triggers When At Least One Condition is True

An OR decision produces a positive output if at least one condition is met. In digital logic, OR is inclusive: if both inputs are 1, the outcome is still TRUE.

Parallel Inputs:
Output (Y):Y = 1 (TRUE / HIGH)
1. Physical Parallel CircuitHardware
+3.3VA (0)B (1)Lamp Y

If either switch is closed, current bypasses the other branch and delivers power to the lamp.

2. Schematic Logic Gate SymbolSymbolic
A=0B=1ORY=1

The curved back and pointed arrowhead shape denotes an OR gate in schematic diagrams.

3. Truth Table MappingBehavior
ABY (Output)
000
011
101
111

The output is 0 ONLY when both inputs are 0. In all other three cases, the output is 1.

4. Boolean Algebra EquationMathematics
Y = A + B
Current evaluation: 0 + 1 = 1
Addition notation: In Boolean algebra, 1 + 1 = 1 (inclusive logical union).

The plus symbol (+) denotes logical OR. It represents the combination of possibilities.

Boolean Equation: Y = A + B. In hardware, this is constructed using switches placed in parallel side-by-side.
2.3Signal Inversion

What about “NOT”?

Unlike AND and OR which combine multiple signals, a NOT circuit acts on a single line to reverse its state.

Can we reverse a signal?

Yes. A “NOT” circuit, also known as an Inverter, flips a digital signal. In schematics, it is drawn as a triangle with an inversion bubble at the output.

What happens to 1?

When the input is 1 (HIGH voltage), an NMOS pull-down transistor turns ON and drains the output line to Ground (0V), turning 1 into 0.

What happens to 0?

When the input is 0 (LOW voltage), the pull-down turns OFF and a PMOS pull-up connects the output line to the power supply rail (VDD), turning 0 into 1.

Pedagogy: Slide 4Interactive Discovery

2.3 The NOT Gate: Reversing Digital Signals (The Inverter)

A NOT circuit, also called an Inverter, flips a digital signal. In silicon hardware, this is accomplished using a pair of complementary PMOS and NMOS transistor switches.

Input Signal:
Output Y = 1
1. Logic Inverter SymbolSchematic
A=0Y=1

The triangular symbol represents a buffer amplifier, and the small circle (bubble) at the output represents inversion.

2. Truth Table & MathBehavior
Input AOutput Y (Ā)State
010 → 1 (INVERTED)
101 → 0 (INVERTED)
Y = A'  or  Y = Ā
Evaluation: NOT(0) = 1

Because there is only 1 input variable, the truth table has exactly 2¹ = 2 possible states.

Boolean Equation: Y = A' or Y = Ā. The circle bubble at the gate output represents inversion.
2.4Composite Logic Gates

Can we combine these decisions?

By cascading the output of one gate into the input of another, we construct composite logic gates that perform specialized decision-making.

Can AND, OR and NOT build more complicated decisions?

Yes. Combining basic gates produces composite operators: NAND (NOT + AND), NOR (NOT + OR), XOR (Exclusive-OR), and XNOR (Exclusive-NOR).

Can we build NAND?

An AND gate followed by an Inverter. Output is 0 ONLY when both inputs are 1; otherwise 1. NAND is a universal gate—you can build any digital circuit in existence using only NAND gates.

Can we build NOR?

An OR gate followed by an Inverter. Output is 1 ONLY when both inputs are 0. If any input is 1, the output becomes 0.

Can we detect whether two signals are different?

Yes, using an XOR (Exclusive-OR) gate. XOR outputs 1 if the inputs are different (A ≠ B) and 0 if they are identical.

What is XNOR?

An equality comparator (A = B). XNOR outputs 1 only when both inputs match (0 and 0, or 1 and 1).

Pedagogy: Slides 5, 6, 7Interactive Discovery

2.4 Combining Decisions: NAND, NOR, XOR, and XNOR

Basic gates combine to produce composite decision blocks. NAND and NOR form universal building blocks, while XOR and XNOR act as inequality and equality detectors.

Select Gate:
Universal Building Block
Toggle Inputs:
Gate Output (Y):Y = 1
1. Schematic SymbolNAND
A=0B=1NANDY=1

An AND gate followed by an Inverter. Output is 0 ONLY when both inputs are 1; otherwise 1.

2. Truth Table4 States
ABNAND (Y)
001
011
101
110
Current: 0 NAND 1 = 1
3. Architectural RoleSilicon Usage
Y = NOT(A AND B) = (A · B)'
NAND Gate (NOT + AND)

Universal Gate: Any digital logic circuit in existence can be constructed entirely out of NAND gates.

Complex computer logic is built by chaining these composite decisions into vast networks.

XOR = 1 when A ≠ B (Different). XNOR = 1 when A = B (Same).
2.5Mathematical Description

Can we describe a circuit mathematically?

In the 19th century, mathematician George Boole created the branch of algebra that operates on truth values (1 and 0). This allows engineers to design and analyze complex circuits using algebraic equations before touching a physical wire.

How can we write the behavior of AND as an equation?

Using multiplication notation: Y = A · B (or Y = AB). Reflects that 1 · 1 = 1, while multiplying anything by 0 equals 0.

What is Boolean algebra?

A formal algebraic system where variables take values of 0 or 1, and the primary operations are AND (·), OR (+), and NOT (X̄ or X').

Can we go from a sentence to a Boolean expression?

Yes. For example, “Turn on alarm (Y) if armed (A) AND motion (M) OR emergency (E)” translates directly to Y = (A · M) + E.

Can we go from an expression to a circuit?

Yes: replace every dot (·) with an AND gate, every plus (+) with an OR gate, and every bar (X̄) with an Inverter.

Can we go from a circuit back to an expression?

Yes: trace backwards from the output wire, writing the mathematical operation for each logic gate until reaching the input terminals.

Pedagogy: Slides 8 & 9Interactive Discovery

2.5 Converting English Sentences to Boolean Circuits: The Alarm System

Engineering requirements begin in spoken human language. Using Boolean algebra, we translate English sentences directly into mathematical equations, and then into physical logic schematics.

Security Sensors:
Alarm Siren (Y):SILENT (0)
Step 1: English RequirementClient Spec

“Turn on alarm (Y) if the system is armed (A) AND motion is detected (M) OR emergency button is pressed (E).”

• A = 1 (ARMED)
• M = 0 (NO MOTION)
• E = 0 (IDLE)

We extract discrete binary variables from the real-world sentence and identify the connective logic keywords.

Step 2: Boolean EquationAlgebra
Y = (A · M) + E
1. AND term: (1 · 0) = 0
2. OR term: 0 + 0 = 0

We replace “AND” with multiplication ($\cdot$) and “OR” with addition ($+$), adhering to algebraic order of operations.

Step 3: Wired Logic CircuitHardware
A=1M=0ANDA·M=0E=0ORY=0

Every dot ($\cdot$) becomes an AND gate, every plus ($+$) becomes an OR gate, and wires route signals directly to the output.

Reverse Engineering Skill: Just as we translate sentences into circuits, we can trace backwards from any hardware output wire through logic gates to derive the exact mathematical Boolean expression and English rules that govern it.
Translation Rule: Replace 'AND' with · (AND gate), 'OR' with + (OR gate), and 'NOT' with bar (Inverter).
2.6Optimization & Verification

How do we find a simpler circuit?

Two visually different circuits can perform the exact same computation. Finding the smallest, fastest circuit is a core task in semiconductor design.

Why would we want fewer gates?

Fewer gates mean a smaller silicon die area, cheaper manufacturing costs, lower power consumption, and shorter propagation delays for faster clock frequencies.

Can two different circuits perform the same function?

Yes. For example, the expression (A · B) + (A · B̄) requires 4 logic gates, but simplifies algebraically to A · (B + B̄) = A · 1 = A—a single copper wire!

How can we prove that they are equivalent?

By generating truth tables for both circuits. If the output column is identical for every single row, the circuits are 100% functionally equivalent.

What is a Karnaugh map?

A 2D graphic grid arranged in Gray code where adjacent cells differ by only 1 bit. Visually looping groups of 1s in powers of 2 ($1, 2, 4, 8$) instantly eliminates redundant variables without tedious algebra.

Pedagogy: Slides 10, 11, 12Interactive Discovery

2.6 How Do We Find a Simpler Circuit? Simplification, Proofs & K-Maps

Fewer gates mean smaller silicon area, lower manufacturing costs, reduced power consumption, and faster circuit speeds. We use Boolean algebra, Truth Table proofs, and Karnaugh Maps to minimize hardware.

Minimization Tool:
Test Inputs:
Original Circuit: (A · B) + (A · B̄) [4 Gates]Output Y = 1
A=1B=0AND1AND2ORY=1
Algebraic Derivation (Boolean Factoring):
(A · B) + (A · B̄)  →  A · (B + B̄)  →  A · 1  →  A
01 Area
Smaller Silicon Die

Fewer transistors fit in a smaller physical footprint.

02 Cost
Cheaper Fabrication

More dies fit on each silicon wafer during manufacturing.

03 Power
Lower Energy Consumption

Eliminates parasitic capacitance and thermal heat.

04 Speed
Faster Clock Speeds

Shorter electrical propagation delays through gates.

Simplification: (A · B) + (A · B̄) = A · (B + B̄) = A · 1 = A. A single wire replaces 4 logic gates!
Section 2 Master Takeaway

From Physical Switches to Universal Decision Machines

We started with physical mechanical switches and watched how series and parallel arrangements created the fundamental logic operations: AND, OR, and NOT. We saw that simple gates combine into universal NAND building blocks and XOR inequality detectors. Finally, we learned that Boolean algebra, Truth Tables, and Karnaugh Maps allow us to express, prove, and collapse complex circuits into optimized hardware.

The Complete Digital Logic Abstraction Hierarchy:
ELECTRICAL STATES→LOGIC GATES→COMBINED DECISIONS→BOOLEAN EQUATIONS→OPTIMIZED LOGIC
The Big Transition Question

“We can make decisions. Can we use those decisions to make a circuit that actually calculates?”

Having logic gates make static decisions is powerful, but how do millions of decisions add numbers, compute equations, and power a calculator? In Stage 03, we combine our decisions to build arithmetic adders and computational circuits.