A number of papers have been written from time to time about logical counters of a certain type which have quite simple logic and have been variously referred to as Binary Ring Counters, Shift Register Counters, Johnson Counters, etc. To my knowledge, most of these papers confine themselves to certain special cases and usually leave the subject with some speculation as to the possibility of generating periods of any desired length by the use of these special types. The point of view of this paper is to consider all possible counters of this general type to see how one would obtain a particular period. Special emphasis is placed on determining the least number of bits, n , required to produce a given period, K . The rules for counting are as follows. If an n -bit counter is in state ( a n -1 , a n -2 ···, a 2 , a 1 , a 0 ) at a given time, T , then at T + 1 its state is ( b n -1 , b n -2 , ···, b 1 , b 0 ) where b 0 = a n -1 , b i = a i -1 + c i a n -1 for i = 1, 2, ···, n - 1. The a 's, b 's, and c 's are all 0's or 1's, the c 's being constants, and the indicated operations are carried out using modulo 2 arithmetic. This is equivalent to considering the state of the counter as an ( n - 1)th degree polynomial in X , multiplying said polynomial by X and reducing it modulo m ( X ), where m ( X ) is a polynomial of degree n which is relatively prime to X . At time T the state of the counter corresponds to: A ( X ) = a n -1 X n -1 + a n -2 X n -2 + ··· + a 1 X + a 0 . The polynomial which corresponds to the state of the counter at time T + 1 is obtained by forming X · A ( X ) and reducing, if necessary, modulo m ( X ) = X n + c n -1 X n -1 + c n -2 X n -2 + ··· + c 1 X + 1. Since a n -1 · m ( X ) = 0 mod m ( X ), X · A ( X ) = X · A ( X )+ a n -1 m ( X ) mod m ( X ), so X · A ( X ) = ( a n -2 + c n -1 · a n -1 ) X n -1 + ( a n -3 + c n -2 a n -1 ) X n -2 + ··· + ( a 0 + c 1 a n -1 ) X + a n -1 = b n -1 X n -1 + b n -2 X n -2 + ··· + b 1 X + b 0 . It is well known that more than one possible period may be obtained depending upon the initial state of the counter. Several examples are given by Young [4]. However, starting with X itself will always yield the longest possible period for any given m ( X ) and, furthermore, any other periods possible will always be divisors of the major period (Theorem I below). Since these minor periods can always be obtained with moduli of lower degree they are of no real interest here, and throughout the remainder of this paper the expression “period of the counter” will be assumed to refer to the major period. The set of all polynomials whose coefficients are the integers modulo 2 is the polynomial domain GF (2, X ), which has among other things unique factorization into primes (irreducibles). If m ( X ) is in GF (2, X ), then GF (2, X ) modulo m ( X ) is a commutative ring. Thus it is closed under multiplication, but it may have proper divisors of zero. However, any element which is relatively prime to m ( X ) in GF (2, X ) has an inverse in GF (2, X )/ m ( X ) [1].
Read full abstract