New in Wolfram Mathematica 7: Industrial-Strength Boolean Computation  previous | next 
Convert to and from Various Truth Table Formats
Find a pure Boolean function represented by a positional truth table.
In[1]:=

Click for copyable input
ImageToBooleanFunction[i_Image] := 

 BooleanFunction[Flatten[First[Binarize[i]]]]
In[2]:=

Click for copyable input
BooleanFunctionToImage[b_BooleanFunction] := 

 Image[Partition[Boole[BooleanTable[b]], 2^(BooleanVariables[b]/2)]]
In[3]:=

Click for copyable input
Out[3]=

In[4]:=

Click for copyable input
Out[4]=