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

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

Sequence #2 (Starting with 1)
States: 1 ⇒ 209 ⇒ 185 ⇒ 141 ⇒ 151 ⇒ 154 ⇒ 77 ⇒ 247 ⇒ 170 ⇒ 85 ⇒ 251 ⇒ 172 ⇒ 86 ⇒ 43 ⇒ 196 ⇒ 98 ⇒ 49 ⇒ 201 ⇒ 181 ⇒ 139 ⇒ 148 ⇒ 74 ⇒ 37 ⇒ 195 ⇒ 176 ⇒ 88 ⇒ 44 ⇒ 22 ⇒ 11 ⇒ 212 ⇒ 106 ⇒ 53 ⇒ 203 ⇒ 180 ⇒ 90 ⇒ 45 ⇒ 199 ⇒ 178 ⇒ 89 ⇒ 253 ⇒ 175 ⇒ 134 ⇒ 67 ⇒ 240 ⇒ 120 ⇒ 60 ⇒ 30 ⇒ 15 ⇒ 214 ⇒ 107 ⇒ 228 ⇒ 114 ⇒ 57 ⇒ 205 ⇒ 183 ⇒ 138 ⇒ 69 ⇒ 243 ⇒ 168 ⇒ 84 ⇒ 42 ⇒ 21 ⇒ 219 ⇒ 188 ⇒ 94 ⇒ 47 ⇒ 198 ⇒ 99 ⇒ 224 ⇒ 112 ⇒ 56 ⇒ 28 ⇒ 14 ⇒ 7 ⇒ 210 ⇒ 105 ⇒ 229 ⇒ 163 ⇒ 128 ⇒ 64 ⇒ 32 ⇒ 16 ⇒ 8 ⇒ 4 ⇒ 2 ⇒ 1
Period = 85 (autocorrelation)
Output =
1111101101100100111100110000100110011011101000010100111011000110
010100000101110000000...

Sequence #3 (Starting with 3)
States: 3 ⇒ 208 ⇒ 104 ⇒ 52 ⇒ 26 ⇒ 13 ⇒ 215 ⇒ 186 ⇒ 93 ⇒ 255 ⇒ 174 ⇒ 87 ⇒ 250 ⇒ 125 ⇒ 239 ⇒ 166 ⇒ 83 ⇒ 248 ⇒ 124 ⇒ 62 ⇒ 31 ⇒ 222 ⇒ 111 ⇒ 230 ⇒ 115 ⇒ 232 ⇒ 116 ⇒ 58 ⇒ 29 ⇒ 223 ⇒ 190 ⇒ 95 ⇒ 254 ⇒ 127 ⇒ 238 ⇒ 119 ⇒ 234 ⇒ 117 ⇒ 235 ⇒ 164 ⇒ 82 ⇒ 41 ⇒ 197 ⇒ 179 ⇒ 136 ⇒ 68 ⇒ 34 ⇒ 17 ⇒ 217 ⇒ 189 ⇒ 143 ⇒ 150 ⇒ 75 ⇒ 244 ⇒ 122 ⇒ 61 ⇒ 207 ⇒ 182 ⇒ 91 ⇒ 252 ⇒ 126 ⇒ 63 ⇒ 206 ⇒ 103 ⇒ 226 ⇒ 113 ⇒ 233 ⇒ 165 ⇒ 131 ⇒ 144 ⇒ 72 ⇒ 36 ⇒ 18 ⇒ 9 ⇒ 213 ⇒ 187 ⇒ 140 ⇒ 70 ⇒ 35 ⇒ 192 ⇒ 96 ⇒ 48 ⇒ 24 ⇒ 12 ⇒ 6 ⇒ 3
Period = 85 (autocorrelation)
Output =
1000011011010110100010101000110101010110011100011110100110100101
011110000111001000000...

Sequence #4 (Starting with 5)
States: 5 ⇒ 211 ⇒ 184 ⇒ 92 ⇒ 46 ⇒ 23 ⇒ 218 ⇒ 109 ⇒ 231 ⇒ 162 ⇒ 81 ⇒ 249 ⇒ 173 ⇒ 135 ⇒ 146 ⇒ 73 ⇒ 245 ⇒ 171 ⇒ 132 ⇒ 66 ⇒ 33 ⇒ 193 ⇒ 177 ⇒ 137 ⇒ 149 ⇒ 155 ⇒ 156 ⇒ 78 ⇒ 39 ⇒ 194 ⇒ 97 ⇒ 225 ⇒ 161 ⇒ 129 ⇒ 145 ⇒ 153 ⇒ 157 ⇒ 159 ⇒ 158 ⇒ 79 ⇒ 246 ⇒ 123 ⇒ 236 ⇒ 118 ⇒ 59 ⇒ 204 ⇒ 102 ⇒ 51 ⇒ 200 ⇒ 100 ⇒ 50 ⇒ 25 ⇒ 221 ⇒ 191 ⇒ 142 ⇒ 71 ⇒ 242 ⇒ 121 ⇒ 237 ⇒ 167 ⇒ 130 ⇒ 65 ⇒ 241 ⇒ 169 ⇒ 133 ⇒ 147 ⇒ 152 ⇒ 76 ⇒ 38 ⇒ 19 ⇒ 216 ⇒ 108 ⇒ 54 ⇒ 27 ⇒ 220 ⇒ 110 ⇒ 55 ⇒ 202 ⇒ 101 ⇒ 227 ⇒ 160 ⇒ 80 ⇒ 40 ⇒ 20 ⇒ 10 ⇒ 5
Period = 85 (autocorrelation)
Output =
1100010110111101110011111100101111111101010010010001110101110111
110001000100101100000...

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