Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - Why can negative numbers be represented by unsigned integers?
Why can negative numbers be represented by unsigned integers?
Arrange 0 to 4294967295 in a "ring" in sequence, and the numbers on both sides of 0 are 1 and 429497295. If the unsigned integer does not exceed the scope of use, the results are all correct. If it is out of range, the program will also give a result, but this result is wrong, and the wrong result is regular, such as the minimum number represented by unsigned integer. If-1 appears in use, then the result given by the program is the number next to 0 in the ring, obviously it will not be 1, but only 4294967295. According to this cycle, -2 is 4294967294, which is converted into binary11111165438.