Nicholas Kinar <
[email protected]> wrote:
>Thanks, Steve!
No problemo.
>> Here is the simplest one for m=12:
>>
>> 0x05eb
>>
>> It is probably bit reversed from the OP's set-up,
>> The leading coefficient of one is deleted from
>> this constant.
>Yes, it appears that the Galois shift register requires bit reversed
>versions.
The way you're doing it, yes.
>> (Unlike the OP, I always put the LS term of the polynomial
>> in the lsb of a binary word, but after looking at OP's
>> code it seems more compact to do it his way.)
>Yeah, it's kind of an interesting way of doing things.
It's good to keep track of the algebra. For a generating
polynomial G of degree m over GF(2), you are computing the remainder
x^n mod G
for a series of values n=0, n=1,....
This remainder is a polynomial over GF(2) of (at most) degree m-1.
How you represent it in a bit field is totally up to you,
and your method is as correct as any.
Steve