校验编码及源代码

博客介绍了一个代码挑战,输入为九位字符(八位数据位加一位校验位),若字符奇偶校验为偶数,输出八位数据字符,否则输出 '?'。还给出了示例,说明了获胜条件,如不使用特定程序且运行最快等,同时给出了性能提示。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Coding Challenge
代码挑战

Input string is encoded as nine bit characters -- eight data bits followed by a parity bit. Output string should contain the eight bit data character if the character parity is even, otherwise output a question mark '?'.
 


For example: Sixteen characters making the string "ABCDEFGHIJKLMNOP" are encoded as in Encoder.vi, adding the parity bits, and resulting in an eighteen byte string of "4184 0C25 52D4 E811 2449 952E 61DA C4C9 5328". Given this eighteen byte string as an input, your VI should produce the original sixteen byte string. If any nine bit input character has odd parity,
this indicates an error in transmission, and you should output a '?'.
例如:16个字符” ABCDEFGHIJKLMNOP”用Encoder.vi进行编码,加上校验位,结果得到以80位字符串” 4184 0C25 52D4 E811 2449 952E 61DA C4C9 5328”.把这80位字符串作为输入,你的VI要能生成原来的16位字符串.如任何9位输入字符有奇位,表示在传输中有错误产生,你应该输出”?”表示.

* The Winning VI will be the fastest correct solution to use no CINs, DLLs, or EXEs.
* Diagram readability and style will be used to break ties.
* VIs will be run on an Intel P4. We may use additional computer architectures such as PPC or multi-CPU to help break ties.
*在不使用任何CINs,DLLs,以及EXEs的情况下运行最快的VI为获胜.
*Diagram的可读性和格式会被作为判定胜负的依据.
*VI将会在Intel PM 1.60GHz的计算机上运行.统一判断最优化的程序.

Hint -- a pretty good solution should take less than 100ms for the longest input string. That will not be fast enough to win, though.
提示—优秀的解决方案在使用最长输入字符串时不应该超过100ms.但100ms还不是最快的,鹋鹋已经达到60ms了.

Be sure to enter your identifying information below.
请务必输入以下信息.

Name:
Company Name:
Email:
Years using LabVIEW:
Comments on Solution:
姓名:
公司名称:
电子信箱:
使用LabVIEW时间():
方案说明:

o_Snap6.gif

转载于:https://www.cnblogs.com/Qia_sky/archive/2005/05/15/155697.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值