From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00,SUBJ_ALL_CAPS autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c4cb2c432feebd9d X-Google-Thread: 1094ba,c4cb2c432feebd9d X-Google-Thread: 101deb,15c6ed4b761968e6 X-Google-Attributes: gid103376,gid1094ba,gid101deb,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.comcast.com!news.comcast.com.POSTED!not-for-mail NNTP-Posting-Date: Tue, 18 Jul 2006 13:41:09 -0500 Date: Tue, 18 Jul 2006 11:41:37 -0700 From: glen herrmannsfeldt User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada,comp.lang.fortran,comp.lang.pl1 Subject: Re: ONES COMPLEMENT References: <0ugu4e.4i7.ln@hunter.axlog.fr> <%P_cg.155733$eR6.26337@bgtnsc04-news.ops.worldnet.att.net> <6H9dg.10258$S7.9150@news-server.bigpond.net.au> <1hfv5wb.1x4ab1tbdzk7eN%nospam@see.signature> <20060712.7A4E6E0.D028@mojaveg.lsan.sisna <20060714.7A4E988.A30D@mojaveg.lsan.sisna.com> <_5Xug.6870$tE5.4349@news-server.bigpond.net.au> In-Reply-To: <_5Xug.6870$tE5.4349@news-server.bigpond.net.au> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 24.18.174.4 X-Trace: sv3-pogIwWd9rO8wx1Qof01UIfZgKVyGUkrbBYZ81PHFUEDzfMk7rBcPm7cljwHSARUQuyB/DwrccoAFSrz!N6hRocAfvjOFFEfdP0ZQKOhxV1uc0iVot14l+3bwHURhBuX3p2p5lluvd8tlG49DvA0U2FOjylYQ!ICmLUg== X-Complaints-To: abuse@comcast.net X-DMCA-Complaints-To: dmca@comcast.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:5775 comp.lang.fortran:12165 comp.lang.pl1:2024 Date: 2006-07-18T11:41:37-07:00 List-Id: robin wrote: > glen herrmannsfeldt wrote in message ... (snip) >>Well, you want unsigned arithmetic to do multiple precision, >>which is harder if a machine only supplies ones complement. > In what way? > The arithmetic is done using fewer bits than word. > You have to do that with twos complement also. The bits resulting in an unsigned addition or subtraction operation are the same as for a twos complement operation, but the detection of overflow (or carry/borrow) is different. If you can properly detect carry/borrow you can do it with all the bits in the word. > The arithmetic required is addition; and all values > manipulated are positive. Results are the same in > machines supporting ones or twos complement > representation for negative values. Hmm. If you can detect the end around carry you can generate the correct unsigned result, and so still use all the bits. This is not usually easy in an high-level language, but should be provided to the assembly programmer. -- glen