# rightLogShift() Function & Examples

Use the rightLogShift() bitwise function in Calcul.io. Review its syntax, edit working examples, understand the result, and explore related math functions.

## rightLogShift

#### x >>> y

#### rightLogShift(x, y)

Try it yourself:

```calculio
8 >>> 1
4 << 1
-12 >>> 2
```

---

## rightLogShift(): Unsigned Bit Shift Right

**rightLogShift()** shifts bits right and fills positions on the left with zeros. It is useful when an integer should be treated as an unsigned bit pattern, such as packed flags or binary protocol fields.

## Logical versus arithmetic shifts

Unlike [rightArithShift()](https://calcul.io/function/rightArithShift/index.md), a logical shift does not preserve a negative sign. Use [leftShift()](https://calcul.io/function/leftShift/index.md) for leftward movement and [bitOr()](https://calcul.io/function/bitOr/index.md) to assemble flags.

Validate shift count and integer width. A decimal-looking negative number is still a bit pattern under logical shifts, so document whether your data is signed or unsigned.

[All functions](https://calcul.io/functions/index.md)
