is the logical NAND function. It evaluates its arguments in order, giving True immediately if any of them are False, and False if they are all True.


  • Nand[e1,e2,] can be input in StandardForm and InputForm as e_(1) nand e_(2) nand .... The character can be entered as nand or \[Nand]. »
  • Nand[e1,e2,] is equivalent to Not[And[e1,e2,]]. »
  • Nand has attribute HoldAll, and explicitly controls the evaluation of its arguments. In Nand[e1,e2,] the e_(i) are evaluated in order, stopping if any one of them is found to be False. »
  • Nand gives symbolic results when necessary, removing initial arguments that are True. »
  • Nand is not Flat.


open allclose all

Basic Examples  (2)

Symbolic arguments:

Enter using nand:

Scope  (4)

Nand with explicit True or False arguments will simplify:

Nand evaluates its arguments in order, stopping when an argument evaluates to False:

Symbolic transformations may not preserve argument ordering or Nand operations:

TraditionalForm formatting:

Applications  (4)

Find the Nand of two regions:

A cellular automaton based on Nand:

Simplify trees involving Nand:

Find the area of the complement of the intersection of sets given by algebraic conditions:

This shows the set:

Properties & Relations  (6)

Truth table for binary Nand:

Ternary Nand:

Zero-argument Nand is False:

Nand with a single argument will return the negated argument regardless of value:

Use BooleanConvert to expand in terms of Or and Not:

The negation of Nand is equivalent to And:

Nand of conditions in Boole functions:

Introduced in 2000