Question: 1. Class 'lfsr' contains the following properties: a) An unsigned integer called the 'seed': (the seed value will range between 0 to 255) b) A

1. Class 'lfsr' contains the following properties:

a) An unsigned integer called the 'seed': (the seed value will range between 0 to 255)

b) A reciprocal characteristic/feedback polynomial function: (the user will set the characteristic polynomial. Basically, the user will specify the bit-positions which your class will use to generate the random numbers. The bits in the LFSR state that influence the input are called taps. An example of such function is given at page #04)

Add appropriate member-functions such as,

a) Constructor(s)

b) A function to print the seed and generated numbers (both in integer and binary number system).

c) A function (named as random_number_generator) to create 20 consecutive random numbers from the given seed and the characteristic polynomial.

d) Based on the requirements of the class, you might have to convert any given decimal number to a binary number and store it. So, you need to implement a function that converts a given decimal number to a corresponding binary number.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!