EasyManuals Logo

Atari 800 User Manual

Atari 800
326 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #95 background imageLoading...
Page #95 background image
Atari BASIC Reference
Guide
93
The
conditions
of
true
and false are represented in
the
computer
by the logical values 1 and O.
As
a result,
the
logical operators
(AND
, OR, and NOT) generate
only
the values 1 and o. The
AND
operation
can be explained by the
following
truth
table.
EX1
1
1
o
o
EX2
1
o
1
o
RESULT
1
o
o
o
AND
is
generally used in
an
IF
/ THEN statement
with
relational
expressions. For example:
10
X =
10
20
Y =
30
30
IF
X = 10
AND
Y>100
THEN END
40
PRINT
"CONDITIONS
WERE
NOT
MET"
RUN
CONDITIONS
WERE
NOT
MET
In this example,
AND
is
us
ed in
an
IF
/ THEN statement
which
ends
the
program
if
both
co
nditions
are
true
. The first expression
of
the
AND
statement
is
X =10. This
is
true
because X
is
assigned
the
value
10
in line
10.
The second expression,
Y>100
,
is
false
because Y
is
assigned
the
value
30
in line
20.
As
a result,
EX1
is
true
and
EX2
is
false. This corresponds to
the
truth
table
where
EX1
= 1
and
EX2
=
O.
The resu It
from
the table
is
0 (fa
Ise)
,
so
the
cond
ition
of
the
IF
/ THEN statement
is
false, and
the
next
line
is
executed.
The
AND
operator
can also be
us
ed
with
algebraic expressions
like
5 * Y, 3 + X, X
II
2, etc.
However
, these must also be
converted
to
logical 0
or
1.
The
computer
does this by assigning
the
logical
value 0
to
any express
ion
that equals O.
Any
expression
that
does
not
equal 0
is
assigned the logical value 1. For
example
,
the
logical value
of
5 * 0
is
O. The logi
ca
l values
of
3 + 1, 2
II
2,3
and
COS
(45)
are all 1.

Other manuals for Atari 800

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atari 800 and is the answer not in the manual?

Atari 800 Specifications

General IconGeneral
ProcessorMOS Technology 6502
Processor Speed1.79 MHz
ROM10 KB
GraphicsANTIC and GTIA chips
Release Year1979
Display Resolutionup to 320 x 192
Colors128 colors
Sound4 channels
StorageCartridge, cassette, floppy disk
PortsCartridge, serial, monitor
Operating SystemAtari OS

Related product manuals