Logical operations, Binary, octal and hexadecimal values – HP 6S User Manual

Page 17

Advertising
background image

17

7654

8

÷ 12

10

= 334.33…

.10

M§7654dM¤12=

334.3333333

= 516

8

OCT

516.

Fractional parts of calculation results are truncated.

110

2

+456

8

x78

10

÷1A

16

M¥110+M§456*

=390

16

M¤78dM¦1A=

HEX

390.

=912

10

912.

Multiplication and division are given priority over addition and subtraction in mixed calculations.

BC

16

x (14

10

+ 69

10

=15604

10

=3CF4

16

M¦BC*(M¤14+69)=

15604.

HEX

3CF4.

Logical operations

&o
xX
Ì

You can use the following logical operations to compare two numbers. When performing
logical operations, keep the following points in mind:

You cannot use decimal-base numbers in logical operations.

The calculator compares the binary versions of the numbers you enter. If the number is
less than 10 digits long, the calculator fills values to the left of the number with 0s—eg, if
you compare hexadecimal F1 to octal 4, the calculator compares 0000010001 to
0000000100.

If you use one number with a logical operation, the calculator compares it to 0000000000.

The logical operators work in the following way:
1. The operation compares the binary digits in the corresponding positions in each of the

numbers.

2. The operation returns a binary digit corresponding to each position.
3. If you are using a base other than binary, the result is shown in the base of the last

number you entered.

The following logical operators are available:
& returns a 1 for every position where there is a 1 in both numbers.
o returns a 1 for every position where there is a 1 in either number.
x returns a 1 for every position where there is a 1 in either number, but not both numbers.
X returns a 1 for every position where there is the same digit in both numbers.
Ì returns the diminished radix complement.
Press these keys to perform the respective binary, octal, decimal and hexadecimal logical
operations.

Binary, octal and hexadecimal values

English.PM6

3/3/99, 3:45 PM

17

Advertising