04 · Precedence & Truth Tables

Operator precedence

OperatorNamePrecedence
¬Negation1 (highest)
∧Conjunction2
∨Disjunction3
→Implication4
↔Biconditional5 (lowest)

Mnemonic — " Not All Ostriches Imitate Birds"

NOT → AND → OR → IMPLIES → BICONDITIONAL

is parsed as . With p = T, q = F: , so F.

Associativity edge cases

  • → is NOT associative. . Counter-example: p = F, r = F → left = = F, right = T.
  • Convention (Rosen and most books): means (right-associative). GATE always uses brackets — don’t assume, read them.
  • ↔ is associative: . So is ⊕.
  • ¬ binds tightest: means , not .

Building a truth table

Rule: variables → rows. Add one column per sub-expression, innermost first.

Slide example: By precedence this is . Let , .

pq¬p¬qr = ¬q∧¬ps = p→rs↔¬q
TTFFFFT
TFFTFFF
FTTFFTF
FFTTTTT

GATE speed tip

You rarely need the full table. To show something is not a tautology, find one falsifying row. To show it is satisfiable, find one satisfying row. → 07 Tautology Contradiction Satisfiability


Prev ← 03 Implication Deep Dive · Next → 05 Translation and Consistency