IṢẸ́ ỌNÀ
ẸWÀ ÀTI ÌLERA
IṢẸ́ ỌWỌ́
ÀṢÀ ÀTI ÌTÀN
ÌṢERÉ
ÀYÍKÁ
OÚNJẸ ÀTI OHUN MÍMU
REVERSE ENGINEERING
SÁYẸ́ǸSÌ
ERÉ ÌDÁRAYÁ
ÌMỌ̀-Ẹ̀RỌ
ÀWỌN OHUN WÍWỌ̀

The Cyclic Redundancy Check
A parity bit notices one flipped bit. Real wires do not flip one bit. They deliver bursts — a relay clicks, a motor starts, lightning strikes three counties away — and forty consecutive bits arrive as noise. Parity catches that only half the time, because half of all bursts contain an even number of flips.
Wesley Peterson and Daniel Brown published the fix in 1961, and it is a piece of algebra rather than a piece of engineering. Treat the message as a polynomial whose coefficients are its bits, working over the field with two elements — where one plus one is zero, so addition and subtraction are both exclusive-or and there are no carries anywhere. Divide by a fixed generator polynomial and append the remainder. The receiver divides again; a clean frame leaves nothing.
What falls out of that is not a probability but a set of GUARANTEES. A generator of degree r detects every single-bit error, every odd number of errors if the polynomial is chosen well, and — the one that matters — EVERY burst of r bits or fewer. Not usually. Every one. Beyond r bits the guarantee stops and the miss rate steps to about two to the minus r, which for the 32-bit CRC in every Ethernet frame is one in four thousand million.
It corrects nothing. That is the trade against the Hamming code this blueprint links to: Hamming repairs a single bit and scales badly as blocks grow, while a CRC only ever says yes or no, costs 32 bits whether the frame is 64 bytes or 1500, and catches the burst that Hamming would not even notice.
FULLY BUILDABLE, and the proof is the point: inject every possible burst of every length and count what slips through. The wall sits exactly where the algebra says it does.
Àárín
3 hours
Ìlànà
1
1
What a single-bit code cannot do
What a single-bit code cannot do
Work the Hamming code first. It uses overlapping parity subsets so the pattern of failed checks points at the guilty bit, and it CORRECTS it. That is more than a CRC will ever do.
Now take a block it protects and flip six consecutive bits. Hamming's syndrome points confidently at a single bit that is not the problem, and correcting it makes the block worse. A code built for isolated errors does not fail gracefully on bursts — it fails CONFIDENTLY, which is the more dangerous of the two.
That is the gap this blueprint fills, and it is why real links carry both: an error-correcting code sized for the expected noise, and a CRC over the whole frame to catch the case where the first code was wrong.
2
2
Divide by hand, once
Divide by hand, once
Do one division on paper. Message 1101011011, generator 10011 — that is x⁴+x+1, degree 4, so you will get a four-bit remainder.
Append four zeros to the message. Then repeatedly: if the leftmost bit under consideration is 1, XOR the generator against it; shift right one place; repeat. No borrowing, no carrying — every step is exclusive-or, because in this field addition and subtraction are the same operation.
The four bits left at the end are the CRC. Append them in place of the zeros and divide the whole thing again: the remainder is zero. Now flip any single bit and repeat — it is not zero any more.
Do this once by hand and the code in the notebook stops being magic. It is this, in a loop.
Àwọn ohun èlò fún ìgbésẹ̀ yìí:
Graph Paper2 ewéÀwọn irinṣẹ́ tí a nílò:
Steel Rule3
3
Implement it and check it against the standard value
Implement it and check it against the standard value
Ń ṣí ìwé Jupyter…
Àwọn irinṣẹ́ tí a nílò:
Desktop Computer4
4
Compendium: guarantees, not probabilities
Compendium: guarantees, not probabilities
WHY THE BURST GUARANTEE IS EXACT. An undetected error is one where the error pattern itself is divisible by the generator. A burst of length L or less is a polynomial of degree less than L, and a polynomial of degree less than r simply cannot be divisible by one of degree r unless it is zero. So every burst up to r bits is caught, by arithmetic, with no appeal to probability. Everything else a CRC promises is a statement about what the chosen generator happens to factor into.
AGAINST A CHECKSUM. An internet checksum is a sum, so it is blind to reordering, to a block of zeros inserted or deleted, and to any pair of errors that cancel. It is cheap and it is computed on a CPU with no special hardware, which is exactly why IP uses one and Ethernet does not. A CRC costs a shift register and gives guarantees; a checksum costs an add instruction and gives a hint. The layers use different ones on purpose.
AGAINST HAMMING. Hamming corrects one error and needs `log2(n)` parity bits, so its cost grows with block size and its power does not. A CRC corrects nothing and costs a fixed 32 bits whether the frame is 64 bytes or 1500. Correction is worth paying for when retransmission is expensive or impossible — deep space, a disc surface, a compact disc's CIRC. Detection is enough when you can simply ask again, which is what every protocol after this blueprint does.
Àwọn ohun-èlò
1- 2 ewéÀyè
Àwọn irinṣẹ́ tó nílò
2- Àyè
Blueprint tó jọra
Àwọn blueprint wọ̀nyí pín ìmọ̀ — ọ̀nà, ohun-èlò tàbí ìlànà
CC0 Àgbègbè Gbogbogbò
Blueprint yìí ti jáde lábẹ́ CC0. O lè ṣe àdàkọ, yí padà, pín, àti lò láìsí ìyọ̀ǹda.
Ṣàtìlẹ́yìn Olùṣẹ́dá nípa rírà àwọn ọjà nipasẹ̀ Blueprint wọn Ẹ̀san Olùṣẹ́dá tí àwọn Olùtajà gbé kalẹ̀, tàbí ṣẹ̀dá àtúnṣe tuntun ti Blueprint yìí kí o sì fi sínú Blueprint rẹ gẹ́gẹ́ bí ìsopọ̀ láti pín owó-wíwọlé.




