Instruction Set
4-167
NOT
One’s Complement Negation
NOT
What It Does
NOT toggles all bits of a component.
Syntax
Description
NOT inverts the operand. Every 1 becomes a 0, and vice versa. NOT is equivalent to XOR
with a mask of all 1s.
Operation It Performs
Flag Settings After Instruction
Examples
This example complements all bits of an 8-bit value in memory. The microcontroller changes
each 0 to a 1 and each 1 to a 0.
Form
Opcode
Description
Clocks
Am186 Am188
NOT
r/m8
F6
/2
Complement each bit in r/m byte
3/10
3/10
NOT
r/m16
F7
/2
Complement each bit in r/m word
3/10
3/14
NOT
component
/* complement bits of component */
component = ~ component;
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Processor Status
Flags Register
reserved
OF DF
IF TF SF ZF
AF
PF
CF
? = undefined; – = unchanged
–
–
–
–
–
– res – res – res –
INDICATORS
DB
11001010b
; complement indicators
NOT
INDICATORS
; INDICATORS = 00110101b
Summary of Contents for Am186 Series
Page 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Page 10: ...Table of Contents x...
Page 18: ...Programming 1 8...
Page 40: ...Instruction Set Listing 3 14...