Examples of integer arithmetic

The operands in integer arithmetic can be of the same base or of mixed bases.

Integer calculation

Decimal equivalent

 

 

#10000b+#10100b

16 + 20 = 36

=#100100b

 

#71o–#10100b =

57 – 20 = 37

#45o

 

#4Dh * #11101b = #8B9h

77 × 29 = 2233

#32Ah/#5o = #A2h

810/5 = 162

 

 

Mixed-base arithmetic

With one exception, where you have operands of different bases, the result of the calculation is presented in the base of the first operand. The example at the right shows two equivalent calculations: the first multiplies 410 by 5710 and the

second multiplies 5710 by 410. Obviously the results too are mathematically equivalent. However, each is presented in the base of the operand entered first: 16 in the first case and 8 in the second.

The exception is if an operand is not marked as an integer by preceding it with #. In these cases, the result is presented in base 10.

584

Basic integer arithmetic

Page 590
Image 590
HP Prime Graphing NW280AAABA manual Examples of integer arithmetic, Mixed-base arithmetic