Opcodes · bitwise · enabled

OP_XOR (0x86)

Bitwise XOR of two byte strings of equal length. Disabled in Bitcoin since 2010 and re-enabled on BCH in May 2018.

Verified
Stack in → out
a b → a^b
Cost
Base instruction cost 100 plus result length, counted as a push even if done in place (2025 VM limits).
Bitcoin status
Disabled in Bitcoin (BTC)Disabled since 2010; an OP_SUCCESS code in Tapscript.

Example

<0x0f> <0x3c> OP_XOR

Step through it opcode by opcode in Bitauth IDE, the in-browser BCH VM debugger.

Sources

  1. BCHN upgrade specs: Restore disabled script opcodes, May 2018
  2. Libauth BCH_2023_05 opcodes (bch-2023-opcodes.ts)
  3. CHIP-2021-05 VM Limits: Targeted Virtual Machine Limits