(unsigned)-1

Kenneth R. Ballou ballou at brahms.Berkeley.EDU
Wed Dec 17 11:16:16 AEST 1986


In article <5460 at brl-smoke.ARPA> gwyn at brl.arpa (Doug Gwyn (VLD/VMB) <gwyn>) writes:
>In article <559 at cartan.Berkeley.EDU> ballou at 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 at brahms
Department of Mathematics		UUCP:  ...!ucbvax!brahms!ballou
University of California
Berkeley, California  94720



More information about the Comp.lang.c mailing list