What are the benefits of the ternary number system over the more traditional binary number system? Are there drawbacks to ternary with respect to binary, aside from the obvious of less adoption?

up vote 31 down vote accepted

Citing response of the IOTA's Co-founder David,

Ternary is the optimal radix, actually Base E (2.71....) is, but you can't make processors like that. So it comes down to Base Binary (2) vs Base Ternary (3). 3 is closer to the universal optimum 2.71 than is 2. That is the absolute most simple elevator pitch for ternary.

There are plenty of great articles on this, if you find computer science fascinating. The one already posted is a good high level historic overview. For a more math intensive one you can check out this article or if you are really into computer science you should check out this video, it goes from fundamentals of logic to hardware and software engineering in a binary vs ternary context. To be sure, we use balanced ternary +1 0 -1 or as we prefer + 0 -

The benefits of ternary go beyond mere computational performance in a parochial 1:1 comparison versus binary. Another area where ternary shines is Artificial Neural Networks, Artifical Neurons and Artificial Intelligence Logic. In fact this is actually how our brain also computes. Other areas where ternary shines is in graphical processing, cryptography and search, among other things.

A last point I want to raise regarding ternary is that it almost inevitably is the future of computing. Spintronics got 3 values natively: Spin Up, Down and No Spin. Same goes for Photonics/Optical Computing; use the two orthogonal polarizations of light to represent + and - and lack of light/darkness as 0.

To clarify we are not doing ternary for the sake of doing ternary/something exotic. Ternary is simply the superior technological solution. Nor are we attempting to replace the cemented legacy of Intel and AMD in the desktop realm or ARM, Synopsys etc. in the current mobile market. Our processors are a new kind of processing unit for the new realm of computation in new fields such as IoT, AI, Massively Distributed Computing etc.

I'll end with a quote:

Perhaps the prettiest number system of all, is the balanced ternary notation.

Donald E. Knuth in The Art of Computer Programming

  • Do you have a secondary source other than from the IOTA foundation? Also, your link is dead. To be honest, this is a biased primary source and would not be allowed to be used on Wikipedia or any research based site. So I am surprised that this is an allowable answer in the first place. – The Coordinator Dec 3 at 23:08

Three questions were made:

  1. Why does IOTA use a ternary number system?
  2. What are the benefits of the ternary number system over the more traditional binary number system?
  3. Are there drawbacks to ternary with respect to binary, aside from the obvious of less adoption?

The other answer concerns question number 2, which doesn't concern IOTA specifically, but instead talks about the general advantages of ternary (i.e. could be the answer for anything that chose to use ternary instead of binary). I'll try to address question 1 here to the best of my knowledge:

The is no practical purpose in choosing ternary for IOTA except to manufacture the utility for the ternary processor Jinn, under development by the same team that initially created IOTA.

That choice already cost IOTA community the Curl vulnerability. Curl was an in-house made ternary cryptographic hash function, which was used everywhere a hash function was needed inside IOTA, including PoW. It is always a risky move to roll out a new, poorly analyzed, cryptographic algorithm. It was eventually shown to be insecure, and as a consequence, wallet key derivation algorithm had to be changed to the more conservative Keccak (SHA-3).

Every theoretical advantage ternary system could bring is nullified by the decades of investment made into perfecting binary computers, software and algorithms (the lack of a properly secure ternary hash function is just a small sample of the trouble of venturing into ternary).

  • 2
    "It was eventually shown to be insecure" The MIT never published code that showed this in practice. – Achim Nov 30 '17 at 7:13
  • 3
    Ethan Heilman from that research group said the following during his presentation about Curl-P: "The attacks presented in Narula's paper, our paper, while being valid academic criticism of the latest public version of the Curl hash function, do not represent valid attacks on the IOTA cryptocurrency." – Come-from-Beyond Nov 30 '17 at 8:50
  • 4
    It motivated the hardfork that locked-up the funds of lot of people, so you can't say the problem was of no consequence for IOTA. If, in retrospect, that change in the wallet is still justifiable, then the attack is very serious indeed. – lvella Nov 30 '17 at 17:08
  • 1
    If there was an attack we would see signs of it on the Internet, at least as a proof-of-concept code. There are no such signs. – Come-from-Beyond Dec 26 '17 at 8:26
  • 1
    No, because the vector was patched very soon. – lvella Dec 27 '17 at 15:23

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.