delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/03/08/08:31:10

From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: odd or even?
Date: 8 Mar 2000 08:20:55 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 48
Distribution: world
Message-ID: <8a52h7$n7g$1@antares.lu.erisoft.se>
References: <38BE28A9 DOT CD476C62 AT student DOT kuleuven DOT ac DOT be> <38BE4B85 DOT 1F5A0778 AT videotron DOT ca> <l5jsbs87qgu43hr16el30msklmmao5j2h1 AT 4ax DOT com> <38BE7E6D DOT 6FE78AC9 AT americasm01 DOT nt DOT com> <tsg0csclt7k7q6suq7vdcq2gua5aacq8kh AT 4ax DOT com> <89to3c$1th$1 AT antares DOT lu DOT erisoft DOT se> <fdv5csgus2u8g26uu8v7b370jt6jqcnovg AT 4ax DOT com>
NNTP-Posting-Host: mars.lu.erisoft.se
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Damian Yerrick (DONT DOT YOU DOT DAREd_yerrick AT hotmail DOT comSEND DOT SPAM) wrote:
: On 5 Mar 2000 13:39:56 GMT, eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
: wrote:

: >One's complement works as well:
: >+0 = 0x00000000 (lowest bit not set)
: >-0 = 0x80000000 (lowest bit not set)
: >-1 = 0x80000001 (lowest bit set)
: >-2 = 0x80000002 (lowest bit not set)

: This isn't ones' complement.  This is called "sign bit" representation
: and is one of the first things taught in Intro to Digital Logic
: (EC130) here at Rose.

Ooops! Sorry.

: >What other interesting representations are there? 

: There's ones' complement, where -foo = 0xffffffff xor foo

: -2 0xfffffffd
: -1 0xfffffffe
: -0 0xffffffff
: +0 0x00000000
: +1 0x00000001
: +2 0x00000002

So here the bit 0 masking does not work. So again it seems we should
let the optimisations be done by the compiler...


This Mortal Coil, Blood,

							MartinS


: -- 
: Damian Yerrick  http://yerricde.tripod.com/
: Comment on story ideas: http://home1.gte.net/frodo/quickjot.html
: AOL is sucks! Find out why: http://anti-aol.org/faqs/aas/
: View full sig: http://www.rose-hulman.edu/~yerricde/sig.html

: This is McAfee VirusScan. Add these two lines to your .sig to
: prevent the spread of .sig viruses.  http://www.mcafee.com/

-- 
This is a polymorphic signature virus, strain Aa1Eff3. Please modify
me and put me as your signature to help me spread.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019