3 ms·
That example looks exactly like it would in binary computing?
by Scarblac 3y ago
That example looks exactly like it would in binary computing?
- Someone 3y agoOf course it does. The representation of numbers is irrelevant, as long as its interface doesn’t change. The only place you’d see changes are in bitwise/tritwise operations and in limits of fixed-size integers (abs(i) would likely be well defined for all ints, for example, and we would have INT_MAX = -INT_MIN, with values like 3^81 or 3^27). Ternary floats probably would do away with the distinction between -0 and +0, too.
- jerf 3y agoWhich is also why I don't see any reason why we'd need a new "language" to use ternary computing. I'm not even sure what a library would do; if you have arbitrary precision ints and/or floats, that's basically all you need for an adapter. For instance, a ternary computer might be able to store a tri-state value more efficiently, but you'd still have the exact same code to resolve it ("case 0: {} case 1: {} case 2: {}"), and it's not like it suddenly mandates that all your binary conditions grow a third clause lest the hardware combust. A trit having more room than a binary value requires isn't news when a lot of our binary values are already consuming a full byte, if not at times a full machine word, as it is. I've seen one other person in the past many years who A: believed ternary computing was very important and B: was absolutely impossible to convince that there is literally nothing a ternary computer can do that a binary computer can not. But there is literally nothing a ternary computer can do that a binary computer can not. The reasons why it may be interesting relate to being one possible avenue for squeezing one last drop of hardware performance out of a system that has otherwise reached its limits, but it is minimally interesting from a software perspective. I think no one is particularly interested in it at this time because there's no step after that; there's no "super ternary" you can go to after that, and for various mathematical reasons stepping up to 4 is much, much less helpful if not actively a step backwards (it turns out that in many ways, 3 is the optimum; actually it's e, but 3 is the closest you can get to that). An optical computer might go faster the next generation, a quantum computer can add more qubits, transistors can be cooled and stacked and built out of graphene and all sorts of other things, but a ternary-ness is a dead end. It's the last thing you do when all else fails.