J
Joe Wright
Off by one.. 65536 takes 17 bits. Happy St. Paddy's.CBFalconer said:Ioannis Vranos wrote:
... snip ...
Yes. Consider a 16 bit system. INT_MAX is 32767. INT_MIN is
-32768 (or -32767). UINT_MAX is 65536 (UINT_MIN is naturally 0).
It is allowable to reserve the value that would represent -32768 to
indicate a special condition, such as uninitialized. Or, for a 1's
complement machine, the bit pattern for -0 is forbidden.