Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Example of CRC calculation:
- Frame = 0207h
- CRC initialization 1111 1111 1111 1111
- Load the first байта 0000 0010
- Execute xor with the first 1111 1111 1111 1101
- Байта of the frame
- Execute 1st right сдвиг 0111 1111 1111 1110 1
- Carry=1,load polynomial 1010 0000 0000 0001
- Execute xor with the 1101 1111 1111 1111
- polynomial
- Execute 2nd right сдвиг 0110 1111 1111 1111 1
- Carry=1,load polynomial 1010 0000 0000 0001
- Execute xor with the 1100 1111 1111 1110
- polynomial
- Execute 3rd right сдвиг 0110 0111 1111 1111 0
- Execute 4th right сдвиг 0011 0011 1111 1111 1
- Carry=1,load polynomial 1010 0000 0000 0001
- Execute xor with the 1001 0011 1111 1110
- polynomial
- Execute 5th right сдвиг 0100 1001 1111 1111 0
- Execute 6th right сдвиг 0010 0100 1111 1111 1
- Carry=1,load polynomial 1010 0000 0000 0001
- Execute xor with the 1000 0100 1111 1110
- polynomial
- Execute 7th right сдвиг 0100 0010 0111 1111 0
- Execute 8th right сдвиг 0010 0001 0011 1111 1
- Carry=1,load polynomial 1010 0000 0000 0001
- Load the second байта 0000 0111
- of the frame
- Execute xor with the 1000 0001 0011 1001
- Second байта of the frame
- Execute 1st right сдвиг 0100 0000 1001 1100 1
- Carry=1,load polynomial 1010 0000 0000 0001
- Execute xor with the 1110 0000 1001 1101
- polynomial
- Execute 2nd right сдвиг 0111 0000 0100 1110 1
- Carry=1,load polynomial 1010 0000 0000 0001
- Execute xor with the 1101 0000 0100 1111
- polynomial
- Execute 3rd right сдвиг 0110 1000 0010 0111 1
- Carry=1,load polynomial 1010 0000 0000 0001
- Execute xor with the 1100 1000 0010 0110
- polynomial
- Execute 4th right сдвиг 0110 0100 0001 0011 0
- Execute 5th right сдвиг 0010 0100 0000 1001 1
- Carry=1,load polynomial 1010 0000 0000 0001
- Execute xor with the 1001 0010 0000 1000
- polynomial
- Execute 6th right сдвиг 0100 1001 0000 0100 0
- Execute 7th right сдвиг 0010 0100 1000 0010 0
- Execute 8th right сдвиг 0001 0010 0100 0001 0
- CRC Result 0001 0010 0100 0001
- 12h 41h
Advertisement
Add Comment
Please, Sign In to add comment