EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

0x07 or 0xE0 CRC

Started by karthikbalaguru May 4, 2009
Hi,

I find that the polynomial for CRC-8-ATM is 1 + x + x^2 + x^8
and the representations as 0x07 or 0xE0 in the below link
http://en.wikipedia.org/wiki/Cyclic_redundancy_check

Does it mean that 0x07 and 0xE0 based CRC calculation
are inter-operable ?

When/Where should we need to use 0x07 and When/Where
should we need to use 0xE0 ?

Why is it mentioned as either 0x07 or 0xE0 ? Any ideas ?

Thx in advans,
Karthik Balaguru
karthikbalaguru wrote:
> Hi, > > I find that the polynomial for CRC-8-ATM is 1 + x + x^2 + x^8 > and the representations as 0x07 or 0xE0 in the below link > http://en.wikipedia.org/wiki/Cyclic_redundancy_check > > Does it mean that 0x07 and 0xE0 based CRC calculation > are inter-operable ? > > When/Where should we need to use 0x07 and When/Where > should we need to use 0xE0 ? > > Why is it mentioned as either 0x07 or 0xE0 ? Any ideas ?
Taken as is, the two "polynomials" are equivalent ("reciproqual"), see http://en.wikipedia.org/wiki/Mathematics_of_CRC but not interoperable, they give two different results. http://www.ross.net/crc/download/crc_v3.txt contains more explicit developments of the theory. Now it's a matter of convention, look if your application works LSB first or MSB first. BTW what is your application ? Are you developing something from scratch or interfacing to something already well defined ? BTW
> Thx in advans, > Karthik Balaguru
yg -- http://ygdes.com / http://yasep.org
On Mon, 04 May 2009 02:03:29 -0700, karthikbalaguru wrote:

> I find that the polynomial for CRC-8-ATM is 1 + x + x^2 + x^8 > and the representations as 0x07 or 0xE0 in the below link > http://en.wikipedia.org/wiki/Cyclic_redundancy_check > > Does it mean that 0x07 and 0xE0 based CRC calculation > are inter-operable ? > > When/Where should we need to use 0x07 and When/Where > should we need to use 0xE0 ? > > Why is it mentioned as either 0x07 or 0xE0 ? Any ideas ?
The column heading says: Representations: normal or reversed (reverse of reciprocal) while the entry for CRC-8-ATM is: 0x07 or 0xE0 (0x83) Meaning normal is 0x07 (00000111), reversed is 0xE0 (11100000), reverse of reciprocal is 0x83. Which to use depends upon whether you enumerate the bits LSB-first or MSB-first.
karthikbalaguru wrote:
> > I find that the polynomial for CRC-8-ATM is 1 + x + x^2 + x^8 > and the representations as 0x07 or 0xE0 in the below link > http://en.wikipedia.org/wiki/Cyclic_redundancy_check > > Does it mean that 0x07 and 0xE0 based CRC calculation > are inter-operable ? > > When/Where should we need to use 0x07 and When/Where > should we need to use 0xE0 ? > > Why is it mentioned as either 0x07 or 0xE0 ? Any ideas ?
Depends on the direction you are shifting data in the register. -- [mail]: Chuck F (cbfalconer at maineline dot net) [page]: <http://cbfalconer.home.att.net> Try the download section.
On May 4, 3:38 pm, whygee <why...@yg.yg> wrote:
> karthikbalaguru wrote: > > Hi, > > > I find that the polynomial for CRC-8-ATM is 1 + x + x^2 + x^8 > > and the representations as 0x07 or 0xE0 in the below link > >http://en.wikipedia.org/wiki/Cyclic_redundancy_check > > > Does it mean that 0x07 and 0xE0 based CRC calculation > > are inter-operable ? > > > When/Where should we need to use 0x07 and When/Where > > should we need to use 0xE0 ? > > > Why is it mentioned as either 0x07 or 0xE0 ? Any ideas ? > > Taken as is, the two "polynomials" are equivalent > ("reciproqual"), seehttp://en.wikipedia.org/wiki/Mathematics_of_CRC > but not interoperable, they give two different results.http://www.ross.net/crc/download/crc_v3.txtcontains more > explicit developments of the theory. > > Now it's a matter of convention, look if your application > works LSB first or MSB first. BTW what is your application ? > Are you developing something from scratch or interfacing > to something already well defined ? >
Working on ROHC. The RFC 4815 states that it uses 0xE0. I was wondering about the reason for opting 0xE0 instead of 0x07 and hence raised these queries to know if there is any specific advantage in using either 0xE0 or 0x07. Agreed, 0xE0 and 0x07 are not inter-operable. But, is the performance same(equivalent) for both 0xE0 and 0x07 based CRC. Thx in advans, Karthik Balaguru
karthikbalaguru wrote:
> Agreed, 0xE0 and 0x07 are not inter-operable. > But, is the performance same(equivalent) for both > 0xE0 and 0x07 based CRC.
yes, 11100000 and 00000111 are just the same polynomials, in a reverse bit order. Mathematically, in the Galois Field GF(2^8), this is just like 2 facets of the same medal. Please read the "A Painless Guide to CRC Error Detection Algorithms", it's a very good read.
> Thx in advans, > Karthik Balaguru
yg -- http://ygdes.com / http://yasep.org
On May 5, 11:15 am, whygee <why...@yg.yg> wrote:
> karthikbalaguru wrote: > > Agreed, 0xE0 and 0x07 are not inter-operable. > > But, is the performance same(equivalent) for both > > 0xE0 and 0x07 based CRC. > > yes, 11100000 and 00000111 are just the same > polynomials, in a reverse bit order.
So, performance(cpu cycles) does not vary for either 0xE0 or 0x07 based CRC. That's Interesting ! Thx, Karthik Balaguru
On May 5, 11:15 am, whygee <why...@yg.yg> wrote:
> karthikbalaguru wrote: > > Agreed, 0xE0 and 0x07 are not inter-operable. > > But, is the performance same(equivalent) for both > > 0xE0 and 0x07 based CRC. > > yes, 11100000 and 00000111 are just the same > polynomials, in a reverse bit order. > Mathematically, in the Galois Field GF(2^8), > this is just like 2 facets of the same medal. > Please read the "A Painless Guide to CRC > Error Detection Algorithms", it's a very > good read.
Yes, This info was very helpful. http://www.ross.net/crc/download/crc_v3.txt is really very good. Thx, Karthik Balaguru

The 2024 Embedded Online Conference