Download Print this page

VTech PreComputer 2000 Manual page 47

Advertisement

Moreover AND, OR, 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:
i)
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) is changed to TRUE(1) .]
ii)
6 OR 13=15 [6=binary 0000011 0 and 13=binary 00001101
,
so
,
with reference
to the OR truth table, 6 OR 13 =15=binary 00001111]
iii) 6 AND 13=4 [6=binary 00000110 and 13=binary 00001101, so with reference
to the AND truth tab
le,
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 INPUTTED varies according to
the type of the variable
.
Examples:
I
35 INPUT AMOUNT
140 INPUT "WHAT IS YOUR NAME:";NAME$
LET
Line #
LET variable = variable expression
The variable expression is calculated and the result is stored under the variable
.
The word LET is optional.
Examples
:
I
40 LET SUM=A+B+C
I
25 LET cosT =PRICE-PROFIT
46

Advertisement

loading
Need help?

Need help?

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

Subscribe to Our Youtube Channel