function shl(arg: unsigned; count: unsigned) return unsigned;
function shl(arg: signed; count: unsigned) return signed;
function shr(arg: unsigned; count: unsigned) return unsigned;
function shr(arg: signed; count: unsigned) return signed;
The bit shifting operations shift left (shl
) and shift right (shr
)
are defined on the unsigned
and signed
types.
They shift arg
in the given direction by count
places.
If all you really need to do is shift by a fixed number of places, you can do it by simple array subscripting.