Title: Truth Tables: "and" Operator
Course: CPS 120: Introduction to Computer Science ~ Master (Aug/2015) OLD > Section: Learning Units

A truth table shows the result when two simple conditions are connected with a logical operator.

"and" Operator

- The simple conditions on each side of the “and” must be True for the compound condition to be True.
- Otherwise the compound condition is False.

“and” operator truth table
Left-side simple condition | Right-side simple condition | Result
True | True | True
True | False | False
False | True | False
False | False | False

Compound condition examples using “and”:

(4 > 1) and (9 < 10)
(24.6 < 1.) and (101.4 > 70.)
(number > 1) and (number < 10)
("X" < "Y") and ("X" == "x")