Re: Why the Range of Int is less by one at positive side?.........
From: Lew Pitcher (Lew.Pitcher_at_td.com)
Date: 01/24/05
- Next message: bacadman: "testing for the newline"
- Previous message: Michael Wojcik: "Re: Why the Range of Int is less by one at positive side?........."
- In reply to: Michael Wojcik: "Re: Why the Range of Int is less by one at positive side?........."
- Next in thread: Mike Wahler: "Re: Why the Range of Int is less by one at positive side?........."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 24 Jan 2005 13:15:32 -0500
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Michael Wojcik wrote:
> In article <41f4e5ad$0$17881$e4fe514c@dreader4.news.xs4all.nl>, "dandelion" <dandelion@meadow.net> writes:
>
>>PS. Does anyone know any *modern* processors with anything but 2's
>>complement encoding of signed integers? I can't remember ever running into
>>one.
>
>
> I think some processors still support packed decimal in hardware,
Yes, the zSeries mainframe (of the System 360/370/390 line) still supports
packed decimal in hardware. Most mainframe languages support these native bcd
datatypes directly in the language.
> but
> that's in addition to 2's-complement.
IIRC, BCD support on IBM mainframes originally was an option; you could order
the original 'basic' system with binary integer support only, a 'scientific'
system with binary integer and floatingpoint support or a 'business' system with
binary integer and BCD support. The "System 360" changed that by incorporating
both the 'business' and 'scientific' support into one hardware architecture.
Legend has it that the system was named "360" because it was an 'all
encompasing' processor, and the name alluded to the 360 degrees of a complete
circle representing the complete circle of basic, business and scientific computing.
> Which is good, since p-d isn't
> a pure binary representation, so a C implementation on a p-d-only
> machine would have to emulate all the integer operations.
>
- --
Lew Pitcher
IT Consultant, Enterprise Data Systems,
Enterprise Technology Solutions, TD Bank Financial Group
(Opinions expressed are my own, not my employers')
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)
iD8DBQFB9TtEagVFX4UWr64RAuUsAKCT/nW+GjHQaRhHffN4QgzA/K3orQCg8CZU
gC23OnjwVDSsFCQtA5xUay0=
=LHK+
-----END PGP SIGNATURE-----
- Next message: bacadman: "testing for the newline"
- Previous message: Michael Wojcik: "Re: Why the Range of Int is less by one at positive side?........."
- In reply to: Michael Wojcik: "Re: Why the Range of Int is less by one at positive side?........."
- Next in thread: Mike Wahler: "Re: Why the Range of Int is less by one at positive side?........."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|