represents the k^(th) maxterm in n variables.


represents the conjunction of the maxterms ki.


represents the conjunction of maxterms given by the exponent vectors ui, vi, .


gives the Boolean expression in variables ai corresponding to the maxterms function specified by spec.


gives the Boolean expression in the form specified by form.


  • BooleanMaxterms[{{u1,u2,}},{a1,a2,}] gives b1b2 where bi==ai if ui is True and bi=¬ai if ui is False.
  • The ui etc. can be either True and False or 1 and 0.
  • BooleanMaxterms[k,n] is equivalent to BooleanMaxterms[{IntegerDigits[k,n,2]}].
  • BooleanMaxterms[spec] gives a Boolean function object that works like Function.
  • BooleanMaxterms[spec][a1,a2,] gives an implicit representation equivalent to the explicit Boolean expression BooleanMaxterms[spec,{a1,a2,}].
  • BooleanConvert converts BooleanMaxterms[spec][vars] to an explicit Boolean expression.
  • In BooleanMaxterms[spec,{a1,a2,},form], the possible forms are as given for BooleanConvert.
  • BooleanMaxterms[spec,{a1,a2,}] by default gives an expression in CNF.


open allclose all

Basic Examples  (4)

Equivalent ways of specifying the same maxterm:

Specify a conjunction of maxterms:

An equivalent way to specify a conjunction of maxterms:

Return a BooleanFunction object representing the conjunction of maxterms:

Enumerate all maxterms of three variables:

Scope  (1)

Specify different forms for the result:

Applications  (1)

Produce a CNF formula for (1,3,5):

Properties & Relations  (4)

The indices correspond to positions of False, in the default ordering for BooleanTable:

BooleanMaxterms can represent any BooleanFunction:

The mapping from maxterms to index:

The mapping from index to maxterms:

Using bit vectors:

Use Subsets to enumerate all possible Boolean functions using BooleanMaxterms:

BooleanMinterms is related to BooleanMaxterms:

Wolfram Research (2008), BooleanMaxterms, Wolfram Language function,


Wolfram Research (2008), BooleanMaxterms, Wolfram Language function,


Wolfram Language. 2008. "BooleanMaxterms." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2008). BooleanMaxterms. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2023_booleanmaxterms, author="Wolfram Research", title="{BooleanMaxterms}", year="2008", howpublished="\url{}", note=[Accessed: 21-April-2024 ]}


@online{reference.wolfram_2023_booleanmaxterms, organization={Wolfram Research}, title={BooleanMaxterms}, year={2008}, url={}, note=[Accessed: 21-April-2024 ]}