Period bound for a linear-feedback shift register (source code)

= Period bound for a linear-feedback shift register

A degree-$d$ binary register has $2^d$ states. The zero state is fixed, so a nonzero periodic orbit has length at most $2^d-1$.