News for hackers. Stuff that matters.
Re:Two's complement – You beauty by paulddraper on Wednesday January 11, 2017 @11:14AM (#13374945)
If you're looking for true beauty, look no further than negabinary. (http://mathworld.wolfram.com/Negabinary.html)

E.g.

     3 = (-2)^2 + (-2)^1 + (-2)^0 = 0110_-2
    -3 = (-2)^3 + (-2)^2 + (-2)^0 = 1101_-2
There is no signed bit, you don't have to worry about sign; everything just works like "normal" numbers because that in fact is what it is.

A pity it was never used except a few times in early computing. I'm never sure why 2's-complement won.

Re:Two's complement – You beauty by jonsen on Wednesday January 11, 2017 @12:57PM (#13375887)
...why 2's-complement won.

Maybee conversion to/from character code is easier. Notice the conversion code in the linked article.

Re:Two's complement – You beauty by paulddraper on Wednesday January 11, 2017 @02:08PM (#13376576)
> conversion to/from character code is easier

(1) How often do you convert from machine integers to binary character representations?

(2) If you're referring to

        for(j = 0; j < bitlen; j++) {
            bin[j] = (i & 1) ? '1': '0';
            i >>= 1;    
        }
that's the exact same for a negabinary machine.
Re:Two's complement – You beauty by jonsen on Wednesday January 11, 2017 @02:16PM (#13376644)
I meant to/from numbers in text form. Usually decimal.