There is a linear algebra approach to shift registers. To study it, we consider with a shift polynomial s R[X] of degree n-1.

The transition of the registers is given by the so-called transition matrix

A =
0 0 0   ···   0 s0
1 0   ···   0 s1
0 1 0   ···   0 s2
  ···  
0 0 0   ···   0 sn-2
0 0 0   ···   1 sn-1

of the shift register. At the transition from state k to k+1, the content (gk-n, ..., gk-1) of the registers changes into

(gk-n+1, ..., gk) = (gk-n, ..., gk-1)A.

The special form of the transition matrix A allows us to write down the minimal polynomial of A without computing.

Fact

Let R be a field and assume that A is the transition matrix of a shift register with shift polynomial s R[X]. Then Xn - s is the minimal polynomial of A.


One of the questions regarding a given shift register is `what is its period', that is, the minimal (positive) number of shifts needed for the shift register to return to its initial state regardless of the specific values of the initial state g0, ..., gn-1. We say that the period is infinite if no such number exists.

Shift register period theorem

Consider a linear shift register with transition matrix A over R. If the minimal polynomial f R[X] of A is a divisor of Xd - 1, then the period of the shift register is a divisor of d.