HP Prime Graphing Wireless Calculator Manual do Utilizador Página 687

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
Vista de página 686
29 Basic integer arithmetic
The common number base used in contemporary mathematics is base 10. By default, all calculations
performed by the HP Prime are carried out in base 10, and all results are displayed in base 10.
However, the HP Prime enables you to carry out integer arithmetic in four bases: decimal (base 10), binary,
(base 2), octal (base 8), and hexadecimal (base 16). For example, you could multiply 4 in base 16 by 71 in base
8 and the answer is E4 in base 16. This is equivalent in base 10 to multiplying 4 by 57 to get 228.
You indicate that you are about to engage in integer arithmetic by preceding the number with the pound
symbol (#, gotten by pressing ). You indicate what base to use for the number by
appending the appropriate base marker:
Base marker Base
[blank] Adopt the default base (see The default base on page 640)
d decimal
b binary
o octal
h hexadecimal
Thus #11b represents 3
10
. The base marker b indicates that the number is to interpreted as a binary number:
11
2
. Likewise #E4h represents 228
10
. In this case, the base marker h indicates that the number is to
interpreted as a hexadecimal number: E4
16
.
Note that with integer arithmetic, the result of any calculation that would return a remainder in oating-point
arithmetic is truncated: only the integer portion is presented. Thus #100b/#10b gives the correct answer:
#10b (since 4
10
/2
10
is 2
10
). 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,
639
Vista de página 686
1 2 ... 682 683 684 685 686 687 688 689 690 691 692 ... 700 701

Comentários a estes Manuais

Sem comentários