# CRC hardware implementation

What is the difference between these two implementations as the feedback is in first implementation the last reg only but the second implementation last reg xored with the input bit, so, what is the difference and how can i take the output from them ?

## 1 Answer

The first example does in fact have the input xored with the output. It's just that the input has a pipeline register which will in essence delay the output by one clock cycle. It doesn't change the polynomial or affect the calculation, and could be removed.

The key difference is the number of registers between the xor gates. It is this that sets the polynomial.

In the second case you have three between the first xor gate and the second, giving you $x^3$. Then you have four registers between the second xor gate and the output, giving you $x^3 \times x^4 = x^7$. Thus you get the polynomial of $x^7 + x^3 + 1$.

In the first case you have two between the first xor gate and the second, giving you $x^2$. Then you have 1 register between the second xor gate and the output, giving you $x^2 \times x^1 = x^3$. Thus you get a polynomial of $x^3 + x^2 + 1$.

• Thanks very much but I understand how we translate the polynomial into number of xors and registers but I dont understand the difference in implementation, what is the difference between the feedback to be the last reg only or the last reg xored with the input ?? – Aren dg Jul 2 '18 at 17:57
• @Arendg Did you read the first paragraph? The two implementations are the same - the feedback for both is xor'ed with the input. – Tom Carpenter Jul 2 '18 at 19:26
• how in the first implementation the feedback is xored with input and second question how can i take the output ? – Aren dg Jul 4 '18 at 11:42
• @Arendg XOR is the (+). Notice how the end of the chain (the output, on the left) loops back all the way to the right where it meets the input. You can ignore the first box on the very right hand side, that doesn't have any influence on the calculated value. – Tom Carpenter Jul 4 '18 at 15:17