Time:10-08
CodePudding user response:
turn binary Make a clean break Return
Quote: refer to 1st floor lin5161678 response: turn binary Make a clean break Return Can you point in detail? I'm a freshman no
the first step to handle overflow section Short is 2 bytes, input value over the short range can express, then keep only two bytes within the scope of the section Unsigned short maximum is 65536, with 100000 minus 65536=34464 is the real was given to the short of residual value of the The second step, to distinguish between a signed or unsigned shor 34464 is the number of the binary representation, short is a signed integer, range 32768 to 32767 34464 is greater than 32767 is necessarily a negative number; According to a negative number of rules, from negative restored the original number is: negative and then take the complement - 1= the original codeDirectly is too tired, opportunistic way is: In 65536-34464 and then just add a minus sign The answer should be - 32072, should not be - 16960
Quote: refer to the second floor woainia_ response: Quote: refer to 1st floor lin5161678 response: turn binary Make a clean break Return Can you point in detail? I'm a freshman no Step by step Will 1000000 RPM binary What is the results turn out
Page link:https//www.codepudding.com/Backend/57539.html