Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.arch > #4786

Re: implementation of unsigned addition on one's complement machines

From anton@mips.complang.tuwien.ac.at (Anton Ertl)
Subject Re: implementation of unsigned addition on one's complement machines
Newsgroups comp.arch
References <1ca86407-1dbc-452c-af08-1f6d1bb76e24@u9g2000vbx.googlegroups.com> <8503c9bb-07c6-4bae-ad8c-64f52322006c@g21g2000yqc.googlegroups.com> <j9thg3$lqc$1@gosset.csi.cam.ac.uk> <2011Nov15.183339@mips.complang.tuwien.ac.at> <j9ua6a$uka$1@gosset.csi.cam.ac.uk>
Organization Institut fuer Computersprachen, Technische Universitaet Wien
Date 2011-11-16 09:34 +0000
Message-ID <2011Nov16.103439@mips.complang.tuwien.ac.at> (permalink)

Show all headers | View raw


nmm1@cam.ac.uk writes:
>In article <2011Nov15.183339@mips.complang.tuwien.ac.at>,
>Anton Ertl <anton@mips.complang.tuwien.ac.at> wrote:
>>>>>
>>>>> >As you probably know, in C unsigned arithmetic is modular. This is
>>>>> >easily implemented in two's complement by ignoring the carry out of
>>>>> >addition.
>>>>>
>>>>> Division and remainder aren't.
...
>Consider 3-bit unsigned integers, for simplicity.  7/5 = 3 in
>true modular arithmetic.

Ok, 3*5=7 (mod 8)

However, with this concept of division, the concept of remainder is
meaningless.

- anton
-- 
M. Anton Ertl                    Some things have to be seen to be believed
anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html

Back to comp.arch | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

implementation of unsigned addition on one's complement machines Luca Forlizzi <luca.forlizzi@gmail.com> - 2011-11-14 07:08 -0800
  Re: implementation of unsigned addition on one's complement machines torbenm@diku.dk (Torben Ægidius Mogensen) - 2011-11-14 17:55 +0100
    Re: implementation of unsigned addition on one's complement machines torbenm@diku.dk (Torben Ægidius Mogensen) - 2011-11-15 10:29 +0100
      Re: implementation of unsigned addition on one's complement machines Luca Forlizzi <luca.forlizzi@gmail.com> - 2011-11-15 02:12 -0800
        Re: implementation of unsigned addition on one's complement machines nmm1@cam.ac.uk - 2011-11-15 10:28 +0000
          Re: implementation of unsigned addition on one's complement machines Luca Forlizzi <luca.forlizzi@gmail.com> - 2011-11-15 03:07 -0800
            Re: implementation of unsigned addition on one's complement machines nmm1@cam.ac.uk - 2011-11-15 11:13 +0000
              Re: implementation of unsigned addition on one's complement machines anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-11-15 17:33 +0000
                Re: implementation of unsigned addition on one's complement machines nmm1@cam.ac.uk - 2011-11-15 18:14 +0000
                Re: implementation of unsigned addition on one's complement machines anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-11-16 09:34 +0000
        Re: implementation of unsigned addition on one's complement machines Michael S <already5chosen@yahoo.com> - 2011-11-16 09:04 -0800
          Re: implementation of unsigned addition on one's complement machines nmm1@cam.ac.uk - 2011-11-16 17:31 +0000
          Re: implementation of unsigned addition on one's complement machines Robert Wessel <robertwessel2@yahoo.com> - 2011-11-16 11:54 -0600
    Re: implementation of unsigned addition on one's complement machines Luca Forlizzi <luca.forlizzi@gmail.com> - 2011-11-15 03:11 -0800
  Re: implementation of unsigned addition on one's complement machines anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2011-11-15 17:26 +0000
    Re: implementation of unsigned addition on one's complement machines Terje Mathisen <"terje.mathisen at tmsw.no"> - 2011-11-15 23:12 +0100
      Re: implementation of unsigned addition on one's complement machines Kai Harrekilde-Petersen <khp@harrekilde.dk> - 2011-11-15 23:25 +0100

csiph-web