next up previous contents index
suivant: Transform a boolean expression monter: Booleans précédent: Tests : ==, !=,   Table des matières   Index


Boolean operators : or xor and not

or (or ||), xor, and (or &&) are infixed operators.
not is a prefixed operators.
If a and b are two booleans :
(a or b) (a || b) returns 0 (or false) if a and b are equal to 0 and returns 1 (or true) otherwise.
(a xor b) returns 1 if a is equal to 1 and b is equal to 0 or if a is equal to 0 and b is equal to 1 and returns 0 if a and b are equal to 0 or if a and b are equal to 1 (it is the "exclusive or").
(a and b) or (a && b) returns 1 (or true) if a and b are equal to 1 and 0 (or false) otherwise.
not(a) returns 1 (or true) if a is equal to 0 (or false), and 0 (or false) if a is equal to 1 (or true).
Input :
1>=0 or 1<0
Output :
1
Input :
1>=0 xor 1>0
Output :
0
Input :
1>=0 and 1>0
Output :
1
Input :
not(0==0)
Output :
0


next up previous contents index
suivant: Transform a boolean expression monter: Booleans précédent: Tests : ==, !=,   Table des matières   Index
giac documentation written by Renée De Graeve and Bernard Parisse