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

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

Sequence #2 (Starting with 1)
States: 1 ⇒ 249 ⇒ 133 ⇒ 187 ⇒ 164 ⇒ 82 ⇒ 41 ⇒ 237 ⇒ 143 ⇒ 190 ⇒ 95 ⇒ 214 ⇒ 107 ⇒ 204 ⇒ 102 ⇒ 51 ⇒ 224 ⇒ 112 ⇒ 56 ⇒ 28 ⇒ 14 ⇒ 7 ⇒ 250 ⇒ 125 ⇒ 199 ⇒ 154 ⇒ 77 ⇒ 223 ⇒ 150 ⇒ 75 ⇒ 220 ⇒ 110 ⇒ 55 ⇒ 226 ⇒ 113 ⇒ 193 ⇒ 153 ⇒ 181 ⇒ 163 ⇒ 168 ⇒ 84 ⇒ 42 ⇒ 21 ⇒ 243 ⇒ 128 ⇒ 64 ⇒ 32 ⇒ 16 ⇒ 8 ⇒ 4 ⇒ 2 ⇒ 1
Period = 51 (autocorrelation)
Output =
111100111010100100000101101101001011111000110000000...

Sequence #3 (Starting with 3)
States: 3 ⇒ 248 ⇒ 124 ⇒ 62 ⇒ 31 ⇒ 246 ⇒ 123 ⇒ 196 ⇒ 98 ⇒ 49 ⇒ 225 ⇒ 137 ⇒ 189 ⇒ 167 ⇒ 170 ⇒ 85 ⇒ 211 ⇒ 144 ⇒ 72 ⇒ 36 ⇒ 18 ⇒ 9 ⇒ 253 ⇒ 135 ⇒ 186 ⇒ 93 ⇒ 215 ⇒ 146 ⇒ 73 ⇒ 221 ⇒ 151 ⇒ 178 ⇒ 89 ⇒ 213 ⇒ 147 ⇒ 176 ⇒ 88 ⇒ 44 ⇒ 22 ⇒ 11 ⇒ 252 ⇒ 126 ⇒ 63 ⇒ 230 ⇒ 115 ⇒ 192 ⇒ 96 ⇒ 48 ⇒ 24 ⇒ 12 ⇒ 6 ⇒ 3
Period = 51 (autocorrelation)
Output =
100010100111110110000111011011101110000100101000000...

Sequence #4 (Starting with 5)
States: 5 ⇒ 251 ⇒ 132 ⇒ 66 ⇒ 33 ⇒ 233 ⇒ 141 ⇒ 191 ⇒ 166 ⇒ 83 ⇒ 208 ⇒ 104 ⇒ 52 ⇒ 26 ⇒ 13 ⇒ 255 ⇒ 134 ⇒ 67 ⇒ 216 ⇒ 108 ⇒ 54 ⇒ 27 ⇒ 244 ⇒ 122 ⇒ 61 ⇒ 231 ⇒ 138 ⇒ 69 ⇒ 219 ⇒ 148 ⇒ 74 ⇒ 37 ⇒ 235 ⇒ 140 ⇒ 70 ⇒ 35 ⇒ 232 ⇒ 116 ⇒ 58 ⇒ 29 ⇒ 247 ⇒ 130 ⇒ 65 ⇒ 217 ⇒ 149 ⇒ 179 ⇒ 160 ⇒ 80 ⇒ 40 ⇒ 20 ⇒ 10 ⇒ 5
Period = 51 (autocorrelation)
Output =
110011110100001101000100110110011001000110111100000...

Sequence #5 (Starting with 15)
States: 15 ⇒ 254 ⇒ 127 ⇒ 198 ⇒ 99 ⇒ 200 ⇒ 100 ⇒ 50 ⇒ 25 ⇒ 245 ⇒ 131 ⇒ 184 ⇒ 92 ⇒ 46 ⇒ 23 ⇒ 242 ⇒ 121 ⇒ 197 ⇒ 155 ⇒ 180 ⇒ 90 ⇒ 45 ⇒ 239 ⇒ 142 ⇒ 71 ⇒ 218 ⇒ 109 ⇒ 207 ⇒ 158 ⇒ 79 ⇒ 222 ⇒ 111 ⇒ 206 ⇒ 103 ⇒ 202 ⇒ 101 ⇒ 203 ⇒ 156 ⇒ 78 ⇒ 39 ⇒ 234 ⇒ 117 ⇒ 195 ⇒ 152 ⇒ 76 ⇒ 38 ⇒ 19 ⇒ 240 ⇒ 120 ⇒ 60 ⇒ 30 ⇒ 15
Period = 51 (autocorrelation)
Output =
101010001110001011100110101101010101100101100010000...

Sequence #6 (Starting with 17)
States: 17 ⇒ 241 ⇒ 129 ⇒ 185 ⇒ 165 ⇒ 171 ⇒ 172 ⇒ 86 ⇒ 43 ⇒ 236 ⇒ 118 ⇒ 59 ⇒ 228 ⇒ 114 ⇒ 57 ⇒ 229 ⇒ 139 ⇒ 188 ⇒ 94 ⇒ 47 ⇒ 238 ⇒ 119 ⇒ 194 ⇒ 97 ⇒ 201 ⇒ 157 ⇒ 183 ⇒ 162 ⇒ 81 ⇒ 209 ⇒ 145 ⇒ 177 ⇒ 161 ⇒ 169 ⇒ 173 ⇒ 175 ⇒ 174 ⇒ 87 ⇒ 210 ⇒ 105 ⇒ 205 ⇒ 159 ⇒ 182 ⇒ 91 ⇒ 212 ⇒ 106 ⇒ 53 ⇒ 227 ⇒ 136 ⇒ 68 ⇒ 34 ⇒ 17
Period = 51 (autocorrelation)
Output =
111111001001001110010101111011111111010111010011000...

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