Facebook Sharer
选择您要替换的背景颜色:
【农历新年】背景图片:
个性化设定
 注册  找回密码
查看: 980|回复: 4
打印 上一主题 下一主题

关贴关贴关贴关贴关贴关贴关贴关贴关贴关贴关贴关贴

[复制链接]

18

主题

0

好友

256

积分

支柱会员

Rank: 4Rank: 4Rank: 4Rank: 4

跳转到指定楼层
1#
发表于 2011-3-25 12:55 PM |只看该作者 |倒序浏览
本帖最后由 hsym 于 2011-6-3 12:29 AM 编辑

请版主帮我关贴。。。




收藏收藏0

2

主题

0

好友

251

积分

支柱会员

Rank: 4Rank: 4Rank: 4Rank: 4

2#
发表于 2011-3-25 01:43 PM |只看该作者
本帖最后由 shippo 于 2011-3-25 01:46 PM 编辑

学校功课 ?

无敌的wikipedia
Even
A wants to transmit:                 1001
A computes parity bit value:  1^0^0^1 = 0
A adds parity bit and sends:  10010
B receives:                              10010
B computes parity:                 1^0^0^1^0 = 0
B reports correct transmission after observing expected even result.


回复

使用道具 举报

2

主题

0

好友

251

积分

支柱会员

Rank: 4Rank: 4Rank: 4Rank: 4

3#
发表于 2011-3-25 01:45 PM |只看该作者
google c++ parity check 一堆答案。


回复

使用道具 举报

7

主题

1

好友

5108

积分

一流名嘴

Rank: 12Rank: 12Rank: 12

4#
发表于 2011-3-25 02:49 PM |只看该作者
#include<iostream.h>
#include<stdio.h>
#include<stdlib.h>

class Errorcheck
{
private:
char *Entry, Letter, Choice[2];
int Ascii, len, Binary[8], Total;
int Checksum(int N, int a[], int m, int depth);

public:
void Convert();
void Checksum();
};

void Errorcheck::Convert()
{
Entry = new char[501];
cout << "Enter Text To Convert(Up To 500 Chars): ";
cin.getline(Entry, 500);

for(int i = 0; i < len; i++)
{
Total = 0;
Letter = Entry;
Ascii = Letter;
while(Ascii > 0)
{
if((Ascii%2)==0)
{
Binary[Total] = 0;
Ascii = Ascii/2;
Total++;
}
else
{
Binary[Total] = 1;
Ascii = Ascii/2;
Total++;
}
}
Total--;

while(Total >= 0)
{
cout << Binary[Total];
Total--;
}
}
delete[] Entry; //Freeup Memory
};

void Errorcheck::Checksum
int Check_sum(int N, int a[], int m, int depth)
{
int i;
if (depth == m-1)
{
for (i=0; i<m; i++) {
if (a == N) return 1;
}
return 0;
}

for (i=0; i<m; i++) {
if (check_sum(N-a, a, m, depth+1))
return 1;
}
return 0;
cout<<("result = %d\n", check_sum(N, a, m , 0));

};

int main()
{
Errorcheck e;
e.Convert();
e.Checksum();
}
};



谁会 Parity Check 的 coding??
hsym 发表于 2011-3-25 12:55 PM


那么樓主你貼這些 coding 然後再問誰會是甚么意思??
如果只是要解釋就是文字轉 binary 後把所有 1 加起來除 2 得餘數,再之後就看你是要用來做 odd 或 even 判斷


回复

使用道具 举报

46

主题

6

好友

6456

积分

百变名嘴

Rank: 13Rank: 13Rank: 13Rank: 13

5#
发表于 2011-3-25 03:29 PM |只看该作者
回复 1# hsym


    这个世界上有个网站能帮到你 w.g.c


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

JBTALKS.CC |联系我们 |隐私政策 |Share

GMT+8, 2024-10-25 10:28 AM , Processed in 0.135367 second(s), 27 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

Ultra High-performance Dedicated Server powered by iCore Technology Sdn. Bhd.
Domain Registration | Web Hosting | Email Hosting | Forum Hosting | ECShop Hosting | Dedicated Server | Colocation Services
本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved
合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部