Source: docs/lotus-v2/research/legacy-v1/script/opcodes.md
Research — non-normative. This page records an investigation. It defines no rule; a research result enters the specification only through a decision recorded in decision history.

title: "Opcodes" linkTitle: "Opcodes" weight: 60


Basic Script

Differences from Bitcoin:

Bitwise Operators

OP_XOR

a b OP_XOR -> c

Same specification as Bitcoin Cash with the requirement that the operands be the same size removed.

OP_AND

a b OP_AND -> c

Same specification as Bitcoin Cash with the requirement that the operands be the same size removed.

OP_NUM2BIN

a b OP_NUM2BIN -> c

Same specification as Bitcoin Cash with the requirement that the BIN size must be less than or equal to 68 bytes.

OP_RAWBITSHIFT

a b OP_RAWBITSHIFT -> c

Pops the top two stack elements. Shifts the top stack element left by b bits. b may be negative. Overflows, drop excess bits.

OP_MULPOW2

a b OP_MULPOW2 -> c

Pops the top two stack elements. Multiplies a by 2^b. b may be negative. Overflows result in a script error.