|
-
Apr 24th, 2003, 01:18 AM
#1
Thread Starter
Banned
Help: How to Calculate Cyclic Redundancy Checksum (CRC)
Hello,
Although it seems like cheating to do this, but I really have no clue and no time to calculate Cyclic Redundancy Checksum (CRC). Would you guys help me to solve the following problem? If possible, would u please give me some explanation? I'll feel guiltier to just copying your answer without understanding it.
Question:
"Suppose you want to transmit the data 10011001 and the generator polynomial is X^3 + X^2 +1. Use CRC method to find data to be transmitted T(s)?"
Thank You Very Much. I appreciate it.
Jacob
-
Apr 24th, 2003, 03:16 PM
#2
transcendental analytic
the basic idea is that you have an agreed polynominal of (n-1)'th degree, usually n being 32 as in the checksum used in internet (CRC32) and add n bits to your data so the whole polynom is divisible with the agreed polynominal. When the data is sent over most any bit and most probably all burst errors are detected when dividing the result with the agreed polynominal getting a rest.
Basically
Send D = T*x^n + T*x^n % P
and
Recieve T=D*X^-n when D % P = 0, otherways ask to retrasmit
of course you'd have to do this with bit arithmetic
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|