Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-crg!ames!ucbcad!ucbvax!cartan!brahms.Berkeley.EDU!ballou From: ballou@brahms.Berkeley.EDU (Kenneth R. Ballou) Newsgroups: comp.lang.c Subject: Re: (unsigned)-1 Message-ID: <567@cartan.Berkeley.EDU> Date: Tue, 16-Dec-86 20:16:16 EST Article-I.D.: cartan.567 Posted: Tue Dec 16 20:16:16 1986 Date-Received: Wed, 17-Dec-86 21:58:30 EST References: <1382@hoptoad.uucp> <8322@lll-crg.ARpA> Sender: daemon@cartan.Berkeley.EDU Reply-To: ballou@brahms.Berkeley.EDU (Kenneth R. Ballou) Organization: Math Dept. UC Berkeley Lines: 19 In article <5460@brl-smoke.ARPA> gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) writes: >In article <559@cartan.Berkeley.EDU> ballou@brahms (Kenneth R. Ballou) writes: >>Actually, I think (unsigned) -1 does have to give you a bit pattern of >>all 1's. > >It can't, on a one's-complement machine. -1 is $FFFFFFFE or something >similar on these. So what? The given argument does NOT depend on how -1 is repre- sented as a signed integer. Point 1 demonstrated that unsigned integers *MUST* be stored in straight binary notation. Keep in mind that casts do not say "treat this bit pattern as though it were this new type", but rather that they may indeed cause changes to the representation of the quantity being converted, as has been pointed out quite often in recent discussion. -------- Kenneth R. Ballou ARPA: ballou@brahms Department of Mathematics UUCP: ...!ucbvax!brahms!ballou University of California Berkeley, California 94720