nn::math::ExtractBits Function

Syntax

template <typename T>
T ExtractBits(
     bit32 v,
     int pos,
     int len
);

template <typename T>
T ExtractBits(
     bit64 v,
     int pos,
     int len
);

List of Overloaded Member Functions

ExtractBits(bit32, int, int) Extracts the bitstring used to maintain the position.
ExtractBits(bit64, int, int) Extracts the bitstring used to maintain the position.

Description of ExtractBits(bit32, int, int)

Extracts the number of bits given by len, starting from the bit given by pos ([pos+len-1,pos]) from the low-order bits of v.

You can also make it so that 0's are created for bits other than those given by len, starting from the bit given by pos from the low-order bits of v.

Description of ExtractBits(bit64, int, int)

Extracts the number of bits given by len, starting from the bit given by pos ([pos+len-1,pos]) from the low-order bits of v.

You can also make it so that 0's are created for bits other than those given by len, starting from the bit given by pos from the low-order bits of v.


CONFIDENTIAL