BooleanFunction

BooleanFunction[k,n]
represents the k^(th) Boolean function in n variables.

BooleanFunction[values]
represents the Boolean function corresponding to the specified vector of truth values.

BooleanFunction[{{i11,i12,}o1,}]
represents the Boolean function defined by the specified mapping from inputs to outputs.

BooleanFunction[spec,{a1,a2,}]
gives the Boolean expression in variables corresponding to the Boolean function specified by spec.

BooleanFunction[spec,{a1,a2,},form]
gives the Boolean expression in the form specified by form.

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Generate the 30^(th) Boolean function of 3 variables:

In[1]:=
Click for copyable input
Out[1]=

Use f like any other Boolean operator:

In[2]:=
Click for copyable input
Out[2]=

Convert to a DNF expression:

In[3]:=
Click for copyable input
Out[3]=

Generate the formula directly:

In[4]:=
Click for copyable input
Out[4]=

Specify a Boolean function based on a table of truth rules:

In[1]:=
Click for copyable input
Out[1]=

Use an incompletely specified truth table:

In[2]:=
Click for copyable input
Out[2]=

Convert a Boolean expression to a BooleanFunction:

In[1]:=
Click for copyable input
Out[1]=

Test that they represent the same function:

In[2]:=
Click for copyable input
Out[2]=
Introduced in 2008
(7.0)