Logical Comparisons And Inequalities - Sharp PC-1500A Instruction Manual

Hide thumbs Also See for PC-1500A:
Table of Contents

Advertisement

All
and more about
Sharp
PC-1500
at
http://www.PC-1500.info
Input
Display
(
(
6
-
4)
I
2)
*
(
(
(
3
-
1)
I
4)
*
6
)
IE:'llfAI
3
The
equat ions
with
in the
innermost
w.t
of
pare
ntheses
will
al\vays be
calculated
first.
REMEMBER
:
When in
doubt.
use
pa
rentheses
to·
c
lar
ify
the o
rder
o
f
your
arilhmetic
operat ions.
G.
LOGICAL COMPARISONS AND INEQUALITIES
SHARP
will
allow
you
to
compare
two
1Jal
ues or eQuat ions
and \viii
indicate
to you
t he
result
o
f
the
comparison
. T
his
abi
lity is
basic
to
designing
programs
which
make
d ecisions.
The
manner in
which
lhis
is done
w
il
l
be
recogn izab
le
to
stude
nts
of
th@
..
N@w Math ..
as
an
inequality
(don'
t
despair
if
you
o, ,
·
1ere
n't
ra
ised on
Ne\v Math;
the
author \•Jasn't
either).
An inequal ity
may
be
though
t
of
as
a
compa
rison which
is
e ithe
r
true o
r
false.
For
instance,
the
statement
"six
d
ivided
by
three
is
equal
to t\vo" is
a
comparison
which
happens
to
be true.
On
t
he
other
hand.
the
statement, " six
divided
by three
is
greater than fi11e"
is a false comparisol).
Co1nputers
and
mathematic
ians
use
the
fo llo
..... ing
symb
ols for
the
possible
types
o
f com·
parisons:
<
less
th
an
>
greater
tha"
=
equal
to
<=
less
th
an OR
equal t
o
>=
greater
than
0
R
equal
t
o
<>
not
equal
to
Thus,
we
can
re
state
tho
above
inequal
ities symbolically. as:
6
{
3
=
2
a
nd
6
I
3
>
5
respec·
t ively.
Given an inequality, SHARP
will dete rrnine
..
..,hether
the
compariion
is
true
or
fa
ls.e.
In
keeping
\Yith
current com
pute
r
d esign
practice, SHARP
will ind
icate
a
tt
ue
staternent with
a
t
and
a fa
lse
statemerl! w
ith
a
0.
For
example if you
type:
6 13
=
2
SHARP
w
ill
respond
w ith
a
1 (for
true).
T
yping
the
sequ
ence:
6
I
3
>
5
will
elicit
a response
of
0
(for
false).
Try the follow
ing
t
ests of
SHARP's judgmen
t
(be
sure
you are
in RUN
mode)
:
18
Do not sale this PDF
!!!

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents