BooleanConvert[expr]
converts the Boolean expression expr to disjunctive normal form.
BooleanConvert[expr,form]
converts the Boolean expression expr to the specified form.
BooleanConvert[expr,form,cond]
finds an expression in the specified form that is equivalent to expr when cond is true.
BooleanConvert
BooleanConvert[expr]
converts the Boolean expression expr to disjunctive normal form.
BooleanConvert[expr,form]
converts the Boolean expression expr to the specified form.
BooleanConvert[expr,form,cond]
finds an expression in the specified form that is equivalent to expr when cond is true.
Details and Options
- BooleanConvert[expr,form] will produce an expression equivalent to expr.
- Available forms are:
-
"DNF","SOP" disjunctive normal form, sum of products "CNF","POS" conjunctive normal form, product of sums "ESOP" exclusive sum of products "ANF" algebraic normal form "NOR" two-level Nor and Not "NAND" two-level Nand and Not "BinaryNOR", "NOR2" two-argument Nor "BinaryNAND", "NAND2" two-argument Nand "AND" two-level And and Not "OR" two-level Or and Not "IMPLIES" Implies and Not "ITE","IF" If and constants "BFF" BooleanFunction form "BDT" Boolean decision tree - The expression expr can contain any Boolean or logical functions, including BooleanFunction, BooleanCountingFunction, etc.
- BooleanConvert[bf,form] converts the internal form of a pure BooleanFunction object.
- BooleanConvert supports a Method option that specifies the detailed method to use.
Examples
open all close allBasic Examples (3)
Convert a Boolean expression to disjunctive normal form:
BooleanConvert[Equivalent[x, y, z]]Convert x⊻y to some common forms:
Table[BooleanConvert[Xor[x, y], fm], {fm, {"DNF", "CNF", "NAND", "NOR"}}]Convert x⊻y⊻z using the condition that x∧(y∨z) is true:
BooleanConvert[Xor[x, y, z], "DNF", x∧(y∨z)]Show that the output is equivalent to the input when x∧(y∨z):
TautologyQ[Implies[x∧(y∨z), Equivalent[Xor[x, y, z], %]]]Scope (2)
Convert a Boolean expression to different forms:
expr = BooleanCountingFunction[{2, 3}, 4][a, b, c, d]e1 = BooleanConvert[expr]e2 = BooleanConvert[expr, "CNF"]e3 = BooleanConvert[expr, "ESOP"]e4 = BooleanConvert[expr, "ANF"]e5 = BooleanConvert[expr, "NAND"]e6 = BooleanConvert[expr, "NOR"]Two-argument Nand:
e7 = BooleanConvert[expr, "BinaryNAND"]Two-argument Nor:
e8 = BooleanConvert[expr, "BinaryNOR"]e9 = BooleanConvert[expr, "AND"]e10 = BooleanConvert[expr, "OR"]e11 = BooleanConvert[expr, "IMPLIES"]If and constants:
e12 = BooleanConvert[expr, "ITE"]e13 = BooleanConvert[expr, "BFF"]e14 = BooleanConvert[expr, "BDT"]Show that they are all equivalent:
TautologyQ[Equivalent[expr, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14]]Convert a Boolean function using a "care set" or condition:
f = BooleanCountingFunction[{2, 3}, 4][a, b, c, d]cond = Xor[a, b, c, d]g = BooleanConvert[f, cond]h = BooleanConvert[f, "CNF", cond]The resulting forms are equivalent when cond is true:
TautologyQ[Implies[cond, Equivalent[f, g, h]]]They are not equivalent without the condition:
TautologyQ[Equivalent[f, g, h]]Typically the forms are longer without conditions:
BooleanConvert[f]BooleanConvert[f, "CNF"]Properties & Relations (3)
The output from BooleanConvert is equivalent to its input:
f = BooleanFunction[228, 3][a, b, c]g = BooleanConvert[f]TautologyQ[Equivalent[f, g]]The output from BooleanConvert with condition is conditionally equivalent to its input:
f = BooleanFunction[158, {a, b, c}]cond = a || b || c;g = BooleanConvert[f, "DNF", cond]The forms f and g are equivalent when cond is true:
TautologyQ[Implies[cond, Equivalent[f, g]]]They are not equivalent on their own:
TautologyQ[Equivalent[f, g]]Use BooleanMinimize to get the minimal length form:
f = BooleanConvert[BooleanCountingFunction[{1, 2}, 3][a, b, c]]g = BooleanMinimize[f]TautologyQ[Equivalent[f, g]]See Also
BooleanMinimize LogicalExpand BooleanFunction BooleanTable
Function Repository: FindBooleanAlternative
Related Guides
Text
Wolfram Research (2008), BooleanConvert, Wolfram Language function, https://reference.wolfram.com/language/ref/BooleanConvert.html (updated 2024).
CMS
Wolfram Language. 2008. "BooleanConvert." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/BooleanConvert.html.
APA
Wolfram Language. (2008). BooleanConvert. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/BooleanConvert.html
BibTeX
@misc{reference.wolfram_2026_booleanconvert, author="Wolfram Research", title="{BooleanConvert}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/BooleanConvert.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_booleanconvert, organization={Wolfram Research}, title={BooleanConvert}, year={2024}, url={https://reference.wolfram.com/language/ref/BooleanConvert.html}, note=[Accessed: 12-June-2026]}