c语言中8位和校验程序_C和C ++中的校验和程序

c语言中8位和校验程序

Here you will get checksum program in C and C++.

在这里,您将获得C和C ++的校验和程序。

A checksum is a error detection method in Data Communication. It is used for errors which may have been introduced during transmission or storage. It is usually applied to an installation file after it is received from the download server.

校验和是数据通信中的错误检测方法。 它用于传输或存储期间可能引入的错误。 从下载服务器收到安装文件后,通常将其应用于安装文件。

The actual procedure which yields the checksum, given a data input is called a checksum function or checksum algorithm.

给定数据输入,产生校验和的实际过程称为校验和函数或校验和算法。

Also Read: Hamming Code in C and C++

另请阅读: C和C ++中的汉明代码

Checksum method can only detect errors but is unable to correct the error.

校验和方法只能检测错误,而无法纠正错误。

In this method a checksum is calculated based on the given binary strings which is sent with the data as redundant bits. This data + checksum is received at receiver end and checksum is calculated again, if checksum is 0 it means no error in data received, else there exists some error in the received data.

在这种方法中,根据给定的二进制字符串计算校验和,该二进制字符串与数据一起作为冗余位发送。 此数据+校验和在接收器端接收,并再次计算校验和,如果校验和为0,则表示接收到的数据没有错误,否则接收到的数据中存在一些错误。

For the purpose of this program we are finding checksum for 2 binary strings.

对于此程序,我们发现2个二进制字符串的校验和。

校验和算法 (Checksum Algorithm)

  1. Take 2 binary input strings.

    取2个二进制输入字符串。
  2. Do their binary sum to find out the checksum w
  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值