Operation Manual

Chapter 2: Math, Angle, and Test Operations 71
and, or, xor
and, or, and xor (exclusive or) return a value of 1 if an expression is true or 0 if an expression is false,
according to the table below. valueA and valueB can be real numbers, expressions, or lists.
valueA and valueB
valueA
or valueB
valueA xor valueB
not(
not( returns 1 if value (which can be an expression) is 0.
not(value)
Using Boolean Operations
Boolean logic is often used with relational tests. In the following program, the instructions store 4
into C.
valueA valueB and or xor
ƒ0 ƒ0 returns 110
ƒ0 0 returns 0 1 1
0 ƒ0 returns 011
0 0 returns 0 0 0