Extract a bit pattern from an integer and store it with an optional shift in a new integer.
- Template Parameters
-
| t_num_bits | The patterns number of bits |
| T_Type | The type of the source integer. |
| T_ReturnType | The type of the returned integer |
- Parameters
-
| [in] | integer | The source integer |
| [in] | index | The index of the first bit of the bit pattern |
| [in] | shift | An integer that specifies the direction and magnitude that the bit pattern should be shifted. Positive values will shift it to the left (higher values) while negative values will shift the bit to the right (lower values). |
- Returns
- An integer containing the extracted and shifted bit pattern.