Talk:CRC-32: Difference between revisions

 
(12 intermediate revisions by 3 users not shown)
Line 1:
== Size of example string ==
strlen("The quick brown fox jumps over the lazy dog") is 43.
 
Due to modern processors having specific hardware engines used to calculate CRC's that are 32 bit wide
at a time, such as the cortex M3 arm series, it would be better to have a test string that
is wholly divisible by 4. The current test string has 43 characters. adding a full stop to this
would give a strlen() of 44.
 
Also CRC-16 engines ake 16 bits at a time, and would not be compatible with the example string chosen.
[[User:Robin48gx|Robin48gx]] ([[User talk:Robin48gx|talk]]) 10:47, 23 September 2014 (UTC)
 
==Task goal==
Hi, What do you want the task to be about? --[[User:Paddy3118|Paddy3118]] 17:45, 29 November 2011 (UTC)
Line 64 ⟶ 53:
:: I suggest something based on [[wp:Low-density parity-check code|Gallager code]]s would be appropriately beefy, as those are used in very high performance applications like transmissions from satellites. If that doesn't satisfy you, Spekkio, I don't know what will. :-) Different task though. –[[User:Dkf|Donal Fellows]] 17:27, 11 December 2011 (UTC)
::: Thanks, that is very interesting :D --[[User:Spekkio|Spekkio]] 10:02, 12 December 2011 (UTC)
:::: Hamming numbers are the number of inverted bits in a row in the message, plus one in the checksum code, that can go wrong before it can fail to detect the error. So if you had a hamming distance of 6, as in the CRC-15 used by CANbus, then you would have up to five bits in a row that could be wrong, along with one wrong in the checksum itsself. So CANCRC15 has a hammin distance of 6. This means its very good at getting rid of electrical interference on a line: i.e. a burst error of 5 bits or less will be detected. Look up papers by Cooperman for a math description, and lots of deifferent polynomials for CRCs. [[User:Robin48gx|Robin48gx]] ([[User talk:Robin48gx|talk]]) 13:28, 23 September 2014 (UTC)
 
== CRC library ported to several languages ==
Line 245 ⟶ 235:
</pre>
Again learned something. --[[User:Walterpachl|Walterpachl]] ([[User talk:Walterpachl|talk]]) 05:18, 19 August 2013 (UTC)
 
== Size of example string ==
strlen("The quick brown fox jumps over the lazy dog") is 43.
 
Due to modern processors having specific hardware engines used to calculate CRC's that are 32 bit wide
at a time, such as the cortex M3 arm series, it would be better to have a test string that
is wholly divisible by 4. The current test string has 43 characters. adding a full stop to this
would give a strlen() of 44.
 
Also CRC-16 engines aketake 16 bitsbit chunks at a time, and would not be compatible with the example string chosen.
 
strlen("The quick brown fox jumps over the lazy dog.") is 44.
cprog out: crc32 of test string <The quick brown fox jumps over the lazy dog.>44 is 1368401385 519025E9
This agrees with feeding 11 32 bit words into the arm cortex CRC engine with it
set to CRC32 and seeded with ~0.
 
[[User:Robin48gx|Robin48gx]] ([[User talk:Robin48gx|talk]]) 10:47, 23 September 2014 (UTC)
 
:*The CRC-32 references given are defined on arbitrary sized strings, not limited to multiples of four.
:*Therefore, an implementation that only supported a multiple of four would not be a correct implementation of this task.
:*Performance issues are typically not the point of Rosetta Code examples. If an implementation is optimized for four byte multiples it's just an optimization irrelevant to the task itself.
:*The example input should therefore purposely ''not'' be a multiple of four.
::&mdash;[[User:dchapes|dchapes]] ([[User talk:dchapes|talk]] | [[Special:Contributions/dchapes|contribs]]) 13:50, 23 September 2014 (UTC)
 
::: Yes I take your points, but 32 and 64 bit words are the norm now, as is increasing integration of
::: common tasks (such as CRCs, multiple ADC readings, zero crossing for motor control). Making this string
::: a little longer makes it compatible with blinding fast hardware circuitry. I think its just keeping up with the times.
::: CRC-32 is often used to validate a block of data, not just transmission lines.:wq --[[User:Robin48gx|Robin48gx]] ([[User talk:Robin48gx|talk]])
 
::::Mind you, they are still shipping shed loads of 16 and 8 bit processors as they are smaller, cheaper and more power efficient ;-)<br>--[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 14:49, 3 October 2014 (UTC)
 
::::Robin48gx, what you say is completely irrelevant for all the reasons I gave. &mdash;[[User:dchapes|dchapes]] ([[User talk:dchapes|talk]] | [[Special:Contributions/dchapes|contribs]]) 18:01, 3 October 2014 (UTC)
Anonymous user