Download Print this page

VTech PreComputer 2000 Manual page 45

Advertisement

LOGICAL OPERATORS
Logical operators are used IF ..
.
THEN ... ELSE and such statements where a
condition is used to determine subsequent operations within the user
program.
The
logical operators are: AND,OR,NOT.
For purposes of this discussion, A and B are relational expressions having only
TRUE and FALSE. Logical operations are performed after arithmetical and
relational operations.
Operator
Example
Meaning
Not
Not A
If A is true, Not A is false.
AND
A AND B
A AND B has the value
true,
only if A and
B are both
true.
A AND B has the value false if either A or
B is false.
OR
A ORB
A OR B has the value true if either A or
B or both are true
.
It has the value false if both are false
.
TRUTH TABLES
The following tables are called TRUTH TABLES. They illustrate the results of the
previous logical operations with both A and B given for every possible combination
of values.
TRUTH TABLE FOR "NOT" FUNCTION
A
NOT A
T
F
F
T
TRUTH TABLE FOR "AND" FUNCTION
A
B
A AND B
T
T
T
T
F
F
F
T
F
F
F
F
44
I

Advertisement

loading
Need help?

Need help?

Do you have a question about the PreComputer 2000 and is the answer not in the manual?