Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - For example, the value of unsigned number A in C language program is negative, why is the result of plastic output 64870?
For example, the value of unsigned number A in C language program is negative, why is the result of plastic output 64870?
Negative numbers are stored in memory in the form of complement,

Namely -666

Original code:1000001010010/0.

Inverse code:11111101010/kloc.

Complement:1110111001/kloc-0.

That is, the data in the actual memory is 0b1111101165438 = 64870.

And a is an unsigned short int, so the feedback should be a positive number of 64870.