Skip to content

Bitcoin accepted at checkout  |  Ships from Laval, QC, Canada  |  Expert support since 2016

Opcode

Network & Protocol

Definition

An opcode (operation code) is a single-byte instruction in Bitcoin Script. Each opcode tells the script interpreter to perform one specific action on the stack — pushing data, duplicating or removing items, doing arithmetic or logical comparisons, hashing, or verifying signatures. Scripts are sequences of these opcodes, and complex spending conditions are built by composing many simple operations rather than writing free-form code.

Categories of opcodes

Opcodes fall into broad groups: data-pushing operations; stack manipulation such as OP_DUP and OP_DROP; arithmetic and logic; cryptographic operations like OP_HASH160, OP_CHECKSIG, and OP_CHECKMULTISIG; and flow-control and timelock operations such as OP_IF, OP_CHECKLOCKTIMEVERIFY, and OP_CHECKSEQUENCEVERIFY. Some opcodes were disabled early in Bitcoin's history for safety and remain unavailable.

Disabled and proposed opcodes

Several opcodes present in the original design — including OP_CAT, which concatenates two stack items — were disabled out of caution and are periodically revisited as candidates for re-enabling. New opcodes are also proposed to extend Script's capabilities, such as OP_CHECKTEMPLATEVERIFY and OP_VAULT for covenants. Adding or re-enabling an opcode is a consensus change requiring broad review, because every node must agree on exactly how it executes.

Opcodes are the atomic building blocks behind features like covenants and timelocks. See OP_CHECKTEMPLATEVERIFY (CTV) and the covenant entry for examples of proposed new opcodes.

In Simple Terms

An opcode (operation code) is a single-byte instruction in Bitcoin Script. Each opcode tells the script interpreter to perform one specific action on the stack…

Explore the Full Glossary

Browse all Bitcoin mining terms from A to Z. Whether you are a beginner or expert, deepen your understanding of the mining ecosystem.

Mining Glossary

ASIC Miner Database

Compare 500+ miners with real-time profitability data, home mining scores, and detailed specs.

Compare Miners