shr

infix fun Byte.shr(bitCount: Int): Byte

Shifts this value right by the bitCount number of bits, filling the leftmost bits with copies of the sign bit.

Note that the result is a Byte. If bitCount is greater than 6, the result will be 0 or -1.


infix fun UByte.shr(bitCount: Int): UByte

Shifts this value right by the bitCount number of bits, filling the leftmost bits with zeros.

Note that the result is a UByte. If bitCount is greater than 7, the result will be 0.


infix fun Short.shr(bitCount: Int): Short

Shifts this value right by the bitCount number of bits, filling the leftmost bits with copies of the sign bit.

Note that the result is a Short. If bitCount is greater than 14, the result will be 0 or -1.


infix fun UShort.shr(bitCount: Int): UShort

Shifts this value right by the bitCount number of bits, filling the leftmost bits with zeros.

Note that the result is a UShort. If bitCount is greater than 15, the result will be 0.