Boolean Array To Number Function
- Updated2025-01-28
- 3 minute(s) read
Boolean Array To Number Function
Converts a Boolean array to an integer or a fixed-point number by interpreting the array as the binary representation of the number. The first element of the array corresponds to the least significant bit in the number.

Inputs/Outputs
![]() Boolean array is a one-dimensional array of Boolean values. This function truncates Boolean array if it is too long. If Boolean array is too short, this function pads Boolean array according to the Sign Extension Mode you can select by right-clicking the function.
![]() number is an integer or a fixed-point number. You can change the numeric representation of number on the Output Configuration page of the Properties dialog box. Right-click the function and select Properties to display the Properties dialog box. |
The following table shows the relationship between Boolean array and number.
Boolean array | Output Representation | Sign Extension Mode | Binary Value | number |
---|---|---|---|---|
{FALSE, TRUE} | I8 | If Output Is Signed | 11111110 | -2 |
{FALSE, TRUE} | U8 | If Output Is Signed | 00000010 | 2 |
{FALSE, TRUE, FALSE, TRUE} | I8 | Always | 11111010 | -6 |
{FALSE, TRUE, FALSE, TRUE} | I8 | Never | 00001010 | 10 |
{FALSE, FALSE, TRUE, FALSE, TRUE} | U8 | If Output Is Signed | 00010100 | 20 |
{FALSE, FALSE, TRUE, FALSE, TRUE} | U8 | Always | 11110100 | 244 |
FPGA Module Details
The following details apply when you use this object in an FPGA VI.
Single-Cycle Timed Loop | Supported. |
Usage | The FPGA Module supports only one-dimensional arrays that resolve to a single size at compile time. The Boolean Array To Number function converts fixed-size arrays by default to use the smallest unsigned integer representation that will fit the array size. |
Timing | This function requires no clock cycles to execute because it does not include internal registers. |
Properties Dialog Box | The data type of number changes based on the size of the array when the Adapt to source checkbox in the Output Configuration page contains a checkmark. The following list describes the relationship between the array size and the data type of number:
|
Resources | This function consumes no FPGA resources because it is purely a wiring operation. |