XOR-SUM 异或累加和校验在线生成工具

异或和就是对数据逐一异或计算(异或结果与下一个数据异或).

示例异或校验数据

A simple bit of C code to calculate your example:

int main()
   {
   int i;
   unsigned char cs;
   unsigned char a[] = {0x00, 0x01, 0x70, 0x00};
   cs=0;
   for (i=0; i< sizeof(a); i++)
      {
      cs ^= a[i];
      }
   printf("cs = %X \n", cs);
   return 0;
}
And the result is as expected:

sh-4.3$ gcc -o main *.c
sh-4.3$ main
cs = 71