If each sample can be represented by an array of boolean, you can use the Convert Boolean Array to Number primitive located in the Boolean palette to convert the samples one by one. The format is lsb-first so if you need msb-first, you can reverse your array with the Reverse 1D Array primitive in the Array palette.