home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: sci.math
- Path: sparky!uunet!mcsun!news.funet.fi!jacek
- From: jacek@tut.fi (Nieweglowski Jacek)
- Subject: Re: Psuedo Random sequences Help needed
- Message-ID: <1992Aug31.074318.19228@funet.fi>
- Sender: usenet@funet.fi (#Kotilo NEWS system )
- Nntp-Posting-Host: kalatiira.cs.tut.fi
- Organization: Finnish University and Research Network FUNET
- References: <1992Aug29.230020.12972@news2.cis.umn.edu>
- Date: Mon, 31 Aug 1992 07:43:18 GMT
- Lines: 57
-
-
- To generate pseudo random sequences you need
- a shift register, which you described. The
- connections in the register are described by
- so called PRIMITIVE POLYNOMIALS. If you
- want to use 12-bit register use following polynomial
-
- y = x^12 + x^6 + x^4 + x + 1
-
- This effectively means that the output (shifted out)
- has to be EX-ORed with bit '1', the result of this
- EX-ORed with bit '4' and the result of that with bit
- '6' and the result fed back into the highest bit of
- the register. So the register should look like
-
- ________________________+_____+___________
- | ^ ^ ^
- | | | |
- -> 12--11--10--9--8--7--6--5--4--3--2--1----> bits out
-
- the register should be initialized with any
- nonzero bit pattern and will generate pseudo
- random sequence of lenght 2^12-1.
- Below are the primitive polynomials for other
- number of bits. They are represented as
- polynomial coefficients
- 1,0,1,1 represents x^3 + x + 1
-
- Note that primitive polynomials are not unique.
- There can be thus alternative polynomial and
- what follows register architecture.
-
- int
- primpol3[]={1,0,1,1},
- primpol4[]={1,0,0,1,1},
- primpol5[]={1,0,0,1,0,1},
- primpol6[]={1,0,0,0,0,1,1},
- primpol7[]={1,0,0,0,1,0,0,1},
- primpol8[]={1,0,0,0,1,1,1,0,1},
- primpol9[]={1,0,0,0,0,1,0,0,0,1},
- primpol10[]={1,0,0,0,0,0,0,1,0,0,1},
- primpol11[]={1,0,0,0,0,0,0,0,0,1,0,1},
- primpol12[]={1,0,0,0,0,0,1,0,1,0,0,1,1},
- primpol13[]={1,0,0,0,0,0,0,0,0,1,1,0,1,1};
-
-
- Jacek
- -----------------------
-
- Jacek Nieweglowski
- Signal Processing Laboratory
- Tampere University of Technology
- P.O. Box 553
- SF 33-101 Tampere, Finland
-
- jacek@cs.tut.fi
- --
-