views:

781

answers:

7

Isn't a three state object immedately capable of holding more information and handling larger values? I know that processors currently use massive nets of XOR gates and that would need to be reworked.

Since we are at 64 bit (we can represent 2^63 possible states) computing the equivalent ternary generation could support number with 30 more tens places log(3^63-2^63).

I imagine it is as easy to detect the potential difference between +1 and 0 as it is between -1 and 0.

Would some compexity of the hardware, power consumption, or chip density offset any gains in storage and computing power?

+4  A: 

Well, for one thing, there is no smaller unit of information than a bit. operating on bits is the most basic and fundamental way of treating information.

Perhaps a stronger reason is because its much easier to make electrical components that have two stable states, rather than three.

Aside: Your math is a bit off. there are approximately 101.4 binary digits in a 64 digit trinary number. Explanation: the largest 64 digit trinary number is 3433683820292512484657849089280 (3^64-1). to represent this in binary, it requires 102 bits: 101011010101101101010010101111100011110111100100110010001001111000110001111001011111101011110100000000

This is easy to understand, log2(3^64) is about 101.4376

TokenMacGuy
2 to the 6 is 64 and 3 to 6 is 729... I am sorry am I being dense?
ojblass
You are right of course... my head hurts but you are right... can you correct the question in some meaningful way to say that?
ojblass
+7  A: 

Of course we'd be able to hold more data per bit, just like our decimal number system can hold far more data in a single digit.

But that also increases complexity. Binary behaves very nicely in many cases, making it remarkably simple to manipulate. The logic for a binary adder is far simpler than one for ternary numbers (or for that matter, decimal ones).

You wouldn't magically be able to store or process more information. The hardware gates would have to be so much bigger and more complex that it'd more than offset the larger capacity.

jalf
Does that come from actual experience designing hardware or simply a gut instinct?
ojblass
ojblass: It comes from people actually making decimal computers in the 1940s onwards. There are also ternary logic gates around, but very few ternary computers. See for example Wikipedia's article on the history of computing hardware: http://en.wikipedia.org/wiki/History_of_computing_hardware,http://en.wikipedia.org/wiki/Ternary_logic, and http://en.wikipedia.org/wiki/Ternary_computer
Doug
+3  A: 

A lot of it has to do with the fact that ultimately, bits are represented as electrical impulses, and it's easier to build hardware that simply differentiates between "charged" and "no charge", and to easily detect transitions between states. A system utilizing three states has to be a bit more exact in differentiating between "charged", "partly charged", and "no charge". Besides that, the "charged" state is not constant in electronics: the energy starts to "bleed" eventually, so a "charged" state varies in actual "level" of energy. In a 3-state system, this would have to be taken into account, too.

mipadi
Actually, I think most ternary logic uses +1, 0, and -1 states, not 0, +0.5, and +1.0 states.
Rick Copeland
Well whatever most means... but I imagine it is as easy to detect the differences between +1 and 0 as it is between -1 and 0.
ojblass
Try writing code that distinguishes three values using only one if statement. (no case allowed)
TokenMacGuy
can i make up a language construct?
ojblass
A: 

I believe it is for two reasons (please correct me if I'm wrong): first because the value of 0 and 1 is not really no-current/current or something alike. The noise is quite high, and the electronic components must be able to distinguish that a value fluctuating from, say, 0.0 to 0.4 is a zero, and from 0.7 to 1.2 is a one. If you add more levels, you are basically making this distinction more difficult.

Second: all the boolean logic would immediately cease to make sense. And since you can implement sum out of boolean gates, and from sum, every other mathematical operation, it is nicer to have something that maps nicely into practical use for math. What would be the boolean truth table for an arbitrary pair between false/maybe/true?

Stefano Borini
Well... Actually boolean truth table is just a special case for number of values=2. You can define ternary logic just as easily http://en.wikipedia.org/wiki/Ternary_logic To make it more interesting Z/high impedance state is actually used in every standard computer / electronic device to implement buses that can handle more than multiple devices on one line.
viraptor
cool :) I didn't know about that. Thanks
Stefano Borini
I disagree with wikipedia's satement that Z is a logic state. You cannot in the real world use Z in all operations. How would one build an XOR gate that works with Z?
MadCoder
+3  A: 

You should read the articles about a russian ternary computer:

lewap
A: 

The ternary equivalent of the 'bit' just caused too much outrage!

NoizWaves
+3  A: 
  • It is much harder to build components that use more than two states/levels/whatever. For example, the transistors used in logic are either closed and don't conduct at all, or wide open. Having them half open would require much more precision and use extra power. Nevertheless, sometimes more states are used for packing more data, but rarely (e.g. modern NAND flash memory, modulation in modems).

  • If you use more than two states you need to be compatible to binary, because the rest of the world uses it. Three is out because the conversion to binary would require expensive multiplication or division with reminder. Instead you go directly to four or a higher power of two.

  • These are practical reasons why it is not done, but mathematically it is perfectly possible to build a computer on ternary logic.

starblue
The play nice with the rest of the world is a great point.
ojblass
we're not talking about modern times here. At the time ternary computers were considered, the rest of the world was still (also) working on the binary computers
lewap