Content deleted Content added
John Comeau (talk | contribs) →Code sample for the binary field in Java: fixed formatting |
John Comeau (talk | contribs) →The algorithm for the binary field: changed variable names (capitalization) to match previous pseudocode |
||
Line 141:
The following is the Berlekamp–Massey algorithm specialized for the typical binary [[finite field]] F<sub>2</sub> (also written GF(2)). The field elements are '0' and '1'. The field operations '+' and '−' are identical and are equivalent to the 'exclusive or' operation, XOR. The multiplication operator '*' becomes the logical AND operation. The division operator reduces to the identity operation (i.e., field division is only defined for dividing by 1, and x/1 = x).
#Let <math>
#Initialise two arrays <math>
#[[Assignment (computer science)|assign]] <math>L \leftarrow 0, m \leftarrow -1</math>.
#'''For''' <math>
#*Let <math>d</math> be <math>
#*'''if''' <math>d = 0</math>, '''then''' <math>
#*'''else''':
#** Let <math>
#** Set <math>
#** If <math>L \le \frac{
At the end of the algorithm, <math>L</math> is the length of the minimal LFSR for the stream, and we have <math>
==Code sample for the binary field in Java==
|