NOT
By Vesper Vei
1 minute read
Table of Contents
NOT (not)
Basic function
NOT performs a bitwise inversion on the operand: dest = ~dest.
That is, all bits 0 → 1, and 1 → 0.
Instruction execution process
- Invert each bit
- Write the result back to the destination operand
- Does not affect any EFLAGS
Instruction format
not r/m8not r/m16not r/m32not r/m64Behavioral characteristics
- Single-operand instruction
- Does not modify flags
- Can be used to construct values, encryption, and mask processing
Common uses
- Constructing special immediates (with XOR, ADD, etc.)
- Implementing two’s complement relationships in logical operations
- Reversing all bits for verification and algorithm analysis
- Avoiding the direct appearance of certain bytes in shellcode