Question
Please help me out to solve this problem asap. Please please note: write the problem as required. I need a help with second question. so
Please help me out to solve this problem asap. Please please note: write the problem as required.
I need a help with second question. so please read all these part and help me .
FIRST QUESTION IS HERE ................................
Problem #1 Write a function that computes the next state of a linear feedback shift register (LFSR) given the current state of the LFSR. The LFSR should satisfy the taps given by the following polynomial:
?? 20 + ?? 19 + ?? 16 + ?? 14 + 1
Your function should take the state as a 32-bit input parameter and return a 32-bit output value. Your main program for the function should call your LFSR function for the following input states and print the output state:
0x00000001
0xdeadbeef
0x200214c8
0x00000000
Problem #2 Write a new program using your LFSR function from the first problem. Start from state 0x00000001, then run a loop counting all the possible states in the LFSR before it cycles back to 0x00000001. This is shown by the following pseudocode:
count = 0;
initial = state = 0x00000001;
do {
state = LFSR(state);
count++;
while (state != initial);
print count;
Verify that the number of states is 2 20 ? 1 = 1,048,575. Your program should complete within 30 seconds. If it takes longer then you likely have entered an infinite loop.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; FIRST QUESTION IS HERE ................................
Problem #1 Write a function that computes the next state of a linear feedback shift register (LFSR) given the current state of the LFSR. The LFSR should satisfy the taps given by the following polynomial:
?? 20 + ?? 19 + ?? 16 + ?? 14 + 1
Your function should take the state as a 32-bit input parameter and return a 32-bit output value. Your main program for the function should call your LFSR function for the following input states and print the output state:
0x00000001
0xdeadbeef
0x200214c8
0x00000000
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started