Boolean
Boolean is the term used to denote computational truth values (as opposed to the truth values of propositions.
The two standard boolean values are true and false.
There are a number of standard operators defined over the booleans that primarily have impacts on program control flow.
Operators
Name |
Notation |
Truth Table |
and |
&& |
X |
Y |
X && Y |
false |
false |
false |
false |
true |
false |
true |
false |
false |
true |
true |
true |
|
or |
|| |
X |
Y |
X && Y |
false |
false |
false |
false |
true |
true |
true |
false |
true |
true |
true |
true |
|
not |
~ |
X |
~X |
false |
true |
true |
false |
|