static int width = 8; // zum Beispiel static int decode (boolean [] x) { int accu = 0; for (int i=width-1; i>=0; i--) { accu *= 2; if (x[i]) { accu ++; } } return accu; }