Bit shift right unsigned

Supported in: Batch, Faster, Streaming

Shifts the given value a number of bits right, filling the vacated high bits with zeros. Byte and short values are widened to integers first. Only the lowest five bits of the number of bits are used for integers, and the lowest six for longs.

Expression categories: Binary

Declared arguments

  • Expression: The value to shift right.
    Expression<Byte | Integer | Long | Short>
  • Number of bits: The number of bits to shift right by.
    Literal<Integer>

Output type: Integer | Long

Examples

Example 1: Base case

Argument values:

  • Expression: value
  • Number of bits: 2
valueOutput
82
-81073741822

Example 2: Null case

Argument values:

  • Expression: value
  • Number of bits: 2
valueOutput
nullnull