Example%20CRC%20Calculation - PowerPoint PPT Presentation

About This Presentation
Title:

Example%20CRC%20Calculation

Description:

As was previously shown, flipping the same bits in each byte of a message ... The following example demonstrates that a CRC calculation of those same messages ... – PowerPoint PPT presentation

Number of Views:658
Avg rating:3.0/5.0
Slides: 19
Provided by: SITE71
Category:

less

Transcript and Presenter's Notes

Title: Example%20CRC%20Calculation


1
Example CRC Calculation
  • As was previously shown, flipping the same bits
    in each byte of a message produces a checksum
    identical to that of the original message
  • The following example demonstrates that a CRC
    calculation of those same messages produce a
    vastly different result
  • Original Message bits Hi 4869h 0100
    1000 0110 1001
  • Swapped Message bits jK 6A4Bh 0110 1010
    0100 1011
  • Note An 8-bit CRC is used in this example for
    ease of calculation, however 16 and 32-bit CRCs
    are more useful
  • Note 2 The XOR gate is located after bit 4 for
    this example, but this is not always the case.

?8-bit CRC hardware diagram
2
8-BIT CRC for Hi INPUT
000 00000 Init.
















8-BIT CRC for jK INPUT
000 00000 Init.
















3
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0















8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0















4
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1














8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1














5
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0













8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1













6
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0
000 00100 0












8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1
000 00110 0












7
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0
000 00100 0
000 01001 1











8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1
000 00110 0
000 01101 1











8
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0
000 00100 0
000 01001 1
000 10010 0










8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1
000 00110 0
000 01101 1
000 11010 0










9
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0
000 00100 0
000 01001 1
000 10010 0
001 00100 0









8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1
000 00110 0
000 01101 1
000 11010 0
001 10101 1









10
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0
000 00100 0
000 01001 1
000 10010 0
001 00100 0
010 01000 0








8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1
000 00110 0
000 01101 1
000 11010 0
001 10101 1
011 01010 0








11
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0
000 00100 0
000 01001 1
000 10010 0
001 00100 0
010 01000 0
100 10000 0







8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1
000 00110 0
000 01101 1
000 11010 0
001 10101 1
011 01010 0
110 10100 0







12
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0
000 00100 0
000 01001 1
000 10010 0
001 00100 0
010 01000 0
100 10000 0
000 00000 1






8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1
000 00110 0
000 01101 1
000 11010 0
001 10101 1
011 01010 0
110 10100 0
100 01000 1






? Note the effect of the XOR gate on bits 0 and 5
13
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0
000 00100 0
000 01001 1
000 10010 0
001 00100 0
010 01000 0
100 10000 0
000 00000 1
000 00001 1





8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1
000 00110 0
000 01101 1
000 11010 0
001 10101 1
011 01010 0
110 10100 0
100 01000 1
001 10001 0





14
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0
000 00100 0
000 01001 1
000 10010 0
001 00100 0
010 01000 0
100 10000 0
000 00000 1
000 00001 1
000 00010 0




8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1
000 00110 0
000 01101 1
000 11010 0
001 10101 1
011 01010 0
110 10100 0
100 01000 1
001 10001 0
011 00010 0




15
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0
000 00100 0
000 01001 1
000 10010 0
001 00100 0
010 01000 0
100 10000 0
000 00000 1
000 00001 1
000 00010 0
000 00101 1



8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1
000 00110 0
000 01101 1
000 11010 0
001 10101 1
011 01010 0
110 10100 0
100 01000 1
001 10001 0
011 00010 0
110 00101 1



16
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0
000 00100 0
000 01001 1
000 10010 0
001 00100 0
010 01000 0
100 10000 0
000 00000 1
000 00001 1
000 00010 0
000 00101 1
000 01010 0


8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1
000 00110 0
000 01101 1
000 11010 0
001 10101 1
011 01010 0
110 10100 0
100 01000 1
001 10001 0
011 00010 0
110 00101 1
101 01011 0


17
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0
000 00100 0
000 01001 1
000 10010 0
001 00100 0
010 01000 0
100 10000 0
000 00000 1
000 00001 1
000 00010 0
000 00101 1
000 01010 0
000 10100 0

8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1
000 00110 0
000 01101 1
000 11010 0
001 10101 1
011 01010 0
110 10100 0
100 01000 1
001 10001 0
011 00010 0
110 00101 1
101 01011 0
011 10110 1

18
8-BIT CRC for Hi INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00010 0
000 00100 0
000 01001 1
000 10010 0
001 00100 0
010 01000 0
100 10000 0
000 00000 1
000 00001 1
000 00010 0
000 00101 1
000 01010 0
000 10100 0
001 01001 1
8-BIT CRC for jK INPUT
000 00000 Init.
000 00000 0
000 00001 1
000 00011 1
000 00110 0
000 01101 1
000 11010 0
001 10101 1
011 01010 0
110 10100 0
100 01000 1
001 10001 0
011 00010 0
110 00101 1
101 01011 0
011 10110 1
111 01101 1
Results
CRC for Hi 00101001 29h CRC for jK
11101101 EDh
Write a Comment
User Comments (0)
About PowerShow.com