Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!uwm.edu!linac!midway!quads.uchicago.edu!tisu From: tisu@quads.uchicago.edu (Seth Tisue) Newsgroups: comp.sys.mac.programmer Subject: Re: 68000 Assembly question -- overflow Message-ID: <1991May25.205252.6668@midway.uchicago.edu> Date: 25 May 91 20:52:52 GMT References: <1991May24.213815.16227@midway.uchicago.edu> <1991May25.021530.17126@neon.Stanford.EDU> Sender: news@midway.uchicago.edu (NewsMistress) Organization: Plaster Cramp Press Lines: 33 In article <1991May25.021530.17126@neon.Stanford.EDU> kaufman@neon.Stanford.EDU (Marc T. Kaufman) writes: >Sigh! What kind of class is this where they don't explain the difference >between 1's complement, 2's complement, and sign-magnitude representations? >The native mode of a 68000 for instance is 2's complement. In that mode, >$80000001 = -2147483647, and that minus 1 gives $80000000 - -2147483648. >Yes, it is the case that there is no representation in 2's comp form of the >positive number +2147483648 (at least in 32 bits). > >In 1's complement and sign-magnitude notation there are, indeed, 2 >representations of zero (+0 and -0), and the positive and negative ranges >are symmetric. But you don't have that, in terms of the 68000 Flag bits >at least. Thanks to everyone who straightened me out on this. It still seems like a poor situation to have a negative number, -214783648, which has no valid corresponding positive representation; I'll have my program check for it. (I don't think the user should have to worry about taking the negative of something yield an overflow.) >[a believer in the principle that there should be no such thing as an >UNDERGRADUATE CS major] You'd be happy here at the University of Chicago; there's no CS major here. You have to major in "Applied Math" (grr) and then take computer courses. -- ---- Seth Tisue USMail: c/o Plaster Cramp Press ---- (tisu@midway.uchicago.edu) P.O. Box 5975 "Please to be restful. It is only a few Chicago IL 60680 crazies who have from the crazy place outbroken." --------------