> ## 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.

# Comparison

> Auto-generated API documentation

[**@tevm/voltaire**](../../index.mdx)

***

[@tevm/voltaire](../../index.mdx) / [evm](../index.mdx) / Comparison

# Comparison

## Functions

### EQ()

> **EQ**(`frame`): [`EvmError`](../index.mdx#evmerror) | `null`

Defined in: [src/evm/comparison/0x14\_EQ.js:18](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/evm/comparison/0x14_EQ.js#L18)

EQ opcode (0x14) - Equality comparison

Pops two values from stack and pushes 1 if they are equal, 0 otherwise.
Comparison is bitwise equality.

Gas: 3 (GasFastestStep)
Stack: a b -> (a == b ? 1 : 0)

#### Parameters

##### frame

[`BrandedFrame`](../index.mdx#brandedframe)

Execution frame

#### Returns

[`EvmError`](../index.mdx#evmerror) | `null`

Error if operation fails

***

### GT()

> **GT**(`frame`): [`EvmError`](../index.mdx#evmerror) | `null`

Defined in: [src/evm/comparison/0x11\_GT.js:18](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/evm/comparison/0x11_GT.js#L18)

GT opcode (0x11) - Greater than comparison (unsigned)

Pops two values from stack and pushes 1 if first > second, 0 otherwise.
All comparisons are unsigned 256-bit integers.

Gas: 3 (GasFastestStep)
Stack: a b -> (a > b ? 1 : 0)

#### Parameters

##### frame

[`BrandedFrame`](../index.mdx#brandedframe)

Execution frame

#### Returns

[`EvmError`](../index.mdx#evmerror) | `null`

Error if operation fails

***

### ISZERO()

> **ISZERO**(`frame`): [`EvmError`](../index.mdx#evmerror) | `null`

Defined in: [src/evm/comparison/0x15\_ISZERO.js:17](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/evm/comparison/0x15_ISZERO.js#L17)

ISZERO opcode (0x15) - Check if value is zero

Pops one value from stack and pushes 1 if it is zero, 0 otherwise.

Gas: 3 (GasFastestStep)
Stack: a -> (a == 0 ? 1 : 0)

#### Parameters

##### frame

[`BrandedFrame`](../index.mdx#brandedframe)

Execution frame

#### Returns

[`EvmError`](../index.mdx#evmerror) | `null`

Error if operation fails

***

### LT()

> **LT**(`frame`): [`EvmError`](../index.mdx#evmerror) | `null`

Defined in: [src/evm/comparison/0x10\_LT.js:18](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/evm/comparison/0x10_LT.js#L18)

LT opcode (0x10) - Less than comparison (unsigned)

Pops two values from stack and pushes 1 if first \< second, 0 otherwise.
All comparisons are unsigned 256-bit integers.

Gas: 3 (GasFastestStep)
Stack: a b -> (a \< b ? 1 : 0)

#### Parameters

##### frame

[`BrandedFrame`](../index.mdx#brandedframe)

Execution frame

#### Returns

[`EvmError`](../index.mdx#evmerror) | `null`

Error if operation fails

***

### SGT()

> **SGT**(`frame`): [`EvmError`](../index.mdx#evmerror) | `null`

Defined in: [src/evm/comparison/0x13\_SGT.js:19](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/evm/comparison/0x13_SGT.js#L19)

SGT opcode (0x13) - Signed greater than comparison

Pops two values from stack and pushes 1 if first > second (signed), 0 otherwise.
Values are interpreted as signed 256-bit two's complement integers.

Gas: 3 (GasFastestStep)
Stack: a b -> (signed(a) > signed(b) ? 1 : 0)

#### Parameters

##### frame

[`BrandedFrame`](../index.mdx#brandedframe)

Execution frame

#### Returns

[`EvmError`](../index.mdx#evmerror) | `null`

Error if operation fails

***

### SLT()

> **SLT**(`frame`): [`EvmError`](../index.mdx#evmerror) | `null`

Defined in: [src/evm/comparison/0x12\_SLT.js:19](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/evm/comparison/0x12_SLT.js#L19)

SLT opcode (0x12) - Signed less than comparison

Pops two values from stack and pushes 1 if first \< second (signed), 0 otherwise.
Values are interpreted as signed 256-bit two's complement integers.

Gas: 3 (GasFastestStep)
Stack: a b -> (signed(a) \< signed(b) ? 1 : 0)

#### Parameters

##### frame

[`BrandedFrame`](../index.mdx#brandedframe)

Execution frame

#### Returns

[`EvmError`](../index.mdx#evmerror) | `null`

Error if operation fails

***

### toSigned256()

> **toSigned256**(`value`): `bigint`

Defined in: [src/evm/comparison/toSigned256.js:10](https://github.com/evmts/voltaire/blob/bd6ec34405c15ad8cd51d11579d495dc53813482/src/evm/comparison/toSigned256.js#L10)

Convert unsigned 256-bit BigInt to signed 256-bit BigInt

Interprets the BigInt as a two's complement signed integer.
Values >= 2^255 are negative.

#### Parameters

##### value

`bigint`

Unsigned 256-bit value

#### Returns

`bigint`

Signed 256-bit value
