CRC Detects Errors in Digital Data Communications and Can Encrypt Data
In our modern age, the importance of digital electronic
data communications by telephone lines, through a
modem, special high-speed lines, or over the airwaves by
radio cannot be overstated. The transfer of information
via these media is critical for the successful operation of
government, military, business, and banking. Without this
technology, our information age and the Internet would
The reliability of data communications over
distance is of the utmost importance because of the
critical requirements of its users. If the medium cannot be
relied upon for error-free performance, it is useless. The
damaging effects that can compromise the system are
noise, distortion, and interference. These three gremlins
have the ability to turn a digital one bit message into a
digital zero bit and vice versa. If this reversal of a bit
occurs, then an error has crept in, possibly undetected.
This scenario could be disastrous.
Since we cannot guarantee a perfect medium
between a source transmitter and a destination receiver,
some method to detect errors must be employed.
Thankfully, there are some systems that can do this.
Parity check and checksum are two ways, but they
have limitations. Another method is a code called
Cyclic Redundancy Check (CRC). CRC is a popular and
powerful means to ensure that a transmitter and receiver
can communicate data reliably, even in the worst of
conditions. CRC is so well regarded that the Internet
relies on it for error detection.
NUTS & VOLTS
In this article, I will present a short course on CRC
and supply the knowledge needed to implement simple
digital electronic circuits to perform CRC. Later, I will
present a modification to the concept, where a method of
data encryption, along with the normal error-detecting
feature, can be utilized.
Cyclic Redundancy Check is a code — or algorithm —
that has three basic and endearing qualities: it provides
extreme error detection capabilities, requires a minimum
of hardware and software, and is easy to implement.
These advantages can make the application of this
system by hobbyists and hardware hackers a reality. I
will demonstrate that CRC circuits are very easy to
breadboard and utilize.
Parity check, checksum, and CRC all work by
applying an algorithm to a message. This algorithm,
or code, produces a binary value that represents the
message in some digital logic way. This value is
then appended to the end of the message before it is
transmitted out. The receiver at the other end of the link
receives the message and binary value combination, then
applies the same algorithm to the message to produce its
own binary value. The receiver compares the two values
and, if they are equal, then the message was received
correctly. If they are not equal, then the receiver tells the
transmitter to retransmit the message.
The primary benefit of CRC is that it can detect more
types of data errors than the other two methods. For
instance, it can detect all single bit errors, all double bit
errors, any odd number of errors, and most burst errors.
Parity check, on the other hand, can only detect single bit
errors, while checksum can detect all single bit and some
multiple bit errors. Obviously, CRC is the most robust of
In exploring the theory behind CRC, we will begin
with a short lesson on modulo-2 arithmetic. Modulo-2
arithmetic is normal binary addition or subtraction, but is
not concerned with carrying or borrowing, as in decimal