Download Print this page

HP 35s Instruction Manual page 2

Using the logic functions
Hide thumbs Also See for HP 35s:

Advertisement

hp calculators
HP 35s Using the LOGIC functions
Numbers in different bases
Most numbers we work with day-to-day are in base 10. There are applications within the computer world that require the
use of numbers in other bases. The number 24 in base 10 can be translated into base 16 by the following procedure.
Just as each digit's location in base 10 can be thought of as a power of ten (the ones' place, the tens' place, the
hundreds' place, etc), each digit's location in base 16 can be thought of as a power of 16. Each digit in a base ten
number can hold a value from 0 to 9. In base 16, each digit can hold a value from 0 to F, where F corresponds to the
value 15 in a base 10 number. Translating 24 from base 10 to base 16 would require a 1 in the second location of the
base 16 number (and would convert 16 of the 24 number's value) and an 8 in the second location of the base 16
number. Therefore, 24 base 10 is equal to 18 in base 16. A similar process could be used to convert 24 base 10 to base
8 or base 2.
On the HP 35s, numbers can be represented in bases 2, 8, 10 and 16, or binary, octal, decimal and hexadecimal. The
HP 35s can work with numbers in bases 2, 8 and 16 that are 36 bits in length or less. Since the leftmost "bit" is used to
indicate a negative number, the largest positive binary number is 0 followed by thirty-five 1's. This means that the largest
hexadecimal number that can be entered or generated as an answer is 7FFFFFFFF, (equal to 34,359,738,367 in base
10, and 377777777777 in base 8). This is because the HP 35s uses a 36 bit binary word space to represent numbers in
these different bases. Decimal numbers are not limited in this fashion, since they can be represented as floating point
numbers. The HP 35s calculator provides the ability to easily work with numbers in different bases, as the following
sample problems illustrate.
In RPN mode, the third row of keys on the HP 35s ( k through , ) can be used to enter the hexadecimal digits A
through F. In algebraic mode, it is necessary to press h and then the appropriate letter key to enter these digits.
Operations on binary numbers
Any binary number, regardless of the base in which it is displayed, can still be thought of as a collection of 1's and 0's.
For example, the number 24 in base 10 is also the number 11000 in binary. This is because 11000 in binary is equal to 1
x 24 + 1 x 23, or 24. The HP 35s contains many functions in the ¹> menu, shown below, that operate on binary
numbers.
The AND function compares two binary numbers at the bit-by-bit level and creates a new binary number with a 1 for
each bit position that contains a 1 in both numbers in the same position.
The XOR function (which stands for exclusive OR), does the same thing as the OR function, but only for positions where
the original numbers contained a 1 and/or 0, but not where both contain a 1.
The OR function compares two binary numbers at the bit-by-bit level and creates a new binary number with a 1 for each
bit position if either original number contains a 1 at the same bit position.
hp calculators
Figure 1
Figure 2
- 2 -
HP 35s Using the LOGIC functions - Version 1.1

Advertisement

loading