Parse an array of bits (`BitArray`) to an integer

Another option is:

bool2int(_boolarr) = evalpoly(2, reverse(_boolarr))

see: vector-bool-to-int

1 Like