Re:Two's complement – You beauty
by gpvos on Wednesday January 11, 2017 @06:04AM
(#13373114)
Yes, but how would you print that infinite sequence of 1s?
[ Parent
| on HN ]
same as the infinite number of zeros in front of a positive number.
Re:Two's complement – You beauty
by AstralStorm on Wednesday January 11, 2017 @08:15AM
(#13373673)
Just trimming 1s would be ambiguous. Is b11 3 or -2?
You would have to add a 0 prefix to all positive numbers or some other to negative.
Re:Two's complement – You beauty
by brandonbloom on Wednesday January 11, 2017 @01:42PM
(#13376325)
Just prefix a + or - just like you do for base 10.