Period of pseudo random sequence generated from (5, 2, 0) LFSR I was reading about the Linear Feedback Shift Registers and I am confused about the technique to find the period of a primitive polynomial. Consider the polynomial $x^5 + x^2 + 1$. As this is a primitive polynomial, it should be a maximal period LFSR. Its period should be $2^5 - 1 = 31$. However, when I tried to generate a pseudo random sequence from this, the period turns out to be $15$.



01 -&gt; 11111           32 -&gt; 01111
02 -&gt; 01111           33 -&gt; 10111
03 -&gt; 10111           34 -&gt; 01011
04 -&gt; 01011           35 -&gt; 10101
05 -&gt; 10101           36 -&gt; 11010
06 -&gt; 11010           37 -&gt; 01101
07 -&gt; 01101           38 -&gt; 00110
08 -&gt; 00110           39 -&gt; 10011
09 -&gt; 10011           40 -&gt; 01001
10 -&gt; 01001           41 -&gt; 00100
11 -&gt; 00100           42 -&gt; 00010
12 -&gt; 00010           43 -&gt; 10001
13 -&gt; 10001           44 -&gt; 11000
14 -&gt; 11000           45 -&gt; 11100
15 -&gt; 11100           46 -&gt; 11110
16 -&gt; 11110           47 -&gt; 01111
17 -&gt; 01111           48 -&gt; 10111
18 -&gt; 10111           49 -&gt; 01011
19 -&gt; 01011           50 -&gt; 10101
20 -&gt; 10101           51 -&gt; 11010
21 -&gt; 11010           52 -&gt; 01101
22 -&gt; 01101           53 -&gt; 00110
23 -&gt; 00110           54 -&gt; 10011
24 -&gt; 10011           55 -&gt; 01001
25 -&gt; 01001           56 -&gt; 00100
26 -&gt; 00100           57 -&gt; 00010
27 -&gt; 00010           58 -&gt; 10001
28 -&gt; 10001           59 -&gt; 11000
29 -&gt; 11000           60 -&gt; 11100
30 -&gt; 11100           61 -&gt; 11110
31 -&gt; 11110          

1, 111101011001000, 111101011001000, 111101011001000, 111101011001000, 11 


What is the correct period of this sequence? Is it 15 or 31?
I believe that you're evaluating the feedback polynomial incorrectly; both in your diagram, and in the chart you have listed, it would appear that you have a feedback polynomial similar to $x^5 + x^4 + x$ (note: there are a couple of different ways to turn a feedback polynomial into an LFSR; I'm not sure which one you're intending to use).

To fix your diagram, one way to fix it is if you place the taps at $b_3$ and $b_1$ (not $b_5$ and $b_2$)