sclass LSFR { int n, cycleLength, step, value, tap; int get() { if (++step > stepLength) step = 0; ret value |= countBits(value & tap) & 1; } }