02 · Logical Connectives
The six operators: negation, conjunction, disjunction, exclusive OR, implication, biconditional.
1. Negation ¬p — “It is not the case that p”
| p | ¬p |
|---|---|
| T | F |
| F | T |
“Adam and Eve lived together” → ¬: “Adam and Eve haven’t lived together.”
2. Conjunction p ∧ q — “p and q”
True only when both are true.
| p | q | p ∧ q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | F |
"but" = ∧
“12 is divisible by 3 but 3 is prime” is still . “but”, “although”, “yet”, “however” all translate to ∧.
3. Disjunction p ∨ q — “p or q” (inclusive)
False only when both are false.
| p | q | p ∨ q |
|---|---|---|
| T | T | T |
| T | F | T |
| F | T | T |
| F | F | F |
4. Exclusive OR p ⊕ q — “p or q but not both”
True when exactly one is true (truth values differ).
| p | q | p ⊕ q |
|---|---|---|
| T | T | F |
| T | F | T |
| F | T | T |
| F | F | F |
Inclusive vs exclusive
- “Experience with C++ or Java is mandatory” → inclusive (both is fine).
- “You get $2500 cashback or accessories worth $2500” → exclusive (not both).
5. Implication p → q — “if p then q”
False only when T → F. p = hypothesis/premise, q = conclusion/consequence.
| p | q | p → q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | T |
| F | F | T |
Golden point — vacuous truth
If is false, is TRUE no matter what is. Think of it as a promise: “If you score 100%, you get a trophy.” The promise is broken only if you score 100% and get no trophy. If you didn’t score 100%, the promise wasn’t broken → TRUE.
Full deep dive → 03 Implication Deep Dive
6. Biconditional p ↔ q — “p if and only if q”
True when truth values are the same.
| p | q | p ↔ q |
|---|---|---|
| T | T | T |
| T | F | F |
| F | T | F |
| F | F | T |
- “p only if q” = , “p if q” = → together = .
- Also said as: “p is necessary and sufficient for q”, “if p then q, and conversely”, “p iff q”.
- — XNOR.
📊 All six at a glance
| p | q | ¬p | p∧q | p∨q | p⊕q | p→q | p↔q |
|---|---|---|---|---|---|---|---|
| T | T | F | T | T | F | T | T |
| T | F | F | F | T | T | F | F |
| F | T | T | F | T | T | T | F |
| F | F | T | F | F | F | T | T |
One-line rules
∧ → true only if all true · ∨ → false only if all false · ⊕ → true if different · ↔ → true if same · → → false only for T→F
🏠 Slide homework — inclusive or exclusive?
Inclusive or exclusive OR?
- Coffee or tea comes with dinner.
👁 Show answer
Exclusive (you get one)
- You can pay using US dollars or euros.
👁 Show answer
Inclusive (paying partly in each is fine)
- Dinner for two includes two items from column A or three from column B.
👁 Show answer
Exclusive
- A password must have at least three digits or be at least eight characters long.
👁 Show answer
Inclusive
- To take discrete maths you must have taken calculus or a CS course.
👁 Show answer
Inclusive
🏠 Slide homework — truth of conditionals
Is each conditional true or false?
- If , then dogs can fly.
👁 Show answer
F→F = T
- If , then dogs can fly.
👁 Show answer
T→F = F
- If monkeys can fly, then .
👁 Show answer
F→F = T
- If , then .
👁 Show answer
T→F = F
- If Delhi is the capital of India then Beijing is the capital of China.
👁 Show answer
T→T = T
Prev ← 01 Propositions · Next → 03 Implication Deep Dive