Boolean Logical Operators Truth Table
Boolean logical operators is just a fancy name for the language used to combine multiple condition formulas into a single condition formula or, in the case of the NOT()
function, reverse the results of a condition formula.
AND
, OR
and NOT()
have similar meanings as in conversational English. Both a AND b
need to be true for the result to be true. Either a OR b
can be true for its result to be true. NOT(b)
is only true if b is false.
The rest of the Boolean Logical Operators can all be created by combining those three operators. For example, a NOR b
is the same as NOT(a OR b)
, but it is shorter to write using NOR
.
The following true table explains the results when different combinations of true and false formulas are used as the inputs of the various logical operators.
Inputs | True | Mixed | False | |
---|---|---|---|---|
a AND b |
And | True | False | False |
a OR b |
Inclusive Or | True | True | False |
NOT(b) |
Not | False | True | |
a NAND b |
Not And | False | True | True |
a NOR b |
Not Inclusive Or | False | False | True |
a XNOR b |
Not Exclusive Or | True | False | True |
a XOR b |
Exclusive Or | False | True | False |
Where a
and b
are both Boolean formulas (returning true or false).
The order of a
and b
do not matter.
The NOT()
function just takes one Boolean formula and reverses its result. This is why it does not have a result listed for Mixed.