HP Prime Graphing NW280AAABA manual Default base

Models: Prime Graphing NW280AAABA

1 616
Download 616 pages 24.49 Kb
Page 588
Image 588

represents 22810. In this case, the base marker h indicates that the number is to interpreted as a hexadecimal number: E416.

Note that with integer arithmetic, the result of any calculation that would return a remainder in floating-point arithmetic is truncated: only the integer portion is presented. Thus #100b/#10b gives the correct answer: #10b (since 410/210 is 210). However, #100b/ #11b gives just the integer component of the correct result: #1b.

Note too that the accuracy of integer arithmetic can be limited by the integer wordsize. The wordsize is the maximum number of bits that can represent an integer. You can set this to any value between 1 and 64. The smaller the wordsize, the smaller the integer that can be accurately represented. The default wordsize is 32, which is adequate for representing integers up to approximately 2 × 109. However, integers larger than that would be truncated, that is, the most significant 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 affects 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 2710=110112).

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 suffix. But if you wanted to enter E416, you need to enter it with the suffix: #E4h. (The HP Prime adds any omitted base markers when the calculation is displayed in history.)

582

Basic integer arithmetic

Page 588
Image 588
HP Prime Graphing NW280AAABA manual Default base