Truth Table Generator

Easily calculate the truth table for any compound logical proposition. Simply write the expression using your preferred logical connectives (¬, ∧, ∨, →, ↔, etc.) and the tool will generate the table.

Instructions for use

You can use either your keyboard or the virtual keyboard to type the logical expression. Once you have it, press "Generate table" or the "enter" key. You can choose between the letter format (T/F) or the binary format (1/0).

Quick examples

Click on any proposition to generate its truth table:

  • (p → q) ∧ (q → p)
  • ¬p ∧ q → ¬r
  • p ∧ q → r
  • (p ∧ q) ∨ r
  • (p ∧ q) → p
  • ¬p ∧ q → ¬r
  • ¬[(p ∧ q) ∧ ¬(p ∨ q)]
  • (¬p ∨ ¬q) → ¬r
  • ¬(p ∨ q) ↔ (¬p ∧ ¬q)
  • (p → q) ∧ (q → r) → (p → r)
  • {[(p ⊕ q) ∧ (s ↔ r)] ∧ (q → s)} ⊕ ¬(q ∧ s)

Propositional variables

The following options are valid:

  • Lowercase letters: a, b, c, d, p, q, r… (except 'v', 'f').
  • Capital letters: A, B, C… P, Q, R… (except 'F', 'T').

Logical operators

Logical connectives have a standard symbol and other accepted symbols, you can see them in the following table.

OperatorStandard symbolAllowed shortcuts
Negation¬~, !, not
Conjunction&, &&, ^, and, AND
Disjunctionv, or, OR
Exclusive Disjunctionxor, ⊻
Implication->, =>, ⇒, imp, IMP
Biconditional<->, <=>, ==, iff, IFF, ⇔

Grouping symbols

You can use parentheses ( ), square brackets [ ], and curly braces { } to group clauses. If you do not use any, the following hierarchy is handled internally:

  1. Negation (¬).
  2. Conjunction (∧).
  3. Inclusive disjunction (∨) and exclusive disjunction (⊕).
  4. Conditional (→).
  5. Biconditional (↔).

For example, the proposition ¬p ∧ q ∨ r → s ↔ p is interpreted as {[(¬p ∧ q) ∨ r ] → s } ↔ p or, using only parentheses: (((¬p ∧ q) ∨ r ) → s ) ↔ p.

Constants

  • Tautology (True): T, ⊤, 1
  • Contradiction (False): F, ⊥, 0

Daniel Machado

Mathematics teacher and administrator of Flamath, where he shares content about Mathematical Logic

Leave a Reply

Your email address will not be published. Required fields are marked *