1'Scomplementmode; Unsignedmode - HP -16C Owner's Handbook Manual

Table of Contents

Advertisement

30
Section 3: Number and Display Control
1's Complement Mode
Pressing
SET COMPL
will set 1's Complement mode. When
you press
(change sign) in 1's Complement mode, the 1's
complement of the number in the X-register is formed by
complementing all bits.
One's Complement accommodates an equal number of positive and
negative numbers, but has two representations for zero: 0 and -0.
2''s Complement Mode
Pressing
SET COMPL
will set 2's Complement mode. The
function will take the 2's complement of the number in the
display (that is, it complements all the bits in the X-register and
adds 1).
In 2's Complement there is just one representation for zero, but
there is always one more negative number than positive number
represented.
Unsigned Mode
Pressing
SET COMPL
will set Unsigned mode, which
uses no sign bit. The most significant bit adds magnitude, not sign,
so the largest value respresented by an 8-bit word is 255,instead
Of 1271().
Changing signs in Unsigned mode has no meaning. If you press
in Unsigned mode, the result will be the 2's complement of the
number in the X-register. Flag 5 (signified by the G annunciator) is
set as a reminder that the true result is a negative number, which is
outside the range of Unsigned mode.
The following table summarizes how the complement modes affect
the decimal interpretation of all possible 4-bit patterns (word
size 4).

Advertisement

Table of Contents
loading

Table of Contents