




已閱讀5頁,還剩1頁未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
計(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通過偶校驗(yàn)); if(sum+0)%2!=0) printf(+0通過奇校驗(yàn)); if(sum+1)%2=1) printf(+1通過奇校驗(yàn)); if(sum+0)%2=0) printf(+0通過偶校驗(yàn)); int main() printf(輸入二進(jìn)制碼:n); char
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- otc活動策劃方案(3篇)
- 中職食堂飯菜管理方案(3篇)
- 媒介投放規(guī)劃方案(3篇)
- DB23-T2901-2021-草原草本植物標(biāo)本制作技術(shù)規(guī)程-黑龍江省
- 公司市場人員管理制度
- 公司員工信息管理制度
- 城市管線普查方案(3篇)
- 寄遞物流管理管理制度
- 賓館用電安全管理制度
- 農(nóng)村超市收購方案(3篇)
- 2022年四川省南充市中考英語真題(含答案)
- JJG 646-2006移液器
- PPT用中國地圖(可編輯)
- 醫(yī)院日間手術(shù)實(shí)施方案(試行)
- 《戲劇鑒賞》專題教學(xué)課件
- 衛(wèi)生法律制度與監(jiān)督學(xué)考核試題及答案
- 二年級語文下冊課件-語文園地二8-部編版(共15張PPT)
- 高血壓病人的護(hù)理(PPT)
- JJF(建材)123-2021 行星式膠砂攪拌機(jī)校準(zhǔn)規(guī)范-(高清現(xiàn)行)
- 馬士基提單樣單格式
- DB34T 3944-2021 靜力觸探應(yīng)用技術(shù)規(guī)程
評論
0/150
提交評論