> ## Documentation Index
> Fetch the complete documentation index at: https://voltaire.tevm.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# isDup()

> Check if opcode is DUP1-DUP16

<Card title="Try it Live" icon="play" href="https://playground.tevm.sh?example=primitives/opcode.ts">
  Run Opcode examples in the interactive playground
</Card>

## Opcode.isDup()

Check if opcode is DUP1-DUP16.

<Tabs>
  <Tab title="Functional API">
    ```typescript theme={null}
    import { isDup, DUP1, DUP16 } from 'tevm/Opcode'

    isDup(DUP1)   // true
    isDup(DUP16)  // true
    ```
  </Tab>
</Tabs>

## Parameters

* `opcode: BrandedOpcode` - Opcode to check

## Returns

`boolean` - True if DUP1-DUP16 (0x80-0x8F)

## DUP Operations

Duplicate stack item at depth 1-16:

* **DUP1** (0x80): Duplicate top item
* **DUP2** (0x81): Duplicate 2nd item
* **DUP16** (0x8F): Duplicate 16th item

## Related

* [dupPosition()](/primitives/opcode/dup-position) - Get DUP stack position
