in reply to Re: Converting negative number to binary with specific width
in thread Converting negative number to binary with specific width
Thanks, I simply did want -1 to show up as 1111111111... of width 10. which, in unsigned int, it would mean infinite (hence lots of ones...) but I just wanted to cut it at ten 1s.
I did not know sprintf always print the entire number. Thanks.
|
|---|