home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.arch
- Path: sparky!uunet!think.com!paperboy.osf.org!meissner
- From: meissner@osf.org (Michael Meissner)
- Subject: Re: Integers implementation
- In-Reply-To: fabre@gr.osf.org's message of Fri, 6 Nov 1992 14:45:02 GMT
- Message-ID: <MEISSNER.92Nov6161926@tiktok.osf.org>
- Sender: news@osf.org (USENET News System)
- Organization: Open Software Foundation
- References: <1992Nov6.144502.17520@osf.org>
- Date: 6 Nov 92 16:19:26
- Lines: 34
-
- In article <1992Nov6.144502.17520@osf.org> fabre@gr.osf.org (Christian
- Fabre) writes:
-
- | --
- | Hello,
- |
- | I have a question about integers representation.
- |
- | Most of today architecture use 2's complement scheme to represent
- | signed integers. About other possibilities, like 1's complement,
- | I have the following questions:
- |
- ...
-
- | - What are their drawbacks ?
-
- 2's complement has a negative number without a postive counterpart.
- This means that abs function either will return 1 result that is
- negative, or will signal some exception.
-
- 1's complement and signed magnitude have -0 which plays havoc with
- things like bit masks. Also, in 1's comp, addition is done via a
- subtractor.
-
- ...
-
- | - Are they likely to pop-up in future processor design ?
-
- I suspect not, particularly if you want to run C.
- --
- Michael Meissner email: meissner@osf.org phone: 617-621-8861
- Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142
-
- You are in a twisty little passage of standards, all conflicting.
-