A ↑ B — truth table

edge casefalse only when both inputs are 1

Answer

4 rows, 3 true (0, 1, 2)

Why this example is worth doing

The Sheffer stroke, written , which this parser accepts as NAND — and never as the OR that the similar-looking pipe character means. That collision is a genuine source of wrong answers when text is pasted from a discrete-maths course into a digital-logic tool, so the page says which is which. The table is the AND table with the output column inverted, and the page notes that this one connective is functionally complete: every other table on this page can be built from copies of it.

Try your own input in the Truth table generator. Turn an expression into a full truth table, with a column for every sub-expression.

How the answer is reached

Truth table

Truth table — columns #, A, B, A ↑ B
#ABA ↑ B
0001
1011
2101
3110

Compare with

Open this example in the Truth table generator

The field arrives filled in with this example’s input.

Note:

Notation this page assumes

  • Symbols: · is AND, + is OR, ⊕ is XOR, a prime or an overline is NOT. The field also takes ∧ ∨ ¬ ~ ! & | and the words.
  • Operator precedence, tightest first: NOT, then AND (including juxtaposition), then XOR/XNOR, then NAND/NOR, then OR, then IMPLIES, then IFF.
  • In a minterm index the first variable is the most significant bit, so over [A, B, C] minterm 5 is A·B̄·C.

Sources

  • Boole, An Investigation of the Laws of Thought (1854)
  • Shannon, “A Symbolic Analysis of Relay and Switching Circuits” (1938)