Template Function Rose::BitOps::shiftRightSigned(Unsigned, size_t, size_t)

Template Function Rose::BitOps::shiftRightSigned(Unsigned, size_t, size_t)#

Function Documentation#

template<typename Unsigned>
inline Unsigned Rose::BitOps::shiftRightSigned(Unsigned src, size_t w, size_t n)#

Right shift low bits without affecting other bits.

Right shift the low-order w bits by n without affecting higher order bits. The width, w, must not be larger than the src

width. If

is greater than or equal to

w then the w low order bits are set or cleared depending on bit w-1. Otherwise, the n low order bits are discarded and the n new bits introduced at index w-1 are either zero or one depending on bit w-1.