In BASIC all logic operators are context sensitive. The default is to perform a bitwise operation on 32 bit numbers. So that
Result is 11111111. The function HEX (param) returns a string representing the hex value param.
But is the context includes a
comparison then the AND operation becomes a logical operation
So if the 2 conditions are TRUE then statement1 is executed.
If you are going to mix logical and bitwise operators then use () in the expression to evaluate the bitwise operations first, see the example below.