Lines Matching refs:remainder
3 A CRC is a long-division remainder. You add the CRC to the message,
7 remainder computed on the message+CRC is 0. This latter approach
17 Like all division, the remainder is always smaller than the divisor.
33 and append it to the current remainder. Then you figure out the
34 appropriate multiple of the divisor to subtract to being the remainder
36 and to make the XOR cancel, it's just a copy of bit 32 of the remainder.
40 the polynomial from the remainder and we're back to where we started,
45 multiple = remainder & 0x80000000 ? CRCPOLY : 0;
46 remainder = (remainder << 1 | next_input_bit()) ^ multiple;
49 Notice how, to get at bit 32 of the shifted remainder, we look
50 at bit 31 of the remainder *before* shifting it.
53 the remainder don't actually affect any decision-making until
65 remainder ^= next_input_bit() << 31;
66 multiple = (remainder & 0x80000000) ? CRCPOLY : 0;
67 remainder = (remainder << 1) ^ multiple;
72 remainder ^= next_input_bit();
73 multiple = (remainder & 1) ? CRCPOLY : 0;
74 remainder = (remainder >> 1) ^ multiple;
77 The most significant coefficient of the remainder polynomial is stored
78 in the least significant bit of the binary "remainder" variable.
86 remainder ^= next_input_byte() << 24;
88 multiple = (remainder & 0x80000000) ? CRCPOLY : 0;
89 remainder = (remainder << 1) ^ multiple;
95 remainder ^= next_input_byte();
97 multiple = (remainder & 1) ? CRCPOLY : 0;
98 remainder = (remainder >> 1) ^ multiple;
114 Here, rather than just shifting one bit of the remainder to decide
116 This produces a 40-bit (rather than a 33-bit) intermediate remainder,
137 A "slicing by 2" technique would shift the remainder 16 bits at a time,
138 producing a 48-bit intermediate remainder. Rather than doing a single
140 two different 256-entry tables. Each contains the remainder required
152 leaves the low-order bits of the intermediate remainder zero, the
175 appending it. This makes the remainder of the message+crc come out not
181 a remainder of 0, an initial remainder of all ones is used. As long as