std_match
Advanced Member level 4
This expression corresponds to the leftmost bit in the intermediate values in the long division (if '1' subtract the polynomial).Wait, why is it crc[4] ^ data ?
crc[4] contains a bit that has already been subjected to the polynomial subtractions, before the corresponding data bit was available.
This XOR operation compensates for that.
The long division shifts in the data bits and then "subtracts" the polynomial.
The serial CRC does the polynomial subtractions from zeros, and later "adds" the real input bits when they arrive. This "addition" is the crc[4] ^ data.
(with no carry/borrow, xor/add/subtract are all the same operation)
Last edited: