Boolean Algebra & Bitwise Logic on a TI-89
The TI-89 has four logic operators, and, or, xor and not, and they work in two ways:
- on true/false conditions (Boolean logic), such as
x>2 and x<5, and - on integers, bit by bit (bitwise logic), such as
0b1100 xor 0b1010.
All four are in 2ND 5 (MATH) → Test. and, or and xor also appear in MATH → Base for bitwise work. You can type them letter by letter too.
These steps are for the TI-89 / TI-89 Titanium handheld, from Texas Instruments' guidebook. Our online TI-89 calculator runs PedroM, a free third-party operating system and doesn't support every handheld feature, so check what it offers before following along there.
Boolean logic: true and false
| Entry | Result |
|---|---|
3>2 and 5>7 |
false |
3>2 or 5>7 |
true |
(3>2) xor (5>4) |
false (both are true) |
not (3>2) |
false |
x≥3 and x≥4 |
x≥4 |
The last line shows the CAS simplifying a condition: if x ≥ 4, then x ≥ 3 is automatically true. That example is from Texas Instruments' reference.
Conditions like this are useful in inequalities, in solve( and with the | ("with") operator, for example solve(x^2=9,x)|x>0.
Truth tables
The TI-89 has no truth-table generator, but you can check a law by testing all four cases. For De Morgan's law, ¬(a ∧ b) = ¬ a ∨ ¬ b:
not (true and false) → true
(not true) or (not false) → true
Try each combination of true and false the same way. For larger tables, a short TI-BASIC program with two nested For loops can print every row.
Bitwise logic on integers
Set MODE → Base to BIN or HEX so results display in that base. Enter numbers with the prefixes 0b (binary) and 0h (hexadecimal); a number with no prefix is decimal.
| Entry | Base mode | Result |
|---|---|---|
0b100101 and 0b100 |
BIN | 0b100 |
0b100101 or 0b100 |
BIN | 0b100101 |
0b1100 xor 0b1010 |
BIN | 0b110 |
37 and 0b100 |
DEC | 4 |
not 0h7AC36 |
HEX | 0hFFF853C9 |
not gives the one's complement: every bit is flipped. The TI-89 works with signed 32-bit integers here, which is why not of a small number fills the left side with 1s. Binary entries can have up to 32 digits and hexadecimal entries up to 8.
Converting between bases
| Entry | Result |
|---|---|
256 ►Hex |
0h100 |
0b10011 ►Dec |
19 |
0h1F ►Bin |
0b11111 |
►Bin, ►Hex and ►Dec are in 2ND 5 (MATH) → Base. More, including two's complement and modulo: modulo and number bases.
Logic circuits and simplification
For simplifying a symbolic Boolean expression (as in digital logic), the CAS handles simple cases like the x≥3 and x≥4 example. It isn't a full Boolean-algebra simplifier, so check results with a truth table, or use a Karnaugh map by hand. EE*Pro's equation library can also help with digital-logic coursework. See EE*Pro.
Common problems
| Problem | Fix |
|---|---|
| Result shows in decimal | set MODE → Base to BIN or HEX |
| Data type error with bitwise operators | the values must be integers. Decimals won't work |
Unexpected huge number from not |
that's the 32-bit one's complement. Mask it with and if you only want the low bits |
and returns an expression |
a variable in it has no value, so the CAS simplified rather than evaluated it |