Skip to content

Rose::BitOps::maskLsb

Generate a mask without affecting other bits.

Synopsis

Declared in <src/Rose/BitOps.h>

template<typename Unsigned>
Unsigned
maskLsb(
    Unsigned src,
    size_t w,
    size_t least,
    size_t greatest);

Description

Generates a mask limited to the low order w bits without affecting the other bits of src.

Return Value

Updated value.

Parameters

Name

Description

src

Input value.

w

Width of the low‐order region.

least

Least significant bit index.

greatest

Most significant bit index.

Created with MrDocs