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+x7+x5+x4+x3+x2+1

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

Sequence #2 (Starting with 1)
States: 1 ⇒ 189 ⇒ 227 ⇒ 204 ⇒ 102 ⇒ 51 ⇒ 164 ⇒ 82 ⇒ 41 ⇒ 169 ⇒ 233 ⇒ 201 ⇒ 217 ⇒ 209 ⇒ 213 ⇒ 215 ⇒ 214 ⇒ 107 ⇒ 136 ⇒ 68 ⇒ 34 ⇒ 17 ⇒ 181 ⇒ 231 ⇒ 206 ⇒ 103 ⇒ 142 ⇒ 71 ⇒ 158 ⇒ 79 ⇒ 154 ⇒ 77 ⇒ 155 ⇒ 240 ⇒ 120 ⇒ 60 ⇒ 30 ⇒ 15 ⇒ 186 ⇒ 93 ⇒ 147 ⇒ 244 ⇒ 122 ⇒ 61 ⇒ 163 ⇒ 236 ⇒ 118 ⇒ 59 ⇒ 160 ⇒ 80 ⇒ 40 ⇒ 20 ⇒ 10 ⇒ 5 ⇒ 191 ⇒ 226 ⇒ 113 ⇒ 133 ⇒ 255 ⇒ 194 ⇒ 97 ⇒ 141 ⇒ 251 ⇒ 192 ⇒ 96 ⇒ 48 ⇒ 24 ⇒ 12 ⇒ 6 ⇒ 3 ⇒ 188 ⇒ 94 ⇒ 47 ⇒ 170 ⇒ 85 ⇒ 151 ⇒ 246 ⇒ 123 ⇒ 128 ⇒ 64 ⇒ 32 ⇒ 16 ⇒ 8 ⇒ 4 ⇒ 2 ⇒ 1
Period = 85 (autocorrelation)
Output =
1110010011111111010001110101010110000101100110010000011011101110
000001001011010000000...

Sequence #3 (Starting with 7)
States: 7 ⇒ 190 ⇒ 95 ⇒ 146 ⇒ 73 ⇒ 153 ⇒ 241 ⇒ 197 ⇒ 223 ⇒ 210 ⇒ 105 ⇒ 137 ⇒ 249 ⇒ 193 ⇒ 221 ⇒ 211 ⇒ 212 ⇒ 106 ⇒ 53 ⇒ 167 ⇒ 238 ⇒ 119 ⇒ 134 ⇒ 67 ⇒ 156 ⇒ 78 ⇒ 39 ⇒ 174 ⇒ 87 ⇒ 150 ⇒ 75 ⇒ 152 ⇒ 76 ⇒ 38 ⇒ 19 ⇒ 180 ⇒ 90 ⇒ 45 ⇒ 171 ⇒ 232 ⇒ 116 ⇒ 58 ⇒ 29 ⇒ 179 ⇒ 228 ⇒ 114 ⇒ 57 ⇒ 161 ⇒ 237 ⇒ 203 ⇒ 216 ⇒ 108 ⇒ 54 ⇒ 27 ⇒ 176 ⇒ 88 ⇒ 44 ⇒ 22 ⇒ 11 ⇒ 184 ⇒ 92 ⇒ 46 ⇒ 23 ⇒ 182 ⇒ 91 ⇒ 144 ⇒ 72 ⇒ 36 ⇒ 18 ⇒ 9 ⇒ 185 ⇒ 225 ⇒ 205 ⇒ 219 ⇒ 208 ⇒ 104 ⇒ 52 ⇒ 26 ⇒ 13 ⇒ 187 ⇒ 224 ⇒ 112 ⇒ 56 ⇒ 28 ⇒ 14 ⇒ 7
Period = 85 (autocorrelation)
Output =
1010111110111111001101010010101000100110001100111100010000100010
100001111100001100000...

Sequence #4 (Starting with 21)
States: 21 ⇒ 183 ⇒ 230 ⇒ 115 ⇒ 132 ⇒ 66 ⇒ 33 ⇒ 173 ⇒ 235 ⇒ 200 ⇒ 100 ⇒ 50 ⇒ 25 ⇒ 177 ⇒ 229 ⇒ 207 ⇒ 218 ⇒ 109 ⇒ 139 ⇒ 248 ⇒ 124 ⇒ 62 ⇒ 31 ⇒ 178 ⇒ 89 ⇒ 145 ⇒ 245 ⇒ 199 ⇒ 222 ⇒ 111 ⇒ 138 ⇒ 69 ⇒ 159 ⇒ 242 ⇒ 121 ⇒ 129 ⇒ 253 ⇒ 195 ⇒ 220 ⇒ 110 ⇒ 55 ⇒ 166 ⇒ 83 ⇒ 148 ⇒ 74 ⇒ 37 ⇒ 175 ⇒ 234 ⇒ 117 ⇒ 135 ⇒ 254 ⇒ 127 ⇒ 130 ⇒ 65 ⇒ 157 ⇒ 243 ⇒ 196 ⇒ 98 ⇒ 49 ⇒ 165 ⇒ 239 ⇒ 202 ⇒ 101 ⇒ 143 ⇒ 250 ⇒ 125 ⇒ 131 ⇒ 252 ⇒ 126 ⇒ 63 ⇒ 162 ⇒ 81 ⇒ 149 ⇒ 247 ⇒ 198 ⇒ 99 ⇒ 140 ⇒ 70 ⇒ 35 ⇒ 172 ⇒ 86 ⇒ 43 ⇒ 168 ⇒ 84 ⇒ 42 ⇒ 21
Period = 85 (autocorrelation)
Output =
1101001110001111011000101111010110111100101001101101011100111011
011001011101001001000...

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-14 04:21:19 ADT
Last Updated: 04-09-25
Richard Tervo [ tervo@unb.ca ] Back to the course homepage...