Sharp PC-1403 Operation Manual page 94

Hide thumbs Also See for PC-1403:
Table of Contents

Advertisement

88
This
results
in an equation
of
NOT
X
=
-X-1,
i.e.,
NOT
X
=
-
(X
+
1)
Thus,
1
is
inverted
to
0,
and
O to
1
for
each bit,
which
is called
"negation (NOT
operation}."
Then,
the
following
will
result
when
1
and
NOT
1 are added
together:
0000000000000001
(1)
+}
1111111111111110(NOT1)
. . .
.
. . . . .
.
. .
.
.
.
.
. . .
ones complement
1111111111111111
(-1)
twos
complement
Thus,
all
bits become
1.
According
to
the above
number list,
the
bi
t s become
-1
in
decimal
notation,
that
is,
1
+
NOT
1
=
-1.
The relationship between
numerical
value X
and
its
negated
(or
inverted) value
NOT
X
is:
X +NOT X
=
-1
The negation
(NOT) of
a
binary
number
0000000000000001
is
taken
as
follows:
NOT
0000000000000001
(Negative)->
1111111111111110
Decimal
16-bit binary
notation
n otation
32767
0111111111111111
3
0000000000000011
2
0000000000000010
1
0000000000000001
0
0000000000000000
-1
111;111111111111
-2
1111111111111110
-3
1111111111111101
-32768
1000000000000000
•Decimal
numbers
can
be
expressed
in
the
bi
n
ary
notation
of 16
bits as follows:
The
XOR
instruction cannot be used in
combination
with the
AND or OR instruction in
an expression.
To
execute
expression
D=(A XOR
B) AND C, for example, divide
the
expression
into two parts for
execution:
D=A XOR Band D=O ANO
C.
Concepts and Terms of BASIC

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents