patternMinor
LFSR sequence computation
Viewed 0 times
lfsrcomputationsequence
Problem
I need to calculate the output of the sequence generated by this shift register but I cannot find anywhere how to do it. Everywhere the results are just given but there is no explanation how to do compute them. I know the the sequence will repeat every 2^3-1=7 times. Could anyone explain me how to do it. Thank you.
Solution
The answer seems to be simple:
First, we XOR the two least significant bits (LSB) to get the most significant bit. The two LSB are obtained by right-shifting. So, calculating in this way, we get the sequence 110, 111, 011, 001, 100, 010, 101.
First, we XOR the two least significant bits (LSB) to get the most significant bit. The two LSB are obtained by right-shifting. So, calculating in this way, we get the sequence 110, 111, 011, 001, 100, 010, 101.
Context
StackExchange Computer Science Q#3337, answer score: 2
Revisions (0)
No revisions yet.