Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
On initialization you have:

for (size_t j = 0; j < 8; j++)
crc32_table[i] = (crc32_table[i] << 1) ^ (crc32_table[i] & (1 << 31) ? ulPolynomial : 0);

what is the order supposed to be here?
(a&b)?c : d or a&(b?c : d)

Thank you
Linda

CRC_32[^]

What I have tried:

order is ambiguous - cannot find anywhere this is correctly specified.
Posted
Updated 3-Apr-18 8:55am

Don't post this under Quick Answers - if you got the code from an article, then there is a "Add a Comment or Question" button at the bottom of that article, which causes an email to be sent to the author. They are then alerted that you wish to speak to them.
Posting this here relies on them "dropping by" and realising it is for them.
 
Share this answer
 
You could try some experiments and figure it out. That's what I would do. You have the other program to give you expected results so try those values with your program and adjust it until you get matching results.
 
Share this answer
 
When you have aquestion about an article, you should use the forum at the bottom of page, that way, you know that the author get notified.

Having more lecture will help you understanfing how crc works.
The defunct Dr.Dobbs magazine used to host rather high quality articles, here is a few links:
Implementing The CCITT Cyclical Redundancy Check | Dr Dobb's[^]
Understanding CRCs | Dr Dobb's[^]
CRC: The C Stands for Confusion | Dr Dobb's[^]
Code project also host more than 1 article about crc:
How to calculate a CRC in C#[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900