Shift and Rotation

SHL

SHL(x,y)

Returns the bitstring x shifted left by y bits. Zero-bits are inserted at the right side. The least significant bit is assumed to be rightmost.

The function is overloaded for any bitstring type for x and any integer type for y. The type of x is used as return type.

Shift and Rotation 1:

CONSTRAINT:

Variable y must not be negative.

SHR

SHR(x,y)

Returns the bitstring x shifted right by y bits. Zero-bits are inserted at the left side. The least significant bit is assumed to be rightmost.

The function is overloaded for any bitstring type for x and for any integer type for y. The type of x is used as return type.

Shift and Rotation 2:

CONSTRAINT:

Variable y must not be negative.

ROL

ROL(x,y)

Returns the bitstring x rotated left by y bits. Bits that are shifted out at the left side are inserted at the right side. The least significant bit is assumed to be rightmost.

The function is overloaded for any bitstring type for x and for any integer type for y. The type of x is used as return type.

Shift and Rotation 3:

CONSTRAINT:

Variable y must not be negative.

ROR

ROR(x,y)

Returns the bitstring x rotated right by y bits. Bits that are shifted out at the right side are inserted at the left side. The least significant bit is assumed to be rightmost.

The function is overloaded for any bitstring type for x and for any integer type for y. The type of x is used as return type.

Shift and Rotation 4:

CONSTRAINT:

Variable y must not be negative.