Download Print this page

HP 9g Manual page 4

Base conversions and arithmetic
Hide thumbs Also See for 9g:

Advertisement

hp calculators
HP 9g Base Conversions and Arithmetic
Solution:
The previous answer is stored in the ANS variable. So, just press:
* , „ „ = c d e =
To display the result in base 10 press:
,†
Answer:
5844996 base 10.
Example 5: Which of the following numbers is the greatest? d473, o712, b110101000 and h1D8.
Solution:
We can use the MAX function to find the maximum of the given numbers. Press:
YY0473W0,‡†=712W0,„=110101
000W0,„„=1h8=
This results in d473 being displayed in the result line, which is therefore the greatest of the given numbers.
If the maximum had been another one, it would have been displayed in the active base (decimal), and
pressing , and selecting the different bases would have been required in order to identify the number.
Also note that up to ten arguments can be specified in the MAX function and that arguments are separated
by commas (W0).
Answer:
d473.
Example 6: Subtract 42 base 8 from 101111 base 2 and then display the two's complement of the result in base 2.
Solution:
We can do this calculation in one step using parentheses. The calculation in question is:
NEG (i.e. m, on the M key. Pressing ~ first is not necessary) calculates the two's complement of
the argument (i.e. complements each bit and adds one). Note that parentheses are required because NEG
has priority over subtraction. Let's make sure the calculator is in BIN mode, by pressing
,††=
and now we can enter and evaluate the above expression by pressing
m N101111-,‡†=42=
We need to press Ü four times to view the entire result , since it's a 32-bit digit.
Answer:
11111111111111111111111111110011 base 2. This is equivalent to –13 in base 10.
hp calculators
NEG( b101111 – o42)
- 4 -
HP 9g Base Conversions and Arithmetic - Version 1.0

Advertisement

loading