1. Engineering
  2. Computer Science
  3. question5 in computer simulation lcm linear congruential method is an...

Question: question5 in computer simulation lcm linear congruential method is an...

Question details

Question5 In computer simulation, LCM (Linear Congruential Method) is an algorithm for producing a sequence of random numbers in a recursive way. In specifie, suppose the random numbers to be generated are Xo, Xi, Xn, then Xo is called the seed, and each Xi+ is generated from X, (0,1,2..n-1) by the following equation: X+(AX,C) mod M where A is the multiplier, C is the increment, and M is the modulus. In this question, we want to generate a 6-bit unsigned random integer (range from 0 to 2-1-3). Suppose the parameters are A 13, C-17, M- 64 (or 26) and the seed is Xo 19, please write an Assembly program for ATmega2560 to generate the next random number. In the program, you must use the register R16 to store both the seed and the generated random number 15 Name the source code file as LCM.VNum.asm (where VNum stands for your V-number) and submit along with the PDF file for answers of the other ques- tions.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution