🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.ibm.pc.programmer
3 messages
3 total messages Started by Gordon Hlavenka Thu, 12 Jul 1990 01:55
CCITT CRC-16
#948
Author: Gordon Hlavenka
Date: Thu, 12 Jul 1990 01:55
10 lines
742 bytes
I need to generate the CCITT CRC16 for an array of bytes.  I know there's a
sexy little algorithm which does it in a dozen lines or so, without lookup
tables.  It uses SHL's and XOR's...

Anybody got this sucker?

----------------------------------------------------------
Gordon S. Hlavenka                 cgordon@vpnet.chi.il.us
Disclaimer: He's just stupid.
Re: CCITT CRC-16
#950
Author: James Michael Anderson
Date: Fri, 13 Jul 1990 01:39
26 lines
1746 bytes
In article <269bd6d3-120comp.sys.ibm.pc.programmer@vpnet.chi.il.us> cgordon@vpnet.chi.il.us (Gordon Hlavenka) writes:
>
>I need to generate the CCITT CRC16 for an array of bytes.  I know there's a
>sexy little algorithm which does it in a dozen lines or so, without lookup
>tables.  It uses SHL's and XOR's...
>
>Anybody got this sucker?
>
>----------------------------------------------------------
>Gordon S. Hlavenka                 cgordon@vpnet.chi.il.us
>Disclaimer: He's just stupid.

  Hey!  I'm looking for the same; however, I have a need for the FASTEST
version possible (lookup tables are OK).  Anybody got any suggestions
for this one?  I belive that there exists (once again) an algorithm that
uses a table of "pre-shifted" values...

Thanx in advance (as always).

-----------------------------------------------------------
Jim Anderson
"I'm not bad -- I'm just programmed bad"
--------------------------------------------------------------------------
       JJJMM    MMMAA       | 
       JJJ MM  MMMM AA      |    "I'm not bad, I'm just coded that way!"
       JJJ  MMM  MMAAAA     |         - The Jessica Rabbit program
Re: CCITT CRC-16
#963
Author: Jeff Pipkins
Date: Fri, 13 Jul 1990 19:27
24 lines
1800 bytes
In article <1990Jul13.013921.1320@cec1.wustl.edu> jma7759@cec1.wustl.edu (James Michael Anderson) writes:
>In article <269bd6d3-120comp.sys.ibm.pc.programmer@vpnet.chi.il.us> cgordon@vpnet.chi.il.us (Gordon Hlavenka) writes:
>>
>>I need to generate the CCITT CRC16 for an array of bytes.  I know there's a
>>sexy little algorithm which does it in a dozen lines or so, without lookup
>>tables.  It uses SHL's and XOR's...
>
>  Hey!  I'm looking for the same; however, I have a need for the FASTEST
>version possible (lookup tables are OK).  Anybody got any suggestions
>for this one?  I belive that there exists (once again) an algorithm that
>uses a table of "pre-shifted" values...

There is a book called "C Programmer's Guide to NetBIOS" by
David Schwaderer (sp?).  It has the best treatment of CRC's for
software types that I have seen anywhere.  It explains several
different kinds of CRC's, including CRC-16, CRC-32, and others.
It has both bit-at-a-time algorithms (less space, more time), and
table lookup algorithms (more space, less time).  Even if you
couldn't care less about NetBIOS, if you are at all interested
in CRC's, this book is a must.

--Jeff Pipkins
pipkins@imagen.com
Disclaimer: "I've already told you more than I know!"
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads