AND and OR Connectors

Where a rule contains multiple conditions, the conditions must be separated by an 'and' or an 'or' to indicate whether one or all conditions are required to satisfy the conclusion. There is no restriction on the number of 'and's and 'or's that can be used in a rule. However, you cannot use both AND and OR together at the same level in a rule because it makes the rule logic ambiguous. If you need to use both AND and OR in a single rule, the rule must be structured differently. (For more information, see BOTH, ALL, EITHER and ANY Grouping Operators.)

AND operator

Conditions can be connected by AND where all conditions must be satisfied. That is, if the conditions in a rule are connected by AND and each of the conditions is true, then the conjunction equates to true. If one or more of the conditions in the conjunction are false, then the conjunction equates to false.

For example, in the rule below both conditions must be true to be able to draw a positive outcome for the person's eligibility. If either condition is false, then only a negative outcome can be drawn.

the person is eligible for a pension if

the person is over 65 and

the person is a citizen

Also notice that when conditions are connected by AND that a single condition being false is sufficient for the conclusion to be false, but a single condition being true is not sufficient for the conclusion to be true (you would need to know the value of the other conditions). In this way, the conjunction itself has its own truth value which is distinct from each of the conditions contained within (that is, one of the conditions may be true, but the value of the conjunction is false).

The table below shows all the possible input value combinations and their corresponding output values when using the AND connector.

Table 1. The set of possible outcomes for the conjunction and
P Q P AND Q
TRUE TRUE TRUE
TRUE FALSE FALSE
FALSE TRUE FALSE
FALSE FALSE FALSE

OR operator

Conditions can be connected by OR where satisfying any condition is sufficient to satisfy the rule. That is, if one or other of the conditions in a rule using the OR connector is true, the disjunction will equate to true. It is only if all conditions are false that the entire collection equates to false.

For example, in the rule below either the first or second condition, or both, must be true to be able to draw a positive outcome. If both the conditions are proved false, then a negative outcome is drawn.

the person is eligible for a pension if

the person is over 65 or

the person is a citizen or

the person is unable to work

Also notice that when conditions are connected by OR that a single condition being true is sufficient for the conclusion to be true, but a single condition being false is not sufficient for the conclusion to be false (you would need to know the value of the other conditions). In this way, a disjunction also has its own truth value distinct from its conditions (that is, one of the conditions may be false, but the value of the disjunction is true).

The table below shows all the possible input value combinations and their corresponding output values when using the OR connector.

Table 2. The set of possible outcomes for the disjunction or
P Q P OR Q
TRUE TRUE TRUE
TRUE FALSE TRUE
FALSE TRUE TRUE
FALSE FALSE FALSE