
which is adequate for representing integers up to approximately 2 × 10
9
. However, integers larger than that
would be truncated, that is, the most signicant bits (that is, the leading bits) would be dropped. thus the
result of any calculation involving such a number would not be accurate.
The default base
Setting a default base only aects the entry and display of numbers being used in integer arithmetic. If you
set the default base to binary, 27 and 44 will still be represented that way in Home view, and the result of
adding those numbers will still be represented as 71. However, if you entered #27b, you would get a syntax
error, as 2 and 7 are not integers found in binary arithmetic. You would have to enter 27 as #11011b (since
27
10
=11011
2
).
Setting a default base means that you do not always have to specify a base marker for numbers when doing
integer arithmetic. The exception is if you want to include a number from the non-default base: it will have to
include the base marker. Thus if your default base is 2 and you want to enter 27 for an integer arithmetic
operation, you could enter just #11011 without the b suix. But if you wanted to enter E4
16
, you need to enter
it with the
suix: #E4h. (The HP Prime adds any omitted base markers when the calculation is displayed in
history.)
Note that if you change the default base, any calculation in history that involves integer arithmetic for which
you did not explicitly add a base marker will be redisplayed in the new base. In the following gure, the rst
calculation explicitly included base markers (b for each operand). The second calculation was a copy of the
rst but without the base markers. The default base was then changed to hex. The rst calculation remained
as it was, while the second—without base markers being explicitly added to the operands—was redisplayed
in base 16.
640 Chapter 29 Basic integer arithmetic
Komentáře k této Příručce