But my problem is how do I compute A0 and A1? not how to program, How do I compute?I got the Kindle Version of Sklar for $11.90. I have not seen any references to "codeword" so I have no idea what you are referring to. Chapter 7 appears to be where the bulk of the relevant discussion takes place. They do identify the 1/2, K=7 encoder and I know a few more things.
A couple of other things are clear:
- When you shift zeros into the encoder you clear it or flush it out.
- The XOR gates affect only the output, the data bits go through the seven stages of the shift register without modification and fall off the right hand edge.
- In operation there is no need for a RESET on the Flip-Flops because shifting 0's accomplishes the same function
- In your code it could never hurt to set the register to zero, even if you know it is already clear
The flow of your program should look like:
- In a program, you can operate the shift register and the XOR gates independently.
- The only external results that need to be visible are the outputs A₀ and A₁
Don't forget to shift some zeros into the register when you are done with the data.
- Shift a data bit into the shift register
- Compute A₀ and A₁
That's it