Skip to content

Rose::BitOps::bitsLsb

Extract part of a value limited by width.

Synopsis

Declared in <src/Rose/BitOps.h>

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

Description

Extracts the bits in the range least through (inclusive) and shifts them right by least bits. Any bits of src at index w or greater are treated as zeros.

Return Value

Extracted bits.

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