Home » Write a program to generate a series of pseudo random numbers

Write a program to generate a series of pseudo random numbers

J. Dichter Random Generator Program CS 501X University of Bridgeport Instructions: You will write a program to generate a series of pseudo random numbers, using a linear feedback shift register method. You will start with an arbitrary number (not zero) x with a representation in n bits. If x = 15 and n = 4, then x = 1111. Then you will select a pair of bits, say bits 0 and 1, take their “xor” producing a new bit -in this case a 0. The number x will then shift to the right, with the new bit becoming the new high bit -in this case 0111. The process continues in this manner to produce a random set of bits. With four bits, we can only have up to 15 unique transitions before repetitions begin, or 2n -1. With n = 32, the number of random bits has a much greater potential. The numbers actually produced by the “shifting” cannot be considered “random”, since all but one of the bits overlap from each succeeding number. However, if we want to produce, say 100 6-bit numbers, then we need to shift the bits into an 6-bit register. We can then save its “value” in an array of 100 integers. Then we should produce the output which will display the distribution. Random numbers should follow a uniform distribution. Using a 32-bit generator does not guarantee 2n -1 random bits. For good results try using bit combinations 0/4, 0/7, 0/25, 0,26, 0/29. Example: 11001110 -> 11100111 -> 01110011 -> 10111001 -> 11011100 -> 11101110 -> 11110111 -> 01111011 -> 10111101 -> 01011110 -> etc Three random 4-bit numbers produced: 11, 13, 4, …. Try “tapping” different bit combinations, as well as the ones I suggested. To verify that the set of numbers you generated are really pseudo random, you will test them using the statistical ? 2 test. You will generate 10,000 numbers in the 0-63 range. Then N=10,000 and r=64. You will then compute ?2 by the formula If ?2 is in the range of r ± 2 r , we conclude that distribution is indeed random. Otherwise it may not be. In your program, you will implement a…

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.

Money-back guarantee

You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.

Read more

Zero-plagiarism guarantee

Each paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.

Read more

Free-revision policy

Thanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.

Read more

Privacy policy

Your email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.

Read more

Fair-cooperation guarantee

By sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.

Read more