lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Sep 22, 2008, at 1:35 AM, Miles Bader wrote:

Louis Mamakos <louie@transsys.com> writes:
Just for completeness, this is only true for CPU architectures that
implement 2's complement arithmetic.  While 1's complement CPU
architectures [1] are even more rare...

[1] UNIVAC/Sperry/Unisys 1100/2200 architectures, DEC-10/20 among
them.

The pdp-10 (decsystem 10/20) used 2s-complement integers.

Sorry, it was PDP-1 and IBM 7090/7094's that I was thinking of.


It seems pretty reasonable to at least _optimize_ for the 2s- complement case...

It's not optimization but rather embedding architecture dependencies
needlessly in a specification.  There ought to be a distinct set
of arithmetic vs. bitwise-logical functions specified.  I suppose
this is similar to not presuming a specific word size for data types
in the specification of the function.



-Miles

--
Do not taunt Happy Fun Ball.


Always wise advice to heed.

louie