OP_NEGATE changes the sign of the top numeric item on the stack. It turns positive numbers into their negative counterparts and vice versa. This opcode is particularly useful in scripts that require the inversion of values, such as in financial transactions involving refunds or reversals.
OP_Code Walkthrough
Negates the top item of the stack
Pop Top Item
Multiply Item by -1
Push Item