EasyManua.ls Logo

HP HP-16C - Section 4: Arithmetic and Bit Manipulation Functions; Bit Summation; Double 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...
50
Section
4:
Arithmetic
and
Bit
Manipulation
Functions
Keystrokes
Display
([STATUS|:
2-08-1000)
(9](RLC]
11001110
b
Carry
bit
(most
significant
bit
of
high-
order
portion)
moves
into
least
significant
bit
position
of
low-order
portion.
x
%
00011100
b
Switches
X-
and
Y-registers.
(9][RLC]
00111001
b
C
cleared:
carry
bit
moved
into
first
part
of
word
and
zero
moved
into
carry
bit.
x
%
11001110
b
New
word
is
00111001
11001110.
(9][(cF]3
11001110
b
Suppresses
leading
Zeros.
Setting,
Clearing,
and
Testing
Bits
Individual
bits
in
a
word
can
be
set to
1
or
cleared
to
0
using
the
(set
bit)
and
(clear
bit)
functions.
In a
manner
analogous
to
flag-testing,
you
can
also
test
for
the
presence
of
a
set
bit
with
[B?].
If
executed
in
a
program,
the
result
affects
program
execution.
To
set,
clear,
or
test
a
specific
bit
in
a
word:
e
The
word
containing
the
specific
bit
must
be
in
the
Y-register.
e
The
magnitude
of
the
number
in
the
X-register
specifies
the
number
of
the
bit
to
be
set,
cleared,
or
tested.
When
the
key
(
or
[CB])
is
pressed,
the
stack
drops
and
the
word
affected
returns
to
the
X-register.
Bits
are
numbered
from
zero
to
one
less
than
the
word
size,
with
the
least
significant
bit
as
bit
number
0.
Keystrokes
Display
([STATUS]:
2-16-0000)
11111111
11111111
b
Enters
quantity
and
copies
it
into
the
Y-register.
1
11 b
Bit
number
3.
11110111
b
Stack
drops;
resulting
word
is
in
X-register.

Table of Contents

Related product manuals