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

# iushr

## Operation

Logical shift right `int`

## Format

```
iushr
```

## Forms

*iushr* = 124 (0x7c)

## Operand Stack

..., *value1*, *value2* →

..., *result*

## Description

Both *value1* and *value2* must be of type `int`. The values are popped from the operand stack. An `int` *result* is calculated by shifting *value1* right by *s* bit positions, with zero extension, where *s* is the value of the low 5 bits of *value2*. The *result* is pushed onto the operand stack.

## Notes

If *value1* is positive and *s* is *value2* & 0x1f, the result is the same as that of *value1* `>>` *s*; if *value1* is negative, the result is equal to the value of the expression (*value1* `>>` *s*) + (2 `<<` ~*s*). The addition of the (2 `<<` ~*s*) term cancels out the propagated sign bit. The shift distance actually used is always in the range 0 to 31, inclusive.
