Template:2-ary truth table/sandbox
F | F |
F | T |
T | F |
T | T |
![]() | __EXPECTUNUSEDTEMPLATE__This is the template sandbox page for Template:2-ary truth table (diff). |
![]() | This template uses Lua: |
![]() | This template uses TemplateStyles: |
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>F | F | F |
F | T | T |
T | F | T |
T | T | F |
F | F | F |
F | T | T |
T | F | T |
T | T | F |
More complex tables can be created with the same styles:
- Implications
(converse) | |||
---|---|---|---|
F | F | T | T |
F | T | T | F |
T | F | F | T |
T | T | T | T |
(converse) | |||
---|---|---|---|
F | F | T | T |
F | T | T | F |
T | F | F | T |
T | T | T | T |
- Disjunction with implication
F | F | T | F | F |
F | T | T | T | T |
T | F | F | T | T |
T | T | T | T | T |
F | F | T | F | F |
F | T | T | T | T |
T | F | F | T | T |
T | T | T | T | T |
- Disjunction with implication and negation
<syntaxhighlight lang=wikitext>
F | F | T | F | F |
F | T | T | T | T |
T | F | F | T | T |
T | T | F | T | T |
</syntaxhighlight>
F | F | T | F | F |
F | T | T | T | T |
T | F | F | T | T |
T | T | F | T | T |
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