🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.arch
Article #508

Re: two's complement and Flags (Re: arithmetic and endian history)

#508
From: Stephen Fuld
Date: Mon, 02 Nov 2026 17:45
67 lines
4974 bytes
On 10/3/2026 4:49 PM, MitchAlsup wrote:
> 
> anton@mips.complang.tuwien.ac.at (Anton Ertl) posted:
> 
>> John Levine <johnl@taugh.com> writes:
>>> Even though the 704's regualar arithmetic was sign-magnitude, its
>>> index arithmetic was two's complement subtraction.  People certainly
>>> knew about two's complement, dunno why they stuck with one's comp so long.
>>
>> My current theory is that 2's complement was known as a technique for
>> subtracting unsigned numbers (and earlier using 10's complement for
>> mechanical computing machines), and that was used just for unsigned
>> numbers for quite a while on many computers, e.g., on the IBM 704 or
>> the PDP-4.
>>
>> The idea of interpreting numbers with set MSB as negative numbers by
>> subtracting 2^n from their unsigned value, and relying on the
>> properties of modular arithmetic to make this work with the same
>> addition, subtraction, multiplication, and shift-left operations that
>> were also used for unsigned arithmetic was apparently only becoming
>> widespread in the early 1960s.  It's not an obvious idea.
>>
>> Once that idea was widespread, people designed their new product lines
>> with 2s-complement representation of signed numbers.
>>
>> However, ones-complement is not obvious, either.  How did that become
>> widespread?
> 
> When an integer adder was spread over several plug in logic boards,
> the end-around carry of 1s-complement was no hinderance to ADD perf
> (as it became when the whole data path was in one die).
> 
> 1s-complment had MUL & DIV 2^n for free, and symmetrical ± ranges.
I remembered someone telling me that, in the technology of the day 
(individual transistors on plug in logic cards) that for the Univac 
1107, ones complement was faster, but I couldn't find a reference for 
that.  I was talking about this with another Univac "old timer", and he 
sent me a paper copy of a talk given at the 25th anniversary USE 
conference (the Univac user's group) titled "Why it is the way it is", 
by Ron Q Smith, then a long time and well respected Univac employee.  It 
goes through the requirement by the military for 36 bit words, due to 
needing eight digits of floating point precision, rather than the 6 
digits that 32 bits would provide and mentions that other computers of 
the day such as the IBM 7090 and 7094, GE systems and PDP 10 that used 
36 bits. It then goes on to make an argument that I hadn't heard before.

"Scientists and engineers demanded both precision and mathematical 
consistency."  The result was both the 36 bit word and the use of 
mathematical representation that provided complete symmetry of positive 
and negative numbers. All of these machines used a numeric 
representation that had an equal number of positive and negative numbers 
and had both plus and minus zeros.  These requirements are still present 
today in the form of the IEEE floating point standard.  The IBM , GE and 
DEC machines used a signed-magnitude representation in which the sign 
bit was just that/  The Sperry Rand Univac systems used a 
ones-complement representation because it permitted faster addition and 
subtraction with less hardware.  A complement cycle was not needed for 
most operations."

Of course, the paper doesn't explain why the requirement for symmetry 
seemed to go away and two's complement became acceptable.



-- 
  - Stephen Fuld
(e-mail address disguised to prevent spam)
Technical Details
Message-ID: <11cai8f$32ue7$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <10uks4f$1dqo$1@gal.iecc.com> <86qzi8omzj.fsf@linuxsc.com> <119n5rt$1205$1@gal.iecc.com> <6abf7d77.41149906@news.eternal-september.org> <119ovig$15mk$2@gal.iecc.com> <2026Oct3.191827@mips.complang.tuwien.ac.at> <1791071365-5857@newsgrouper.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Stephen Fuld <sfuld@alumni.cmu.edu.invalid>
Newsgroups: comp.arch
Subject: Re: two's complement and Flags (Re: arithmetic and endian history)
Date: Mon, 2 Nov 2026 09:45:51 -0800
Organization: A noiseless patient Spider
Lines: 67
Message-ID: <11cai8f$32ue7$1@dont-email.me>
References: <10uks4f$1dqo$1@gal.iecc.com> <86qzi8omzj.fsf@linuxsc.com>
 <119n5rt$1205$1@gal.iecc.com> <6abf7d77.41149906@news.eternal-september.org>
 <119ovig$15mk$2@gal.iecc.com> <2026Oct3.191827@mips.complang.tuwien.ac.at>
 <1791071365-5857@newsgrouper.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 02 Nov 2026 17:45:52 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3242439"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19214eNLTn8AfUHLnLmDTw8+rKA0jueSg8="; posting-host="1a9b3b4bf730a9d280d77f1c4d91b062"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:TSWRDlGlz/C23VurUPyH//Lixq0= sha256:fqKXgb+7X7qCm+A9pOZfkLKrvo13YT8nHAg2qKBXsVk=
	sha1:BeW0fC/XCBbbtlxrVXvGr5UFNEc= sha256:5gKiKb1loPamJO7DjYMIRSxn6RZJJs7aAPOQBnuROwk=
Content-Language: en-US
In-Reply-To: <1791071365-5857@newsgrouper.org>