3
$\begingroup$

A length-$127$ frame scramble uses the following generator polynomial

$$G(D)= D^7+D^4+1$$

  • If the all-ones initial state is used, how can one obtain the $127$ bit sequence? I am not interested in the sequence itself or computer algorithm but an understanding of how to obtain in.

  • My understanding is that $G(D)$ is the $\mathcal Z$-transform of the impulse response $\textrm{1001001}$. Is this convolved with the initial state $\textrm{1111111}$?

$\endgroup$
1
$\begingroup$

This generating (check if it's a primitive polynomial - those are usually used) polynomial representing a simple Linear Feedback Shift Register (LFSR). The circuit is given below, the gate is a XOR gate (an addition over GF(2) ). You can follow the output of this shift register very easily

enter image description here

| improve this answer | |
$\endgroup$
0
$\begingroup$
boolean mls[127];
unsigned D = 0x7F;
for (i=0; i<127; i++)
    {
    mls[i] = D&1;
    D = D>>1;
    if (mls[i])
        {
        D = D^0x48;
        }
    }
| improve this answer | |
$\endgroup$
0
$\begingroup$

or it might be

boolean mls[127];
unsigned D = 0x7F;
for (i=0; i<127; i++)
    {
    mls[i] = (D & 0x40)>>6;
    D = D<<1;
    if (mls[i])
        {
        D = D^0x11;
        }
    }

all depends on if we're shifting left or right.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Thank you very much, can you please explain in words what does it mean i.e how is G(D) generating the bits. And how did you use the fact that the inital state is all ones in this program? $\endgroup$ – Tyrone May 14 '15 at 23:07
  • $\begingroup$ "please explain in words what does it mean i.e how is G(D) generating the bits." if you're shifting right, the $D^0$ in $G(D)$ is not used. if you're shifting left, the $D^7$ is not used. so examine the bits of either 0x48 or 0x11. see what you get. "how did you use the fact that the inital state is all ones in this program?" D = 0x7F; $\endgroup$ – robert bristow-johnson May 14 '15 at 23:11
  • 2
    $\begingroup$ take a look at A Little MLS Tutorial if you want to. $\endgroup$ – robert bristow-johnson May 14 '15 at 23:16
  • $\begingroup$ thanks, is D a binary number 0 or 1? @robert bristow-johnson $\endgroup$ – Tyrone May 14 '15 at 23:17
  • 1
    $\begingroup$ no D is a 7 bit number. in the left-shifting example, i don't bother to mask off the bits that "fall offa the edge" on the left. but i don't use those bits either, so it doesn't matter if i mask them or not. perhaps the line of code should be D = (D<<1) & 0x7F; to make it more clear. for any i (that is 0 ≤ i < 127), mls[i] is a binary value. that is your sequence of bits. $\endgroup$ – robert bristow-johnson May 14 '15 at 23:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.