Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

LFSR in c programming

0 votes
asked May 18, 2020 by D K (120 points)

hi there, i need a help about this excersise:

A grammatically fluctuating feedback with feedback (Shift Register, LFSR).
The program is required or appears as parameters:
3.1 the number of LFSR digits
3.2 initial value of LFSR in binary system
3.3 The number of cycles he will look for. If the number given by the user is 0, it will run for 2^n
The program, accordingly with the result of LFSR should choose a primitive polynomial for LFSR  from the according table:
Bits (n) | Feedback polynomial| Period
2         x2+x+1                 3
3         x3+x2+1                7
4         X4+x3+1                15
5         X5+x3+1                31
6         X6+x5+1                63
7         X7+x6+1                127
8         X8+x6+x5+x4+1          255
9         X9+x5+1                511
10        X10+x7+1               1,023
11        X11+x9+1               2,047
12        X12+x11+x10+x4+1       4,095

the only thing that i want is just to help me on how to start with this (or to understand more about this excersise) so i could continue and solve the problem by myself.


1 Answer

0 votes
answered Jun 11, 2020 by Peter Minarik (15,580 points)

I think the problem description is done by Google Translate (or a similar tool) as it barely makes any sense.

You can read about the Linear Feedback Shift Register here: https://en.wikipedia.org/wiki/Linear-feedback_shift_register

"x2+x+1" doesn't make much sense to me. What does X represent? What is X2 (two times X -- usually noted as 2 * X --, or maybe X to the power of 2 -- a.k.a. X square, usually noted as X ^ 2)? 

I think a clear description would be nice to understand the problem.

commented Jun 12, 2020 by D K (120 points)
The translation its not from google translate (or somthing simillar) and you better souldn't judge someone that you don't know.

As for the problem i solved it,
thank's for your reply.
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and and receive answers from other members of the community.