bit2byte function

int bit2byte (
  1. List<int> bits
)

Implementation

int bit2byte (List<int> bits) {
  return (bits[0] * 1) +
         (bits[1] * 2) +
         (bits[2] * 4) +
         (bits[3] * 8) +
         (bits[4] * 16) +
         (bits[5] * 32) +
         (bits[6] * 64) +
         (bits[7] * 128);
}