User Tools

Site Tools


en:logicaloperators

This is an old revision of the document!


Logical Operators

Logical operators work on Boolean (true/false) values. These values often come as Boolean Constants and Comparison Operators.

Logical Operators
OperatorNameExampleComments
NOTLogical NegationNOT a
ANDLogical Conjunctiona AND b
ORLogical Disjunctiona OR b
XORLogical Exclusive Disjunctiona XOR b
Not

Also known as Boolean negation.

not truefalse
not falsetrue
And

Also known as a Boolean product.

false and falsefalse
false and truefalse
true and falsefalse
true and truetrue
Or

Also known as Boolean addition.

false and falsefalse
false and truetrue
true and falsetrue
true and truetrue
Xor

The exclusive or. “You can have you cake XOR you can eat it.”

false and falsefalse
false and truetrue
true and falsetrue
true and truefalse
en/logicaloperators.1470763032.txt.gz · Last modified: 2020/02/28 10:46 (external edit)