> For the complete documentation index, see [llms.txt](https://docs.blockdagnetwork.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.blockdagnetwork.io/get-started/introductory-concepts/evm/opcodes.md).

# Opcodes

This document serves as an updated reference for BlockDAG opcodes, inspired by established opcode references. It provides an accessible yet comprehensive guide to the execution instructions utilized within the BlockDAG ecosystem. These opcodes define how transactions, contract execution, and state changes occur on the network.

### Understanding BlockDAG Opcodes <a href="#whats-a-transaction" id="whats-a-transaction"></a>

In BlockDAG, opcodes are low-level instructions that the virtual machine executes to process transactions and smart contract operations. Each opcode performs a specific function, such as mathematical computations, data storage, or smart contract execution.

### Key Features of BlockDAG Opcodes <a href="#whats-a-transaction" id="whats-a-transaction"></a>

* **Transaction Execution:** Opcodes define how transactions are processed and state changes are applied.
* **Smart Contract Operations:** Contract interactions rely on opcode execution to enable decentralized applications.
* **Gas Consumption:** Each opcode has an associated gas cost, ensuring efficient computation and network security.
* **Storage & Memory Management:** Opcodes handle data storage, retrieval, and manipulation within smart contracts.

### Categories of BlockDAG Opcodes <a href="#whats-a-transaction" id="whats-a-transaction"></a>

* **Arithmetic Operations:** Addition, subtraction, multiplication, and division of integers.
* **Logical Operations:** Boolean operations like AND, OR, XOR, and bitwise shifting.
* **Memory & Storage:** Reading and writing data from memory or contract storage.
* **Execution Control:** Jumps, conditionals, and function calls within contracts.
* **Blockchain Interaction:** Fetching block data, account balances, and interacting with contracts.

### Importance of Opcodes Execution in BlockDAG <a href="#whats-a-transaction" id="whats-a-transaction"></a>

BlockDAG’s opcode architecture ensures efficient transaction processing and smart contract execution. Each opcode is optimized to support high-performance decentralized applications while maintaining security and decentralization.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.blockdagnetwork.io/get-started/introductory-concepts/evm/opcodes.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
