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.

AND, OR and NOT

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)

An interactive lesson with a live experiment: move the sliders, press the buttons and answer quick questions. 5 short steps and a 6-question quiz. Part of the Family plan. Written and checked by Shalo Lab. Last updated 11 November 2026.

← Linear search · Devices that talk →

All lessons in Term 1 · Computing · Age 12