Feedback

  • Contents
 

The OR Operator

The logical operator OR has the following truth table, where A and B are constituent expressions of the larger boolean expression A OR B:

A

B

A OR B

True

True

True

True

False

True

False

True

True

False

False

False

From the truth table, you can see that an expression using OR is true if any of its constituent expressions is true, if several of them are true, or if all of them are true. Here is another truth table:

A

B

C

A OR B OR C

True

True

True

True

True

True

False

True

True

False

True

True

False

True

True

True

True

False

False

True

False

False

True

True

False

True

False

True

False

False

False

False

No matter how many constituents a boolean expression with OR has, the expression is true if any of its constituents is true. It's only false if all of its constituents are false.