> On Jun 11, 2026, at 11:19 AM, r.stricklin via cctalk <[email protected]> 
> wrote:
> 
> 
>> On Jun 11, 2026, at 8:09 AM, Paul Koning via cctalk <[email protected]> 
>> wrote:
>> 
>> A lot of systems used one's complement through the 1960s.  I'm not really 
>> sure why.  Not just for integers but floating point also (as on the CDC 
>> mainframes, and around the same time the Electrologica X8 with a slightly 
>> different approach).
> 
> My understanding of it is, it makes the logic simpler. But the cost is 
> software complexity.

It doesn't really make the software more complex, just different.

I can see the logic thing, more or less.  You end up with just complement both 
for logic and arithmetic operations (it doubles as negate).  The end-around 
carry seems to complicate things but it doesn't really because you have carry 
anyway, so you just end up with an ALU that looks like a circle.  The only 
additional logic I can see is that a test for zero requires matching both +0 
and -0.

Using one's complement style float notation means a bunch of the operations 
(like negate/complement) apply to floating point operands as well, no separate 
fneg operation needed.  And with the right exponent notation, an integer not 
exceeding the mantissa size doubles as a valid floating point value for that 
same number.

CDC made things a little easier for programmers to understand because they used 
a subtractor circuit, so you end up with +0 for all operations that involve 
non-zero or +0 operands.  Others tended to use adders, so you end up with -0 
most of the time.  Still no problem so long as you remember it. 

        paul

Reply via email to