NAND is not associative: (A ↑ B) ↑ C vs A ↑ (B ↑ C) — NAND gate

coredifferent functions, same symbols

Answer

(A ↑ B) ↑ C column 10101011, A ↑ (B ↑ C) column 11110001

Why this example is worth doing

Two bracketings of the same three symbols produce different truth tables, which is not true of AND, OR or XOR. NAND and NOR are the standard counterexamples to the assumption that all binary logic operators associate, and it is an exam favourite. The consequence for design is concrete: a three-input NAND is not two two-input NANDs chained, so a NAND-only conversion has to be done algebraically rather than by textual substitution.

Try your own input in the NAND gate. Truth table, symbol and algebraic form for (A·B)′, the universal gate.

How the answer is reached

Output table

Output table — columns A, B, C, (A ↑ B) ↑ C, A ↑ (B ↑ C)
ABC(A ↑ B) ↑ CA ↑ (B ↑ C)
00011
00101
01011
01101
10010
10100
11010
11111

Compare with

Open the NAND gate

This input is entered in the tool itself — it is too rich for a link to carry.

Note:

Notation this page assumes

  • Symbols: · is AND, + is OR, ⊕ is XOR, a prime or an overline is NOT. The field also takes ∧ ∨ ¬ ~ ! & | and the words.
  • Operator precedence, tightest first: NOT, then AND (including juxtaposition), then XOR/XNOR, then NAND/NOR, then OR, then IMPLIES, then IFF.
  • Gate symbols follow whichever standard the header toggle is set to: ANSI/IEEE Std 91-1984 distinctive shapes, or IEC 60617-12 rectangles.

Sources

  • ANSI/IEEE Std 91-1984, Graphic Symbols for Logic Functions
  • IEC 60617-12, Graphical Symbols for Diagrams — Binary Logic Elements
  • Sheffer, “A Set of Five Independent Postulates for Boolean Algebras” (1913)