Opcodes · arithmetic · enabled
OP_RSHIFTNUM (0x8e)
Arithmetic right shift: divides number a by 2 to the power `bits`, rounding toward negative infinity. Negative shift counts fail. This byte was the disabled OP_2DIV before May 2026.
Verified
- Stack in → out
- a bits → floor(a/2^bits)
- Cost
- Base instruction cost 100 plus the byte length of the pushed result (2025 VM limits).
- Bitcoin status
- Disabled in Bitcoin (BTC)0x8e is the disabled OP_2DIV in BTC; an OP_SUCCESS code in Tapscript.
Example
OP_12 OP_2 OP_RSHIFTNUM OP_3 OP_EQUAL Step through it opcode by opcode in Bitauth IDE, the in-browser BCH VM debugger.