not
One's complement negation
Inverts every bit of the operand to give its ones complement, leaving the flags unchanged.
8086 and latertakes lock
Used in
- Arithmetic, logic and bitsx86-64 assembly
CFPFAFZFSFDFOF –––––––
- Changes no flag
Forms
Operands
r/m- A general-purpose register or memory location matching the operation’s size, for example
raxorqword [rbp-8]. The byte registersah,bh,chanddhcannot be used with a REX prefix, including when the memory address usesr8–r15.
NOT, similarly, performs one's complement (inverts all
the bits).
global _start
section .text
_start:
mov rax, 12
mov rbx, 5
mov rcx, 3
mov rsi, 9
not rax
mov rax, 60 ; syscall 60: exit
xor rdi, rdi
syscall