Truth table: Difference between revisions

Line 2,520:
 
{{FormulaeEntry|page=https://formulae.org/?script=examples/Truth_table}}
 
'''Solution'''
 
[[File:Fōrmulæ - Truth table 01.png]]
 
'''Test case 1'''
 
The following example produces the logical negation table:
 
[[File:Fōrmulæ - Truth table 02.png]]
 
[[File:Fōrmulæ - Truth table 03.png]]
 
'''Test case 2'''
 
The following example produces the logical conjunction table:
 
[[File:Fōrmulæ - Truth table 04.png]]
 
[[File:Fōrmulæ - Truth table 05.png]]
 
'''Test case 3'''
 
Because there is no restrictions about the mapping expression, it can be an array of expressions involving the arguments.
 
The following example produces the truth table for logical conjunction, disjunction, conditional, equivalence and exclusive disjunction:
 
[[File:Fōrmulæ - Truth table 06.png]]
 
[[File:Fōrmulæ - Truth table 07.png]]
 
'''Test case 4'''
 
In the following example, the truth table is used to show that a boolean formula is a tautology:
 
[[File:Fōrmulæ - Truth table 08.png]]
 
[[File:Fōrmulæ - Truth table 09.png]]
 
=={{header|Go}}==
2,120

edits