CHIPs · CHIP-2025-05 · activated
Bitwise: Re-Enable Bitwise Operations
Enables OP_INVERT plus numeric and binary left/right shifts, completing Script's bitwise toolkit.
Summary
This CHIP “re-enables bitwise operations, enabling Bitcoin Cash contracts to more efficiently implement a variety of financial and cryptographic applications.”
Motivation
The May 2018 upgrade restored OP_AND, OP_OR and
OP_XOR, but bit inversion and shifts stayed disabled. The CHIP’s summary gives the reason to
enable them: more efficient financial and cryptographic contracts. The CHIP itself is short on examples; its
rationale and alternatives live in separate documents in the repository.
With VM Limits charging each operation by the bytes it pushes, these opcodes fit into the existing cost system. A shift whose result would exceed the maximum stack item length fails.
What it specifies
Five opcodes:
| Opcode | Code | Does |
|---|---|---|
OP_INVERT |
0x83 |
bitwise NOT of every byte |
OP_LSHIFTNUM |
0x8d |
numeric left shift |
OP_RSHIFTNUM |
0x8e |
numeric right shift |
OP_LSHIFTBIN |
0x98 |
binary (bit-string) left shift |
OP_RSHIFTBIN |
0x99 |
binary (bit-string) right shift |
Each is charged the base instruction cost plus the length of its result.
Current status
Activated on 15 May 2026 (version 1.1.1 was frozen for lock-in). The stakeholder table records 91 approvals, 1 disapproval (Coin Wallet) and 420 neutral; non-responses were counted as neutral.
Stakeholder positions
Only public statements we could link to. Silence is not listed as a position.