|You are here:|
Replaces the value of operand (the destination operand) with its two's complement. (This operation is equivalent to subtracting the operand from 0.)
reg = 0 - regActually, a instruction is the result of a and as shown below:
00000101 5 11111010 not(5) 11111011 not(5)+1 = -5
if(Destination == 0) CF = 0; else CF = 1;
- The , , , , and flags are set according to the result.
mov eax, 0x5 ; eax = 5 (0x5) neg eax ; eax = -5 (0xFB)