Xnor
Details
- Xnor[e1,e2,…] can be input in StandardForm and InputForm as eie2…. The character can be entered as
xnor
or \[Xnor]. - Xnor gives symbolic results, applying various simplification rules automatically.
- Unlike And, Nand, Or, and Nor, Xnor must always test all its arguments, so is not a control structure, and does not have attribute HoldAll.
Examples
open all close allBasic Examples (3)
Xnor[True, False]Xnor[True, True]Xnor in disjunctive normal form:
BooleanConvert[Xnor[a, b]]abScope (1)
Xnor[]Xnor[a]Xnor[a, True, b]Xnor[a, False, b]Xnor is commutative and sorts its arguments:
Xnor[c, a, b]Properties & Relations (5)
Truth table for binary Xnor:
BooleanTable[{x, y, Xnor[x, y]}, {x, y}]//GridTernary Xnor:
BooleanTable[{x, y, z, Xnor[x, y, z]}, {x, y, z}]//GridXnor in
variables has a disjunctive normal form of length
:
BooleanConvert[Xnor@@Array[a, 2]]BooleanConvert[Xnor@@Array[a, 3]]Table[Length[BooleanConvert[Xnor@@Array[a, n]]], {n, 2, 10}]Xnor is equivalent to the negation of Xor:
TautologyQ[Equivalent[Xnor[a, b, c], ¬Xor[a, b, c]]]TautologyQ[Equivalent[Xnor@@Array[a, 10], Not[Xor@@Array[a, 10]]]]For two variables Xnor is the same as Equivalent:
TautologyQ[Equivalent[Xnor[a, b], Equivalent[a, b]]]But they differ for more than two variables:
TautologyQ[Equivalent[Xnor[a, b, c], Equivalent[a, b, c]]]Xnor is a special case of BooleanCountingFunction:
xnor[v__] := BooleanCountingFunction[{0, Length[{v}], 2}, Length[{v}]][v]TautologyQ[Equivalent[Xnor@@Array[a, 10], xnor@@Array[a, 10]]]Neat Examples (1)
The 2D truth table for Xnor of 12 variables:
ArrayPlot[BooleanTable[Xnor@@Array[x, 12], Array[x, 6], Array[x, 6, 7]], ColorRules -> {False -> White, True -> Black}]Related Guides
History
Text
Wolfram Research (2008), Xnor, Wolfram Language function, https://reference.wolfram.com/language/ref/Xnor.html.
CMS
Wolfram Language. 2008. "Xnor." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Xnor.html.
APA
Wolfram Language. (2008). Xnor. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Xnor.html
BibTeX
@misc{reference.wolfram_2026_xnor, author="Wolfram Research", title="{Xnor}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Xnor.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_xnor, organization={Wolfram Research}, title={Xnor}, year={2008}, url={https://reference.wolfram.com/language/ref/Xnor.html}, note=[Accessed: 12-June-2026]}