0

Beginner here, learning c++. I tried to convert a negative int16_t (-32768) to uint32_t and I'm not exactly sure why I get 4294934528. The binary representation of -32678 as a short is a one followed by 15 zeroes so shouldn't casting just add 16 zeroes to the left of original binary representation and give me a positive int?

0 Answers0