rightLogShift

x >>> y

rightLogShift(x, y)

Try it yourself:


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(), a logical shift does not preserve a negative sign. Use leftShift() for leftward movement and bitOr() 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.

Try Right Log Shift in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions