Just like other programming languages, TI-Basic has the standard set of core operators built-in (math, relational, and logical), although they each have their own syntax and rules.
There are five math operators: +, -, *, /, and ^. Anybody who has ever done even basic math should know and recognize at least the first four operators, but for those who don't, their meaning is pretty straightforward:
- Adds two numbers together
- Subtracts one number from another
- Multiplies two numbers together
- Divides one number by another
- Raises a number to a power
There are two similar negative symbols on the TI-83 calculators — the subtraction symbol (the - key) and the negation symbol (the (-) key). These aren't interchangeable. However, it's almost always clear from an expression which one is being used, so the - symbol will be used to represent both throughout most of this guide.
- X=Y is true if X is equal to Y
- X≠Y is true if X is not equal to Y
- X>Y is true if X is greater than Y
- X≥Y is true if X is greater than or equal to Y
- X<Y is true if X is less than Y
- X≤Y is true if X is less than or equal to Y
Because the calculator does not have a separate time for logical values (true and false), they are represented by the numbers 1 and 0. This becomes important when dealing with piecewise expressions.
- X and Y is true if both X and Y are true
- X or Y is true if at least one of X and Y is true
- X xor Y is true if only one of X and Y is true
- not(X) is true if X is false
Again, as with the relational operators, 1 is used to for 'true', and 0 is used for 'false'. It so happens that the logical operators treat all nonzero values as though they were 1 (true), so the expression '2 and 3' will be true just as '1 and 1'.
Here is a truth table of the various values:
|A||B||A and B||A or B||A xor B||not(A)|
The TI-83 series of calculators has nine priority levels for evaluating expressions. All the functions on a priority level will be calculated from left to right before moving on to the next priority level. Of course, calculations within parentheses are done first. Here is a table of the priority levels:
|1||Functions that precede their argument (such as √( or sin(), except for negation|
|2||Functions that follow their argument (such as 2 or !)|
|3||^ and ×√|
|4||nPr and nCr|
|5||Multiplication, division, and implied multiplication|
|6||Addition and subtraction|
|7||The relational operators =, ≠, <, >, ≤, ≥|
|8||The logic operator and|
|9||The logic operators or and xor|
|10||Conversions such as ►Frac|
TI refers to the routine that determines order of operations as the Equation Operating System (EOSTM). Unfortunately, this cool name hasn't become common usage.
Test your knowledge
Here are some sample problems on logical operators, in order of complexity. For the more difficult ones, it may be best to break them up into smaller parts and work in steps.
|1||0 and 1 or 1|
|2||0 and (1 or 1)|
|3||4 and -4 xor (.6 and 0)|
|4||not(1) xor (1 and 1 xor 1)|
|5||1 and 0 xor (6*4 and 0) or not(0 and 6)|