Operation Manual

2-16 Math, Angle, and Test Operations
8202MATH.DOC TI-82, Chapter 2, English Bob Fedorisko Revised: 02/09/01 12:20 PM Printed:
02/09/01 12:36 PM Page 16 of 16
TEST LOGIC (Boolean) Operations
To display the TEST LOGIC menu, press
y
:
~
. When you select from the
menu, the name is copied to the cursor location.
TEST LOGIC Menu
TEST LOGIC
True if:
1: and
Both values are nonzero (true)
2: or
At least one value is nonzero (true)
3: xor
Only one value is zero (false)
4: not
The value is zero (true)
Boolean Operators
Boolean operators are often used in programs to control program flow and
in graphing to control the graph of a function over specific values. Values
are interpreted as zero (false) or nonzero (true).
and, or, xor
and
,
or
, and
xor
(exclusive or) return a value of
1
if a expression is true or
0
if the expression is false, according to the table below.
valueA
and
valueB
can be expressions.
valueA
and
valueB
valueA
or
valueB
valueA
xor
valueB
valueA
valueB
and or xor
ƒ
0
ƒ
0 returns 1 1 0
ƒ
0 0 returns 0 1 1
0
ƒ
0 returns 0 1 1
0 0 returns 0 0 0
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 a program, the following
instructions store
4
into
C
: