TI-BASIC:Not
From Learn @ Cemetech
Jump to navigationJump to searchCommand Summary
Flips the truth value of its argument.
Command Syntax
not(value)
Menu Location
Press:
- 2nd TEST to access the test menu.
- RIGHT to access the LOGIC submenu.
- 4 to select not(, or use arrows and ENTER.
TI-83/84/+/SE
1 byte
The last logical operator available on the 83 series takes only one value as input. not( comes with its own parentheses to make up for this loss. Quite simply, it negates the input: False becomes True (1) and True returns False (0). not( can be nested; one use is to make any True value into a 1.
:not(0) 1 :not(-20 and 14) 0 :not(not(2)) 1
Advanced Uses
not(not(X)) will make any value X into 1 if it's not 0, and will keep it 0 if it is.
Optimization
not(X) and X=0 have the same truth value, but not( is shorter if the closing parenthesis is omitted:
:If A=0 can be :If not(A