杭 州 电 子 科 技 大 学实验报告学生姓名:韩民杨学 号: 指导教师:吴端坡实验地点: 1#108 实验时间: 2015-4-24一、实验室名称: 1#108二、实验项目名称: 计算机网络实验1Coding on error dectecting algorithms(C++)三、实验学时:四、实验原理: C++编程五、实验目的: 利用 C++编程 CRC16校验及奇偶校验六、实验内容:Coding on error dectecting algorithms(C++)1. Cyclic redundancy checkUsing the polynomials below to encode random generated data stream (40-100bits). Show the FEC, and encoded data frame. CRC-4x4+x+1ITU CRC-16 x16+x15+x2+1IBM SDLCCRC-32x32+x26+x23+...+x2+x+1ZIP, RAR, IEEE 802 LAN/FDDI, IEEE 1394, PPP-FCSFor the error patter listed below, what the conclusion does the receiver get Can the receiver find the errors CaseError patternNo error0000⋯⋯ 0000One error1000⋯..000Two errors100⋯.001Random errorsRandom error pattern2. Parity check Using even or odd parity check on random generated data stream (8-20bits). Show encoded data frame. For the error patter listed below, what the conclusion does the receiver get Can the receiver find the errors CaseError patternNo error0000⋯⋯ 0000One error1000⋯..000Two errors100⋯.001七、实验器材(设备、元器件) :PC机一台,装有 C++集成开发环境。八、实验步骤:#include<>#include<>#include<>#include<>#include<> #include<> #define NO_ERROR 1#define ONE_ERROR 2#define TWO_ERROR 3#define RANDOM_ERROR 4#define RESULT 1#define CRC 0#define Parity 0#define check 1int flag_parity;000Two errors 100⋯.001Random errors Random error pattern*/if(channel_way == NO_ERROR){char *result = NULL;int flagg=0;printf(" 信道中传输数据: ");for(int f =0;f