Array of boolean to binary byte

Viewed 24

I have an array of boolean

 boolean[] bits={true,true,false,true,false,true,false,true}
               //bit7,bit6, bit5,bit4, bit3,bit2, bit1,bit0

How can I transform it to a single byte where the left most value is the most significant bit?

0 Answers
Related