Technology   • Technology •

< Technology


> Intro

• Polynomial

> Calculation

> Examples


 

— FCS (CRC): Polynomial —

Frame Check Sequence (FCS) in High-level Data Link Control (HDLC) frame used for the Point-to-Point Protocol (PPP)

There are a 16-bit and a 32-bit Frame Check Sequence methods used in the High-level Link Control frame as used in the Point-to-Point Protocol. The 16-bit FCS is the default, 32-bit FCS can be negotiated between the participating devices. Here, the 16-bit FCS is discussed only, the 32-bit one can be infered from this discussion, however.

Note that the FCS is sometimes called CRC (Cyclic Redundancy Check) for other applications than HDLC and PPP. They function in the same way, although the generator polynomial may be different.

What makes it somewhat hard to understand the FCS is the fact that it was originally designed for a hardware implementation. The bits drip along the serial telephone line. To speed up a purely software implementation uses bytes instead of bits, a precalculated table is used.

This generator polynomial applies to CCITT X.25 and UIT V.41 as well.

        x16 + x12 + x5 + 1

Here is the table for this polynomial copied from RFC 1662, page 19:

 + 0+ 1+ 2+ 3¦+ 4+ 5+ 6+ 7 
00000011892312329b¦462457ad653674bf07
088c489dc1af5abed3¦ca6cdbe5e97ef8f70f
10108101083393221a¦56a5472c75b7643e17
189cc98d40bfdbae52¦daedcb64f9ffe8761f
202102308b02101399¦672676af443455bd27
28ad4abcc38e589fd1¦eb6efae7c87cd9f52f
303183200a12910318¦77a7662e54b5453c37
38bdcbac429ed98f50¦fbefea66d8fdc9743f
404204538d6116709f¦042015a9273236bb47
48ce4cdfc5ed5efcd7¦886899e1ab7abaf34f
505285430c7197601e¦14a1052837b3263a57
58decdcf44fddfec56¦98e98960bbfbaa725f
606306728f4014519d¦252234ab063017b967
68ef4efec7cc5cddd5¦a96ab8e38a789bf16f
707387620e5095411c¦35a3242a16b1073877
78ffcfee46dcddcd54¦b9eba8629af98b707f
8084089581a71ab693¦c22cd3a5e13ef0b787
88084019c92b523adb¦4e645fed6d767cff8f
9094898500b79ba612¦d2adc324f1bfe03697
9818c109483bd32a5a¦5ee54f6c7df76c7e9f
a0a50ab48386189791¦e32ef2a7c03cd1b5a7
a8294238cb0a501bd9¦6f667eef4c745dfdaf
b0b58ba40296998710¦f3afe226d0bdc134b7
b839c3284a1ad10b58¦7fe76e6e5cf54d7cbf
c0c60cd785e51ef497¦802891a1a33ab2b3c7
c84a445bcd695678df¦0c601de92f723efbcf
d0d68dc704f59fe416¦90a98120b3bba232d7
d85ac54b4c79d7685e¦1ce10d683ff32e7adf
e0e70ef687c41cd595¦a12ab0a3823893b1e7
e86b467acf485459dd¦2d623ceb0e701ff9ef
f0f78fe606d49dc514¦b1aba02292b98330f7
f87bc76a4e58d5495c¦3de32c6a1ef10f78ff
 + 0+ 1+ 2+ 3¦+ 4+ 5+ 6+ 7 

This table is available here as pure ascii-text files (2 KB) for

ready to copy into your source file.

 
  © 2004 - 2018 by Horo Wernli.