Logo
All chapters
Volume II: Digital Logic  ›  Boolean Algebra & Logic Gates

Other Logic Operations

Beyond AND/OR/NOT: the full set of two-variable functions, including XOR and NAND.

PrevCanonical & Standard Forms
NextDigital Logic Gates

Description

The complete catalog of the sixteen possible functions of two binary variables. It shows which operations exist and which (NAND/NOR) are universal. Enumerate all 2^(2²) = 16 output patterns and name the useful ones.

  • Two variables have 4 input rows, so 2⁴ = 16 distinct output columns.
  • Named members include AND, OR, NAND, NOR, XOR, XNOR, and implication.
  • NAND and NOR are each functionally complete (universal).
  • What: The complete catalog of the sixteen possible functions of two binary variables.
  • Why: It shows which operations exist and which (NAND/NOR) are universal.
  • How: Enumerate all 2^(2²) = 16 output patterns and name the useful ones.
  • Where: Choosing gate primitives and understanding universality.
  • When: When selecting a minimal or convenient gate set for a technology.
  • Analogy — Like discovering that out of 16 possible handshakes between two people, just one move (NAND) can be repeated to mimic all the others — a single universal gesture.

At a glance

What

The complete catalog of the sixteen possible functions of two binary variables.

Why

It shows which operations exist and which (NAND/NOR) are universal.

How

Enumerate all 2^(2²) = 16 output patterns and name the useful ones.

Where

Choosing gate primitives and understanding universality.

When

When selecting a minimal or convenient gate set for a technology.

Think of it like…

Like discovering that out of 16 possible handshakes between two people, just one move (NAND) can be repeated to mimic all the others — a single universal gesture.

Sixteen functions

  • Two variables have 4 input rows, so 2⁴ = 16 distinct output columns.
  • Named members include AND, OR, NAND, NOR, XOR, XNOR, and implication.
  • NAND and NOR are each functionally complete (universal).

Key 2-variable functions

FunctionExpressionNote
ANDABboth 1
ORA + Bany 1
NAND(AB)′universal
NOR(A + B)′universal
XORA ⊕ Binequality
XNOR(A ⊕ B)′equality
ImplicationA′ + Bif A then B

Try every named gate

▶ live simulator
A0B00YAND

Click a terminal (A/B) to toggle it · glowing wires carry a logic 1 · the lamp is output Y

ABY
000
010
100
111

The 5 Whys

  1. 1

    Why study all 16 functions? To know the full design space for two inputs.

  2. 2

    Why highlight NAND/NOR? Each can build every other function.

  3. 3

    Why does universality matter? A library can standardize on one cell type.

  4. 4

    Why standardize cells? It simplifies fabrication and optimization.

  5. 5

    Root cause: enumerating the space reveals the minimal primitives hardware actually needs.

Cheat sheet

Working principle

  • Enumerate all 2^(2²) = 16 output patterns and name the useful ones.
  • The complete catalog of the sixteen possible functions of two binary variables.

Formulas & Boolean expressions

  • Two variables have 4 input rows, so 2⁴ = 16 distinct output columns.

Key facts

  • Two variables have 4 input rows, so 2⁴ = 16 distinct output columns.

Why it exists

  • Root cause: enumerating the space reveals the minimal primitives hardware actually needs.
PrevCanonical & Standard Forms
NextDigital Logic Gates