One of the most useful features of the TI-83 Plus/TI-84 Plus series of calculators is their integrated programming language, TI-BASIC. Unfortunately, not much documentation exists online on how to create programs using this feature. This tutorial provides an introduction on how to create a simple program to solve one of the most ubiquitous problems in elementary mathematics, finding the zeros of a quadratic equation.
Note: Read the TI-89/Voyage 200 version of this tutorial here.
From your calculator’s home screen, press
Press to select and you will be prompted to name your new program. If you choose the name of an existing program, it will just open that program, so choose a unique name. Names also cannot begin with a number. You can press 2nd and then ALPHA to enter alpha lock, which lets you type using only the green letters until disabled, instead of having to press ALPHA every single time you input a letter.
You will then be taken to the program editing screen. From here you can use any of your calculator’s functions to create a program. If you pressfrom this menu you are taken to the programming menu, which lists commands you can enter in. Under CTL are standard programming functions such as loops and conditional statements. Under I/O there are functions for getting user input and outputting statements to the home screen. The EXEC menu is a list of programs so that any TI-BASIC program can call another.
In order to create a program we need to prompt for user input, perform a calculation, and then display the result to the user. The good news is that syntax for calculations in TI-BASIC is identical to typing expressions into the home screen.
For the first line of your program, enter: Disp “AX²+BX+C. (No period) This displays “AX²+BX+C on the home screen. You can enter Disp by pressing ALPHA . The quote tells the program that everything after it is to be displayed as text instead of evaluated as a calculation. We don’t need to add a closing quote because there is nothing else on the line. Press to go to the next line and type Prompt A,B,C. Prompt can be entered by pressing . The prompt function asks the user to enter values for A, B, and C, which are variables on the calculator. Each letter, from A to Z, as well as theta, can be used to store a single number, and prompt does this for you for whichever letters you tell it to. Press to go to the next line., and a single quote can be entered by pressing
Now that we have the values of A, B, and C in our equation, we need to do something with them. You may recall that the quadratic formula is:
Since the calculator doesn’t have a ± key, we have to break this up into plus and minus cases. Luckily, this isn’t that much more work. On the new line, enter Disp (-B+√(B²-4AC))/(2A. As with the quotation mark above, we don’t have to add a closing parenthesis, in this case because you are not required to close expressions on the TI-83+ and TI-84+. Since programs are stored in the calculator’s memory and too many large programs can cause your calculator to crash, leaving out unnecessary characters is a good habit to get in to. Pressto go to the next line and enter Disp (-B-√(B²-4AC))/(2A for the minus case.
Now exit the program editor by pressing 2nd . You can run your program by pressing and scrolling down to your program using the arrowkeys and pressing twice when your program is selected. If your program has any errors, you can select “GOTO” and your calculator will take you to where it encounters the error.
Now you can experiment by adding more features to your program. Calcblog’s version of a simple quadratic formula program looks like this:
The a+bi line makes sure that your calculator is set to display imaginary numbers, otherwise if you input a quadratic with imaginary solutions you will get an error. You can get this command by pressing and selecting it from the list. The extra text on the bottom two Disp lines adds text labels to the solution and separates them from their corresponding equation using a comma. You can download this program here.
You can keep enhancing your quadratic formula program to include many other features, such as displaying the discriminant of the equation or formatting more nicely. Knowing how to program TI-BASIC is very useful in creating such programs, and if you’re looking for some more practice, try creating a program to calculate the area of a circle with radius R or to convert temperatures between Celsius and Fahrenheit. Happy coding!