dupuy@amsterdam.UUCP (06/03/87)
In article <3460004@hpsrla.HP.COM> roger@hpsrla.HP.COM (Roger Petersen) writes: > >Actually, if you care to get theoretical, I believe it can be shown that >the ideal number base for a computer is e (2.7182818...). Interesting, >perhaps, but not very practical. I once worked this out independently; it's been a while, but I recall that the information ``efficiency'' for base x is $\ln X / X$ and is maximal at X = e. This assumes that the hardware cost of providing n-valued symbols is n/2 times the cost of bivalued symbols, which may or may not hold in real electronic systems. Even though there's no way to use a transcendental base in hardware, this does argue in favor of ternary logic, since $\ln 3 / 3 \approx .3662$ is only slightly less than $\ln e / e \approx .3679$, while $\ln 2 / 2 \approx .3466$. It can be said however, that ternary logic would be wasteful for boolean operations, which are heavily used in most systems (e.g. branches). There was an interesting Martin Gardner column in Scientific American in the late 60's or early 70's on ternary logic. For example, there are several ways of representing signed ternary numbers. The most interesting is using the symbols -1, 0 and +1, rather than 0, 1, and 2. This avoids wasting a ternary symbol on the (bivalued) sign bit. Another possibility is three's complement, although it makes the sign harder to determine. @alex --- arpanet: dupuy@columbia.edu uucp: ...!seismo!columbia!dupuy
kent@xanth.UUCP (06/11/87)
In article <4656@columbia.UUCP> dupuy@amsterdam.columbia.edu (Alexander Dupuy) writes: [...] >Even though there's no way to use a transcendental base in hardware, this does >argue in favor of ternary logic,[...] For example, there are several ways >of representing signed ternary numbers. The most interesting is using the >symbols -1, 0 and +1, rather than 0, 1, and 2. This avoids wasting a ternary >symbol on the (bivalued) sign bit. Ah, yes! Besides, it would give a whole raft of new possiblities for incorrect implementations of the C construct "unsigned long", providing additional years of job security for C compiler writers and maintainers, who have almost perfected themselves out of jobs! ;-) Kent. -- Kent Paul Dolan, LCDR, NOAA, Retired; ODU MSCS grad student // Yet UUCP : kent@xanth.UUCP or ...{sun,harvard}!xanth!kent // Another CSNET : kent@odu.csnet ARPA : kent@xanth.cs.odu.edu \\ // Happy USPost: P.O. Box 1559, Norfolk, Virginia 23501-1559 \// Amigan! Voice : (804) 587-7760 -=][> Last one to Ceres is a rotten egg! -=][>