See BooleanLogic.