文件名称:Checksum
介绍说明--下载内容均来自于网络,请自行研究使用
校验和的计算过程主要分位三个步骤:数据文件的输入,校验和的计算和校验结果的输出。输入数据可能是以字符形式存储的 ,而校验和的计算则要采用数据形式,所以在从文件读取数据时,都要进行字符到数据的相互转换. 使用C++编程时直接使用16进制的方式打开输入文件。待校验的数据按16位位一个单位相加,采用端循环进位,最后对所得16位的数据取反码。因为待校验的数据时以字节方式分隔的 ,所以为了方便,将16位的数据分成高8位和 低8位处理。-Checksum calculation process is divided into bits of three steps: the input data file, the checksum calculation and verification results of the output. Input data may be stored in characters, and checksum calculation will have to use the data in the form, so read the data from the file, should be carried out to the data conversion between the character. Using C++ programming directly using 16 hex way to open the input file. The data to be verified by adding a flat 16-bit bit by bit into the side loop, the last 16 bits of data on income inversion code. Because the data to be verified by a byte-delimited, so for convenience, the 16-bit 8-bit data into high and low 8-bit processing.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Code\Checksum.cpp
....\Checksum.dsp
....\Checksum.dsw
....\Checksum.ncb
....\Checksum.opt
....\Checksum.plg
Code
....\Checksum.dsp
....\Checksum.dsw
....\Checksum.ncb
....\Checksum.opt
....\Checksum.plg
Code