Course contentsShow
← Computer Science
Lesson 34 of 2,8722. Discrete Mathematics for CSFree lesson

Logical Disjunction (OR)

Learn the inclusive OR operator, its truth conditions, and how it differs from everyday language usage.

Logical Disjunction (OR)

What You'll Learn

You'll understand how the logical OR operator works in discrete mathematics and why it behaves differently than the word "or" in everyday conversation.

The Inclusive OR Operator

Logical disjunction, written as ∨ (or sometimes OR), combines two propositions and evaluates to true whenever at least one of them is true. This is called the inclusive OR because it includes the case where both propositions are true.

Think of it like a restaurant menu: "Meals come with soup OR salad." In computer science logic, if the kitchen accidentally gives you both, the statement is still true—you got what was promised (and more).

Truth Conditions

The disjunction P ∨ Q is true in three cases:

  • P is true, Q is false
  • P is false, Q is true
  • P is true, Q is true ← This is the key difference!

It's only false when both P and Q are false.

Truth Table:

P     | Q     | P ∨ Q
------|-------|-------
true  | true  | true
true  | false | true
false | true  | true
false | false | false

Everyday Language vs. Logic

In casual speech, "or" often means "one or the other, but not both"—like "You can have cake or cookies" at a party. That's actually XOR (which you've already learned). But logical OR is inclusive: having both options still satisfies the condition.

Key Takeaway: Logical disjunction (OR) returns true when one or both propositions are true, making it inclusive unlike everyday language which often implies exclusivity.