Complete Guide to Mastering Logic and Truth Tables

Complete Guide to Mastering Logic and Truth Tables

Logic assigns every statement a truth value of true or false. A truth table lists every combination of inputs and the resulting output, which makes the behavior of and, or, and not completely explicit.

Read the logic symbols

  • Conjunction (AND) denoted by (∧): If both ( p ) and ( q ) are true, then ( p ∧ q ) is true.
  • Disjunction (OR) denoted by (∨): If either ( p ) or ( q ) is true, then ( p ∨ q ) is true.
  • Negation (NOT) denoted by (¬): If ( p ) is true, then (¬ p ) is false and vice versa.
  • Conditional (IF…THEN) denoted by (→): “If ( p ) then ( q )” is false only when ( p ) is true and ( q ) is false.
  • Biconditional (IF AND ONLY IF) denoted by (↔): True if both ( p ) and ( q ) have the same truth value.

How to build a truth table

Use T for true and F for false. With n distinct statements, list 2n input rows: two rows for p alone, four for p and q, and eight for p, q, and r. For two statements, use the order TT, TF, FT, FF so you do not miss a combination.

  1. Write one column for each input statement.
  2. Add intermediate columns for the parts inside parentheses and for negations.
  3. Evaluate those parts in each row, then use them to calculate the complete expression in the last column.

Keep the grouping clear: ¬p ∧ q means (¬p) ∧ q, which differs from ¬(p ∧ q). In these examples, ∨ means inclusive OR; it is true when one or both inputs are true.

Worked examples: building a truth table

Truth Table for ( p ∨ ¬ p )
( p ) ( ¬ p ) ( p ∨ ¬ p )
T F T
F T T
Truth Table for ( p → q )
( p ) ( q ) ( p → q )
T T T
T F F
F T T
F F T

Practice questions on logic and truth tables

  1. Construct the truth table for the statement ( ¬ p ∧ q ).
  2. Evaluate the truth table for the biconditional statement ( p ↔ q ).
  3. Determine the truth value of the statement ( (p ∧ q) ∨ ¬ p ) when ( p ) is true and ( q ) is false.

Answers and reasoning

  1. Truth Table for ( ¬ p ∧ q )
    ( p ) ( q ) ( ¬ p ∧ q )
    T T F
    T F F
    F T T
    F F F
  2. Truth Table for ( p ↔ q )
    ( p ) ( q ) ( p ↔ q )
    T T T
    T F F
    F T F
    F F T
  3. The truth value of ( (p ∧ q) ∨ ¬ p ) when p is true and q is false is False: p ∧ q is False, ¬p is False, and False ∨ False is False.

Work through the three practice questions on paper before checking the answers. For another explanation of AND, OR, and NOT, see OpenStax’s lesson on constructing truth tables.

Related to This Article

What people say about "Logic and Truth Tables"?

No one replied yet.

Leave a Reply