Black Hole
May contain traces of nut
Hmm. Being so steeped in two's-compliment, I wasn't even aware of one's-compliment as a "thing". I can see how it works:
* The leftmost bit is a "sign" flag: 0 = positive, 1 = negative;
* Negating a number == invert all the bits;
* To add numbers: binary sum, and if one of the numbers was negative increment the result by 1.
I can't quickly think out under what circumstances a carry flag gets set.
It seems messy compared with two's-compliment, which I guess is why every microprocessor I know of uses two's-compliment. Another guess is that Unisys might have been forced into it to avoid infringing patents, or maybe they had a "not invented here" attitude.
* The leftmost bit is a "sign" flag: 0 = positive, 1 = negative;
* Negating a number == invert all the bits;
* To add numbers: binary sum, and if one of the numbers was negative increment the result by 1.
I can't quickly think out under what circumstances a carry flag gets set.
It seems messy compared with two's-compliment, which I guess is why every microprocessor I know of uses two's-compliment. Another guess is that Unisys might have been forced into it to avoid infringing patents, or maybe they had a "not invented here" attitude.