nn::math::ExtractBits Function
template <typename T>
T ExtractBits(
bit32 v,
int pos,
int len
);
| Name | Description |
|---|---|
| T | Return value type. |
| Name | Description | |
|---|---|---|
| in | v | Value to operate on. |
| in | pos | A position relative to the lowest bit. |
| in | len | The bit length of the bit string to be extracted. |
Extracts the bitstring used to maintain the position.
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