Submit Search
Upload
crc.pdf
•
0 likes
•
4 views
R
RkGupta83
Follow
Computer networking
Read less
Read more
Engineering
Report
Share
Report
Share
1 of 3
Download now
Download to read offline
Recommended
Os lab file c programs
Os lab file c programs
Kandarp Tiwari
Asssignment2
Asssignment2
AnnamalikAnnamalik
Cs pritical file
Cs pritical file
Mitul Patel
Templates in C++
Templates in C++
Tech_MX
OOP 2012 - Hint: Dynamic allocation in c++
OOP 2012 - Hint: Dynamic allocation in c++
Allan Sun
C++ practical
C++ practical
Rahul juneja
oodp elab.pdf
oodp elab.pdf
SWATIKUMARIRA2111030
Project_Euler_No_104_Pandigital_Fibonacci_ends
Project_Euler_No_104_Pandigital_Fibonacci_ends
? ?
Recommended
Os lab file c programs
Os lab file c programs
Kandarp Tiwari
Asssignment2
Asssignment2
AnnamalikAnnamalik
Cs pritical file
Cs pritical file
Mitul Patel
Templates in C++
Templates in C++
Tech_MX
OOP 2012 - Hint: Dynamic allocation in c++
OOP 2012 - Hint: Dynamic allocation in c++
Allan Sun
C++ practical
C++ practical
Rahul juneja
oodp elab.pdf
oodp elab.pdf
SWATIKUMARIRA2111030
Project_Euler_No_104_Pandigital_Fibonacci_ends
Project_Euler_No_104_Pandigital_Fibonacci_ends
? ?
C++ ARRAY WITH EXAMPLES
C++ ARRAY WITH EXAMPLES
Farhan Ab Rahman
Arrays
Arrays
poonamchopra7975
Oop1
Oop1
Vaibhav Bajaj
C++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptx
ssuser3cbb4c
2014 computer science_question_paper
2014 computer science_question_paper
vandna123
C# Assignmet Help
C# Assignmet Help
Programming Homework Help
Go vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoF
Timur Safin
Pads lab manual final
Pads lab manual final
AhalyaR
Multi client
Multi client
ganteng8
C++ file
C++ file
simarsimmygrewal
Lecture1 classes3
Lecture1 classes3
Noor Faezah Mohd Yatim
UDP.yash
UDP.yash
Yashpatel821746
CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011
Deepak Singh
#include iostream #include string #include invalidHr.h.pdf
#include iostream #include string #include invalidHr.h.pdf
APMRETAIL
I have written the code but cannot complete the assignment please help.pdf
I have written the code but cannot complete the assignment please help.pdf
shreeaadithyaacellso
Microsoft Word Hw#1
Microsoft Word Hw#1
kkkseld
Ss
Ss
Karan Soni
C++ TUTORIAL 5
C++ TUTORIAL 5
Farhan Ab Rahman
Deep dumpster diving 2010
Deep dumpster diving 2010
RonnBlack
C++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdf
yamew16788
Hostel management system project report..pdf
Hostel management system project report..pdf
Kamal Acharya
Online food ordering system project report.pdf
Online food ordering system project report.pdf
Kamal Acharya
More Related Content
Similar to crc.pdf
C++ ARRAY WITH EXAMPLES
C++ ARRAY WITH EXAMPLES
Farhan Ab Rahman
Arrays
Arrays
poonamchopra7975
Oop1
Oop1
Vaibhav Bajaj
C++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptx
ssuser3cbb4c
2014 computer science_question_paper
2014 computer science_question_paper
vandna123
C# Assignmet Help
C# Assignmet Help
Programming Homework Help
Go vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoF
Timur Safin
Pads lab manual final
Pads lab manual final
AhalyaR
Multi client
Multi client
ganteng8
C++ file
C++ file
simarsimmygrewal
Lecture1 classes3
Lecture1 classes3
Noor Faezah Mohd Yatim
UDP.yash
UDP.yash
Yashpatel821746
CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011
Deepak Singh
#include iostream #include string #include invalidHr.h.pdf
#include iostream #include string #include invalidHr.h.pdf
APMRETAIL
I have written the code but cannot complete the assignment please help.pdf
I have written the code but cannot complete the assignment please help.pdf
shreeaadithyaacellso
Microsoft Word Hw#1
Microsoft Word Hw#1
kkkseld
Ss
Ss
Karan Soni
C++ TUTORIAL 5
C++ TUTORIAL 5
Farhan Ab Rahman
Deep dumpster diving 2010
Deep dumpster diving 2010
RonnBlack
C++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdf
yamew16788
Similar to crc.pdf
(20)
C++ ARRAY WITH EXAMPLES
C++ ARRAY WITH EXAMPLES
Arrays
Arrays
Oop1
Oop1
C++ lectures all chapters in one slide.pptx
C++ lectures all chapters in one slide.pptx
2014 computer science_question_paper
2014 computer science_question_paper
C# Assignmet Help
C# Assignmet Help
Go vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoF
Pads lab manual final
Pads lab manual final
Multi client
Multi client
C++ file
C++ file
Lecture1 classes3
Lecture1 classes3
UDP.yash
UDP.yash
CBSE Question Paper Computer Science with C++ 2011
CBSE Question Paper Computer Science with C++ 2011
#include iostream #include string #include invalidHr.h.pdf
#include iostream #include string #include invalidHr.h.pdf
I have written the code but cannot complete the assignment please help.pdf
I have written the code but cannot complete the assignment please help.pdf
Microsoft Word Hw#1
Microsoft Word Hw#1
Ss
Ss
C++ TUTORIAL 5
C++ TUTORIAL 5
Deep dumpster diving 2010
Deep dumpster diving 2010
C++ Nested loops, matrix and fuctions.pdf
C++ Nested loops, matrix and fuctions.pdf
Recently uploaded
Hostel management system project report..pdf
Hostel management system project report..pdf
Kamal Acharya
Online food ordering system project report.pdf
Online food ordering system project report.pdf
Kamal Acharya
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
kalpana413121
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
JIT KUMAR GUPTA
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
DineshKumar4165
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
jabtakhaidam7
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
Amil baba
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Arindam Chakraborty, Ph.D., P.E. (CA, TX)
Employee leave management system project.
Employee leave management system project.
Kamal Acharya
Computer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
ChandrakantDivate1
Hospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
Thermal Engineering Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
DineshKumar4165
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
Arindam Chakraborty, Ph.D., P.E. (CA, TX)
Computer Networks Basics of Network Devices
Computer Networks Basics of Network Devices
ChandrakantDivate1
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Neometrix_Engineering_Pvt_Ltd
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
drmkjayanthikannan
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
sarkmank1
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
Dr. Deepak Mudgal
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
RashidFaridChishti
Recently uploaded
(20)
Hostel management system project report..pdf
Hostel management system project report..pdf
Online food ordering system project report.pdf
Online food ordering system project report.pdf
UNIT 4 PTRP final Convergence in probability.pptx
UNIT 4 PTRP final Convergence in probability.pptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
COST-EFFETIVE and Energy Efficient BUILDINGS ptx
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Navigating Complexity: The Role of Trusted Partners and VIAS3D in Dassault Sy...
Employee leave management system project.
Employee leave management system project.
Computer Graphics Introduction To Curves
Computer Graphics Introduction To Curves
Hospital management system project report.pdf
Hospital management system project report.pdf
Thermal Engineering Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
Computer Networks Basics of Network Devices
Computer Networks Basics of Network Devices
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
crc.pdf
1.
#include <iostream> using namespace
std; class CRC { public: int nf, ng, frame[20], gen[10], temp[20], b; char a; int* divide(int n, int g, int temp[10], int gen[10]) { for(int i=0; i<n; i++) { if(gen[0]==temp[i]) { for(int j=0, k=i; j<g+1; j++, k++) { if(temp[k]^gen[j]==1) temp[k]=1; else temp[k]=0; } } } return temp; } void input() { cout<<"Enter length of your frame:"; cin>>nf; cout<<"Enter your frame:"; for(int i=0; i<nf; i++) { cin>>frame[i]; temp[i]=frame[i]; } cout<<"Enter length of your generator:"; cin>>ng; cout<<"Enter your generator:"; for(int i=0; i<ng; i++) { cin>>gen[i]; } ng--; for(int i=0; i<ng; i++) { temp[nf+i]=0; }
2.
} void sender_side() { int* sender; sender
= divide(nf,ng,temp,gen); cout<<endl<<"-----Senders Side-----n"<<"CRC:"; for(int i=0; i<ng; i++) { frame[nf+i]=sender[nf+i]; cout<<sender[nf+i]<<' '; } cout<<endl<<"Transmitted frame:"; for(int i=0; i<nf+ng; i++) cout<<frame[i]<<' '; cout<<endl; } int receiver_side() { int* receiver; cout<<"n-----Receivers Side-----n"<<"Received message:"; for(int i=0; i<nf+ng; i++) cout<<frame[i]<<' '; cout<<endl; cout<<"Enter which bit you want to change(from 0-"<<nf+ng<<")-"; cin>>b; if(frame[b]==1) frame[b]=0; else frame[b]=1; receiver = divide(nf,ng,frame,gen); cout<<"Error:"; for(int i=0; i<nf+ng; i++) { if(receiver[i]!=0) { cout<<"Error Detected!!"<<endl; return 0; } } cout<<"No error detected!"<<endl; } }; int main() {
3.
CRC o; o.input(); o.sender_side(); o.receiver_side(); return 0; }
Download now