Boolean Array to Number

Converts a Boolean array to an integer by interpreting the array as the binary representation of the number. If the number is signed, this node interprets the array as the two's complement representation of the number. The first element of the array corresponds to the least significant bit in the number.

1378

Inputs/Outputs

datatype_icon

Boolean array

A 1D array of Boolean values.

This node truncates the Boolean array if it is too long and pads it with Boolean False bits if the Boolean array is too short.

datatype_icon

number

An integer that represents Boolean array.

Examples

Boolean array number
{False, False} 0
{True, False} 1
{False, True} 2
{True, True} 3