int LFSR ;
int tap1 = (1 << (31-1) ) ; // 0b100000000000000, 2^31 = 2147483648
int tap2 = ( 1 << (28-1) ) ; // 0b010000000000000
int generateBit() {
  newBit=0 ;
  if ( (LFSR & tap1) != 0) { newBit ^= 1 ; } 
  if ( (LFSR & tap2) != 0) { newBit ^= 1 ; }
  LFSR = (LFSR<<1) | newBit ;
  return newBit ;
  }
