HP -16C Owner's Handbook Manual page 42

Table of Contents

Advertisement

40
Section 4: Arithmetic and Bit Manipulation Functions
Example: The following simple additions set and then clear the
carry flag (4).
Keystrokes
Display
([STATUS]: 2-16-0000)*
(HEX]FFFF [ENTER]
FFFF h
Hex mode.
1
0 h
C annunciator: carry
occurred and flag 4 set.
1
1 h
Carry flag cleared
because no carry
occurred.
Flag 5: Out-of-Range (G)
Flag 5 and the G annunciator are set if the correct result of an
operation cannot be represented in the current word size and
complement mode. For the
and [-] operations, this corresponds
to the "overflow" condition on most computers.
The functions below either set or clear flag 5 and the G annunciator
whenever they are performed in Integer mode:
F
O
®
&
@
S
(DBLX] T
[DBL=]t
In addition, the arithmetic operators [+], [-], (], and [¢] will affect
flag 5 in Floating-Point Decimal mode. The
function also
affects flag 5. Refer to section 5 for details.
When a result is out-of-range, the lower bits (as many as fit in the
given word size) of the full answer will be returned. If the operation
was [X]or [£]in 1's or 2's Complement mode, the most significant bit
(sign bit) returned will match the sign bit of the full answer.
*Throughout this manual, this status display is used to indicate what the machine status
(as explained on page 37) must be for the examples to work as shown.
TAlways clears flag 5.

Advertisement

Table of Contents
loading

Table of Contents