Not Ot E E; And E E - HP -16C Owner's Handbook Manual

Table of Contents

Advertisement

Section 4: Arithmetic and Bit Manipulation Functions
45
corresponding positions of the words in the X- and Y-registers; the
stack then drops and the result is placed in the X-register. The
operator
acts only upon the word in the X-register; the stack
does not drop.
NOT
The
function inverts the values of all bits in the binary
number in the X-register. It is equivalent to forming the 1's
complement, that is, using
in 1's Complement mode. Only the
X-register is affected.
Keystrokes
Display
([STATUS]: 2-16-1000)
(BIN]J11111111
11111111 b
Binary mode.
00000000.b
1's complement of
[f)[WINDOW] 1
11111111 b. 00000000 11111111, is
11111111 00000000s.
AND
The
function (the logical product) compares each corre-
sponding bit in two words. Each resulting bit is 1 only if both
corresponding operand bits are 1; otherwise, it is 0.
The use of [AND]is illustrated under Masking, page 51.
OR
The
function (the logical sum) compares each corresponding
bit in two words. Each resulting bit is 0 only if both operand bits
are 0's.
Example: Perform a logical OR to determine which bits are zero
in both 10101, and 10011,.
Keystrokes
Display
([STATUS]: 2-16-0000)
10101
10101 b
10011
10011
b
10111 b
Bit 3 (represented by the
zero) and all bits to the
left of bit 4 are zero in
both of the given words.

Advertisement

Table of Contents
loading

Table of Contents