Lesson 2.2: Logic

Key Concepts: Logic ⭐

Statements and Truth Values

A statement (or proposition) is a sentence that is either true (T) or false (F), but not both.

Negation

The negation of a statement p (written ~p or ¬p) has the opposite truth value. If p is true, then ~p is false, and vice versa.

Compound Statements

  • Conjunction (p ∧ q): "p AND q" — true only when BOTH p and q are true.
  • Disjunction (p ∨ q): "p OR q" — true when AT LEAST ONE of p or q is true.

Truth Tables

A truth table shows all possible combinations of truth values for a compound statement. For two statements p and q, there are 4 possible combinations (TT, TF, FT, FF).