Jump to content

Template:Truth table auto

From Logic World Wiki
Revision as of 19:00, 9 September 2025 by Felipe (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Renders a truth table with any number of inputs and outputs. IMPORTANT: Make sure to use "+" instead of "|" as the OR operator. Wikitest parses the "|" as a property separator unless you instead use "{{!}}", but the plus sign is better for readability.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
captioncaption

Title to show above the table

Lineoptional
inputsinputs

Number of inputs or list of input names

Example
"3", "A B C"
Linerequired
outputsoutputs

Number of outputs or list of output names

Example
"2", "X Y"
Linerequired
expr1expr1

Expression for output #1

Example
(a & b) + c ^ d
Lineoptional
expr2expr2

Expression for output #2

Example
(a & b) + c ^ d
Lineoptional
expr3expr3

Expression for output #3

Example
(a & b) + c ^ d
Lineoptional
expr4expr4

Expression for output #4

Example
(a & b) + c ^ d
Lineoptional
expr5expr5

Expression for output #5

Example
(a & b) + c ^ d
Lineoptional
expr6expr6

Expression for output #6

Example
(a & b) + c ^ d
Lineoptional