Ternary computer
This article needs more citations. (December 2014) |
A ternary computer, also called trinary computer, is one that uses ternary logic (i.e., base 3) instead of the more common binary system (i.e., base 2) in its calculations. Ternary computers use trits, instead of binary bits.
Types of states
[edit]Ternary computing deals with three discrete states, but the ternary digits themselves can be defined differently:[1]
| System | States | ||
|---|---|---|---|
| Unbalanced ternary | 0 | 1 | 2 |
| Fractional unbalanced ternary | 0 | 1/2 | 1 |
| Balanced ternary | −1 | 0 | 1 |
| Unknown-state logic | F | ? | T |
| Ternary-coded binary | T | F | T |
Ternary computing is commonly implemented in terms of balanced ternary, which uses the three digits −1, 0, and +1. The negative value of any balanced ternary digit can be obtained by replacing every + with a − and vice versa. It is easy to subtract a number by inverting the + and − digits and then using normal addition. Balanced ternary can express negative values as easily as positive ones, without the need for a leading negative sign as with unbalanced numbers. These advantages make some calculations more efficient in ternary than binary.[2] Considering that digit signs are mandatory, and nonzero digits are magnitude 1 only, notation that drops the 1s and use only 0 and the + and − signs is more concise than if 1s are included.
Ternary computing can be implemented in terms of unbalanced ternary, which uses the three digits 0, 1, 2. The original 0 and 1 are explained as an ordinary binary computer, but instead uses 2 as leakage current. The world's first unbalanced ternary semiconductor design on a large wafer was implemented by the research team led by Kim Kyung-rok at Ulsan National Institute of Science and Technology in South Korea, which will help development of low power and high computing microchips in the future. This research theme was selected as one of the future projects funded by Samsung in 2017, published on July 15, 2019.[3]
History
[edit]I often reflect that had the Ternary instead of the denary Notation been adopted in the Infancy of Society, machines something like the present would long ere this have been common, as the transition from mental to mechanical calculation would have been so very obvious and simple.
— Thomas Fowler, letter to Sir George Biddell Airy[4]
One early calculating machine, built entirely from wood by Thomas Fowler in 1840, operated in balanced ternary.[5][6][4]
The first modern, electronic ternary computer, Setun, was built in 1958 in the Soviet Union at the Moscow State University by Nikolay Brusentsov,[7][8] and it had notable advantages over the binary computers that eventually replaced it, such as lower electricity consumption and lower production cost.[citation needed] In 1970 Brusentsov built an enhanced version of the computer, which he called Setun-70.[7]
In the United States, the ternary computing emulator Ternac working on a binary machine was developed in 1973.[9]: 22 The ternary computer QTC-1 was developed in Canada.[10]
Comparison to binary computing
[edit]Balanced ternary systems and ternary computers are not unprecedented in history. Thomas Fowler built a mechanical computer in 1840 using balanced ternary system.[11] The balanced ternary representation of numbers and its related arithmetics was applied in number theory back to Leonhard Euler[12] and was briefly discussed by Claude Shannon in his paper "A Symmetrical Notation for Numbers" published in 1950.[13]
Despite the ternary design never becoming massively produced, there have been discussions on the advantages of the ternary system over the binary system, and great interest was present on the ternary and more generally on the multi-valued logic systems in the academy.[14]
Advantages
[edit]While developing the Setun ternary computer, Nikolay Brusentsov found the ternary number system superior to the binary number system: it allowed him to create very simple and reliable elements, and he needed only one-seventh as many elements as Lev Gutenmakher's binary computers. The power source requirements were also significantly reduced because fewer magnetic rods and diodes were used. He also found the natural number-coding system used in the ternary system superior over the direct, reciprocal and supplementary number coding used in the binary system. He maintained that the ternary system is superior to binary in most aspects and published several papers advocating the ternary system from 1985 to 2014.[15]
The symmetric nature of balanced ternary logic allows for natural representation of negative numbers.
The ternary system is also more efficient from an information theory perspective. Donald Knuth wrote in his book The art of Computer Programming that "Perhaps the symmetric properties and simple arithmetic of this number system will prove to be quite important some day,"[16] noting that,
The complexity of arithmetic circuitry for balanced ternary arithmetic is not much greater than it is for the binary system, and a given number requires only as many digit positions for its representation."[16]
In the paper The Prospects for Multivalued Logic: A Technology and Applications View, Kenneth C. Smith argued that multi-valued logic is a solution to the interconnection problem in digital systems.[17] In particular, Douglas W. Jones suggests that the ternary system will reduce the number of interconnection wires by 36%[18]
Disadvantages
[edit]Douglas W. Jones made a series of computations and design algorithms of ternary system on his homepage under the name The Ternary Manifesto, including fast ternary addition, multiplication, and division. It turns out that much of the improved efficiency in the interconnection and digit representation is balanced out by requiring more gates in the computations. For example, the ternary addition, while achieving the same computational speed as binary addition, requires 62% more logic.[18]
Meanwhile, many have suggested that ternary circuits are hard to develop, especially when most modern digital flows are binary.[19][20]
In the paper Comparison of Binary and Multivalued ICs According to VLSI Criteria written by Daniel Etiemble & Michel Israël, the authors compared binary and multivalued integrated circuits by examining their performance in detail, and discovered that while the design of multivalued circuits are valid and useful, they have not surpassed the binary circuits. They wrote in the conclusion that [19]
Multi-valued circuits and two-valued circuits must not be seen as competitors. If they are seen as such, then two-valued circuits have already won.
Future applications and research
[edit]With the advent of mass-produced binary components for computers, ternary computers have diminished in significance. However, Donald Knuth argues that they will be brought back into development in the future to take advantage of ternary logic's elegance and efficiency.[2] One possible way this could happen is by combining an optical computer with the ternary logic system.[21] A ternary computer using fiber optics could use dark as 0 and two orthogonal polarizations of light as +1 and −1.[22]
The Josephson junction has been proposed as a balanced ternary memory cell, using circulating superconducting currents, either clockwise, counterclockwise, or off. "The advantages of the proposed memory circuit are capability of high speed computation, low power consumption and very simple construction with fewer elements due to the ternary operation."[23]
Ternary computing shows promise for implementing fast ternary large language models (LLMs) and potentially other AI applications, in lieu of floating point arithmetic.[24]
With the emergence of carbon nanotube transistors, many research projects have shown interest in designing ternary logic gates using them. Between 2020 and 2024, more than 100 papers about this subject were published on IEEE Xplore.[25]
In 2025, a patent by Huawei proposed a ternary logic gate able to add and subtract ternary inputs. It is introduced as a "ternary logic gate circuit, a computing circuit, a chip, and an electronic device". It uses three transistors with three different voltage level (low, medium and high) to build ternary logic gates.[26]
Quantum ternary
[edit]Ternary quantum computers use qutrits rather than trits. A qutrit is a quantum state that is a complex unit vector in three dimensions, which can be written as in the bra–ket notation.[27] The labels given to the basis vectors () can be replaced with other labels, for example those given above.
In popular culture
[edit]In Robert A. Heinlein's novel Time Enough for Love, the sapient computers of Secundus, the planet on which part of the framing story is set, including Minerva, use an unbalanced ternary system. Minerva, in reporting a calculation result, says "three hundred forty one thousand six hundred forty ... the original ternary readout is unit pair pair comma unit nil nil comma unit pair pair comma unit nil nil point nil".[28]
See also
[edit]- Decimal computer – Computer operating on base-10 numbers
- Flip-flop (electronics) – Electronic circuit with two stable states
- Radix economy – Number of digits needed to express a number in a particular base
- Skew binary number system – Non-standard positional numeral system
- Ternary numeral system – Base-3 numeral system
- Ternary signal
- Unconventional computing – Computing by new or unusual methods
References
[edit]- ↑ Connelly, Jeff (2008). "Ternary Computing Testbed 3-Trit Computer Architecture" (PDF). California Polytechnic State University of San Luis Obispo.
- 1 2 Knuth, Donald (1980). The Art of Computer Programming. Vol. 2: Seminumerical Algorithms (2nd ed.). Addison-Wesley. pp. 190–192. ISBN 0-201-03822-6..
- ↑ "S. Korean researchers develop world's first ternary semiconductor tech". Maeil Business Newspaper. 17 July 2019.
- 1 2 Hayes, Brian (2008-04-01). Group Theory in the Bedroom, and Other Mathematical Diversions. Farrar, Straus and Giroux. ISBN 978-1-4299-3857-0.
- ↑ McKay, John; Vass, Pamela. "Thomas Fowler". Archived from the original on 31 May 2007.
- ↑ Glusker, Mark; Hogan, David M.; Vass, Pamela (July–September 2005). "The Ternary Calculating Machine of Thomas Fowler". IEEE Annals of the History of Computing. 27 (3): 4–22. doi:10.1109/mahc.2005.49.
- 1 2 Nitusov, Alexander. "Nikolay Petrovich Brusentsov". Russian Virtual Computer Museum: Hall of Fame. Retrieved 25 January 2010.
- ↑ Trogemann, Georg; Nitussov, Alexander Y.; Ernst, Wolfgang (2001). Computing in Russia: the history of computer devices and information technology revealed. Vieweg+Teubner Verlag. pp. 19, 55, 57, 91, 104–107. ISBN 978-3-528-05757-2..
- ↑ Epstein, George; Frieder, Gideon; Rine, David C. (1974). "The development of multiple-valued logic as related to computer science". Computer. 7 (9). IEEE: 20–32. doi:10.1109/MC.1974.6323304. eISSN 1558-0814. ISSN 0018-9162. S2CID 30527807.
- ↑ Cho, Y. H.; Mouftah, H. T. (1988). A CMOS ternary ROM chip (PDF). Proceedings. The Eighteenth International Symposium on Multiple-Valued Logic. IEEE. pp. 358–363. doi:10.1109/ISMVL.1988.5195. ISBN 0-8186-0859-5. Archived from the original (PDF) on 2024-02-03.
- ↑ McKay, John; Vass, Pamela. "Thomas Fowler". Archived from the original on 31 May 2007.
- ↑ Andrews, George E. (2007). "Euler's "De Partitio numerorum"". Bulletin of the American Mathematical Society. New Series. 44 (4): 561–573. doi:10.1090/S0273-0979-07-01180-9. MR 2338365.
- ↑ Shannon, C. E. (February 1950). "A Symmetrical Notation for Numbers". The American Mathematical Monthly. 57 (2): 90–93. doi:10.1080/00029890.1950.11999490. ISSN 0002-9890.
- ↑ Dubrova, Elena. Multiple-Valued Logic in VLSI: Challenges and Opportunities. S2CID 17070721. Retrieved 2025-05-27.
- ↑ Malinovsky, Boris Nikolaevich (2010). Fitzpatrick, Anne; Maldonado, Kate (eds.). Pioneers of Soviet Computing. Translated by Aronie, Emmanuel (2nd ed.). Special Interest Group for Computing, Information, and Society.
- 1 2 Knuth, Donald (1997). The art of Computer Programming. Vol. 2. Addison-Wesley. pp. 195–213. ISBN 0-201-89684-2.
- ↑ Smith (September 1981). "The Prospects for Multivalued Logic: A Technology and Applications View". IEEE Transactions on Computers. C-30 (9): 619–634. Bibcode:1981ITCmp.100..619S. doi:10.1109/tc.1981.1675860. ISSN 0018-9340.
- 1 2 Jones, Douglas (April 1, 2012). "Douglas W. Jones on Ternary Computing". homepage.cs.uiowa.edu. Retrieved 2025-05-27.
- 1 2 Etiemble, D.; Israel, M. (April 1988). "Comparison of binary and multivalued ICs according to VLSI criteria". Computer. 21 (4): 28–42. Bibcode:1988Compr..21d..28E. doi:10.1109/2.49. ISSN 0018-9162.
- ↑ Nair, Ravi; Smith, Scott; Di, Jia (2015-09-11). "Delay Insensitive Ternary CMOS Logic for Secure Hardware". Journal of Low Power Electronics and Applications. 5 (3): 183–215. doi:10.3390/jlpea5030183. ISSN 2079-9268.
- ↑ Jin Yi; He Huacan; Lü Yangtian (2005). "Ternary Optical Computer Architecture". Physica Scripta. T118: 98–101. Bibcode:2005PhST..118...98Y. doi:10.1238/Physica.Topical.118a00098.
- ↑ Jin, Yi (2003). "Ternary optical computer principle". Science in China Series F: Information Sciences. 46 (2): 145–150. doi:10.1360/03yf9012 (inactive 1 July 2025). ISSN 1009-2757. S2CID 35306726.
{{cite journal}}: CS1 maint: DOI inactive as of July 2025 (link) - ↑ Morisue, M.; Endo, J.; Morooka, T.; Shimizu, N.; Sakamoto, M. (1998). "A Josephson ternary memory circuit". Proceedings. 1998 28th IEEE International Symposium on Multiple- Valued Logic (Cat. No.98CB36138). pp. 19–24. doi:10.1109/ISMVL.1998.679270. ISBN 978-0-8186-8371-8. S2CID 19998395.
- ↑ Ma, Shuming; Wang, Hongyu; Ma, Lingxiao; Wang, Lei; Wang, Wenhui; Huang, Shaohan; Dong, Li; Wang, Ruiping; Xue, Jilong; Wei, Furu (27 Feb 2024). "The Era of 1-bit LLMs: All Large Language Models are in 1.58 Bits". Computation and Language. arXiv:2402.17764.
- ↑ "IEEE Xplore Search Results". IEEE Xplore. IEEE. Archived from the original on 2024-06-17. Retrieved 2024-06-17.
- ↑ CN119652311A, 胡海林; 黄明强 & 赵广超 et al., "Ternary logic gate circuit, computing circuit, chip and electronic device", issued 2025-03-18
- ↑ Colin P. Williams (2011). Explorations in Quantum Computing. Springer. pp. 22–23. ISBN 978-1-84628-887-6.
- ↑ Heinlein, Robert (1982). "Variations on a theme III: Domestic problems". Time Enough for Love. Berkley Books. p. 99. ISBN 978-0-399-11151-8.
Further reading
[edit]- Hunger, Francis (2007). Eine Recherche über den sowjetischen Ternarcomputer [SETUN. An Inquiry into the Soviet Ternary Computer]. Institut für Buchkunst Leipzig. ISBN 978-3-932865-48-0.