Google for CRC calculation! Here's one simple result:
It's basically shifting in , XORing the MS bit with the poly, and pushing 1s or 0s into the CRC.
How you do it in the end depends on how fast you want to do it, whether it's in software or hardware, how much time you've got to debug it etc. etc.
Paul Burke