 Given an appropriate tap configuration, such LFSRs can be used to generate Galois fields for arbitrary prime values of "q".As shown by George Marsaglia and further analysed by Richard P. Brent, linear feedback shift registers can be implemented efficiently using XOR and Shift operations.Below is a C code example for a 16-bit maximal-period Xorshift LFSR