Lines Matching refs:a
3 A CRC is a long-division remainder. You add the CRC to the message,
4 and the whole thing (message+CRC) is a multiple of the given
8 is used by a lot of hardware implementations, and is why so many
14 subtract, we just xor. Thus, we tend to get a bit sloppy about
18 To produce a 32-bit CRC, the divisor is actually a 33-bit CRC polynomial.
23 Note that a CRC is computed over a string of *bits*, so you have
28 is sent last. And when appending a CRC word to a message, you should
31 Just like with ordinary division, you proceed one digit (bit) at a time.
36 and to make the XOR cancel, it's just a copy of bit 32 of the remainder.
38 When computing a CRC, we don't care about the quotient, so we can
55 Also, to add the CRC to a message, we need a 32-bit-long hole for it at
59 These details lead to a standard trick: rearrange merging in the
82 As long as next_input_bit is returning the bits in a sensible order, we don't
84 We can do it 8 bits at a time rather than 1 bit at a time:
102 If the input is a multiple of 32 bits, you can even XOR in a 32-bit
103 word at a time and increase the inner loop count to 32.
106 bulk of a message byte-at-a-time and adding bit-at-a-time processing
110 the byte-at-a-time table method, popularized by Dilip V. Sarwate,
115 in the correct multiple to subtract, we can shift a byte at a time.
116 This produces a 40-bit (rather than a 33-bit) intermediate remainder,
118 a 256-entry lookup table indexed by the high 8 bits.
123 4-bit shifts followed by a lookup in a 16-entry table.
125 It is not practical to process much more than 8 bits at a time using this
129 To get higher software performance, a "slicing" technique can be used.
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
139 lookup in a 65536-entry table, the two high bytes are looked up in
146 takes barely longer than a single table look-up and thus performs almost
155 But this still enforces sequential execution: a second group of table
166 By always having 4 loads in flight, a modern superscalar processor can
171 Normally, appending zero bits to a message which is already a multiple
172 of a polynomial produces a larger multiple of that polynomial. Thus,
173 a basic CRC will not detect appended zero bits (or bytes). To enable
174 a CRC to detect this condition, it's common to invert the CRC before
179 The same problem applies to zero bits prepended to the message, and a
181 a remainder of 0, an initial remainder of all ones is used. As long as
182 you start the same way on decoding, it doesn't make a difference.