MICRO-PROJECT
Subject : Data Communication and Computer Network
(DCCN)
Subject Code : [22414]
Topic :“C program for CRC Error Detection”
Lecturer: Lect. Chavhan mam
 INTRODUCTION
 What is CRC Program in C?
A computer program written in C
language that uses the CRC algorithm to
check for mistakes in data is known as a
CRC program in C.
This function generates a unique code
for the data to check for errors and then
compares it to the code received. The
CRC program can verify that data is
accurate before it is utilized. It typically forms
a component of a bigger program.
The Cyclic Redundancy Checks (CRC) is the
most powerful method for Error- Detection
o In C programming, CRC is a
way to check if data has
errors. It can be done
differently and is used in
many real-life situations.
PROPERTIES OF CRC
• Most powerful and easy to implement
technique.
• CRC is based on Binary Division.
• CRC bits are appended at the end of data unit.
• Generator polynomial is decided by sender
and receiver by their mutual understanding.
ADVANTAGES OF CRC
• Cyclic codes have very good performance in
detecting singe bit error, double errors, an odd
number of errors
• They can easily be implemented in hardware.
• They are especially fast when implemented in
hardware.
• This has made cyclic codes a good candidate for
many networks.
Importance of CRC Program in C
The CRC program helps ensure that the data is accurate and reliable.
This is crucial since inaccurate data can lead to issues with usage and
undermine public confidence in the information by providing that data is
correct.
The CRC program in C helps prevent these problems by ensuring the data is
precise and trustworthy, meaning people can trust and use the information
confidently.
There are numerous real-world uses for the CRC program in C, some of
which include:
1. The CRC program in C ensures that the data stored on storage devices
like hard drives are accurate and can be retrieved without errors. Data is
checked for mistakes when saved on these devices by the CRC program,
which also appends a code that can be used to check for faults afterward.
The data could be lost or rendered useless if there are any errors. Therefore
this is crucial.
2. The CRC program is employed in medical devices like blood pressure and
heart monitors to ensure accurate and reliable data.
20XX presentation title 5
o Qualities of CRC
 It should have accurately one less bit than the
divisor.
 Joining it to the end of the data unit should create
the resulting bit sequence precisely divisible by
the divisor.
 A right padded data set.
 It can not correct if errors are detected.
20XX presentation title 6
CRC generator and checker
CRC applies the CRC Generator
and CRC Checker at the sender and
receiver sides, respectively.
The CRC is a complex algorithm
derived from the CHECKSUM error
detection algorithm, using the MODULO
algorithm as the basis of operation.
• CRC generator is an algebraic
polynomial represented as a bit pattern.
• Bit pattern is obtained from the CRC
generator
PROPERTIES OF CRC
20XX presentation title 7
• Most powerful and easy to implement
technique.
• CRC is based on Binary Division.
• CRC bits are appended at the end of data
unit.
• Generator polynomial is decided by
sender and receiver by their mutual
understanding.
20XX presentation title 8
1. A string of n as is appended to the data unit.
The length of predetermined divisor is n+ 1.
2. The newly formed data unit i.e. original data +
string of n as are divided by the divisor using
binary division and remainder is obtained. This
remainder is called CRC.
3. Now, string of n 0s appended to data unit
replaced by the CRC remainder (which is also of
n bit).
4. The data unit + CRC is then transmitted to
receivers.
5. The receiver on receiving it divides data unit +
CRC by the same divisor & checks the remainder.
6. If the remainder of division is zero, receiver
assumes that there is no error in data and it
accepts it.
7. If remainder is non-zero then there is an error
in data and the receiver rejects it.
The various steps followed in the CRC method are
• For example, if data to be
transmitted is 1001 and
predetermined divisor is 1011.
The procedure given below is
used:
• String of 3 zeros is appended
to 1011 as divisor is of 4 bits.
Now newly formed data is
1011000.
20XX presentation title 9
Example
OUTPUT CRC ERROR DETECTION PROGRAM:
IF ERROR NOT DETECTED
IF ERROR DETECTED
thank you
PROJECTEE:,
1. Anagha Bhattad [ 10 ]
2. Nandini Chatke [ 14 ]
3. Grishma Shingane[ 51 ]

dccn ppt.pptx

  • 1.
    MICRO-PROJECT Subject : DataCommunication and Computer Network (DCCN) Subject Code : [22414] Topic :“C program for CRC Error Detection” Lecturer: Lect. Chavhan mam
  • 2.
     INTRODUCTION  Whatis CRC Program in C? A computer program written in C language that uses the CRC algorithm to check for mistakes in data is known as a CRC program in C. This function generates a unique code for the data to check for errors and then compares it to the code received. The CRC program can verify that data is accurate before it is utilized. It typically forms a component of a bigger program. The Cyclic Redundancy Checks (CRC) is the most powerful method for Error- Detection o In C programming, CRC is a way to check if data has errors. It can be done differently and is used in many real-life situations.
  • 3.
    PROPERTIES OF CRC •Most powerful and easy to implement technique. • CRC is based on Binary Division. • CRC bits are appended at the end of data unit. • Generator polynomial is decided by sender and receiver by their mutual understanding. ADVANTAGES OF CRC • Cyclic codes have very good performance in detecting singe bit error, double errors, an odd number of errors • They can easily be implemented in hardware. • They are especially fast when implemented in hardware. • This has made cyclic codes a good candidate for many networks.
  • 4.
    Importance of CRCProgram in C The CRC program helps ensure that the data is accurate and reliable. This is crucial since inaccurate data can lead to issues with usage and undermine public confidence in the information by providing that data is correct. The CRC program in C helps prevent these problems by ensuring the data is precise and trustworthy, meaning people can trust and use the information confidently. There are numerous real-world uses for the CRC program in C, some of which include: 1. The CRC program in C ensures that the data stored on storage devices like hard drives are accurate and can be retrieved without errors. Data is checked for mistakes when saved on these devices by the CRC program, which also appends a code that can be used to check for faults afterward. The data could be lost or rendered useless if there are any errors. Therefore this is crucial. 2. The CRC program is employed in medical devices like blood pressure and heart monitors to ensure accurate and reliable data.
  • 5.
    20XX presentation title5 o Qualities of CRC  It should have accurately one less bit than the divisor.  Joining it to the end of the data unit should create the resulting bit sequence precisely divisible by the divisor.  A right padded data set.  It can not correct if errors are detected.
  • 6.
    20XX presentation title6 CRC generator and checker CRC applies the CRC Generator and CRC Checker at the sender and receiver sides, respectively. The CRC is a complex algorithm derived from the CHECKSUM error detection algorithm, using the MODULO algorithm as the basis of operation. • CRC generator is an algebraic polynomial represented as a bit pattern. • Bit pattern is obtained from the CRC generator
  • 7.
    PROPERTIES OF CRC 20XXpresentation title 7 • Most powerful and easy to implement technique. • CRC is based on Binary Division. • CRC bits are appended at the end of data unit. • Generator polynomial is decided by sender and receiver by their mutual understanding.
  • 8.
    20XX presentation title8 1. A string of n as is appended to the data unit. The length of predetermined divisor is n+ 1. 2. The newly formed data unit i.e. original data + string of n as are divided by the divisor using binary division and remainder is obtained. This remainder is called CRC. 3. Now, string of n 0s appended to data unit replaced by the CRC remainder (which is also of n bit). 4. The data unit + CRC is then transmitted to receivers. 5. The receiver on receiving it divides data unit + CRC by the same divisor & checks the remainder. 6. If the remainder of division is zero, receiver assumes that there is no error in data and it accepts it. 7. If remainder is non-zero then there is an error in data and the receiver rejects it. The various steps followed in the CRC method are
  • 9.
    • For example,if data to be transmitted is 1001 and predetermined divisor is 1011. The procedure given below is used: • String of 3 zeros is appended to 1011 as divisor is of 4 bits. Now newly formed data is 1011000. 20XX presentation title 9 Example
  • 10.
    OUTPUT CRC ERRORDETECTION PROGRAM: IF ERROR NOT DETECTED IF ERROR DETECTED
  • 11.
    thank you PROJECTEE:, 1. AnaghaBhattad [ 10 ] 2. Nandini Chatke [ 14 ] 3. Grishma Shingane[ 51 ]