0% found this document useful (0 votes)
47 views

Name: Hayden Hodge Log In: Date: October 13

Hayden Hodge reported on error detection methods for sending data between terminals. Two main methods discussed were parity bit and cyclic redundancy check (CRC). Parity bit involves adding an extra bit to represent if there is an even or odd number of 1s in the data, but can only detect odd number of errors. CRC is more reliable as it uses a generator polynomial key agreed by sender and receiver to produce a remainder that is sent and checked. While not perfect, CRC is generally more effective than parity bit for error detection.

Uploaded by

hrhodge
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views

Name: Hayden Hodge Log In: Date: October 13

Hayden Hodge reported on error detection methods for sending data between terminals. Two main methods discussed were parity bit and cyclic redundancy check (CRC). Parity bit involves adding an extra bit to represent if there is an even or odd number of 1s in the data, but can only detect odd number of errors. CRC is more reliable as it uses a generator polynomial key agreed by sender and receiver to produce a remainder that is sent and checked. While not perfect, CRC is generally more effective than parity bit for error detection.

Uploaded by

hrhodge
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Name: Hayden Hodge

Log in:

hod0035

Date: October 13th, 2015

Report of Error Detection


Title: Error Detection Methods
Task: Detect errors that occur due to noise interference while sending data
Scheme:

Introduction to problems:
When sending data between terminals, noise interference can corrupt the data. There are several
methods that we can use to detect whether or not an error has occurred.
Elaboration:
Parity Bit Method
The first and easiest method is adding a Parity bit. The parity bit is a way to notify the receiving
terminal if there should be an even or odd number of 1's in the binary data. An even number of 1's in
the data is represented by a 0 added to the end of the information, and an odd number is represented by
a 1 added to the end.
For example, we will try to transmit the letter H, which in ASCII is 48, which is binary is 100 1000. In
the example there are two 1's in the data, so our parity bit is a 0. Now our message looks like this, 100
1000 0, you can see the 0 added to the end of the data. If the receiver gets the message, 101 1000 0,
they know there is an error because the parity shows an even number of 1's should exist, but there is
now an odd number.
In the Octave program, we use XOR logic gates to determine the parity bit. In an XOR gate, 1+1=0,
0+0=0, 1+0=1, and 0+1=1. So, we create a for loop looking like this:
ans = 0; for i = 1: length(data)
xor(data(i), ans); endfor; ans
Continuing our example of 100 1000, the algorithm does this:

1 + 0 + 0 + 1 + 0 + 0 + 0 = 2 = 0 parity bit
There is however, one massive shortcoming to this method of detection, it will only detect an odd
number of errors! Let's continue the example of 100 1000. The parity bit will be 0, so our new message
is 100 1000 0. But if an even number of errors occur, for instance, 101 1100 0, the receiver will not
know of the error. They will check the parity bit and see there should be an even number of 1's, which
there is, and assume everything is correct.
Cycle Redundancy Check
A more reliable method of error detection is the Cycle Redundancy Check, or CRC. For this method to
work, both the sender and the receiver must agree on a key, this is also called a generator polynomial.
Lets call the message M, and the key will be K. We divide M by K, and get a remainder like this, M / K
= R. So the receiver will also dived the message he received by the key, and hope to get the same
remainder. If his remainder is different, an error has occurred.
In practice, it works just a bit differently, with a few extra steps. Lets use H again as an example, or
100 1000. If we want to, we can represent that as the abstract polynomial x^6 + x^3. Now, we will
agree upon a key of 101, or x^2 + 1. What we do now is look at the highest degree of the key, which in
this case is 2, and based on that we add two 0's to the end of our message. So now it will look like this,
M = 100 1000 00. If we use binary long division to calculate 100100000 by 101, we get a remained of
11. Now, we then replace the 00 we added to M with the 11 we just got for R, the new M = 100100011.
So, we send our M, and the receiver knows our key = 101. Because he knows the highest degree of 101
is 2, then we takes the last 2 bits of our message and knows that they are the CRC, the check bit, and
the rest is the actual data we wanted to send. What the receiver will do now to actually check for an
error, is to take the entire M that we sent, and divide it by K, the key. If no error occurred, the
remainder he will get is 0, because of what we added to our M. If he gets something other than 0, he
can know there was an error.
In our example, if there was no error and the receiver divided the M, 100100011, by K, 101, he would
get 0 and know he received an uncorrupted M.
Again, in the Octave program we would use XOR gates to do this division and find the remainder. A
quick example of XOR gate binary division would look like this:
1010/
1001
Each digit of the divisor goes into a XOR gate with the digit above it from the dividend. We get
xor(1,1), xor(0,0), xor(1,0), and xor(0,1). That comes out to 0011. If the top number is our M, and the
bottom is our K, 11 is our R.
Of course, this method of error detection is not perfect either. There are several numbers that give the

same remainder when dividing by K, but that is a rare problem. CRC is generally considered a very
effective method of error detection, and is widely used.
Conclusion:
While the Parity bit method of error detection is easy to understand and put into practice, it is
extremely flawed. The CRC method of error detection is much more widely used because it is
significantly more effective and still does not take an extreme amount of extra calculation to do.
References:
Ing. Nevlud Lectures
https://en.wikipedia.org/wiki/Cyclic_redundancy_check
http://mathpages.com/home/kmath458.htm

You might also like