Nand
Details
- Nand[e1,e2,…] can be input in StandardForm and InputForm as
. 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
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.
Examples
open all close allBasic Examples (2)
Scope (4)
Nand with explicit True or False arguments will simplify:
Nand[x, True, z]Nand[x, False, z]Nand evaluates its arguments in order, stopping when an argument evaluates to False:
Nand[Print[1];False, Print[2];True]Nand[Print[1];True, Print[2];True]Symbolic transformations may not preserve argument ordering or Nand operations:
z⊼!x⊼!ySimplify[%]TraditionalForm formatting:
Nand[x, y, z]//TraditionalFormApplications (4)
Find the Nand of two regions:
RegionPlot[Nand[x ^ 2 + y ^ 2 < 1, x + y > 0], {x, -2, 2}, {y, -2, 2}]A cellular automaton based on Nand:
ArrayPlot[Boole[CellularAutomaton[{Nand@@#&, {}}, RandomChoice[{True, False}, 40], 20]]]Simplify trees involving Nand:
NestList[Nand[#, #]&, p, 4]Simplify[%]Find the area of the complement of the intersection of sets given by algebraic conditions:
Integrate[Boole[Nand[x ^ 2 + y ^ 2 < 1, (x - 1) ^ 2 + y ^ 2 < 2]], {x, -3 / 2, 5 / 2}, {y, -2, 2}]RegionPlot[Nand[x ^ 2 + y ^ 2 < 1, (x - 1) ^ 2 + y ^ 2 < 2], {x, -3 / 2, 5 / 2}, {y, -2, 2}]Properties & Relations (6)
Truth table for binary Nand:
BooleanTable[{x, y, Nand[x, y]}, {x, y}]//GridTernary Nand:
BooleanTable[{x, y, z, Nand[x, y, z]}, {x, y, z}]//GridNand[]Nand with a single argument will return the negated argument regardless of value:
Nand[2 + 2]Use BooleanConvert to expand in terms of Or and Not:
BooleanConvert[Nand[p, q, r]]The negation of Nand is equivalent to And:
BooleanConvert[!Nand[p, q, r]]Nand of conditions in Boole functions:
Boole[Nand[a, b, c]] - (1 - Boole[a]Boole[b]Boole[c])Simplify[%]Tech Notes
Related Guides
Related Links
History
Introduced in 2000 (4.1)
Text
Wolfram Research (2000), Nand, Wolfram Language function, https://reference.wolfram.com/language/ref/Nand.html.
CMS
Wolfram Language. 2000. "Nand." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Nand.html.
APA
Wolfram Language. (2000). Nand. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Nand.html
BibTeX
@misc{reference.wolfram_2026_nand, author="Wolfram Research", title="{Nand}", year="2000", howpublished="\url{https://reference.wolfram.com/language/ref/Nand.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_nand, organization={Wolfram Research}, title={Nand}, year={2000}, url={https://reference.wolfram.com/language/ref/Nand.html}, note=[Accessed: 13-June-2026]}