// message[i]; rsize = msize; for(int i = 0;

////  main.cpp//  CRCProject////  Created by Vidit Kalani on 12/23/17.

//  Copyright © 2017 Vidit Kalani. All rights reserved.//  CRC Project#include#include #define SIZE 20using namespace std;class CRC{    int messageSIZE,divisiorSIZE,resSIZE,remainderSIZE;    int rmessageSIZE,rdivisiorSIZE,rresSIZE,rremainderSIZE;    int msize,dsize,rsize;    int rmsize,rdsize,rrsize;    public : CRC();    void getdata();    void display();    void convert();    void checkcrc();};//CRC execlutedCRC :: CRC(){        for(int i = 0; i < SIZE; i++)        messagei = divisiori = resi = remainderi = -1;        for(int i = 0; i < SIZE; i++)        rmessagei = rdivisiori = rresi = rremainderi = -1;    msize = dsize = rsize = 0;    rmsize = rdsize = rrsize = 0;}// GetData: Enter the messsage size and messagevoid CRC :: getdata(){    cout << " Enter the size of the message bit ";    cin >> msize;        cout << " Enter the message bit ";    for(int i = 0; i < msize; i++)    {        cout<<" Enter bit "<< i+1 <<" ";        cin >> messagei;    }        cout << " Enter the size of the divisor bit ";    cin >> dsize;    for(int i = 0; i < dsize; i++)    {        cout << " Enter bit "<< i+1 <<" ";        cin >> divisiori;    }}// Display the bit Massage and divisorvoid CRC :: display(){    cout << " Enteres message bit is ";    for(int i=0; i < msize; i++)        cout << " " << messagei;        cout << " Entered divisor bit is ";    for(int i = 0; i < dsize; i++)        cout << " " << divisiori;}void CRC :: convert(){    int n = 0,m = 0,flag = 0,k = 0,count = 0;    for(int i = msize; i <(msize+dsize) - 1; i++)        messagei = 0;        msize = (msize + dsize) - 1;        cout << " New message bit is ";    for(int i = 0; i < msize; i++)        cout << " " << messagei;        rsize = msize;    for(int i = 0; i < msize; i++)        resi = messagei;    for(int i = 0; i < dsize; i++)    {        resi = messagei^divisiori;        n = i;    }        while(n <= msize)    {        while(flag == 0)        {            if(resm == 0)                m++;            else                flag = 1;        }        flag = 0;                for(int i = m; i < (dsize+m); i++)        {            if(resi == 0 || resi == 1)                count++;        }        cout << " count:" << count;        if(count == dsize)        {            for(int i = m; i < (dsize+m); i++)            {                resi = resi^divisiork;                k++;            }            k = 0;        }        else            break;        count = 0;        n = (dsize+m)+1;        cout<0;i–)    {        remainderi = resrsize;        rsize–;    }    cout<<" remainderainder is ";    for(int i = 1; i < dsize; i++)        cout<<" "<>rmessagei;    }        cout<<" Entered data is ";    for(int i = 0; i < rmsize; i++)        cout<<" "< 0; i–)    {        rremainderi = rresrrsize;        rrsize–;    }        cout<<" remainderainder is ";    for(int i = 1; i < dsize; i++)        cout<<" "<

Best services for writing your paper according to Trustpilot

Premium Partner
From $18.00 per page
4,8 / 5
4,80
Writers Experience
4,80
Delivery
4,90
Support
4,70
Price
Recommended Service
From $13.90 per page
4,6 / 5
4,70
Writers Experience
4,70
Delivery
4,60
Support
4,60
Price
From $20.00 per page
4,5 / 5
4,80
Writers Experience
4,50
Delivery
4,40
Support
4,10
Price
* All Partners were chosen among 50+ writing services by our Customer Satisfaction Team