Converting 8-bit binary array to decimal number

The first thing to do is to make it a byte array to save space. Then read each entry in the array and use bitWrite() to set the bits in a variable then shift out the variable. Better still set the bits in a variable in the first place instead of using an array.