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