Ternary computer

Last updated

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 uses trits, instead of binary bits.

Contents

Types of states

Ternary computing deals with three discrete states, but the ternary digits themselves can be defined differently: [1]

SystemStates
Unbalanced ternary012
Fractional unbalanced ternary0121
Balanced ternary−101
Unknown-state logicF?T
Ternary-coded binaryTFT

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. [2] The labels given to the basis vectors () can be replaced with other labels, for example those given above.

History

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.

One early calculating machine, built entirely from wood by Thomas Fowler in 1840, operated in balanced ternary. [4] [5] [3] The first modern, electronic ternary computer, Setun, was built in 1958 in the Soviet Union at the Moscow State University by Nikolay Brusentsov, [6] [7] 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. [6] In the United States, the ternary computing emulator Ternac working on a binary machine was developed in 1973. [8] :22

The ternary computer QTC-1 was developed in Canada. [9]

Balanced ternary

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. [10] Considering that digit signs are mandatory, and nonzero digits are magnitude 1 only, notation that drops the '1's and use only zero and the + − signs is more concise than if 1's are included.

Unbalanced ternary

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. [11]

Potential future applications

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. [10] One possible way this could happen is by combining an optical computer with the ternary logic system. [12] A ternary computer using fiber optics could use dark as 0 and two orthogonal polarizations of light as +1 and −1. [13]

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." [14]

Ternary computing shows promise for implementing fast large language models (LLMs) and potentially other AI applications, in lieu of floating point arithmetic. [15]

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". [16]

See also

Related Research Articles

The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented as either "1" or "0", but other representations such as true/false, yes/no, on/off, or +/ are also widely used.

<span class="mw-page-title-main">Binary-coded decimal</span> System of digitally encoding numbers

In computing and electronic systems, binary-coded decimal (BCD) is a class of binary encodings of decimal numbers where each digit is represented by a fixed number of bits, usually four or eight. Sometimes, special bit patterns are used for a sign or other indications.

<span class="mw-page-title-main">Floating-point arithmetic</span> Computer approximation for real numbers

In computing, floating-point arithmetic (FP) is arithmetic that represents subsets of real numbers using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. Numbers of this form are called floating-point numbers. For example, 12.345 is a floating-point number in base ten with five digits of precision:

<span class="mw-page-title-main">Qubit</span> Basic unit of quantum information

In quantum computing, a qubit or quantum bit is a basic unit of quantum information—the quantum version of the classic binary bit physically realized with a two-state device. A qubit is a two-state quantum-mechanical system, one of the simplest quantum systems displaying the peculiarity of quantum mechanics. Examples include the spin of the electron in which the two levels can be taken as spin up and spin down; or the polarization of a single photon in which the two spin states can also be measured as horizontal and vertical linear polarization. In a classical system, a bit would have to be in one state or the other. However, quantum mechanics allows the qubit to be in a coherent superposition of multiple states simultaneously, a property that is fundamental to quantum mechanics and quantum computing.

A ternary numeral system has three as its base. Analogous to a bit, a ternary digit is a trit. One trit is equivalent to log2 3 bits of information.

A binary number is a number expressed in the base-2 numeral system or binary numeral system, a method of mathematical expression which uses only two symbols: typically "0" (zero) and "1" (one).

In logic, a three-valued logic is any of several many-valued logic systems in which there are three truth values indicating true, false, and some third value. This is contrasted with the more commonly known bivalent logics which provide only for true and false.

<span class="mw-page-title-main">Setun</span> Soviet ternary computer

Setun was a computer developed in 1958 at Moscow State University. It was built under the leadership of Sergei Sobolev and Nikolay Brusentsov. It was the most modern ternary computer, using the balanced ternary numeral system and three-valued ternary logic instead of the two-valued binary logic prevalent in other computers.

A numerical digit or numeral is a single symbol used alone or in combinations, to represent numbers in a positional numeral system. The name "digit" comes from the fact that the ten digits of the hands correspond to the ten symbols of the common base 10 numeral system, i.e. the decimal digits.

Balanced ternary is a ternary numeral system that uses a balanced signed-digit representation of the integers in which the digits have the values −1, 0, and 1. This stands in contrast to the standard (unbalanced) ternary system, in which digits have values 0, 1 and 2. The balanced ternary system can represent all integers without using a separate minus sign; the value of the leading non-zero digit of a number has the sign of the number itself. The balanced ternary system is an example of a non-standard positional numeral system. It was used in some early computers and has also been used to solve balance puzzles.

In computing, signed number representations are required to encode negative numbers in binary number systems.

<span class="mw-page-title-main">CORDIC</span> Algorithm for computing trigonometric, hyperbolic, logarithmic and exponential functions

CORDIC, Volder's algorithm, Digit-by-digit method, Circular CORDIC, Linear CORDIC, Hyperbolic CORDIC, and Generalized Hyperbolic CORDIC, is a simple and efficient algorithm to calculate trigonometric functions, hyperbolic functions, square roots, multiplications, divisions, and exponentials and logarithms with arbitrary base, typically converging with one digit per iteration. CORDIC is therefore also an example of digit-by-digit algorithms. CORDIC and closely related methods known as pseudo-multiplication and pseudo-division or factor combining are commonly used when no hardware multiplier is available, as the only operations they require are additions, subtractions, bitshift and lookup tables. As such, they all belong to the class of shift-and-add algorithms. In computer science, CORDIC is often used to implement floating-point arithmetic when the target platform lacks hardware multiply for cost or space reasons.

A qutrit is a unit of quantum information that is realized by a 3-level quantum system, that may be in a superposition of three mutually orthogonal quantum states.

<span class="mw-page-title-main">Thomas Fowler (inventor)</span>

Thomas Fowler was an English inventor whose most notable invention was the thermosiphon which formed the basis of early hot water central heating systems. He also designed and built an early mechanical calculator.

Unconventional computing is computing by any of a wide range of new or unusual methods. It is also known as alternative computing.

A binary multiplier is an electronic circuit used in digital electronics, such as a computer, to multiply two binary numbers.

A negative base may be used to construct a non-standard positional numeral system. Like other place-value systems, each position holds multiples of the appropriate power of the system's base; but that base is negative—that is to say, the base b is equal to −r for some natural number r.

TERNAC is an emulation written in FORTRAN of a ternary computer on another binary machine, a Burroughs B1700. It was implemented in 1973 at State University of New York, Buffalo. The implementation provided both fixed-point and floating-point capability; fixed-point words were 24 trits in length and the floating-point words had 42 trits for mantissa and 6 trits for exponent.

A redundant binary representation (RBR) is a numeral system that uses more bits than needed to represent a single binary digit so that most numbers have several representations. An RBR is unlike usual binary numeral systems, including two's complement, which use a single bit for each digit. Many of an RBR's properties differ from those of regular binary representation systems. Most importantly, an RBR allows addition without using a typical carry. When compared to non-redundant representation, an RBR makes bitwise logical operation slower, but arithmetic operations are faster when a greater bit width is used. Usually, each digit has its own sign that is not necessarily the same as the sign of the number represented. When digits have signs, that RBR is also a signed-digit representation.

A comma code is a type of prefix-free code in which a comma, a particular symbol or sequence of symbols, occurs at the end of a code word and never occurs otherwise. This is an intuitive way to express arrays.

References

  1. Connelly, Jeff (2008). "Ternary Computing Testbed 3-Trit Computer Architecture" (PDF). California Polytechnic State University of San Luis Obispo.
  2. Colin P. Williams (2011). Explorations in Quantum Computing. Springer. pp. 22–23. ISBN   978-1-84628-887-6.
  3. 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.
  4. McKay, John; Vass, Pamela. "Thomas Fowler". Archived from the original on 31 May 2007.
  5. 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.
  6. 1 2 Nitusov, Alexander. "Nikolay Petrovich Brusentsov". Russian Virtual Computer Museum: Hall of Fame. Retrieved 25 January 2010.
  7. 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..
  8. 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.
  9. 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.
  10. 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..
  11. "S. Korean researchers develop world's first ternary semiconductor tech". Maeil Business Newspaper . 17 July 2019.
  12. Jin Yi; He Huacan; Lü Yangtian (2005). "Ternary Optical Computer Architecture". Physica Scripta . T118: 98. Bibcode:2005PhST..118...98Y. doi: 10.1238/Physica.Topical.118a00098 .
  13. Jin, Yi (2003). "Ternary optical computer principle". Science in China Series F. 46 (2): 145. doi:10.1360/03yf9012. ISSN   1009-2757. S2CID   35306726.
  14. 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.
  15. 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 .
  16. Heinlein, Robert A. (1982). "Variations on a Theme III: Domestic Problems". Time Enough for Love. Berkley Books. p. 99. ISBN   978-0-399-11151-8.

Further reading