Article View: comp.arch
Article #552Re: two's complement and Flags (Re: arithmetic and endian history)
From: Jeroen Belleman
Date: Fri, 06 Nov 2026 15:50
Date: Fri, 06 Nov 2026 15:50
39 lines
2855 bytes
2855 bytes
On 11/6/26 07:24, Anton Ertl wrote: > John Levine <johnl@taugh.com> writes: > [PDP-4] >> They >> added two's complement arithmetic because the users wanted to do >> multiple precision and floating point arithmetic with more than 18 >> bits which is a lot easier to do in two's complement. It also added a >> "link" bit to hold the carry out of the accumulator, and instructions >> to test it so you could do something like this for a two word addition >> >> CLA A / low part >> TAD B / carry is in the link bit >> DAC C >> >> CLA A+1 / high part >> SZL / skip on zero link >> IAC / add 1 to AC if there was a carry >> TAD B+1 >> DAC C+1 > > That's good enough for double-precision integer arithmetic, but for > multiple-precision integers, an add with carry-in and carry-out is > needed. The first sequence only does carry-out, the second only > carry-in; the second produces a carry, but it does not reflect a > possible carry-out of the IAC. > [...] > > - anton There should be no problem. It's just a flip-flop. The carry out becomes the new carry in after the next clock. There is no problem at all to propagate this over as many additions as you want As far as I know, all machines these days have an ADD with carry as a single instruction. Jeroen Belleman
Technical Details
Message-ID:
<11cksvl$2lad5$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-mailReferences:
<10uks4f$1dqo$1@gal.iecc.com> <11cai8f$32ue7$1@dont-email.me> <11caljv$jeo$1@gal.iecc.com> <6ae8eec0.35320218@news.eternal-september.org> <11cjh58$1flq$4@gal.iecc.com> <2026Nov6.072410@mips.complang.tuwien.ac.at>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: Jeroen Belleman <jeroen@nospam.please> Newsgroups: comp.arch Subject: Re: two's complement and Flags (Re: arithmetic and endian history) Date: Fri, 6 Nov 2026 16:50:13 +0100 Organization: A noiseless patient Spider Lines: 39 Message-ID: <11cksvl$2lad5$1@dont-email.me> References: <10uks4f$1dqo$1@gal.iecc.com> <11cai8f$32ue7$1@dont-email.me> <11caljv$jeo$1@gal.iecc.com> <6ae8eec0.35320218@news.eternal-september.org> <11cjh58$1flq$4@gal.iecc.com> <2026Nov6.072410@mips.complang.tuwien.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Fri, 06 Nov 2026 15:50:14 +0000 (UTC) Injection-Info: dont-email.me; logging-data="2795941"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+71nAvsbOjRp81f2eQLeNA"; posting-host="bc00e8dc99ee1c2d29f93d8fa3698062" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Cancel-Lock: sha1:BSFB7o1S0ZNT1rkiIkid8RCBkaI= sha256:eHDnBm0GTUsHvKoYTXD5RqCijlpkKbbLv1utT6Gm+c4= sha1:UXambNSgsRyXMgnzWeIJOAjXmiM= sha256:eD3dHmPXzmXJK/dfbFo+b2lJtNWhXeH+bS02zSxSxXA= Content-Language: en-US, fr-FR, nl-NL In-Reply-To: <2026Nov6.072410@mips.complang.tuwien.ac.at>