Skip to content

Rose::BitOps::rotateRightLsb

Rotate low‐order bits right without affecting others.

Synopsis

Declared in <src/Rose/BitOps.h>

template<typename Unsigned>
Unsigned
rotateRightLsb(
    Unsigned src,
    size_t w,
    size_t n);

Description

Rotates the low‐order w bits of src right by n bits without affecting the higher‐order bits, and returns the result. The rotation amount is modulo w. If w is zero then the original value is returned.

Return Value

Updated value.

Parameters

Name

Description

src

Input value.

w

Width of the low‐order region.

n

Rotation count.

Created with MrDocs