EasyManuals Logo

HP HP-16C User Manual

HP HP-16C
140 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 #45 background imageLoading...
Page #45 background image
Section
4:
Arithmetic
and
Bit
Manipulation
Functions
43
The
Carry
Flag
During
Subtraction.
The
carry
flag
(flag
4,
C
annunciator)
will
be
set
whenever
a
binary
subtraction
results
in
a
borrow
into
the
most
significant
bit.
Otherwise,
the
carry
flag
is
cleared.
This
is
the
same
for
all
complement
modes.
(Note
that
subtraction
in
the
HP-16C
is
not
computed
as
the
addition
of
a
negative
number;
this
affects
how
carry
generation
occurs.)
([STATUS]:
2-04-1000)
Carry
Set
Carry
Cleared
0
-G
1010
o
0170
-(-4)
~1100
-
—0001
2,0
1110,
5,6
0101,
The
Out-of-Range
Flag.
Arithmetic
results
that
cannot
be
shown
in
the
current
word
size
and
complement
mode
set
the
out-
of-range
flag.
For
[¢],
this
occurs
only
in
2’s
Complement
mode
when
the
largest
possible
negative
number
is
divided
by
—1.
Example:
With
a
word
size
of
4
bits,
calculate
(7
+
6)
in
base
2
and
observe
the
effect
on
flags
4
and
5.
Keystrokes
Display
([STATUS]:
2-04-0000)
Binary
mode.
111
111
b
7.
110
110
b
6.
1101
b
-3.Flag5
(out-of-range)
set;
flag
4
(carry)
cleared.
Remainder
After
Division
and
In
division,
only
the
integer
portion
of
the
result
is
returned
to
the
X-register.
If
the
remainder
is
not
zero,
flag
4
(carry)
and
the
C
annunciator
are
set.
If
the
remainder
is
zero,
flag
4
is
cleared.
To
obtain
the
remainder
instead
of
the
quotient,
press
instead
of
[£].
This
calculates
|y|
MOD
|x|.
The
sign
of
the
result
matches
the
sign
of
the
dividend
(that
is,
the
sign
of
y).

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP HP-16C and is the answer not in the manual?

HP HP-16C Specifications

General IconGeneral
BrandHP
ModelHP-16C
CategoryDesktop
LanguageEnglish

Related product manuals