Compound Boolean Statements
Learn to build compound statements from simple ones with AND, OR and NOT, translate between words and symbols, and find their truth value.
Advanced25 min18 problems
Definition
A simple statement is one sentence that is either true or false, such as "It is raining." A compound statement joins two or more simple statements with the logical operators AND (), OR () and NOT (). Its truth value depends only on the truth values of its parts.
We write 1 for true and 0 for false. The interactive tables in this lesson use 1 and 0 as well.
From words to symbols. Let : "It is raining" and : "It is cold".
| In words | Symbols | True when |
|---|---|---|
| It is raining and it is cold. | both parts are true | |
| It is raining or it is cold. | at least one part is true | |
| It is not raining. | is false | |
| It is raining but it is not cold. | is true and is false | |
| It is neither raining nor cold. | both parts are false |
Signal words: *and*, *but*, *both ... and* mean AND. *or* means OR, which is also true when both parts are true. *not*, *it is not true that* mean NOT.
Finding the truth value in 3 steps:
- 1.Give each simple statement its value: 1 or 0.
- 2.Work out the parts in brackets and every NOT.
- 3.Combine the results with AND or OR.
The four cases of two statements (starting with 0, like the interactive table; the lesson Truth Tables starts with T, and both orders list the same cases):
| 0 | 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 |
Three parts, eight cases. With a third statement there are cases, and brackets show which parts belong together. For :
| 0 | 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 0 |
This compound statement is true in 3 of the 8 cases: when at least one of and is true and is false. How to read a statement without brackets (the order of operations) is the topic of the lesson Boolean Expressions.
Try it now
Let : "The dog is hungry" and : "The dog is tired". Which symbols mean "The dog is hungry and tired"?
Interactive Visual
Truth Table
P ∧ Q
| P | Q | P ∧ Q |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 0 |
| 1 | 0 | 0 |
| 1 | 1 | 1 |
1= True0= False
Truth Table
Expression(P ∨ Q) ∧ ¬R
| P | Q | R | P ∨ Q | ¬R | (P ∨ Q) ∧ ¬R |
|---|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 | 0 |
| 0 | 0 | 1 | 0 | 0 | 0 |
| 0 | 1 | 0 | 1 | 1 | 1 |
| 0 | 1 | 1 | 1 | 0 | 0 |
| 1 | 0 | 0 | 1 | 1 | 1 |
| 1 | 0 | 1 | 1 | 0 | 0 |
| 1 | 1 | 0 | 1 | 1 | 1 |
| 1 | 1 | 1 | 1 | 0 | 0 |
1= True0= False
Interactive Sandbox
Expression Calculator
Try these:
History
No calculations yet
Practice Problems
18 problemsProblem 1 of 18
Easy
Let : "The dog is hungry" and : "The dog is tired". Which symbols mean "The dog is hungry and tired"?
Glossary
- Simple statement
- A single sentence that is either true or false, such as " is prime"
- Compound statement
- A statement built from simple statements with AND, OR and NOT, such as
- Truth value
- Whether a statement is true (1) or false (0)
- Conjunction (AND)
- , true only when both parts are true
- Disjunction (OR)
- , true when at least one part is true
- Negation (NOT)
- , true exactly when is false
Formula Card
AND (conjunction)
True (1) only when both $P$ and $Q$ are true
OR (disjunction)
False (0) only when both $P$ and $Q$ are false
NOT (negation)
Flips the value: $\neg 1 = 0$ and $\neg 0 = 1$
Number of cases
$n$ simple statements give $2^n$ cases: 4 for two, 8 for three