HP Calculators: HP 35s Using The LOGIC Functions
HP Calculators: HP 35s Using The LOGIC Functions
hp calculators
Figure 1
Figure 2
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
-2-
hp calculators
Figure 3
Figure 4
Figure 5
Answer:
-4568 base 10. Figure 4 shows the result in RPN mode while figure 5 shows the result in algebraic mode.
Example 2: Perform an OR on these two binary numbers: #70114 o and #57610 o. Make sure the calculator is in
OCTAL mode to enter the base 8 numbers.
Solution:
hp calculators
w
w>
-3-
hp calculators
>
w
w
Figure 6
Figure 7
Answer:
77714 base 8. Figure 6 shows the result in RPN mode. Figure 7 shows the result in algebraic mode.
Example 3: Perform an NOR on these two binary numbers: #1011 b and #1001 b. Make sure the calculator is in
BINARY mode to enter the base 2 numbers. Do not forget to append the b suffix to the binary numbers.
Solution:
w
In RPN mode, press:
w
w>
In algebraic mode, press:
>
w
w
Figure 8
Figure 9
Figure 10
Answer:
hp calculators
Figures 8, 9, and 10 show the result in algebraic mode. This display indicates an arrow pointing to the right
which indicates that the answer scrolls off the screen in that direction. Press to view the rest of the
result. The leading 1s in the answer are due to the 36 bit word length on the HP 35s. Since both binary
numbers would have had all leading bits equal to zero, the NOR function returns a 1 for each of those zero
bits. The last four bits reflect the NOR of the entered digits. Only the second entered bit was a zero in both
numbers and NOR returns a 1 for that bit location.
-4-