Date: Thu, 6 Jan 2000 11:08:11 -0500 (EST) From: "Crist J. Clark" <cjc@cc942873-a.ewndsr1.nj.home.com> To: jcm@dogma.freebsd-uk.eu.org (Jonathon McKitrick) Cc: tom@embt.com (Tom Embt), cjclark@home.com, chat@freebsd.org Subject: Re: I will never trust NBC news again! Message-ID: <200001061608.LAA20035@cc942873-a.ewndsr1.nj.home.com> In-Reply-To: <Pine.BSF.4.21.0001061418190.66464-100000@dogma.freebsd-uk.eu.org> from Jonathon McKitrick at "Jan 6, 2000 02:19:23 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
Jonathon McKitrick wrote, > > >BTW, I *think* it would be 2^31-1 not 2^31. For example, doesn't a char > >store values from -128 to 127 ? > > Only if it's treated as a signed value. If it is unsigned, then the extra > bit can be used for value storage. ^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ I think that is a misleading way to phrase it or think about it. In signed or unsigned integer-types, all bits are used for "value storage." This is seen in your example, > signed int: -128 127 > unsigned: 0 255 Both of these ranges contain 256 values, the number of states that 8 binary switches can assume. All bits are used for "value storage." How we map those 256 states to the mathematical objects, like integers, is up to the programmer. -- Crist J. Clark cjclark@home.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200001061608.LAA20035>