code: public static boolean[][] getTruthTable(int colCount) {
                  boolean[][] table = new boolean[colCount][(int) Math.pow(2, colCount)];
                  for (int i = 1; i <= colCount; i++) {
                          for (int j = 0; j < (int) Math.pow(2, colCount); j++) {
                                  //System.out.println(i+" "+j+" "+(int) Math.floor(j/Math.pow(2,i-1)));
                                  table[i - 1][j] = (((int) Math.floor(j / Math.pow(2, i - 1))) % 2) == 0;
                          }
                  }
                  return table;
          }
docs: Constucts a truth-table for the given column-number. <br>
  The number of table rows is 2^columnCount.<br>
  A truth-table with three columns looks like this:<br>
  (0=<tt>false</tt>, 1=<tt>true</tt>)<br>
  <br>
  <ul>
  <li>0 0 0</li>
  <li>0 0 1</li>
  <li>0 1 0</li>
  <li>0 1 1</li>
  <li>1 0 0</li>
  <li>1 0 1</li>
  <li>1 1 0</li>
  <li>1 1 1</li>
  </ul>
  <br>
  
  @param colCount The number of columns.
  @return The constructed truth-table