cashscript
cashscript copied to clipboard
Bitshift ops (2026 network upgrade)
There is a proposal to add bitshift ops to BCH as part of the 2026 network upgrade.
The virtual machine is modified to enable five bitwise opcodes: OP_INVERT, OP_LSHIFTNUM, OP_RSHIFTNUM, OP_LSHIFTBIN, and OP_RSHIFTBIN.
It would be good to consider the possible syntax this would translate to in CashScript. There's some industry standard notation which can be used but we might want to consider if we need different syntax for the binary ops compared to the numeric ops
currently our docs say:
Note the lack of the bitshift operators (<< and >>) as well as bitwise INVERT (~).