Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
If the user wants to push -10 onto the stack.
Would I do "10 OP_NEGATE" ?
Or could I convert it to the hex value by doing 0x80 + 10 = 0X8A ?
Both will work. OP_NEGATE simply XORs with 0x80, so you can also directly push the result.
Required, but never shown