1 year ago
get the results of any of the many online CRC32 generators available. So I
coded up the same algorithm and tried it myself with similar results.
I tried digging around and found little that I could use to either evaluate
an algorithm or to generate comparison data other than the final result.
What I needed was something that could produce a result for each input bit.
Most of the reference designs are for sequential languages which are byte
oriented. Even if you present them with a single bit they treat it as a b
yte and perform the logic at a byte level. Heck, some of the calculators d
on't even allow hex data input, treating everything as an ascii character.
Finally I found this link...
Not very easy to use, much of the controls and labeling is rather cryptic.
Eventually by stumbling around I found it I didn't touch anything on the c
ontrols other than selecting CRC32 and inputting the data as binary, lsb fi
rst I could get an output that agreed with my result before the final bit i
nversion used in CRC32.
Wow! If I knew more about web page design maybe I would build a page that
makes this a bit easier.
The standard example code is C, written to calculate a result one bit at a
time. However it won't work on less than a byte of data. In fact, it isn'
t good for comparing to a true bitwise implementation because before the lo
op where they calculate the result bitwise, the input byte is xor'ed with t
he CRC register all at once mucking the data for comparison purposes.
Anyone else have similar problems?
BTW, with the standard bit order CRC32, polynomial 0x04C11DB7, the inverted
output of an input "ABCD1234" (lsb first) would be 16#E928FF7E. Anyone ca
re to confirm that?
-- Rick C. - Get 1,000 miles of free Supercharging