Opcodes · arithmetic · enabled
OP_1SUB (0x8c)
Subtracts 1 from the top number. Since May 2025 numbers may be up to 10,000 bytes long (BigInt).
Verified
- Stack in → out
- a → a-1
- Since
- Original Bitcoin script
- Cost
- Base instruction cost 100, plus the result length, plus the result length again to cover number encoding (2025 VM limits).
- Bitcoin status
- Same in Bitcoin (BTC)BTC limits arithmetic inputs to 4 bytes.
Example
OP_3 OP_1SUB OP_2 OP_EQUAL Step through it opcode by opcode in Bitauth IDE, the in-browser BCH VM debugger.