Logic[TruthTable] - construct the truth table of a Boolean expression
|
Calling Sequence
|
|
TruthTable(expr, L, opt)
|
|
Parameters
|
|
expr
|
-
|
Boolean expression
|
L
|
-
|
list of identifiers appearing in the expression
|
opt
|
-
|
(optional) equation of the form form=tblform, where tblform is either boolean or MOD2.
|
|
|
|
|
Description
|
|
•
|
The TruthTable command returns the truth table corresponding to the Boolean expression expr.
|
•
|
The truth table returned is of type tabular.
|
•
|
The optional parameter form=tblform specifies the type of the inputs and output; by default, this is boolean. If form=MOD2 is specified, then the indices and entries will be zeroes and ones.
|
|
|
Examples
|
|
>
|
|
>
|
|
>
|
|
| (1) |
>
|
|
>
|
|
| (2) |
>
|
|
>
|
|
| (3) |
|
|