Turing Reference - Logical Operators


Logical operators, also known as boolean operators, allow multiple conditional statements to be combined into a more complex statement.  There are three (3) logical operators, but two of them are much more important, so we will focus on them first.

 

Operator  Explanation Syntax 
and 
  • if ALL conditions are TRUE, then it is TRUE
  • if ANY conditions are FALSE, then it is FALSE 
condition1 and condition2
or 
  • if ANY conditions are TRUE, then it is TRUE
  • if ALL conditions are FALSE, then it is FALSE 
condition1 or condition2