So, quick summary. Im making a yahtzee program for my ti-84. Ive been programming on this thing for a while so i know my stuff.

Flags would be if you had several variables with only 2 values, but didnt want to make a bunch of different variables for each value, you could enclose them like this

If a is 1, add 1 to x. Else add 0

If b is 1, add 2 to x. Else add 0

If c is 1, add 4 to x. Else add 0

This way given any number you could determine the values of a, b, and c. If it was 5, a would be 1, b would be 0, and c would be 1. My brain isnt working right now, does anyone know a way to make this happen?