# evm_shl

Implements EVM SHL: shifts a UINT256 word left, discards bits above bit 255, and returns zero for counts at least 256. Negative SQL BIGINT counts throw Invalid Input Error: Shift amount must be non-negative. NULL input propagates to NULL.

Canonical HTML: <https://determica.com/docs/functions/evm_shl>

- Kind: scalar function
- Category: [EVM utilities](/docs/category/evm-utilities.md)
- Tags: Types, EVM

Implements EVM SHL: shifts a UINT256 word left, discards bits above bit 255, and returns zero for counts at least 256. Negative SQL BIGINT counts throw Invalid Input Error: Shift amount must be non-negative. NULL input propagates to NULL.

## Overload 1: evm_shl(BIGINT, UINT256)

```sql
evm_shl(BIGINT, UINT256)
```

Logical left shift with EVM 256-bit word truncation.

- Kind: scalar
- Execution context: Offline
- Behavior: Transform
- Execution modes: Offline
- Input shape: Scalar Arguments
- Planning contract: Runtime
- Cardinality: One Per Input
- Determinism: Deterministic
- Return shape: Scalar
- Schema stability: Fixed
- Stability: Stable
- Side effects: None documented

### Inputs

- `shift` (BIGINT; required; positional) — Non-negative BIGINT bit count.
- `x` (UINT256; required; positional) — UINT256 word shifted toward bit 255.

### Returns

Left-shifted word

UINT256 shifted word, zero for shift >= 256, or NULL for NULL input.

- `result` (UINT256)

Left-shifted word. UINT256 shifted word, zero for shift >= 256, or NULL for NULL input.

### Examples

_Local SQL · Local_

```sql
SELECT evm_shl(8::BIGINT, 1::UINT256)::VARCHAR AS result;
-- => [{"result":"256"}]
```
