Detect transmission errors by dividing the frame by a fixed generator and sending the remainder along with it.
CRC treats your data as one giant binary number and divides it by a fixed bit pattern called the generator. The leftover — the remainder — is a short fingerprint appended to the frame. The receiver divides the whole received frame by the *same* generator: if the remainder comes out zero, the bits almost certainly arrived intact; if it's anything else, the frame was corrupted in transit.
k+1-bit generator produces a k-bit CRC. 1011 (4 bits) gives a 3-bit remainder.k zero bits to the data (one fewer than the generator's length), making room for the CRC.1, line the generator up and XOR; wherever it's 0, the quotient bit is 0 and you slide on. No carrying to track.The generator 1011 is 4 bits, so the CRC is 3 bits and we append 3 zeros to the data: 1010 becomes 1010000. Now XOR-divide by 1011. Each time the leftmost remaining 1 lines up, XOR the generator under it.
1 0 1 0 0 0 0 data 1010 with 3 zeros appended
^ 1 0 1 1 generator lines up under the leading 1
-----------
0 0 0 1 0 0 0
^ 1 0 1 1 slide right to the next leading 1, XOR again
-----------
0 0 0 0 0 1 1 remainder = 011 <- the CRCSo the CRC is `011`. The sender transmits the data with the remainder in place of the zeros: 1010 + 011 = `1010011`. To verify, the receiver divides 1010011 by 1011 — the same XOR division now leaves remainder 000, so no error is flagged.