Binary, Hexadecimal and Octal number system

Binary, hexadecimal, and octal refer to different number systems. The one that we typically use is called decimal. These number systems refer to the number of symbols used to represent numbers. In the decimal system, we use ten different symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. With these ten symbols, we can represent any quantity. For example, if we see a 2, then we know that there is two of something. For example, this sentence has 2 periods on the end..

When we run out of symbols, we go to the next digit placement. To represent one higher than 9, we use 10 meaning one unit of ten and zero units of one. This may seem elementary, but it is crucial to understand our default number system if you want to understand other number systems.

For example, when we consider a binary system which only uses two symbols, 0 and 1, when we run out of symbols, we need to go to the next digit placement. So, we would count in binary 0, 1, 10, 11, 100, 101, and so on.

This article will discuss the binary, hexadecimal, and octal number systems in more detail and explain their uses.

# How a Number System Works

Number systems are used to describe the quantity of something or represent certain information. Because of this, I can say that the word "calculator" contains ten letters. Our number system, the decimal system, uses ten symbols. Therefore, decimal is said to be **Base Ten**. By describing systems with bases, we can gain an understanding of how that particular system works.

When we count in Base Ten, we count starting with zero and going up to nine in order.

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, …

Once we reach the last symbol, we create a new placement in front of the first and count that up.

8, 9, **1**0, 11, 12, … , 19, **2**0, …

This continues when we run out of symbols for that placement. So, after 99, we go to 100.

The placement of a symbol indicates how much it is worth. Each additional placement is an additional power of 10. Consider the number of 2853. We know this number is quite large, for example, if it pertains to the number of apples in a basket. That's a lot of apples. How do we know it is large? We look at the number of digits.

Each additional placement is an additional power of 10, as stated above. Consider this chart.10^{3} |
10^{2} |
10^{1} |
10^{0} |
---|---|---|---|

digit | digit | digit | digit |

*1000 | *100 | *10 | *1 |

Each additional digit represents a higher and higher quantity. This is applicable for Base 10 as well as to other bases. Knowing this will help you understand the other bases better.

## Binary

Binary is another way of saying Base Two. So, in a binary number system, there are only two symbols used to represent numbers: 0 and 1. When we count up from zero in binary, we run out of symbols much more frequently.

0, 1, …

From here, there are no more symbols. We do not go to 2 because in binary, a 2 doesn't exist. Instead, we use 10. In a binary system, 10 is equal to 2 in decimal.

We can count further.

Binary | 0 | 1 | 10 | 11 | 100 | 101 | 110 | 111 | 1000 | 1001 | 1010 |
---|---|---|---|---|---|---|---|---|---|---|---|

Decimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |

2^{6} |
2^{5} |
2^{4} |
2^{3} |
2^{2} |
2^{1} |
2^{0} |
---|---|---|---|---|---|---|

1 | 0 | 0 | 1 | 1 | 0 | 1 |

64+0+0+8+4+0+1 | ||||||

77 |

Since this is base two, however, the numbers don't get quite as large as it does in decimal. Even still, a binary number with 10 digits would be larger than 1000 in decimal.

The binary system is useful in computer science and electrical engineering. Transistors operate from the binary system, and transistors are found in practically all electronic devices. A 0 means no current, and a 1 means to allow current. With various transistors turning on and off, signals and electricity is sent to do various things such as making a call or putting these letters on the screen.

Computers and electronics work with bytes or eight digit binary numbers. Each byte has encoded information that a computer is able to understand. Many bytes are stringed together to form digital data that can be stored for use later.

## Octal

Octal is another number system with less symbols to use than our conventional number system. Octal is fancy for Base Eight meaning eight symbols are used to represent all the quantities. They are 0, 1, 2, 3, 4, 5, 6, and 7. When we count up one from the 7, we need a new placement to represent what we call 8 since an 8 doesn't exist in Octal. So, after 7 is 10.

Octal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 10 | 11 | 12… | 17 | 20… | 30… | 77 | 100 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

Decimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10… | 15 | 16… | 24… | 63 | 64 |

Just like how we used powers of ten in decimal and powers of two in binary, to determine the value of a number we will use powers of 8 since this is Base Eight. Consider the number 3623 in base eight.

8^{3} |
8^{2} |
8^{1} |
8^{0} |
---|---|---|---|

3 | 6 | 2 | 3 |

1536+384+16+3 | |||

1939 |

Each additional placement to the left has more value than it did in binary. The third digit from the right in binary only represented 2^{3-1}, which is 4. In octal, that is 8^{3-1} which is 64.

## Hexadecimal

The hexadecimal system is Base Sixteen. As its base implies, this number system uses sixteen symbols to represent numbers. Unlike binary and octal, hexadecimal has six additional symbols that it uses beyond the conventional ones found in decimal. But what comes after 9? 10 is not a single digit but two… Fortunately, the convention is that once additional symbols are needed beyond the normal ten, letters are to be used. So, in hexadecimal, the total list of symbols to use is 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, and F. In a digital display, the numbers B and D are lowercase.

When counting in hexadecimal, you count 0, 1, 2, and so on. However, when you reach 9, you go directly to A. Then, you count B, C, D, E, and F. But what is next? We are out of symbols! When we run out of symbols, we create a new digit placement and move on. So after F is 10. You count further until you reach 19. After 19, the next number is 1A. This goes on forever.

Hexadecimal | 9 | A | B | C | D | E | F | 10 | 11… | 19 | 1A | 1B | 1C… | 9F | A0 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|

Decimal | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 25 | 26 | 27 | 28 | 159 | 160 |

Digits are explained as powers of 16. Consider the hexadecimal number 2DB7.

16^{3} |
16^{2} |
16^{1} |
16^{0} |
---|---|---|---|

2 | D | B | 7 |

8192+3328+176+7 | |||

11703 |

As you can see, placements in hexadecimal are worth a whole lot more than in any of the other three number systems.

# Conversion

It is important to know that 364 in octal is **not** equal to the normal 364. This is just like how a 10 in binary is certainly not 10 in decimal. 10 in binary (this will be written as 10_{2} from now on) is equal to 2. 10_{8} is equal to 8. How on earth do we know this? What is 20C.38F_{16}, and how do we find out?

Here is why it is important to understand how the number systems work. By using our powers of the base number, it becomes possible to turn any number to decimal and from decimal to any number.

## Base to Decimal

So, we know that 364_{8} is not equal to the decimal 364. Then what is it? There is a simple method in converting from any base to the decimal base ten. If you remember how we dissected the numbers above, we used powers, such as 2^{4}, and ended up with a number we understand. This is exactly what we do to convert from a base to decimal. We find out the true value of each digit according to their placement and add them together.

In a formula, this algorithm looks like:

(1)Where V_{10} is the decimal value, v is the digit in a placement, p is the placement from the right of the number assuming the rightmost placement is 0, and B is the starting base. Do not be daunted by the formula! We are going to go through this one step at a time.

So, let us say we had the simple hexadecimal number 2B. We want to know what this number is in decimal so that we can understand it better. How do we do this?

Let us use the formula above. Define every variable first. We want to find V_{10}, so that is unknown. The number 2B_{16} has two positions since it has two digits. p therefore is one less than that^{1}, so p is 1. The number is in base 16, so B is 16. Finally, we want to know what v is, but there are multiple v's. You have v_{1} and v_{0}. This refers to the value of the digit in the subscripted position. v_{1} refers to the digit in position one (the second digit from the right). So, v_{1} is 2. v_{0} is the first digit which is B. In the case of the conversion, you must convert all the letters to what they are in decimal. B is 11 in decimal, so v_{0} is 11.

Now, plug all this into the formula:

(2)Therefore, 2B_{16} is equal to 43.

Now, let me explain how this works. Remember how digit placement affects the actual value? For example, in the decimal number 123, the "1" represents 100 which is 1*10^{2}. The "2" is 20, or 2*10^{1}. Likewise, in the number 2B_{16}, the "2" is 2*16^{1}, and the B is 11*16^{0}.

We can determine the value of numbers in this way. For the number 364_{8}, we will make a chart that exposes the decimal value of each individual digit. Then, we can add them up so that we have the whole. The number has three digits, so starting from the right, we have position 0, position 1, and position 2. Since this is base eight, we will use powers of 8.

8^{2} |
8^{1} |
8^{0} |
---|---|---|

3 | 6 | 4 |

Now, 8^{2} is 64. 8^{1} is 8. 8^{0} is 1. Now what?

Remember what we did with the decimal number 123? We took the value of the digit *times* the respective power. So, considering this further…

3*64 | 6*8 | 4*1 |

192 | 48 | 4 |

Now, we add the values together to get 244. Therefore, 364_{8} is equal to 244_{10}.

In the same way that for 123, we say there is one group of 100, two groups of 10, and three groups of 1, for octal and the number 364, there are three groups of 64, six groups of 8, and four groups of 1.

## Decimal to Base

Just like how we can convert from any base to decimal, it is possible to convert decimal to any base. Let us say that we want to represent the number 236_{10} in binary, octal, and hexadecimal. What we need to do is pretty much reverse whatever we did above. There isn't really a good formula for this, but there is an algorithm that you can follow which will help accomplish what we want.

This algorithm may look confusing at first, but let us go through an example to see how it can be used. We want to represent 236 in binary, octal, and hexadecimal. So, let's try getting it to binary first.

The first step is to make p equal to $\operatorname{int}(\sqrt[B]{V})$. B is the base we want to convert to which is 2. The V is the number we want to convert, 236. Essentially, we are taking the square root of 236 and disregarding the decimal part. Doing this makes p become 7.

Step two says to let v equal our number V divided by B^{p}. B^{p} is 2^{7}, or 128, and the integer part of 236 divided by 128 is 1. Therefore, our first digit on the left is 1. Now, we actually change V to become V minus the digit times the B^{p}. So, V will now be 236-128, or 108.

We simply repeat the process until the p becomes a zero. When p becomes zero, we complete the steps a last time and then end.

So, since V is now 108, p becomes 6. 108 divided by 2^{6} is 1. The 1 goes to the right of the 1, so now we have 11. V becomes 44 since 108-64 is 44.

# How?

Now you might be asking yourself how to *read* these numbers. Well, that’s not so difficult. First, I’ll give a general mathematical explanation which can be fit into one formula:

In human language: the value of the cipher in the number is equal to the value of the cipher on its own multiplied by the base of the number system to the power of the position of the cipher from left to right in the number, starting at 0. Read that a few times and try to understand it.

Thus, the value of a digit in binary **doubles** every time we move to the left. (see table below)

From this follows that every hexadecimal cipher can be split up into 4 binary digits. In computer language: a nibble. Now take a look at the following table:

Binary Numbers | ||||||
---|---|---|---|---|---|---|

8 | 4 | 2 | 1 | Hexadecimal Value | Decimal Value | |

0 | 0 | 0 | 0 | 0 | 0 | |

0 | 0 | 0 | 1 | 1 | 1 | |

0 | 0 | 1 | 0 | 2 | 2 | |

0 | 0 | 1 | 1 | 3 | 3 | |

0 | 1 | 0 | 0 | 4 | 4 | |

0 | 1 | 0 | 1 | 5 | 5 | |

0 | 1 | 1 | 0 | 6 | 6 | |

0 | 1 | 1 | 1 | 7 | 7 | |

1 | 0 | 0 | 0 | 8 | 8 | |

1 | 0 | 0 | 1 | 9 | 9 | |

1 | 0 | 1 | 0 | A | 10 | |

1 | 0 | 1 | 1 | B | 11 | |

1 | 1 | 0 | 0 | C | 12 | |

1 | 1 | 0 | 1 | D | 13 | |

1 | 1 | 1 | 0 | E | 14 | |

1 | 1 | 1 | 1 | F | 15 |

Another interesting point: look at the value in the column top. Then look at the values. You see what I mean? Yeah, you’re right! The bits switch on and off following their value. The value of the first digit (starting from the right), goes like this: 0,1,0,1,0,1,0,1,0,1,… Second digit: 0,0,1,1,0,0,1,1,0,0,1,1,0,0… Third digit (value=4): 0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,… And so on…

Now, what about greater numbers? Therefore we’ll need an extra digit. (but I think you figured that out by yourself). For the values starting from 16, our table looks like this:

Binary Numbers | |||||||
---|---|---|---|---|---|---|---|

16 | 8 | 4 | 2 | 1 | Hexadecimal Value | Decimal Value | |

1 | 0 | 0 | 0 | 0 | 10 | 16 | |

1 | 0 | 0 | 0 | 1 | 11 | 17 | |

1 | 0 | 0 | 1 | 0 | 12 | 18 | |

1 | 0 | 0 | 1 | 1 | 13 | 19 | |

1 | 0 | 1 | 0 | 0 | 14 | 20 | |

1 | 0 | 1 | 0 | 1 | 15 | 21 | |

1 | 0 | 1 | 1 | 0 | 16 | 22 | |

1 | 0 | 1 | 1 | 1 | 17 | 23 | |

1 | 1 | 0 | 0 | 0 | 18 | 24 | |

1 | 1 | 0 | 0 | 1 | 19 | 25 | |

1 | 1 | 0 | 1 | 0 | 1A | 26 | |

1 | 1 | 0 | 1 | 1 | 1B | 27 | |

1 | 1 | 1 | 0 | 0 | 1C | 28 | |

1 | 1 | 1 | 0 | 1 | 1D | 29 | |

1 | 1 | 1 | 1 | 0 | 1E | 30 | |

1 | 1 | 1 | 1 | 1 | 1F | 31 |

Binary Numbers | |||||
---|---|---|---|---|---|

4 | 2 | 1 | Octal Value | Decimal Value | |

0 | 0 | 0 | 0 | 0 | |

0 | 0 | 1 | 1 | 1 | |

0 | 1 | 0 | 2 | 2 | |

0 | 1 | 1 | 3 | 3 | |

1 | 0 | 0 | 4 | 4 | |

1 | 0 | 1 | 5 | 5 | |

1 | 1 | 0 | 6 | 6 | |

1 | 1 | 1 | 7 | 7 |

# Conversion.

In the latter topic I explained the logic behind the binary, hexadecimal and octal number systems. Now I’ll explain something more practical. If you fully understood the previous thing you can skip this topic.

## From decimal to binary

- Step 1: Check if your number is odd or even.
- Step 2: If it's even, write 0 (proceeding backwards, adding binary digits to the left of the result).
- Step 3: Otherwise, if it's odd, write 1 (in the same way).
- Step 4: Divide your number by 2 (dropping any fraction) and go back to step 1. Repeat until your original number is 0.

An example:

Convert 68 to binary:

- 68 is even, so we write 0.
- Dividing 68 by 2, we get 34.
- 34 is also even, so we write 0 (result so far - 00)
- Dividing 34 by 2, we get 17.
- 17 is odd, so we write 1 (result so far - 100 - remember to add it on the left)
- Dividing 17 by 2, we get 8.5, or just 8.
- 8 is even, so we write 0 (result so far - 0100)
- Dividing 8 by 2, we get 4.
- 4 is even, so we write 0 (result so far - 00100)
- Dividing 4 by 2, we get 2.
- 2 is even, so we write 0 (result so far - 000100)
- Dividing 2 by 2, we get 1.
- 1 is odd, so we write 1 (result so far - 1000100)
- Dividing by 2, we get 0.5 or just 0, so we're done.
- Final result: 1000100

## From binary to decimal

- Write the values in a table as shown before. (or do so mentally)
- Add the value in the column header to your number, if the digit is turned on (1).
- Skip it if the value in the column header is turned off (0).
- Move on to the next digit until you’ve done them all.

An example:

Convert 101100 to decimal:

- Highest digit value: 32. Current number: 32
- Skip the "16" digit, its value is 0. Current number: 32
- Add 8. Current number: 40
- Add 4. Current number: 44
- Skip the "2" and "1" digits, because their value is 0.
- Final answer: 44

## From decimal to hexadecimal.

THIS IS ONLY ONE OF THE MANY WAYS!

- Convert your decimal number to binary
- Split up in nibbles of 4, starting at the end
- Look at the first table on this page and write the right number in place of the nibble

(you can add zeroes at the beginning if the number of bits is not divisible by 4, because, just as in decimal, these don’t matter)

An example:

Convert 39 to hexadecimal:

- First, we convert to binary (see above). Result: 100111
- Next, we split it up into nibbles: 0010/0111 (Note: I added two zeroes to clarify the fact that these are nibbles)
- After that, we convert the nibbles separately.
- Final result: 27

## From hexadecimal to decimal

*Check the formula in the first paragraph and use it on the ciphers in your hexadecimal number. (this actually works for any conversion to decimal notation)

An example:

Convert 1AB to decimal:

- Value of B = 16
^{0}×11. This gives 11, obviously - Value of A = 16
^{1}×10. This gives 160. Our current result is 171. - Value of 1 = 16
^{2}×1. This gives 256. - Final result: 427

## From decimal to octal

- Convert to binary.
- Split up in parts of 3 digits, starting on the right.
- Convert each part to an octal value from 0 to 7

Example: Convert 25 to octal

- First, we convert to binary. Result: 11001
- Next, we split up: 011/001
- Conversion to octal: 31

## From octal to decimal

Again, apply the formula from above

Example: convert 42 to decimal

- Value of 2=8
^{0}×2=2 - Value of 4=8
^{1}×4=32 - Result: 34

# Fun Facts

OK, these may not be 100% "fun", but nonetheless are interesting.

- Do you tend to see numbers beginning with 0x? This is common notation to specify hexadecimal numbers, so you may see something like:

```
0x000000
0x000002
0x000004
```

This notation is most commonly used to list computer addresses, which are a whole different story.

- This is pretty obvious, but you can "spell" words using hexadecimal numbers. For example:
- CAB = 3243 in decimal notation.

# End

Did you understand everything? If you think so, test yourself:

Bin | Dec | Hex |
---|---|---|

… | … | 3A |

… | 76 | … |

101110 | … | … |

… | 88 | … |

1011110 | … | … |

… | … | 47 |

Make some exercises yourself, if you want some more.

For the most up-to-date version of this page, see http://tibasicdev.wikidot.com/binandhex

Error Conditions

In the Error Conditions section on a command page, descriptions will be given of the errors that can result when using a command. These do not include errors that can occur with virtually any command, such as **ERR:ARGUMENT** or **ERR:SYNTAX**. However, if one of these errors is triggered in an unusual way, it will be listed.

Be aware that certain errors don't occur when graphing or using one of the commands DrawF, DrawInv, Tangent(, or Shade(. Instead, the graph point is skipped and treated as an undefined value. Tangent( is a minor exception, actually: if there's an error at the tangent point, it will be treated normally. The errors that are ignored in graphs are:

**ERR:DATA TYPE****ERR:DIVIDE BY 0****ERR:DOMAIN****ERR:INCREMENT****ERR:NONREAL ANS****ERR:OVERFLOW****ERR:SINGULAR MAT**

There are are also several error messages that don't actually occur (as far as anyone knows) from normal use of the calculator — however, the messages are stored in the OS along with the normal messages. It's conceivable that an assembly program, especially an official TI application, would use these error messages for its own purposes. These messages are ERR:SOLVER, ERR:SCALE, ERR:NO MODE, ERR:LENGTH, and ERR:APPLICATION.

# A

## ARCHIVED

- You have attempted to use, edit, or delete an archived variable. For example, dim(L1) is an error if L1 is archived.
- Use UnArchive
*variable name*to unarchive the variable before using it. For lists, SetUpEditor is recommended instead since it does the same thing, but works on the TI-83 (which has no archive) as well, and does not crash when the list is undefined. - There is no way to archive or unarchive programs using pure Basic, although several assembly utilities are available for doing so.
- When you attempt to edit a archived Matrix,List,Variable, or program, the option 2:GOTO doesn't show up.
- Use Unarchive or the memory manager to unarchive a variable,matrix,list, program, etc.

## ARCHIVE FULL

- You have attempted to archive a variable and there is not enough space in archive to receive it.
- Sometimes, if the calculator displays a message from memory management saying "Garbage Collect?", choosing the option No gives this error.

## ARGUMENT

- A function or instruction does not have the correct number of arguments. See the appropriate command page.
- A function or instruction that can have any number of arguments has 256 or more.
- In general, if a function has more than one non-SYNTAX error in it, this is the error that will be generated first (if it applies, of course).
- Generally, on graphing calculators and such, most functions ex: randInt( require that you use commas to make a list.

# B

## BAD ADDRESS

- You have attempted to send or receive an application and an error (e.g., electrical interference) has occurred in the transmission.

## BAD GUESS

- With the solve( function, the equation solver, or an operation from the CALC menu, your guess wasn't within the lower and upper bound, or else the function is undefined at that point. Change the guess.

## BOUND

- In a CALC operation or with Select(, you defined Left Bound > Right Bound.
- In fMin(, fMax(, solve(, or the equation solver, the lower bound must be less than the upper bound.

## BREAK

- You pressed the [ON] key to break execution of a program, to halt a DRAW instruction, or to stop evaluation of an expression.

# D

## DATA TYPE

- You entered a value or variable that is the wrong data type.
- For a function (including implied multiplication) or an instruction, you entered an argument that is an invalid data type, such as a complex number where a real number is required.
- In an editor, you entered a type that is not allowed, such as a matrix entered as an element in the stat list editor.
- You attempted to store an incorrect data type, such as a matrix to a list.
- You attempted to divide matrices, which should be done by matrix inversion and multiplication instead.
- This error is not returned when graphing (see the note at the top of the page).

## DATE

- Only on the TI-84+ or TI-84+ SE, this error occurs when an invalid date is entered.
- Below the error menu, an explanation of what's wrong is given: e.g., "Invalid day for month selected."

## DIM MISMATCH

- You attempted to perform an operation that references more than one list or matrix, but the dimensions do not match.
- In most cases, the dimensions are required to be equal, with the following exceptions:
- When multiplying two matrices, the number of columns of the first must match the number of rows of the second.
- When using augment( to combine two matrices, only the number of rows must match.
- With the List►matr( command, the lists don't have to match sizes - shorter lists will be padded with zeroes.

## DIVIDE BY 0

- You attempted to divide by zero.
- You attempted a linear regression on data that fit a vertical line.
- This error is not returned when graphing (see the note at the top of the page).

## DOMAIN

- You specified an argument to a function or instruction outside the valid range. This error is not returned during graphing. The TI-83+ allows for undefined values on a graph.
- You attempted a logarithmic or power regression with a negative X or an exponential or power regression with a negative Y.
- You attempted to compute ΣPrn( or ΣInt( with pmt2 < pmt1.
- You've assigned a value to
*n*(the sequential graph variable),*n*Min or*n*Max that isn't an integer, or that is less than 0. - This error is not returned when graphing (see the note at the top of the page).

## DUPLICATE

- You attempted to create a duplicate group name.
- You attempted to create a duplicate program using AsmComp(.

## Duplicate Name

- A variable you attempted to transmit cannot be transmitted because a variable with that name already exists in the receiving unit.
- Also appears when you unpack a group and a variable in the group is already defined. In both cases, it will give you several options for correcting the error, including Omit, Rename, and Overwrite.

# E

## EXPIRED

- You have attempted to run a Flash application with a limited trial period which has expired.

## Error in Xmit

- The TI-83+ was unable to transmit an item. Check to see that the cable is firmly connected to both units and that the receiving unit is in receive mode.
- You pressed [ON] to break during transmission.
- You attempted to perform a backup from a TI-82 to a TI-83+.
- You attempted to transfer data (other than L1 through L6) from a TI-83+ to a TI-82.
- You attempted to transfer L1 through L6 from a TI-83+ to a TI-82 without using 5:Lists to TI-82 on the LINK SEND menu.
- You attempted to use SendOS with no other calculator connected.
- When this error occurs, the option 2:Goto doesn't show up, but will redirect you to the LINK screen instead of the main screen.

# I

## ID NOT FOUND

- This error occurs when the SendID command is executed, but the proper calculator ID cannot be found.
- When this error occurs, the option 2:Goto does not show up.

## ILLEGAL NEST

- You attempted to use an invalid function in an argument to a function.
- This happens when using seq( in the expression for seq(, fnInt( within the first argument of fnInt(, expr( inside the string argument of expr(, or Σ( within the argument for Σ(.

## INCREMENT

- The increment in seq( is 0 or has the wrong sign.
- The increment in a For( loop is 0.
- This error is not returned when graphing (see the note at the top of the page).

## INVALID

- You attempted to reference a variable or use a function where it is not valid. For example, Yn cannot reference Y, Xmin, ΔX, or TblStart.
- You attempted to reference a variable or function that was transferred from the TI-82 and is not valid for the TI-83+. For example, you may have transferred UnN1 to the TI-83+ from the TI-82 and then tried to reference it.
- In Seq mode, you attempted to graph a phase plot (uvAxes, uwAxes, or vwAxes) without defining both equations of the phase plot.
- In Seq mode, you attempted to graph a recursive sequence without having input the correct number of initial conditions.
- In Seq mode, you attempted to reference terms other than (n-1) or (n-2).
- You attempted to designate a graph style that is invalid within the current graph mode.
- You attempted to use Select( without having selected (turned on) at least one xyLine or scatter plot.
- You attempted to use certain functions (e.g. If, Then, Else) outside a program.

## INVALID DIM

- You tried to access an element past the end of a list or matrix (there is an exception: it's allowed to store to the element one past the end of a list, adding the element).
- You specified dimensions for an argument that are not appropriate for the operation.
- You specified a list dimension as something other than an integer between 1 and 999.
- You specified a matrix dimension as something other than an integer between 1 and 99.
- You attempted to invert a matrix that is not square.

## ITERATIONS

- The solve( function or the equation solver has exceeded the maximum number of permitted iterations. Examine a graph of the function. If the equation has a solution, change the bounds, or the initial guess, or both.
- irr( has exceeded the maximum number of permitted iterations.
- When computing I%, the maximum number of iterations was exceeded.

# L

## LABEL

# M

## MEMORY

- Memory is insufficient to perform the instruction or function. You must delete items from memory before executing the instruction or function.
- You might also want to try archiving some variables,matrixes,lists,etc if you have nothing in RAM that you don't need.
- Recursive problems return this error; for example, graphing the equation Y1=Y1. (but Y1=X, Y2=Y1, for example, will NOT cause an error.)
- Branching out of an If:Then, For(, While, or Repeat loop with a Goto will waste memory until the program finishes running, because the End statement that terminates the loop is never reached. Unless a program is very large, this is one of the likeliest causes of ERR:MEMORY. Refer to memory-leaks.

## MemoryFull

- You are unable to transmit an item because the receiving unit’s available memory is insufficient. You may skip the item or exit receive mode.
- During a memory backup, the receiving unit’s available memory is insufficient to receive all items in the sending unit’s memory. A message indicates the number of bytes the sending unit must delete to do the memory backup. Delete items and try again.
- You may also try to archive some variables to free up some memory that you do not plan to transmit.

## MODE

- You attempted to store to a window variable in another graphing mode or to perform an instruction while in the wrong mode; for example, DrawInv in a graphing mode other than Func.

# N

## NO SIGN CHNG

- The solve( function or the equation solver did not detect a sign change.
- You attempted to compute I% when FV, (N*PMT), and PV all share the same sign.
- You attempted to compute irr( when CFList and CFO share the same sign.

## NONREAL ANS

# O

## OVERFLOW

- You attempted to enter, or you have calculated, a number that is beyond the range of the calculator (-1
_{E}100 to 1_{E}100, non-inclusive). - Sometimes you can fix this error by re-ordering operations. For example, 60!*30!/20! will return an overflow error, but 60!/20!*30! will not.
- This error is not returned when graphing (see the note at the top of the page).

# R

## RESERVED

- You attempted to use a system variable inappropriately (for example, performing 1-Var Stats on the reserved list ∟RESID).

# S

## SINGULAR MAT

- A singular matrix (determinant = 0) is not valid as the argument for
^{-1}. - A regression generated a singular matrix (determinant = 0) because it could not find a solution, or a solution does not exist.
- This error is not returned when graphing (see the note at the top of the page).

## SINGULARTY

- The expression in the solve( function or the equation solver contains a singularity (a point at which the function is not defined). Examine a graph of the function. If the equation has a solution, change the bounds or the initial guess or both.
- Although the correct spelling is "singularity", the error message shown has "singularty" on all calculators and OS versions.

## STAT

- You attempted a stat calculation with lists that are not appropriate.
- Statistical analyses must have at least two data points.
- Med-Med must have at least three points in each partition.
- When you use a frequency list, its elements must be at least 0.
- (Xmax - Xmin) / Xscl must equal 47 for a histogram.

## STAT PLOT

- You attempted to display a graph when a stat plot that uses an undefined list is turned on.
- To fix this error, use the command PlotsOff to turn off plots when you're using the graph screen.

## SYNTAX

- The command contains a syntax error. Look for misplaced functions, arguments, parentheses, or commas. See the appropriate command page.
- This error will also occur in place of a DATA TYPE error if the variable type in question is a variable name (with seq(, solve(, For(, and other commands)
- The command was attempting to get expr( of a non-value string, i.e., trying to evaluate a space, equals sign, etc.

# T

# U

## UNDEFINED

- You referenced a variable that is not currently defined. This error doesn't occur with number variables (A-Z,θ), which have a default value of 0.
- Lists, matrices,strings,pictures, and GDBs have to be stored to first, in order to be used.
- Most system variables always have a value, so this error doesn't apply to them.
- However, statistical variables are undefined except for those used by the last relevant command.
- Undefined equation variables (such as Parametric and Polar variables) return ERR:INVALID instead of ERR:UNDEFINED.

# V

## VALIDATION

- Electrical interference caused a link to fail or this calculator is not authorized to run the application.

## VARIABLE

- You have tried to archive a variable that cannot be archived or you have have tried to unarchive an application or group.
- Variables that cannot be archived include:
- The number variables R, T, X, Y, and θ (because they are used for graphing)
- The list ∟RESID (because it's reserved for residuals from regression models)
- System variables (including statistical variables, finance variables, equations, plots, and window variables)
- The AppIdList.

## VERSION

- You have attempted to receive an incompatible variable version from another calculator.

# W

## WINDOW RANGE

- A problem exists with the window variables.
- You defined Xmin>Xmax or Ymin>Ymax.
- Xmin and Xmax (or Ymin and Ymax) are equal or so close that numerical precision can't allow for enough values between them.
- The values for θmin, θmax, and θstep create an empty or never-ending loop for θ.
- The values for Tmin, Tmax, and Tstep create an empty or never-ending loop for T.

- When this error occurs, the option 2:Goto doesn't show up.

# Z

## ZOOM

- A point or a line, instead of a box, is defined in ZBox.
- A ZOOM operation returned a math error.
- When this error occurs, the option 2:Goto doesn't show up.

# Other

## ?

- An unknown error has occurred.

For the most up-to-date version of this page, see http://tibasicdev.wikidot.com/errors

Glossary

For the most up-to-date version of this page, see http://tibasicdev.wikidot.com/abbreviations

Key Codes

The picture to the right top contains the value returned by getKey for each keypress. The picture is organized so that the key codes are placed where they would be on the literal calculator. You should note that the [ON] key (the key in the bottom left corner) has no key code, so you cannot check for nor disable it.

If you look at the key codes, you will probably notice that they actually follow a pattern: a key is represented by putting its row and column together. For example, the [ENTER] key is row 10, column 5; therefore, its value is 105. The up, right, and left arrow keys are assumed to be in the second row, and the down arrow key is in the 3rd row.

In case you want to know the key codes while using your calculator, here is a simple program to use:

```
:Repeat Ans=105
:getKey
:If Ans:Disp Ans
:End
```

The picture to the right bottom contains the value returned by the real(8 command when using xlib. The key placement is somewhat disorganized, but consistent for the most part. The [ON] key will return a value, according to the tutorial, but due to the [ON] break inherent to TI-Basic, it will not be returned.

For the most up-to-date version of this page, see http://tibasicdev.wikidot.com/key-codes

Tokens and Token Size

Each command, variable, and operation on the TI-83 series calculators is represented by a "token." This means that internally, the calculator does not store a command such as "cos(" as the letters c, o, s, and (. It stores a single number that it will later translate as "cos(" when necessary. In this case, the value is 196, but you most likely don't need to know that.

What you do need to know is that not all tokens are the same size. If there were 256 tokens or less, then you could fit all their values into 1 byte and be happy. Unfortunately, the TI-83 has more than 256 commands and variables. Therefore TI employed some trickery and made some tokens take up 1 byte (usually the most common ones, though they seem to have had a different idea of "common") and some take up 2 bytes.

What this means to you, as the programmer, is that the size of the program is determined by the number of commands, not the number of letters in it: a short line can take up more memory than a longer one if it uses a lot of commands. Furthermore, some commands will take up the memory of two commands rather than one, so a line with a few of these commands may take up as much memory as a line with more commands of the ordinary type.

Lowercase letters are the epitome of memory wasters: at a single character, they each take up 2 bytes of memory. A program that uses a lot of lowercase letters can fill up all of RAM very quickly! This may be avoided by using uppercase letters instead, which only take up 1 byte each. You can also save memory by replacing words such as "If", " or ", " and " with the appropriate commands, when displaying text. Such a command will only take up 1 byte, whereas the text may be much larger memory-wise. Lowercase letters are also not available on the original TI-83, so if you use them, your program will not work on it.

# Token Tables

These token tables are unnecessary for TI-Basic programmers; they would most likely be of use for someone writing a TI-Basic program editor.

- One-byte tokens
- Two-byte user variable tokens
- Two-byte statistical variable tokens
- Two-byte window and finance variable tokens
- Two-byte graph format tokens
- Miscellaneous two-byte tokens
- TI-84+(C(S)E) only two-byte tokens

There are several ways to insert a token given its hex value; all of them require an assembly program of some form. One of the easiest is to create an assembly program using AsmPrgm followed by the hex codes you want to convert to tokens, assemble it using AsmComp(, and then unlock it (there are many programs that allow you to do this).

For the most up-to-date version of this page, see http://tibasicdev.wikidot.com/tokens