home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / sci / math / 10720 < prev    next >
Encoding:
Text File  |  1992-08-30  |  2.0 KB  |  70 lines

  1. Newsgroups: sci.math
  2. Path: sparky!uunet!mcsun!news.funet.fi!jacek
  3. From: jacek@tut.fi (Nieweglowski Jacek)
  4. Subject: Re: Psuedo Random sequences   Help needed
  5. Message-ID: <1992Aug31.074318.19228@funet.fi>
  6. Sender: usenet@funet.fi (#Kotilo NEWS system )
  7. Nntp-Posting-Host: kalatiira.cs.tut.fi
  8. Organization: Finnish University and Research Network FUNET
  9. References:  <1992Aug29.230020.12972@news2.cis.umn.edu>
  10. Date: Mon, 31 Aug 1992 07:43:18 GMT
  11. Lines: 57
  12.  
  13.  
  14. To generate pseudo random sequences you need
  15. a shift register, which you described. The
  16. connections in the register are described by
  17. so called PRIMITIVE POLYNOMIALS. If you
  18. want to use 12-bit register use following polynomial
  19.  
  20. y = x^12 + x^6 + x^4 + x + 1
  21.  
  22. This effectively means that the output (shifted out)
  23. has to be EX-ORed with bit '1', the result of this
  24. EX-ORed with bit '4' and the result of that with bit
  25. '6' and the result fed back into the highest bit of
  26. the register. So the register should look like
  27.  
  28.  ________________________+_____+___________
  29. |             ^     ^           ^
  30. |             |     |           |
  31.  -> 12--11--10--9--8--7--6--5--4--3--2--1----> bits out
  32.  
  33. the register should be initialized with any 
  34. nonzero bit pattern and will generate pseudo
  35. random sequence of lenght 2^12-1.
  36. Below are the primitive polynomials for other
  37. number of bits. They are represented as 
  38. polynomial coefficients 
  39. 1,0,1,1 represents x^3 + x + 1
  40.  
  41. Note that primitive polynomials are not unique.
  42. There can be thus alternative polynomial and
  43. what follows register architecture.
  44.  
  45. int
  46.   primpol3[]={1,0,1,1},
  47.   primpol4[]={1,0,0,1,1},
  48.   primpol5[]={1,0,0,1,0,1},
  49.   primpol6[]={1,0,0,0,0,1,1},
  50.   primpol7[]={1,0,0,0,1,0,0,1},
  51.   primpol8[]={1,0,0,0,1,1,1,0,1},
  52.   primpol9[]={1,0,0,0,0,1,0,0,0,1},
  53.   primpol10[]={1,0,0,0,0,0,0,1,0,0,1},
  54.   primpol11[]={1,0,0,0,0,0,0,0,0,1,0,1},
  55.   primpol12[]={1,0,0,0,0,0,1,0,1,0,0,1,1},
  56.   primpol13[]={1,0,0,0,0,0,0,0,0,1,1,0,1,1};
  57.  
  58.  
  59. Jacek
  60. -----------------------
  61.  
  62. Jacek Nieweglowski
  63. Signal Processing Laboratory
  64. Tampere University of Technology
  65. P.O. Box 553
  66. SF 33-101 Tampere, Finland
  67.  
  68. jacek@cs.tut.fi
  69. -- 
  70.