Template:2-ary truth table/doc

From English Wikipedia @ Freddythechick

Usage

This template is for articles like Exclusive or. The colors white and red correspond to Venn diagrams like File:Venn0110.svg, as well as other files like File:Variadic logical XOR.svg.

<syntaxhighlight lang=wikitext>

FFF
FTT
TFT
TTF

</syntaxhighlight> gives:

FFF
FTT
TFT
TTF

More complex tables can be created with the same styles:

Implications

<syntaxhighlight lang=wikitext>

(converse)
FFTT
FTTF
TFFT
TTTT

</syntaxhighlight>

(converse)
FFTT
FTTF
TFFT
TTTT
Disjunction with implication

<syntaxhighlight lang=wikitext>

FFTFF
FTTTT
TFFTT
TTTTT

</syntaxhighlight>

FFTFF
FTTTT
TFFTT
TTTTT
Disjunction with implication and negation

<syntaxhighlight lang=wikitext>

FFTFF
FTTTT
TFFTT
TTFTT

</syntaxhighlight>

FFTFF
FTTTT
TFFTT
TTFTT

In this template A is 0011, and B is 0101. In the corresponding Venn diagram files it is the other way round.
E.g. implication has to be entered as 1101. But the corresponding Venn diagram is File:Venn1011.svg