Note that T = TRUE and F = FALSE.

Example:

10 INPUT A,B,C

20IF A=B AND B=C THEN PRINT “A=B=C”

30IF (NOT A=B) OR (NOT B=C) THEN 50

40END

50PRINT “A=B=C IS FALSE”

60END

RUN

? 10 (pick a number) ?? 5 (pick a number) ?? 7 (pick a number)

A=B=C IS FALSE

Moreover AND, OR, and NOT can be used to manipulate numerical values. These operations are based on binary numbers with 1 and 0 representing TRUE and FALSE respectively.

For example:

NOT 1=-2 [1=binary 00000001 and -2=binary 11111110, so it just changes the 1 to 0 and 0 to 1. In other words, TRUE(1) changed to FALSE(0) and FALSE(0) changed to TRUE(1).]

OR 13=15 [6=binary 00000110 and 13=binary 00001101, so, with reference to the OR truth table, 6 OR 13 =15=binary 00001111]

AND 13=4 [6=binary 00000110 and 13=binary 00001101, so with reference to the AND truth table, 6 AND 13=4 binary 00000100]

INPUT

Line # INPUT “(optional character string)”; variable 1, variable 2,....

INPUT allows the user to type in the value of a variable at the time the program is RUN. If an optional character string is used, this message will be printed before the question is asked. The type of data to be INPUT varies according to the type of the variable.

61