Appearance
Bit Extract
Extracts a single bit from an integer signal: out = (in >> bit_index) & 1. Useful for picking individual flags out of a status word.
Category: Digital Logic / Bits
Keywords: bit, extract, field, isolate, flag, shift, bit-extract
Ports
| Name | Direction | Value type | Notes |
|---|---|---|---|
in | input | int | |
out | output | int |
Parameters
| Name | Label | Type | Default | Units | Description |
|---|---|---|---|---|---|
bit_index | Bit | int | 0 | — | Bit position to extract (0 = LSB). Result is 0 or 1: out = (in >> bit_index) & 1. |
Implemented in C++ class SimCompCtlBitExtract (components/control/CSim_comp_ctl_bit_extract/sim_comp_ctl_bit_extract.h).