Skip to content

NAND Logic

A basis-restricted Boolean construction in which every target function is synthesized as a composition of NAND alone, exploiting NAND's functional completeness.

Version
v3 · 2026-09-07 · History
Domain-specific #
2345
Origin domain
Boolean algebra
Subdomain
functionally complete connectives
Aliases
NAND-only logic, NAND-gate logic

Core Idea

NAND logic is the disciplined construction of Boolean formulas or digital logic networks using NAND as the only primitive logical operation. Binary NAND returns false only when both inputs are true: x NAND y = NOT(x AND y). Its importance is not this truth table alone but functional completeness. Every Boolean function of finitely many variables can be expressed by a finite composition of NAND operations[1].

The constructive proof is compact. Tying the two inputs together gives negation: NOT x = x NAND x. Applying NAND to x and y and then NAND-inverting the result gives conjunction: x AND y = (x NAND y) NAND (x NAND y). By De Morgan's law, disjunction follows: x OR y = (x NAND x) NAND (y NAND y). Since NOT together with AND or OR can express every ordinary Boolean function, NAND alone can do so as well.

NAND logic turns that theorem into a basis-restricted design practice. A target truth table, proposition, or combinational block is rewritten as a network whose internal nodes are all NAND. The resulting representation is logically equivalent to the target, though it may differ in gate count, depth, fan-out, power, hazard behavior, or physical technology. In the standard weak sense, NAND alone expresses every positive-arity Boolean function. If zero-ary constants are also counted, the convention must supply a variable or a permitted constant as a leaf: with a variable x, NAND(x, NAND(x,x)) is constantly true and NAND of that result with itself is constantly false.

Henry M. Sheffer's 1913 paper showed that a single binary “rejection” operation could replace familiar Boolean operations in an axiomatization[2]. Under the paper's convention that operation corresponds to NOR; later notation commonly uses the Sheffer stroke for NAND, while both NAND and NOR are individually functionally complete[2]. Digital design realizes the NAND truth function in physical gates. Nisan and Schocken make the construction operational in The Elements of Computing Systems: their first project treats NAND as primitive and requires learners to build NOT, AND, OR, XOR, multiplexers, demultiplexers, and wider chips from it[3].

The exact abstraction therefore spans two aligned levels—symbolic composition and gate-network synthesis—without collapsing them. A logical proof of expressibility does not by itself establish that every physical implementation has acceptable timing, electrical loading, or state behavior.

Structural Signature

The abstraction has nine roles:

  • Boolean domain — values 0 and 1, false and true, under truth-functional interpretation;
  • primitive operation — binary NAND, with output zero only for input pair (1,1);
  • target function — the Boolean behavior to be represented;
  • composition graph — an acyclic formula tree or combinational gate network made only from NAND nodes;
  • input wiring — variables may feed multiple nodes, and the same signal may feed both inputs of one NAND;
  • derived operations — reusable NAND-only realizations of NOT, AND, OR, XOR, MUX, and other blocks;
  • equivalence criterion — the constructed network and target agree for every input assignment;
  • cost model — gate count, logic depth, fan-out, delay, area, power, or another implementation metric;
  • technology interpretation — abstract connective, HDL primitive, standard logic IC, CMOS cell, or other physical realization.

Its invariant is:

for every permitted input assignment, the NAND-only composition produces the same output vector as the target Boolean function.

The structural signature is:

target Boolean specification + NAND as sole primitive + finite composition/wiring + exhaustive functional equivalence + optional cost optimization → NAND-logic realization.

For multi-output circuits, internal NAND subexpressions may be shared. For sequential devices, feedback and a time/state model must be added explicitly; functional completeness of combinational Boolean operations alone does not supply memory semantics.

What It Is Not

It is not merely the NAND operation or one NAND gate. NAND logic is the use of that operation as a complete construction basis for other behavior.

It is not functional completeness in general. NOR alone and several multi-connective sets are also functionally complete. NAND logic is one named realization of the broader property.

It is not NOR logic, although NOR is the dual single-gate universal basis and supports a parallel synthesis practice.

It is not any circuit that happens to contain NAND gates. A mixed library containing NAND, inverter, XOR, and flip-flop primitives is not NAND-only unless every counted logical primitive is reduced under a declared boundary.

It is not proof that NAND is optimal for every implementation. Universality guarantees existence of an equivalent construction, not minimum area, delay, energy, wiring, or transistor count.

It is not Turing completeness. Functional completeness covers finite Boolean functions under composition. General computation additionally requires unbounded or extensible state, sequencing, and a machine model.

It is not the claim that a complete physical computer needs no assumptions beyond ideal NAND truth functions. Clocks, storage, I/O, power, analog signal integrity, and fabrication remain distinct concerns, even though NAND networks can participate in their logical realization.

Scope of Application

The home domains are propositional logic, Boolean algebra, combinational digital design, logic synthesis, hardware description, and introductory computer architecture. In symbolic logic, a formula written with AND, OR, and NOT can be translated into the Sheffer stroke. In circuit design, the gates of a combinational network can be replaced by NAND-only subcircuits. In education, a uniform primitive makes hierarchy visible: successive chips are built from previously verified NAND-derived parts.

The method applies to any finite Boolean function, including multiple-output combinational functions when each output is represented and subexpressions may be shared. It can produce decoders, encoders, adders, comparators, multiplexers, arithmetic/logic components, and control logic. These applications follow from functional completeness, not from memorizing a finite catalog of gate diagrams.

Sequential circuits require a scope declaration. Cross-coupled NAND gates can form latches, and larger state elements can be built from such structures, but feedback introduces time, stability, and state. A purely truth-functional proof for an acyclic network is insufficient to validate a latch. The node covers NAND-only sequential construction only when the feedback/state semantics and physical timing assumptions are explicit.

Physical implementation also has a declared library boundary. A standard integrated circuit such as TI's SN74HC00 contains four independent two-input NAND gates with real voltage, loading, and propagation specifications[4]. Calling a larger board “NAND logic” may mean its logical combinational primitives are NAND packages; it does not mean resistors, power rails, interconnects, or clock sources disappear.

Clarity

A recognition procedure asks:

  1. Is the target a Boolean function or a digital block with a precise Boolean interface?
  2. Is binary NAND the only primitive operation inside the claimed logical boundary?
  3. Are constants, fan-out, wires, and tied inputs treated as wiring conventions rather than undeclared gates?
  4. Does the constructed expression terminate as a finite acyclic composition for combinational logic?
  5. Does it agree with the target on every input row?
  6. If feedback is present, are state and timing semantics separately specified?
  7. Is the claim about logical equivalence, or does it also assert a cost or physical property that needs independent evidence?

Truth-table equivalence gives a complete test for small blocks. For larger designs, algebraic proof, Boolean decision methods, equivalence checking, or exhaustive simulation over a finite feasible interface can establish the same criterion.

The simplest diagnostic is the primitive inventory. Wires, signal forks, and the reuse of a NAND output are normally free structural connections. An explicit NOT symbol is not a permitted primitive even if a library would implement it efficiently; it must be expanded as NAND(x,x) when the representation is claimed to be NAND-only.

Manages Complexity

Digital logic offers many functionally distinct gates and innumerable possible networks. NAND logic compresses the primitive vocabulary to one operation. This uniformity makes completeness constructive: after NOT, AND, and OR are derived, any formula in a familiar complete language can be translated systematically.

The compression improves modular reasoning and pedagogy. A NAND primitive can be verified once; derived gates can be tested against their interfaces; larger chips can then be built from verified lower layers. Nisan and Schocken's project uses exactly this progression, treating NAND as the primitive contract and asking learners to construct a basic chip set.

Uniformity does not eliminate design complexity. Naive replacement can duplicate subexpressions and increase depth. Gate count and longest input-to-output path affect implementation cost. Physical NAND gates have nonzero delay and finite fan-out. Reconvergent paths can create glitches. A designer therefore moves from mere NAND realizability to NAND optimization.

The abstraction separates two questions that are often confused: Can this behavior be expressed using only NAND? and Which NAND-only expression is best under the chosen cost model? Functional completeness answers the first for every finite Boolean target. Circuit synthesis and technology mapping address the second.

Abstract Reasoning

Let B = {0,1}, and define N(x,y) = 1 - xy. A NAND formula is a rooted finite tree whose leaves are variables or explicitly permitted constants and whose internal nodes compute N. A NAND circuit generalizes the tree to a directed acyclic graph so that intermediate results can be shared. The positive-arity theorem needs variables as leaves; a strong convention that demands zero-ary functions must specify how a leaf is obtained before any binary composition can begin.

The translation basis is:

  • NOT x = N(x,x);
  • x AND y = N(N(x,y), N(x,y));
  • x OR y = N(N(x,x), N(y,y)).

Take any Boolean function f. A truth table can be written in disjunctive normal form using NOT, AND, and OR. Recursively replace those operations using the identities above. The resulting expression contains only N and is extensionally equal to f. That is the operational functional-completeness proof.

The theorem predicts invariance under several transformations. Algebraically equivalent NAND subgraphs can be substituted without changing behavior. Common subexpressions can be shared. Double NAND inversion can introduce or remove buffering structure. Associative regrouping of a derived AND or OR can change depth even though the final truth function remains constant.

It also predicts limitations. Functional equivalence says nothing about the uniqueness of a representation; one target has many NAND networks. It says nothing about minimum size. It does not preserve hazards, analog transition shapes, or exact propagation delay. And if a circuit contains cycles, evaluation is no longer a simple topological pass; a state model is required.

Knowledge Transfer

The exact term transfers cleanly between formulas, HDL exercises, ideal gate networks, and physical NAND libraries when the shared Boolean interface and primitive boundary are maintained. This makes NAND logic a particularly transparent bridge between formal logic and digital engineering.

The broader lesson is that a small primitive can be expressively universal under composition. Similar reasoning appears in instruction sets, combinator bases, universal cellular automata, and minimal generating systems. But those analogies should not inherit the name NAND logic. Their portable structure is already represented by Completeness, Composition, Equivalence, Constraint, and generating-set abstractions.

The candidate does not become a prime merely because functional completeness is general. The exact object depends on the two-valued NAND truth function, Boolean equivalence, gate networks, and digital implementation costs. Its transfer beyond those roles is analogy.

Examples

NAND inverter. Tie both inputs of one NAND node to x. Since x AND x = x, the output is NOT x. This is the minimal bridge from NAND to negation.

NAND conjunction. Compute t = NAND(x,y), then NAND t with itself. The second node negates the first, producing x AND y.

NAND disjunction. Invert x and y separately with tied-input NAND nodes, then NAND the two inverted signals. De Morgan's law yields x OR y.

NAND multiplexer. For selector s and data a,b, express (a AND NOT s) OR (b AND s), then replace each NOT, AND, and OR using NAND identities. Nisan and Schocken's first project makes this a tested construction task[3].

Multi-level combinational block. Translate an adder's sum and carry truth functions into NAND-only networks, share repeated intermediate signals, and verify every output row. The result is NAND logic even if its layout contains many packages or cells.

Physical gate package. Four gates in an SN74HC00 can realize several nodes of a NAND-only network. The device data sheet supplies electrical properties beyond the ideal truth function; those specifications must be checked separately.

Nonexample—mixed primitive schematic. A diagram uses NAND for most logic but retains a primitive XOR. It may be functionally equivalent to a NAND-only circuit, but the displayed implementation is not NAND-only.

Nonexample—universality without state model. Saying that functional completeness alone proves a clocked computer works skips storage, timing, and sequential semantics.

Structural Tensions

  • Primitive uniformity vs. network expansion. One gate type simplifies the vocabulary, while translation can increase gate count and wiring.
  • Existence vs. optimization. Functional completeness guarantees a construction; it does not choose the smallest, fastest, or lowest-power one.
  • Formula trees vs. shared circuits. Recursive replacement is easy to prove, while direct tree expansion can duplicate intermediates that a circuit graph would share.
  • Logical equivalence vs. physical behavior. Equal truth tables can have different propagation delays, hazards, drive strengths, and energy use.
  • Combinational closure vs. sequential state. Acyclic composition is truth-functional; feedback requires time and stability semantics.
  • Library purity vs. system completeness. A logical block may use only NAND primitives even though a physical system necessarily uses wires, supplies, packaging, clocks, and interfaces.
  • Canonical primitive vs. multiple representations. NAND is sufficient by itself, but the representation of any target is highly nonunique.
  • Pedagogical transparency vs. industrial mapping. A NAND-only hierarchy exposes construction principles; real cell libraries often use several complex gates for better implementation quality.

Structural–Framed Character

NAND logic is structurally strong. It has a finite domain, one primitive truth function, a composition rule, an exhaustive equivalence criterion, a proof of coverage, and predictable transformations and failure modes. A target either has a valid NAND-only realization—and every finite Boolean target does—or a proposed network fails its truth table or primitive boundary.

It is also substantially framed. The two-valued Boolean domain, Sheffer stroke, gate symbols, circuits, fan-out, propagation depth, HDL, CMOS/TTL realizations, and computer-architecture pedagogy make the identity specific.

The correct type is domain-specific. Completeness carries the portable “nothing in the target class is inexpressible” structure; NAND Logic records the concrete Boolean basis and the design practice built around it.

Structural Core vs. Domain Accent

The structural core is a single permitted operation closes under composition over the entire target function class. Completeness supplies total expressive coverage; Composition builds larger expressions; Equivalence preserves target behavior; Constraint restricts the primitive inventory.

The domain accent is binary truth values, NAND's particular truth table, Boolean formulas, logic gates, tied inputs, gate depth, fan-out, physical timing, and the historical Sheffer/digital-design tradition.

Basis is a useful related prime but not the parent. A NAND singleton is a minimal generating set for Boolean functions under superposition, yet NAND representations are not unique coordinates, and the repository's Basis prime includes independence and coordinate consequences that do not map cleanly here.

Completeness is the strongest parent. NAND logic is an exact case of functional completeness: every member of the target class of finite Boolean functions can terminate inside the NAND-generated expression system.

Composition is the construction mechanism. NAND nodes are recursively nested or connected as a directed acyclic graph.

Equivalence supplies the validation rule: target and realization must return the same outputs for every input.

Constraint fixes the sole allowed primitive and makes the synthesis problem meaningful.

Basis describes the intuition of a minimal generator, but its stronger independence and coordinate commitments block parentage.

The proposed DAG uses one strict composition/instantiation edge to Completeness. The remaining relations stay explanatory.

Relationships to Other Abstractions

Local relationship map for NAND LogicParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.NAND LogicDOMAINPrime abstraction: Completeness — is a kind ofCompletenessPRIME

Current abstraction NAND Logic Domain-specific

Parents (1) — more general patterns this builds on

  • NAND Logic is a kind of Completeness Prime

    Completeness is the strongest parent.

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

NAND Logic sits in a sparse region of the domain-specific corpus (83rd percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Discrete Structures & Graph Algorithms (17 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-09-08

Not to Be Confused With

  • Logical NAND / Sheffer stroke: the operation itself rather than the NAND-only construction practice.
  • NAND gate: one ideal or physical component.
  • Functional completeness: the broader property shared by NAND, NOR, and several connective sets.
  • NOR logic: the dual universal-gate construction.
  • Boolean algebra: the full algebraic setting, not a primitive-restricted representation.
  • Conjunctive or disjunctive normal form: standard complete representation forms that use multiple connectives.
  • Turing completeness: universality of a computational model with state and unbounded resources.
  • CMOS NAND cell: one transistor-level realization whose electrical behavior exceeds the Boolean truth table.
  • NAND flash: a nonvolatile memory architecture named for array connectivity, not synonymous with NAND-only Boolean synthesis.
  • NAND-only combinational logic vs. NAND latch: the latter uses feedback and requires sequential semantics.
  • Higher-order function: a function that takes or returns functions, unrelated to NAND's functional completeness.

References

[1] Enderton, Herbert B. A Mathematical Introduction to Logic. Academic Press, 2001. Enderton's section 1.5, 'Sentential Connectives', is the complete-sets-of-connectives material this result belongs to; the section text was not reachable for direct confirmation in this pass. registry

[2] Sheffer. “A set of five independent postulates for Boolean algebras, with application to logical constants”. Transactions of the American Mathematical Society, 1913. Sheffer's own paper: negation and disjunction are defined from the single primitive 'rejection', which he states may replace both wherever they are taken as primitive. Sheffer's own text settles the convention: he glosses his stroke as 'neither p nor q', i.e. NOR. The later migration of the symbol to NAND, and NAND's own completeness, are not claims of this paper. registry ↩a ↩b

[3] Nisan, Noam and Schocken, Shimon. The Elements of Computing Systems: Building a Modern Computer from First Principles. MIT Press, 2021. Project 1 of Nisan and Schocken's Chapter 1 gives Nand as the only building block and requires Not, And, Or, Xor, Mux and DMux, then their 16-bit and multi-way variants, to be built from it. Mux is one of the chips Project 1 requires learners to build from Nand, and each is checked against a supplied test script and compare file - so 'tested' is literal. registry ↩a ↩b

[4] Texas Instruments. SNx4HC00 Quadruple 2-Input NAND Gates. Texas Instruments data sheet, revision H (14 September 2021), 2021. TI's data sheet for the SNx4HC00 gives four independent 2-input NAND gates in one package, with a 2 V to 6 V supply range, drive and capacitive-load limits, and propagation delays in the tens of nanoseconds. registry