I wanted to calculate CRC and for this, I had written following code, but it gives me Overflow error. The error come in the line...
mCrc = mCrc Xor mStr where...
mCrc = "1111111111111111" (binary of 65535) and
mStr = "10" (binary of 2)
Could you please help me out of this.
My code is:
Private Sub Command1_Click()
Text2 = CalcCrc(Text1)
Public Function CalcCrc(mStr As String)
mCrc = DecimalToBinary(65535)
mTmpPoly = DecimalToBinary(40961)
mStr = DecimalToBinary(2)
mCrc = mCrc Xor mStr
For i = 0 To 7
mtmp = Right(mCrc, 1)
mCrc = "0" & Left(mCrc, Len(mCrc) - 1)
CalcCrc = mCrc
Sorry, if I have posted question to wrong zone.