Article View: comp.std.c
Article #1171Re: space optimization involving enum
From: Clive Feather
Date: Mon, 07 Sep 1992 10:31
Date: Mon, 07 Sep 1992 10:31
20 lines
1526 bytes
1526 bytes
In article <1992Aug29.232155.14657@sq.sq.com> msb@sq.sq.com (Mark Brader) writes: >>> ... The representation of [decimal] 10000 has to use the bit >>> sequence 10011100010000. >> As I read it, wrong. Nothing I see prevents use of 2's complement, >> 1's complement, or excess-2**(n-1) (the sign bit being reversed from >> 2's complement). > These systems are indeed all permissible. But they also all use the > bit sequence 10011100010000 in the representation of decimal 10000. Both wrong. Excess-2**(n-1) is not a permitted system, because the representation of decimal 10000 is not binary 10011100010000. The standard requires that the representation of integers be a "pure-binary" system, except for the sign bit, and that unsigned and signed integers use the same representation for numbers where their ranges overlap. -- Clive D.W. Feather | IXI Limited | If you lie to the compiler, clive@x.co.uk | 62-74 Burleigh St. | it will get its revenge. Phone: +44 223 462 131 | Cambridge CB1 1OJ | - Henry Spencer Fax: +44 223 462 132 | United Kingdom |
Technical Details
Message-ID:
<1992Sep07.103132.19727@x.co.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!acorn!ixi!cliveReferences:
<1992Aug25.160905.9177@sq.sq.com> <1992Aug26.222505.7496@sneaky.lonestar.org> <1992Aug29.232155.14657@sq.sq.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!acorn!ixi!clive From: clive@x.co.uk (Clive Feather) Newsgroups: comp.std.c Subject: Re: space optimization involving enum Message-ID: <1992Sep07.103132.19727@x.co.uk> Date: 7 Sep 92 10:31:32 GMT References: <1992Aug25.160905.9177@sq.sq.com> <1992Aug26.222505.7496@sneaky.lonestar.org> <1992Aug29.232155.14657@sq.sq.com> Organization: IXI Limited, Cambridge, UK Lines: 20