128bits + division problem

hi, I'm currently doing a project to create a CRC code. In this project, input is a 128 + bit data stream that is saved in a big 1d array. I need to do some division for the whole bitstream. I have saved this bitstream in 3 variables currently. I need to divide this stream but having 3 variables made it hard. any creative ideas can be really helpful.

Take a look at GitHub - nickgammon/BigNumber: BigNumber library for the Arduino

1 Like

3 variables? What type? Maybe it would help if you posted your code.

I guess you would do this in a similar way to how it is done by hand - remember doing "long division" on paper at school? Maybe I'm just showing my age...

1 Like

You probably shouldn't need to actually do division to calculate a CRC.

See perhaps https://ww1.microchip.com/downloads/en/AppNotes/00730a.pdf

2 Likes

Treat each bit, or collection of 8 bits as a byte and use any standard CRC routine.

Presumably, all you want to know is whether the CRC of the transmitted data and the computed CRC of the received data match.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.