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.

Sources

  1. CHIP-2025-05 Bitwise: Re-Enable Bitwise Operations
  2. Libauth BCH_2026_05 opcodes (bch-2026-opcodes.ts)
  3. Announcing Bitcoin Cash Node v29.0.0