EasyManua.ls Logo

HP HP-16C - Section 4: Arithmetic and Bit Manipulation Functions; Arithmetic Functions

HP HP-16C
140 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Section
4
Arithmetic
and
Bit
Manipulation
Functions
Integer
arithmetic
operations
and
bit
manipulation
functions
can
only
be
performed
in
Integer
mode.
Since
these
functions
are
subject
to
carry
and
out-of-range
conditions,
an
explanation
of
these
conditions
precedes
the
discussion
of
the
functions
themselves.*
Floating-point
decimal
arithmetic
and
other
capabilities
of
Floating-Point
Decimal
mode
are
discussed
in
section
5,
Floating-
Point
Numbers.
Carry
and
Out-of-Range
Conditions
The
execution
of
certain
arithmetic
and
bit
manipulation
operations
can
result
in
a carry
and/or
an
out-of-range
condition.
These
conditions
set
flags (that
may
be
tested)
and
display
annunciators
(for
visual
indication).
The
definitions
for
“carry”
and
“out-of-range”
depend
on
the
particular
function
executed.
Section
3,
under
Flags
(page
36),
explains
how
to
manually
set
and
clear
these
(and
other)
flags.
Flag
4:
Carry
(C)
The
shifting,
rotating,
and
arithmetic
operations
listed
below
will
set
or
clear
flag
4
and
the
C
annunciator
whenever
they
are
performed
in
Integer
mode.
Flag
4,
the
carry
flag,
is
set
if
the
carry
bitis
1,
and
cleared
if
the
carry
bit
is
0.
[(+](carry)
RLC
RLCn
(-]
(borrow)
(:)(remainder
#
0)
RRC
RRCn
(remainder
#
0)
(remainder
#
0)
(These
functions
are
described
later
in this
section.)
*
Appendix
A
includes
a
table
of
the
relevant
functions
and
how
they
affect
the
carry
and
out-of-range
flags.
39

Table of Contents

Related product manuals