• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

CRC16 with Polynominal : 0x8408, and Preset CRC : 0x6363

 
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Friends..

Currently i'm looking for maybe there's existing CRC16 java class which compute CRC16 with Polynominal : 0x8408, and Preset CRC : 0x6363..
But if there's no existing CRC16 java class, please help me how to create a Java class which compute CRC16 with Polynominal : 0x8408, and Preset CRC : 0x6363..

i have tried using this CRC16 classes of this LINK, but it's not what i need..

Please help me regarding this..

Any help would be appreciated..

Thanks in advance..
 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try searching the forum for CRC or CRC16, there have been some threads on this topic already.
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Martin,

Thanks for your reply..
I've looked up it on google and i found that actually the CRC16 that i'm looking for is CRC16 according to ISO14443A..
I've found that implementation in Phyton..
But, i face problem how to implement it in Java..

Here's the implementation of CRC16 in Phyton :


Could you or anyone help me to convert this in Java method..
Sorry, i'm a little bit stuck to implement this in Java, especially for this line of codes :


Please help me, Any help would be very appreciated..

Thanks
 
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is nothing more than Python's way of writing The other operators are available in Java as well.
 
Leonardo Carreira
Ranch Hand
Posts: 494
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Rob Prime,

Thanks for your reply..
Hmm, sorry i'm not too understand how to use any unsigned data type (same as used by C) in Java..
Could you or anyone help me how to convert these methods in Java?..
Sorry, i'm stuck.. This code seems a little bit complicated to translated into Java..



Thanks in advance..
Any help would be very appreciated..
 
Rob Spoor
Sheriff
Posts: 22781
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't think you need to have them unsigned. An unsigned short with value 0x8408 will be transformed into a signed short with value -31736. However, because both are 16 bit numbers, they both still have the same bit pattern. Since all your >>, & and ^ operators work on bit patterns (not numbers) you will end up with the same bit pattern again. Your signed short will be recognized as the correct unsigned short in a C program.
reply
    Bookmark Topic Watch Topic
  • New Topic