> For the complete documentation index, see [llms.txt](https://hub.bsvblockchain.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hub.bsvblockchain.org/wiki/bitcoin-script-and-opcodes/script/pushdata-opcodes.md).

# Pushdata Opcodes

**Pushdata opcodes** are the set of Bitcoin Script opcodes used to push data onto the script execution stack. Unlike most opcodes, which perform an operation on existing stack items, pushdata opcodes are used to supply the data and constants that other opcodes then operate on. The pushdata opcodes are:

* **Direct push (opcodes 1-75, 0x01-0x4b)** - the opcode value itself specifies the number of following bytes to push onto the stack.
* **OP\_PUSHDATA1 (76, 0x4c)** - the next byte contains the number of bytes to be pushed onto the stack, allowing data lengths up to 255 bytes.
* **OP\_PUSHDATA2 (77, 0x4d)** - the next two bytes (little-endian) contain the number of bytes to be pushed, allowing data lengths up to 65,535 bytes.
* **OP\_PUSHDATA4 (78, 0x4e)** - the next four bytes (little-endian) contain the number of bytes to be pushed, allowing arbitrarily large data lengths (subject to the current transaction and script size rules).
* **OP\_0 / OP\_FALSE (0, 0x00)** - pushes an empty byte array onto the stack.
* **OP\_1NEGATE (79, 0x4f)** - pushes the value -1 onto the stack.
* **OP\_1-OP\_16 / OP\_TRUE (81-96, 0x51-0x60)** - push the small integer values 1 through 16 onto the stack directly, without needing a following length byte and data. Since the Genesis upgrade, pushdata opcodes are no longer limited to pushing at most 520 bytes at a time, and OP\_PUSHDATA1/2/4 can be used to push data of any size permitted by the current transaction size and policy limits. See Opcodes used in Bitcoin Script for the full opcode table and Script for more on how the stack is used during script evaluation.


---

# 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://hub.bsvblockchain.org/wiki/bitcoin-script-and-opcodes/script/pushdata-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.
