LoginSignup
2
7

More than 5 years have passed since last update.

CRC-16 > 色々あるようだ | On-line CRC calculation and free library

Last updated at Posted at 2017-08-25

CRC-16の実装コード(C++)がある。

Python実装は以下で見つけた。
https://gist.github.com/oysstu/68072c44c02879a2abf94ef350d1c7c6

比較してみた。結果が異なる。

CRC-16と言っても色々あるようだ。
https://blogs.yahoo.co.jp/edamatsu_denki/24482845.html

・CRC16-IBM (x16 + x15 + x2 + 1)
・CRC16-ANSI (x16 + x15 + x5 + 1)
・CRC16-CCITT (x16 + x12 + x5 + 1)
・CRC16-XMODEM (x16 + x12 + x5 + 1)

C++実装はCRC-16(Modbus)。
PythonのコードはCRC-16-CCITT。

On-line CRC calculation and free library
にさらに多くの種類が紹介されている。

2
7
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
7