AND, OR and NOT
About this lesson: AND, OR and NOT
In short
Some decisions need two conditions at once. With AND, the result is TRUE only when both conditions are TRUE. To go on this ride you must be tall enough and old enough.

What you'll explore
- AND: Both must be TRUE
- Some decisions need two conditions at once. With AND, the result is TRUE only when both conditions are TRUE.
- OR: At least one TRUE
- With OR, the result is TRUE when at least one condition is TRUE. Children under 5 and people aged 65 or over get a free ticket. Move the age slider.
- NOT: Flip the condition
- NOT turns TRUE into FALSE and FALSE into TRUE. This program only says “Play outside” when it is not raining. Make it rain and watch NOT flip.
- Combining: Brackets first
- Conditions can be combined. A person may enter if they have a ticket or are a member, and are not banned.
- Check yourself: Free entry?
- A museum gives free entry to students OR people under 12. Sam is 15 and a student.
Also in this lesson
- Common mix-ups
- All the answers
- George Boole
- Rule maker
Words to know
- Boolean
- A value that is either TRUE or FALSE.
- AND
- TRUE only when both conditions are TRUE.
- OR
- TRUE when at least one condition is TRUE.
- NOT
- Flips TRUE to FALSE and FALSE to TRUE.
- truth table
- A table listing every input combination and its result.
Sources
- BBC Bitesize KS3 Computing: Boolean logic
- G. Boole, An Investigation of the Laws of Thought (1854)