Home > other >  Python CRC check
Python CRC check

Time:09-18

Python x16 + CRC check x15 + x2 + 1 11, I'd like to check generation 0 x0066
With the following algorithm was 0 x0707

Def crc16 (x, invert) :
A=0 x0000
B=0 x8005
For byte in x:
A ^=word (byte)
For I in range (8) :
The last=a % 2
a>=1
If the last==1:
A ^=b
S=hex (a). The upper ()

Return s + s made [then] if invert==True else s + s [then] [now]
Bb=crc16 (" 11 ", False)
Print (bb)
  • Related