- or download this
Data byte D(0:7) encode this to make 9bit data q_m(0:8)
q_m[0] = D(0);
...
q_m(6) = q_m(5) XOR D(6);
q_m(7) = q_m(6) XOR D(7);
q_m(8) = 1;
- or download this
$q_m_byte = (0x100 | ($D_byte ^ (0xff & ($q_m_byte << 1))));
- or download this
$Q[ 0 ] = $D[ 0 ];
$Q[ 1 ] = $D[ 1 ] ^ $Q[ 0 ];
$Q[ 2 ] = $D[ 2 ] ^ $Q[ 1 ];
$Q[ 3 ] = $D[ 3 ] ^ $Q[ 2 ];
...
- or download this
$Q[ 0 ] = $D[ 0 ];
$Q[ 1 ] = $D[ 1 ] ^ $D[ 0 ];
$Q[ 2 ] = $D[ 2 ] ^ $D[ 1 ] ^ $D[ 0 ];
$Q[ 3 ] = $D[ 3 ] ^ $D[ 2 ] ^ $D[ 1 ] ^ $D[ 0 ];
...