The MidSquare Method

If you want to generate random numbers, here's a digital computer-oriented method available for you. it is called the MIDSQUARE Method. Below are the the steps to follow:

1. select a number of N digits(usually even), where N is the number of digits desired in the random number.
2. square the number from step 1 and add zeros to the left as necessary to form a number of 2N digits.
3. extract the middle N digits from the number in step 2. this is the random number.
4. square the random number obtained from step 3, adding zeros once again to the result as needed to form a number of 2N digits.
5. repeat steps 3 and 4 in order to obtain additional random numbers.

So there you have it. it is very simple to understand and use.

0 comments: