




已閱讀5頁(yè),還剩1頁(yè)未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
計(jì)算機(jī)通信與網(wǎng)絡(luò)實(shí)驗(yàn) 課程實(shí)驗(yàn)報(bào)告實(shí)驗(yàn)一 : LAB1 Coding on error dectecting algorithms(C+)實(shí)驗(yàn)名稱:LAB1 Coding on error dectectingalgorithms(C)1.實(shí)驗(yàn)內(nèi)容1. Cyclic redundancy checkUsing the polynomials below to encode random generated data stream (40-100bits). Show the FEC, and encoded data frame. CRC-4 x4+x+1 ITU G.704CRC-16 x16+x15+x2+1 IBM SDLCCRC-32 x32+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 findthe errors?Case Error patternNo error 00000000One error 1000.000Two errors 100.001Random errors Random error pattern2.Parity checkUsing 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 error00000000One error1000.000Two errors100.0012.實(shí)驗(yàn)結(jié)果一、二、3.實(shí)驗(yàn)程序一、#include #include #include stdlib.hunsigned int char2int(char *str) unsigned int count=0, ret=0; for(count = 0; countstrlen(str);count+) ret = ret1; if(0 != strcount) ret+=1; return ret;unsigned int getR(char *str) unsigned int c =0 ; int ret = strlen(str)-1; for(c=0;c 1; return c;void CRC(char *scode, char *p, char*g )unsigned int iP = char2int(p);unsigned int iG = char2int(g);unsigned int r= getR(g);unsigned int code = iP = getRi(iG);) yx = yx (iG(getRi(yx) - getRi(iG);code += yx;itoa(code,scode,2);void main()char data8= , bds8=,code16=;printf(數(shù)據(jù):);scanf(%s, data);printf(表達(dá)式:);scanf(%s, bds);CRC(code,data,bds);printf(編碼:%s,code);二、#include #include void fun(char *s) int i=0; int sum=0; for(i=0;i200;i+) sum=sum+si; if(sum+1)%2=0) printf(+1通過(guò)偶校驗(yàn)); if(sum+0)%2!=0) printf(+0通過(guò)奇校驗(yàn)); if(sum+1)%2=1) printf(+1通過(guò)奇校驗(yàn)); if(sum+0)%2=0) printf(+0通過(guò)偶校驗(yàn)); int main() printf(輸入二進(jìn)制碼:n); char
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 棉麻與其他天然纖維的復(fù)合創(chuàng)新
- 流動(dòng)科技館科普服務(wù)規(guī)范編制說(shuō)明
- 海洋產(chǎn)業(yè)集群空間布局
- 2025年四川大道致遠(yuǎn)供應(yīng)鏈管理公司市場(chǎng)管理招聘考試筆試試題(含答案)
- 2025年寧波侖大碶街道招聘考試筆試試題(含答案)
- 鏟車操作人員安全教育與培訓(xùn)合同
- 餐飲場(chǎng)地租賃及品牌形象設(shè)計(jì)合作協(xié)議
- 老人養(yǎng)老護(hù)理培訓(xùn)課件
- 大學(xué)黨務(wù)面試題庫(kù)及答案
- 大理體彩考試題及答案
- 2025年小學(xué)教師班主任能力提升計(jì)劃
- 鹽堿項(xiàng)目可行性研究報(bào)告
- 哈爾濱體彩考試題及答案
- 探索基于數(shù)字孿生技術(shù)的三峽升船機(jī)智能平臺(tái)的構(gòu)建與應(yīng)用
- 2025年湖北省中考道德與法治真題含答案
- 新生兒腹脹的觀察及護(hù)理
- 2025年全國(guó)統(tǒng)一高考英語(yǔ)試卷(全國(guó)一卷)含答案
- GB/T 2982-2024工業(yè)車輛充氣輪胎規(guī)格、尺寸、氣壓與負(fù)荷
- 福建省廈門市2024年高一下學(xué)期期末考試英語(yǔ)試題含解析
- 抖音快閃自我介紹(含背景音樂(lè))
- 阿里巴巴102句土話完整版(共11頁(yè))
評(píng)論
0/150
提交評(píng)論