UNB ECE4253 Digital Communications
Department of Electrical and Computer Engineering - University of New Brunswick, Fredericton, NB, Canada

Linear Recursive Sequence Generator

Shift registers with feedback essentially divide polynomials to create distinctive binary sequences.

This online tool draws and analyzes digital circuits which generate Linear Recursive Sequences (LRS) based on a defining polynomial P(x). The circuit shown below is traced through all possible states. Maximum length sequences are identified. The autocorrelation of each sequence can also be checked (maximum 1023 bits).


Galois Implementation

* alternate configuration
Galois
Circuit based on P(x) = x8+x6+x5+x4+x3+x+1

The circuit taps correspond to P(x) = (101111011) in reversed order as (110111101).
Taps: (110111101) (prime)
Sequence #1 (Starting with 0)
States: 0 ⇒ 0, forever...

Sequence #2 (Starting with 1)
States: 1 ⇒ 222 ⇒ 111 ⇒ 233 ⇒ 170 ⇒ 85 ⇒ 244 ⇒ 122 ⇒ 61 ⇒ 192 ⇒ 96 ⇒ 48 ⇒ 24 ⇒ 12 ⇒ 6 ⇒ 3 ⇒ 223 ⇒ 177 ⇒ 134 ⇒ 67 ⇒ 255 ⇒ 161 ⇒ 142 ⇒ 71 ⇒ 253 ⇒ 160 ⇒ 80 ⇒ 40 ⇒ 20 ⇒ 10 ⇒ 5 ⇒ 220 ⇒ 110 ⇒ 55 ⇒ 197 ⇒ 188 ⇒ 94 ⇒ 47 ⇒ 201 ⇒ 186 ⇒ 93 ⇒ 240 ⇒ 120 ⇒ 60 ⇒ 30 ⇒ 15 ⇒ 217 ⇒ 178 ⇒ 89 ⇒ 242 ⇒ 121 ⇒ 226 ⇒ 113 ⇒ 230 ⇒ 115 ⇒ 231 ⇒ 173 ⇒ 136 ⇒ 68 ⇒ 34 ⇒ 17 ⇒ 214 ⇒ 107 ⇒ 235 ⇒ 171 ⇒ 139 ⇒ 155 ⇒ 147 ⇒ 151 ⇒ 149 ⇒ 148 ⇒ 74 ⇒ 37 ⇒ 204 ⇒ 102 ⇒ 51 ⇒ 199 ⇒ 189 ⇒ 128 ⇒ 64 ⇒ 32 ⇒ 16 ⇒ 8 ⇒ 4 ⇒ 2 ⇒ 1
Period = 85 (autocorrelation)
Output =
1011010010000001110111011000001001100110100001101010101110001011
111111001001110000000...

Sequence #3 (Starting with 7)
States: 7 ⇒ 221 ⇒ 176 ⇒ 88 ⇒ 44 ⇒ 22 ⇒ 11 ⇒ 219 ⇒ 179 ⇒ 135 ⇒ 157 ⇒ 144 ⇒ 72 ⇒ 36 ⇒ 18 ⇒ 9 ⇒ 218 ⇒ 109 ⇒ 232 ⇒ 116 ⇒ 58 ⇒ 29 ⇒ 208 ⇒ 104 ⇒ 52 ⇒ 26 ⇒ 13 ⇒ 216 ⇒ 108 ⇒ 54 ⇒ 27 ⇒ 211 ⇒ 183 ⇒ 133 ⇒ 156 ⇒ 78 ⇒ 39 ⇒ 205 ⇒ 184 ⇒ 92 ⇒ 46 ⇒ 23 ⇒ 213 ⇒ 180 ⇒ 90 ⇒ 45 ⇒ 200 ⇒ 100 ⇒ 50 ⇒ 25 ⇒ 210 ⇒ 105 ⇒ 234 ⇒ 117 ⇒ 228 ⇒ 114 ⇒ 57 ⇒ 194 ⇒ 97 ⇒ 238 ⇒ 119 ⇒ 229 ⇒ 172 ⇒ 86 ⇒ 43 ⇒ 203 ⇒ 187 ⇒ 131 ⇒ 159 ⇒ 145 ⇒ 150 ⇒ 75 ⇒ 251 ⇒ 163 ⇒ 143 ⇒ 153 ⇒ 146 ⇒ 73 ⇒ 250 ⇒ 125 ⇒ 224 ⇒ 112 ⇒ 56 ⇒ 28 ⇒ 14 ⇒ 7
Period = 85 (autocorrelation)
Output =
1100001111100001010001000010001111001100011001000101010010101100
111111011111010100000...

Sequence #4 (Starting with 19)
States: 19 ⇒ 215 ⇒ 181 ⇒ 132 ⇒ 66 ⇒ 33 ⇒ 206 ⇒ 103 ⇒ 237 ⇒ 168 ⇒ 84 ⇒ 42 ⇒ 21 ⇒ 212 ⇒ 106 ⇒ 53 ⇒ 196 ⇒ 98 ⇒ 49 ⇒ 198 ⇒ 99 ⇒ 239 ⇒ 169 ⇒ 138 ⇒ 69 ⇒ 252 ⇒ 126 ⇒ 63 ⇒ 193 ⇒ 190 ⇒ 95 ⇒ 241 ⇒ 166 ⇒ 83 ⇒ 247 ⇒ 165 ⇒ 140 ⇒ 70 ⇒ 35 ⇒ 207 ⇒ 185 ⇒ 130 ⇒ 65 ⇒ 254 ⇒ 127 ⇒ 225 ⇒ 174 ⇒ 87 ⇒ 245 ⇒ 164 ⇒ 82 ⇒ 41 ⇒ 202 ⇒ 101 ⇒ 236 ⇒ 118 ⇒ 59 ⇒ 195 ⇒ 191 ⇒ 129 ⇒ 158 ⇒ 79 ⇒ 249 ⇒ 162 ⇒ 81 ⇒ 246 ⇒ 123 ⇒ 227 ⇒ 175 ⇒ 137 ⇒ 154 ⇒ 77 ⇒ 248 ⇒ 124 ⇒ 62 ⇒ 31 ⇒ 209 ⇒ 182 ⇒ 91 ⇒ 243 ⇒ 167 ⇒ 141 ⇒ 152 ⇒ 76 ⇒ 38 ⇒ 19
Period = 85 (autocorrelation)
Output =
1110010110001001001011101001101101110011101011011001010011110110
101111010001101111000...

In this example, a prime polynomial failed to give a maximum length sequence. For this polynomial of degree 8, the maximum length sequence would have a period of 28-1 states. Use of a prime polynomial is a necessary but not sufficient condition for a maximum length sequence. Only "primitive primes" give maximum length sequences.

See a detailed analysis and State Table for this circuit.

Specify the taps for your sequence
Binary Value:    Reversed

Modulo 2 addition is shown schematically equivalent to Exclusive-OR gates.

2024-05-15 23:24:27 ADT
Last Updated: 04-09-25
Richard Tervo [ tervo@unb.ca ] Back to the course homepage...