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

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

Sequence #2 (Starting with 1)
States: 1 ⇒ 197 ⇒ 167 ⇒ 150 ⇒ 75 ⇒ 224 ⇒ 112 ⇒ 56 ⇒ 28 ⇒ 14 ⇒ 7 ⇒ 198 ⇒ 99 ⇒ 244 ⇒ 122 ⇒ 61 ⇒ 219 ⇒ 168 ⇒ 84 ⇒ 42 ⇒ 21 ⇒ 207 ⇒ 162 ⇒ 81 ⇒ 237 ⇒ 179 ⇒ 156 ⇒ 78 ⇒ 39 ⇒ 214 ⇒ 107 ⇒ 240 ⇒ 120 ⇒ 60 ⇒ 30 ⇒ 15 ⇒ 194 ⇒ 97 ⇒ 245 ⇒ 191 ⇒ 154 ⇒ 77 ⇒ 227 ⇒ 180 ⇒ 90 ⇒ 45 ⇒ 211 ⇒ 172 ⇒ 86 ⇒ 43 ⇒ 208 ⇒ 104 ⇒ 52 ⇒ 26 ⇒ 13 ⇒ 195 ⇒ 164 ⇒ 82 ⇒ 41 ⇒ 209 ⇒ 173 ⇒ 147 ⇒ 140 ⇒ 70 ⇒ 35 ⇒ 212 ⇒ 106 ⇒ 53 ⇒ 223 ⇒ 170 ⇒ 85 ⇒ 239 ⇒ 178 ⇒ 89 ⇒ 233 ⇒ 177 ⇒ 157 ⇒ 139 ⇒ 128 ⇒ 64 ⇒ 32 ⇒ 16 ⇒ 8 ⇒ 4 ⇒ 2 ⇒ 1
Period = 85 (autocorrelation)
Output =
1110100000101001100011011100101000010111011001100100001100111100
100110110111110000000...

Sequence #3 (Starting with 3)
States: 3 ⇒ 196 ⇒ 98 ⇒ 49 ⇒ 221 ⇒ 171 ⇒ 144 ⇒ 72 ⇒ 36 ⇒ 18 ⇒ 9 ⇒ 193 ⇒ 165 ⇒ 151 ⇒ 142 ⇒ 71 ⇒ 230 ⇒ 115 ⇒ 252 ⇒ 126 ⇒ 63 ⇒ 218 ⇒ 109 ⇒ 243 ⇒ 188 ⇒ 94 ⇒ 47 ⇒ 210 ⇒ 105 ⇒ 241 ⇒ 189 ⇒ 155 ⇒ 136 ⇒ 68 ⇒ 34 ⇒ 17 ⇒ 205 ⇒ 163 ⇒ 148 ⇒ 74 ⇒ 37 ⇒ 215 ⇒ 174 ⇒ 87 ⇒ 238 ⇒ 119 ⇒ 254 ⇒ 127 ⇒ 250 ⇒ 125 ⇒ 251 ⇒ 184 ⇒ 92 ⇒ 46 ⇒ 23 ⇒ 206 ⇒ 103 ⇒ 246 ⇒ 123 ⇒ 248 ⇒ 124 ⇒ 62 ⇒ 31 ⇒ 202 ⇒ 101 ⇒ 247 ⇒ 190 ⇒ 95 ⇒ 234 ⇒ 117 ⇒ 255 ⇒ 186 ⇒ 93 ⇒ 235 ⇒ 176 ⇒ 88 ⇒ 44 ⇒ 22 ⇒ 11 ⇒ 192 ⇒ 96 ⇒ 48 ⇒ 24 ⇒ 12 ⇒ 6 ⇒ 3
Period = 85 (autocorrelation)
Output =
1001110000111101010010110010111100011100110101010110001010100010
110101101100001000000...

Sequence #4 (Starting with 5)
States: 5 ⇒ 199 ⇒ 166 ⇒ 83 ⇒ 236 ⇒ 118 ⇒ 59 ⇒ 216 ⇒ 108 ⇒ 54 ⇒ 27 ⇒ 200 ⇒ 100 ⇒ 50 ⇒ 25 ⇒ 201 ⇒ 161 ⇒ 149 ⇒ 143 ⇒ 130 ⇒ 65 ⇒ 229 ⇒ 183 ⇒ 158 ⇒ 79 ⇒ 226 ⇒ 113 ⇒ 253 ⇒ 187 ⇒ 152 ⇒ 76 ⇒ 38 ⇒ 19 ⇒ 204 ⇒ 102 ⇒ 51 ⇒ 220 ⇒ 110 ⇒ 55 ⇒ 222 ⇒ 111 ⇒ 242 ⇒ 121 ⇒ 249 ⇒ 185 ⇒ 153 ⇒ 137 ⇒ 129 ⇒ 133 ⇒ 135 ⇒ 134 ⇒ 67 ⇒ 228 ⇒ 114 ⇒ 57 ⇒ 217 ⇒ 169 ⇒ 145 ⇒ 141 ⇒ 131 ⇒ 132 ⇒ 66 ⇒ 33 ⇒ 213 ⇒ 175 ⇒ 146 ⇒ 73 ⇒ 225 ⇒ 181 ⇒ 159 ⇒ 138 ⇒ 69 ⇒ 231 ⇒ 182 ⇒ 91 ⇒ 232 ⇒ 116 ⇒ 58 ⇒ 29 ⇒ 203 ⇒ 160 ⇒ 80 ⇒ 40 ⇒ 20 ⇒ 10 ⇒ 5
Period = 85 (autocorrelation)
Output =
1101001000100011111011101011100010010010101111111101001111110011
101111011010001100000...

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