Owning Palette: Boolean Functions
Requires: Base Development System
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.
Add to the block diagram | Find on the palette |
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 |