Skip to content

Logic: AND, OR, NOT

A room that stays comfortable

  • A thermostat keeps a room between 18 and 24 degrees. One test cannot say both ends.
  • AND is TRUE only when both tests are TRUE.
  • Write the variable on each side: Temp >= 18 AND Temp <= 24.

On a temperature line the comfortable band runs from 18 to 24 inclusive; 21 gives TRUE AND TRUE, 15 gives FALSE AND TRUE

Handout

Log in or create account

IGCSE, A-Level & AP