EasyManuals Logo

Sinclair QL User Manual

Sinclair QL
422 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 #71 background imageLoading...
Page #71 background image
You
can see the effects of different combinations
if
answers
In
the rules below:
batsman
bowler
batsman OR bowler effect
FALSE
FALSE
FALSE
not
In
feam
FALSE
TRUE
TRUE
in
the team
TRUE
FALSE
TRUE
In
the
team
TRUE TRUE
TRUE
in
the team
Rules
for
OR
When the inclusive OR
is
used a true value
in
either
of
the simple statements
will
produce
a true value
in
the compound expression.
If
Ian
Botham, the England all-rounder, were
to
answer the questions both
as
a bowler and
as
a batsman, both simple statements
would be true and
so
would the compound expression. He would be
in
the team.
If
you
write 0
for
false
and 1 for true
you
will
get
all
the possible combinations
by
counting
in
binary numbers:
00
01
10
11
The word NOT has the obvious meaning.
NOT
true
is
the same
as
false
NOT false
is
the same
as
true
However
you
need
to
be careful. Suppose
you
hold a red triangle and say that
it
is:
NOT red AND square
In
English this may be ambiguouS.
If
you
mean:
(NOT
red) AND square
then for a red triangle the expression
is
false.
If you mean:
NOT
(red AND square)
then
for
a red triangle the whole expression
is
true.
There must be a rule
in
programming
to make
it
clear what
is
meant. The rule
is
that NOT takes precedence over AND so
the interpretation:
(NOT
red) AND square
is
the correct
one.
This
is
the same
as:
NOT red AND square
To
get the other interpretation
you
must use brackets.
If
you
need
to
use a complex
logical expression
it
is
best
to
use
brackets and NOT
if
their usage naturally reflects what
you
want.
But you can
if
you
wish always remove brackets by using the following
laws
(attributed
to
Augustus De Morgan)
NOT
Log",
NOT (tall AND fair)
is
the same
as
NOT tall
OR
NOT fair
NOT (hungry OR thirsty)
is
the same as
NOT
hungry
AND NOT thirsty
NOT
(a
AND
b)
NOT
(a
OR
b)
For example:
12/84
is
the same
as
is
the same
as
NOT a OR NOT b
NOT a AND NOT b
55

Other manuals for Sinclair QL

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Sinclair QL and is the answer not in the manual?

Sinclair QL Specifications

General IconGeneral
ProcessorMotorola 68008
Clock Speed7.5 MHz
RAM128 KB (expandable to 640 KB)
ROM48 KB
Operating SystemSinclair QDOS
Release Year1984
StorageMicrodrive tape loop
Graphics256x256 pixels, 8 colors
PortsRS-232, ROM cartridge
SoundBeeper (internal speaker)

Related product manuals