And its output will be a periodic signal with period no more than \$15 T\$ where \$T\$ is the clock period. Therefore the system must repeat its sequence of states at most every 15 cycles. The state transitions are entirely deterministic, so we know if we are in (for example) state 0110, the next state will always be 1011. The all-zeros state is not allowed (because 0 XOR 0 = 0, this state won't cause any change on the next cycle) Third question: does it generate a periodic sequence?įour flip-flops can only encode \$2^4=16\$ different states. There are ways to arrange to take more than one bit at a time as output, but they require changes to the logic. The second question is: which is the number of coded bits we see at the output?Īs drawn, you'd take one of the flip-flop outputs as your LFSR output. If using XNOR gates, then any starting state besides all-1's can be used. Normally you'd provide a SET or RESET input to the flip-flops to ensure they start up in the state you want.įor an LFSR using XOR gates, any starting state besides all-0's can be used. Let's suppose the first sequence of bit equal to 1011 (first question: how do we decide this sequence? It is the random sequence which is generated when flip flops are activated?