04 Try it yourself Interactive

Do the modulo 2 division one XOR at a time

The same dataword and the same generator as section 02. Sender divides 110101000 by 1011 and produces the remainder that becomes the CRC. Receiver, clean divides the transmitted codeword 110101111 and should land on 000. Receiver, bit 3 flipped divides 111101111, which is the same codeword with the third bit corrupted in flight, and that is the run worth watching. Amber marks the four columns of the dividend the division is lined up against right now. Indigo is what gets XORed in there, either the generator 1011 or 0000. The four bits actually being XORed are the ones sitting in those columns on the row directly above the indigo one, and the last three bits of the bottom row are the remainder. Nothing plays on its own: Next, Back and Reset, or the arrow keys.

Sender · compute the CRC
110101 with three zeros appended
A step XORs with 1011 when the leading bit of the window is 1, and with 0000 when it is 0. The 0000 case is a shift and costs nothing, which is why the XOR counter and the step counter do not agree.
Press Next to begin. Each press does one step of the division.


      
Bits consumed0
XOR with 10110
Shift only0
Remainder
step 0 / 0