The OR Operation

Learn how the OR logical operation works and when the result is true.

Intermediate20 minLesson

Definition

The OR operation (also called logical disjunction) combines two statements and returns true if at least one of the statements is true.
We write OR using these symbols:
  • (mathematical notation)
  • OR (written out)
  • || (programming)
Truth Table for OR:
TTT
TFT
FTT
FFF
The key insight: OR is only false when both inputs are false. If even one input is true, the result is true!

Try it now

What is the result of T OR F?

Worked Examples

You'll go swimming if: it's Saturday OR it's above 25°C. Today is Monday and it's 28°C. Will you go swimming?

1

Identify statement P

P = "It's Saturday" → Today is Monday, so P is FalseP = F

2

Identify statement Q

Q = "It's above 25°C" → 28°C > 25°C, so Q is TrueQ = T

3

Apply OR operation

= F OR T = True (one condition is met!)P OR Q = T

4

Interpret the result

Since OR returns True, the overall condition is satisfiedYes, go swimming!

Common Mistakes

Thinking OR means exactly one must be true

Why it's wrong: This confuses OR with XOR (exclusive or). In standard OR, if both are true, the result is still true.

Correct: OR returns true if at least one input is true - this includes when both are true! T OR T = T.

Confusing OR with AND

Why it's wrong: AND requires ALL inputs to be true. OR only requires ONE input to be true.

Correct: Remember: AND is strict (all must be true), OR is lenient (any one is enough).

Forgetting that F OR F = F

Why it's wrong: Some students think OR always gives true, but it needs at least one true input.

Correct: The ONLY way OR returns false is when ALL inputs are false.

Interactive Visual

Truth Table

P ∨ Q
PQP ∨ Q
FFF
FTT
TFT
TTT

T= TrueF= False

Interactive Sandbox

Expression Calculator

Try these:

History

No calculations yet

Practice Problems

16 problems
Problem 1 of 16
Easy

What is the result of T OR F?

Why It Matters

The OR operation is essential in everyday decision-making and technology:
  • Decision Making: "I'll go to the park if it's sunny OR if it's warm" - you go if either condition is met
  • Safety Systems: Alarm triggers if there's smoke OR if someone presses the emergency button
  • Search Engines: Finding documents containing "cats OR dogs" gives results with either word
  • Electronics: OR gates control circuits in computers, phones, and appliances
  • Programming: Every app uses OR logic for checking multiple conditions
Understanding OR helps you think logically about choices and build smart systems!

Real World Applications

Search Engines

When you search "cats OR dogs", the search engine finds pages containing either word (or both).

Example:

Searching "pizza OR pasta" on a restaurant website shows all items with pizza, pasta, or both.

1Try It Yourself

You search a library database for books about "robots OR automation". A book is titled "Robots in Manufacturing".

Will this book appear in your search results?

Step 1: Write the mathematical expression

Let R = "contains robots", A = "contains automation":

Smart Home Systems

Automated homes use OR logic to trigger actions when any of several conditions are met.

Example:

Lights turn on automatically if: motion is detected OR it's after sunset OR you press a button.

2Try It Yourself

Your smart thermostat turns on heating if: temperature < 18°C OR you press "Heat" OR it's scheduled. It's 20°C, you haven't pressed anything, but heating is scheduled for now.

Will the heating turn on?

Step 1: Write the mathematical expression

Let T = "temp < 18°C", B = "button pressed", S = "scheduled":

Key Takeaways

  • 1The OR operation returns true if at least one input is true
  • 2OR only returns false when all inputs are false
  • 3Truth table: T OR T = T, T OR F = T, F OR T = T, F OR F = F
  • 4Symbol: in math, OR in words, || in programming
  • 5Real-world examples: search engines, safety systems, smart devices

Frequently Asked Questions

OR (inclusive or) is true when at least one input is true, including when both are true. XOR (exclusive or) is true when exactly one input is true, not both. So T OR T = T, but T XOR T = F.
OR (inclusive or) is true when at least one input is true, including when both are true. XOR (exclusive or) is true when exactly one input is true, not both. So T OR T = T, but T XOR T = F.
OR asks: "Is at least one statement true?" When both are true, the answer is definitely yes! Think of it this way: "I'll be happy if I get ice cream OR cake." Getting both doesn't make you unhappy!
As many as you want! A OR B OR C OR D... is true if ANY of the inputs is true. It's only false if ALL inputs are false.

Glossary

OR operation
A logical operation that returns true if at least one input is true
Disjunction
The mathematical name for the OR operation
Truth table
A table showing all possible input combinations and their outputs
Inclusive OR
Standard OR that's true when one or both inputs are true
XOR (Exclusive OR)
A variant that's true only when exactly one input is true

More in This Topic