Jon, The short answer. Use the value -1 for true instead of 1,2 or anyother value. NOT -1 = 0 NOT 0 = -1 end of short answer. Long answer. Operators like AND, OR, EXCLUSIVE OR, and NOT can come in two varities. Logical and bitwise. Because they react differently you have to use the right one with higher level languages. I think your problem is that you are thinking logicaly and the Stamp basic is working bitwise. Note.... the bitwise type of operator should not be confused with operations on a specific bit in a byte like the pic can preform. Bitwise means that every bit in the byte or variable is operated on. And this may be what the Stamp basic uses. So the following applies to the operator functioning in a bitwise manner. False means that all bits in the byte or variable are off. True means that all bits in byte or variable are not off. (at least one bit in the byte or variable is on) The NOT operator complements the byte (or variable). So that every bit that was on before the NOT is off after the NOT. And every bit that was off before the NOT, is on after the NOT. I keep saying byte or variable because in some languages a integer is two bytes long. And I don't know how many butes the Stamp uses for a variable. If you NOT 0 then the results will be all bits on, or the value -1. And if you NOT the value -1 then the results will be all bits off, or 0. This is why it is best to use -1 as the TRUE value when setting flags. It is not necessary, but when you start NOT'ing them, they will work properly. With any value other than 0 or -1, the NOT will just toggle all the bits and some will toggle on and the rest will toggle off. But in the end, the result will allways have one or more bits on and be considered TRUE. If you NOT the value of 1, then all bits are on except the Least Signifuenct Bit 'LSB". And this will show as a value of -2. Now a question. What does 1 AND 2 return? And how about 1 OR 2? Have fun, Bill C. bill@cornutt.com ---------- > Hello > > According to the stamp manual page 274, if I understand it you can write an > If...then statement like: > > Flag var byte > Flag = 1 > > If flag then istrue 'Value is true- True is any value other than 0 > and > If NOT flag then istrue 'Is also true > > Isn't NOT 1 the same as 0 or 2...any non 0 number. If true is any value other > than 0 and "NOT 1 is true" as well as any non-zero numberI don't understand > the difference. > > For example whats the difference between these two commands > > IF NOT in1 then si2c_rbyte_dl > and > IF bit_count then si2c_rbyte_lp > > > Thanks > > Jon >