Shr Function

Shift bits to the right in a natural number


Function

The function Shr shifts the bits of natural numbers in the first argument to the right. The number of steps is given in the second argument.

The number of steps must be between 0 and 31. Larger values are interpreted as modulo 32.

The argument can be a single number or a data field. For data fields, the number of each element is shifted and the results are returned in a data field of the same size.


Syntax

Shr (number, steps)

Shr (list, steps)

Shr (table, steps)

Example

Shr(8,2)= 2

Shr([9,12,15],2)= 2 3 3