Lines Matching full:remainder
253 * A CRC is a long-division remainder. You add the CRC to the message,
257 * remainder computed on the message+CRC is 0. This latter approach
280 * Just like with ordinary division, the remainder is always smaller than
283 * to the current remainder. Then you figure out the appropriate multiple
284 * of the divisor to subtract to being the remainder back into range.
286 * XOR cancel, it's just a copy of bit 32 of the remainder.
290 * the polynomial from the remainder and we're back to where we started,
295 * multiple = remainder & 0x80000000 ? CRCPOLY : 0;
296 * remainder = (remainder << 1 | next_input_bit()) ^ multiple;
298 * Notice how, to get at bit 32 of the shifted remainder, we look
299 * at bit 31 of the remainder *before* shifting it.
302 * the remainder don't actually affect any decision-making until
314 * remainder ^= next_input_bit() << 31;
315 * multiple = (remainder & 0x80000000) ? CRCPOLY : 0;
316 * remainder = (remainder << 1) ^ multiple;
320 * remainder ^= next_input_bit();
321 * multiple = (remainder & 1) ? CRCPOLY : 0;
322 * remainder = (remainder >> 1) ^ multiple;
332 * remainder ^= next_input_byte() << 24;
334 * multiple = (remainder & 0x80000000) ? CRCPOLY : 0;
335 * remainder = (remainder << 1) ^ multiple;
340 * remainder ^= next_input_byte();
342 * multiple = (remainder & 1) ? CRCPOLY : 0;
343 * remainder = (remainder << 1) ^ multiple;
354 * Here, rather than just shifting one bit of the remainder to decide
356 * This produces a 40-bit (rather than a 33-bit) intermediate remainder,
368 * invert the CRC before appending it. This makes the remainder of the
372 * a similar solution is used. Instead of starting with a remainder of
373 * 0, an initial remainder of all ones is used. As long as you start