public static void main(String s[]) {
    testLoop: for (int bits = MIN_BITS ; bits <= MAX_BITS ; bits++) {
      final int period = (1 << bits) - 1 ;
      final boolean reg[] = new boolean[period] ;
      final LFSR lfsr = new LFSR(bits, 1) ;
      I.say("\nBeginning test for "+bits+" bit LFSR...") ;
      //
      //  Begin an exhaustive check.
      for (int i = 0 ; i++ <= period ;) {
        final int val = lfsr.nextVal() ;
        if (reg[val - 1] == true) {
          I.say("Duplicated value after "+i+" steps- ") ;
          if (i < period) I.add("___TEST FAILED___") ;
          else I.add("Test successful!") ;
          continue testLoop ;
        }
        else reg[val - 1] = true ;
      }
      I.say("Test failed- seed value does not recur.") ;
    }
  }