Jan 152018

CRC16 – calculate and display CRC checksum for file(s). Includes complete C source code. | |||
---|---|---|---|

File Name | File Size | Zip Size | Zip Type |

CRC16.C | 2889 | 1149 | deflated |

CRC16.DOC | 2191 | 926 | deflated |

CRC16.EXE | 8834 | 5507 | deflated |

FINDFILE.C | 1629 | 627 | deflated |

# Download File CRC16X.ZIP Here

## Contents of the CRC16.DOC file

CRC16 CRC16

NAME

crc16 - calculate and display CRC checksum for file(s)

SYNOPSIS

crc16 [-c][-s] file(s)

wildcards are permitted

default polynomial is CRC-16, as used in ARC, PKPAK, etc..

specify -c for CCITT, as used in the XMODEM-CRC protocol

specify -s for the IBM SDLC algorithm

DESCRIPTION

This algorithm is adapted from the classic paper "Byte-wise CRC Calculations",

Aram Perez in IEEE Micro June 1983 pp 40-50.

The default table is that for CRC-16 (x16 + x15 + x2 + 1). It is derived from

combinations of the bits of the low order byte shifted eight times and

combined according to the polynomial. Other polynomials may be derived, see

the article by Perez.

x8 x7 x8 x7 x6 x5 x4 x3 x2 x1 0 0 0 0 0 x8

x7 x6 x7 x6 x5 x4 x3 x2 x1 x7

x6 x5 x6

x5 x4 x5

x4 x3 x4

x3 x2 x3

x2 x1 x2

x1 x1

Entry 1 (00000001) is therefore

1 1 0 0 0 0 0 0 1 1 0 0 0 0 0 1 = C0C1

2 (00000010) is

1 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 = C181

3 (00000011) is their binary sum

0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 = 0140

This program will calculate the CRC used by the popular ARC archiving program.

The program can be used to check that a file has been archived properly. The

program will also calculate the crc used by XMODEM which is the CCITT standard

polynomial (x16 + x12 + x5 + 1), this polynomial is also used by IBM corp. in

their SDLC synchronous transfer protocol.

To cause the CCITT polynomial to be used use the -c option, for the SDLC

modification where the crc is initialized to all ones use the -s option.

AUTHOR

Rob Duff, 2255 Cambridge St., Apt 301, Vancouver, BC V5L 1E5 Canada

BBS: The DuffleBoard, (604) 251-1816 2400/N/8/1

This program is not copyrighted.

January 15, 2018
Add comments