Skip to content
BetterDL

Functional completeness

Also called: functionally complete, functionally complete set, complete set of gates, complete gate set, adequate set of connectives

A set of gates is functionally complete if copies of those gates alone can build every possible Boolean function. {AND, OR, NOT} and {NAND} are examples.

A set of gate types is functionally complete when you can build any Boolean function using only gates from that set. The idea tells you which building blocks are enough.

The starting point is {AND, OR, NOT}. Every function has a sum of products form, which uses only those three, so that set is complete.

From there, a set is complete if it can make NOT plus either AND or OR. De Morgan's law supplies the missing one, for example = . So:

  • {AND, NOT} and {OR, NOT} are complete.
  • {NAND} alone and {NOR} alone are complete. A single gate type that does this is a universal gate.
  • {AND, XOR} is complete if a constant 1 is available, since = .

Sets that are not complete, and why:

  • {AND, OR}: raising an input from 0 to 1 can never make their output fall, so they can't build NOT.
  • {XOR, XNOR}, even with constants: they only ever build parity-style functions, never AND.
  • {NOT} alone: it has only one input, so it can't combine signals.

When checking a claim, always ask whether constants 0 and 1 are allowed. The answer can change.

ABY

Worked examples

Example

Showing {OR, NOT} is complete

Build AND from OR and NOT only, as drawn above.

  1. 1.

    Invert both inputs: and .

  2. 2.

    OR them: .

  3. 3.

    Invert the result: .

  4. 4.

    De Morgan: = . So AND is available, and with AND, OR and NOT the set is complete.

  5. 5.

    Row check, A = 1, B = 0: the inverters give 0 and 1, the OR gives 1, and the final NOT gives 0 = 1 · 0. ✓

Example

Is {AND, XOR} complete?

Assume the constant 1 can be wired to any input.

  1. 1.

    NOT: = , one XOR gate.

  2. 2.

    AND is already in the set.

  3. 3.

    NOT plus AND is complete, so yes, with a constant 1 the set is complete.

  4. 4.

    Without the constant, no circuit of AND and XOR gates can output 1 when every input is 0, so it couldn't build NOT.

Common mistakes

  • Ignoring whether constants are allowed. {AND, XOR} is complete with a 1 available, but not without one.

  • Thinking a set needs all three of AND, OR and NOT. NOT plus either one is enough.

  • Calling {AND, OR} complete. With no way to invert, it can't build NOT.

Practice Functional completeness

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Functional completeness is taught in Logic Gates.