---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 26 Edition"
java_version: 26
chapter: "Chapter 6. The Java Virtual Machine Instruction Set"
section: "6.5.l2i"
heading: "l2i"
parent: "6.5. Instructions"
source: https://docs.oracle.com/javase/specs/jvms/se26/html/jvms-6.html#jvms-6.5.l2i
id: "6.5.l2i"
url: https://jvm.obfuscated.software/jvms/se26/6.5.l2i.html
raw: https://jvm.obfuscated.software/jvms/se26/6.5.l2i.md
---

# l2i

## Operation

Convert `long` to `int`

## Format

```
l2i
```

## Forms

*l2i* = 136 (0x88)

## Operand Stack

..., *value* →

..., *result*

## Description

The *value* on the top of the operand stack must be of type `long`. It is popped from the operand stack and converted to an `int` *result* by taking the low-order 32 bits of the `long` value and discarding the high-order 32 bits. The *result* is pushed onto the operand stack.

## Notes

The *l2i* instruction performs a narrowing primitive conversion (JLS §5.1.3). It may lose information about the overall magnitude of *value*. The *result* may also not have the same sign as value.
