From "EDN" magazine, June 5, 1979, page 84
------------------------------------------
8080 ROUTINE GENERATES CRC CHARACTER
by Fred Gutman
California Microwave, Inc., Sunnyvale, CA
Communications and magnetic-storage controllers often use cyclic
redundancy checking (CRC) to enhance data-transmission accuracy;
this method's popularity is due, in part, to its easy implementa-
tion with shift registers and exclusive-OR gates (EDN, Sept 5,
1978, pgs 119-123).
Many software methods can emulate this hardware mechanization.
The more natural software method discussed here directly executes
the division of a message by a generating polynomial. An example,
programmed on the 8080, appears in the figure.
CRC divides a message M(x) of any length by a generating
polynomial P(x) to form a quotient Q(x) and a remainder R(x):
M(x)/P(x)=Q(x)+R(x). R(x) is appended to the message and checked
at the receiving end of the communication channel or upon read-
back of magnetic-storage information.
In these operations, addition and division are based on the
exclusive-OR function without carry; only bit-by-bit differences
are important, not their arithmetic sum. Thus, while this
process resembles nonrestoring binary division, its mechanization
is somewhat simpler. Note that you don't have to store the
quotient - the remainder is the only useful part. This versatile
method accepts different generating polynomials (table); you
simply insert them into the routine in the figure. In each case,
an R-bit remainder is left in location REM for transmission or
checking. (R is the order of the generating polynomial.)