Transformation from C Language Shaping to Character Number
The highest bit of 87 is 1, which is a negative number; The complement of negative numbers is different from the complement of positive numbers. So something went wrong. put int a = 0x 8765432 1; Change to unsigned a = 0x87654321; ,put char * ch =(char *)&; a; Changed to unsigned char * ch = (unsigned char *)&; a; The correct way is to make them unsigned numbers and avoid participating in the complement process.