Trinarna logika i Setun, ruski trinarni kompjuter

Balanced ternary



Balanced ternary is a ternary numeral system (i.e. base 3 with three digits) that uses a balanced signed-digit representationof 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[1] and has also been used to solve balance puzzles.[2]
Different sources use different glyphs to represent the three digits in balanced ternary. In this article, T (which resembles a ligature of the minus sign and 1) represents −1, while 0 and 1 represent themselves. Other conventions include using '−' and '+' to represent −1 and 1 respectively, or using Greek letter theta (Θ), which resembles a minus sign in a circle, to represent −1. In publications about the Setun computer, −1 is represented as overturned 1: "1".[1]

Balanced ternary makes an early appearance in Michael Stifel's book Arithmetica Integra(1544).[3] It also occurs in the works of Johannes Kepler and Léon Lalanne. Related signed-digit schemes in other bases have been discussed by John Colson, John Leslie, Augustin-Louis Cauchy, and possibly even the ancient Indian Vedas.[2]

https://en.wikipedia.org/wiki/Balanced_ternary
 
Komplikacije su više nego očigledne, nema operacija sa bitovima, najmanja jedinica informacije u trinarnoj logici je (naravno) trit, jedan trit je ekvivalent 1.58496 bita (binarne) informacije.

Ternary numeral system​


A ternary /ˈtɜːrnəri/ numeral system (also called base 3 or trinary[1]) has three as its base. Analogous to a bit, a ternary digit is a trit (trinary digit). One trit is equivalent to log2 3 (about 1.58496) bits of information.

Although ternary most often refers to a system in which the three digits are all non–negative numbers; specifically 0, 1, and 2, the adjective also lends its name to the balanced ternary system; comprising the digits −1, 0 and +1, used in comparison logic and ternary computers.

https://en.wikipedia.org/wiki/Ternary_numeral_system
 
Poslednja izmena:
Trinarna tablica množenja:

Representations of integer numbers in ternary do not get uncomfortably lengthy as quickly as in binary. For example, decimal 365(10) or senary 1405(6) corresponds to binary 101101101(2) (nine bits) and to ternary 111112(3) (six digits). However, they are still far less compact than the corresponding representations in bases such as decimal – see below for a compact way to codify ternary using nonary (base 9) and septemvigesimal (base 27).
A ternary multiplication table

×12101112202122100
112101112202122100
22112022101110112121200
1010201001101202002102201,000
1111221101212022201,0011,0121,100
12121011202022211,0101,0221,1111,200
20201102002201,0101,1001,1201,2102,000
21211122101,0011,0221,1201,2112,0022,100
22221212201,0121,1111,2102,0022,1012,200
1001002001,0001,1001,2002,0002,1002,20010,000
 

THE SETUN COMPUTER​

December 29, 2014
Last week I gave a talk at QEC Zurich, for which I had decided to speak about the potential of quantum computers built from d-level quantum systems. When preparing for the talk I discovered that not all conventional computers have used binary logic. In 1958, the first Setun computer was built at Moscow State University using ternary, or 3 state, logic. I was fascinated by this curiosity of computing, and so decided to kick off my talk with a brief mention of it. Here I’ll say a bit more about it, but really I want to invite any knowledgeable readers to tell me more about Setun! I’ve found some sources in English, but the vast majority of the literature is in Russian.

B6A6D761-4286-4992-98ED-A98499100FEE.jpeg
Снимок Сетунь“. Licensed under Public Domain via Wikimedia Commons.

Above is Setun’s exterior. Under the hood, it represented numbers in balanced ternary logic. Each possible value is best labelled as 0,1 or -1. Given a string of such numbers
\{ a_{n}, a_{n-1},\ldots,a_2, a_1 \}
,
they would represent a number
x = \sum_{k=1}^n 3^k a_k
.
For example, the numbers from -5 to 5 are represented as
\begin{array}{r|rcccl}  x & \{&a_2,& a_1,& a_0 &\} \\ \hline \hline  -5 & \{&-1,& 1,&1 &\} \\  -4 & \{&0,& -1,&-1 &\} \\  -3 & \{&0,& -1,& 0 &\} \\  -2 & \{&0,& -1,& 1 &\} \\  -1 & \{&0,& 0,&-1 &\} \\  0 & \{&0,& 0,& 0 &\} \\  1 & \{&0,& 0,&1 &\} \\  2 & \{&0,& 1,& -1 &\} \\  3 & \{&0,& 1,& 0 &\} \\  4 & \{&0,& 1,& 1 &\} \\  5 & \{&1,& -1,& -1 &\} \\  \end{array}
.
Unlike in binary, negative numbers are naturally captured by this system without an ad hoc prefix for the sign. Many basic arithmetical operations are particularly simple. Rounding of a number to leading significant figures can be achieved by just truncating a sequence, whereas binary rounding potentially depends on the whole sequence of bits. In The Art of Computing, Donald Knuth gives a fantastic survey of different number systems, and was so enamored with balanced ternary that he said it is “perhaps the prettiest number system”.

The development of Setun was lead by Sergei Sobolev and Nikolay Brusentsov. Sobolev was a mathematician of considerable renown and influence within the Soveit union who was in the 1950s the head of computational mathematics in Moscow State University. Brusentsov was a younger engineer keen to get his teeth into modern computing, and recalling his first meeting with Sobolev said,

When I first came to Sergei Sobolev’s office, it seemed as if I was enveloped in sunlight – his face looked that kind and open. We hit it off immediately and I will be forever grateful to providence for leading me to this remarkable man, a bright mathematician and knowledgeable scientist, one of the first people who understood the significance of computers.
Together they conceived built a research team and conceived the initial design. Though Sobolev was pivotal in getting the project of the ground, Brusentsov stayed committed to Setun as Sobolev’s attention became diverted. Brunsentov recalled,

Sobolev was the heart and soul of this project. Unfortunately, his participation in our creative work ended in the early 1960s when he moved to Novosibirsk. All of his later involvement revolved around perpetual fighting with bureaucrats for the right to do the work we believed in.

Whereas, it seems Setun really became Brusentsov’s life long passion. Later in life he continued to write papers on Setun and ternary computing, until he passed away just several weeks ago.

E6362503-545A-43C9-8D84-B6D6DC214747.webp
Nikolay Brusentsov
7 February 1925 – 4 December 2014


The decision to work in ternary came earlier, and it is claimed the elegance of the number system allowed them to achieve the equivalent computing power with fewer components. At the time, transistors were not yet available and vacuum tubes were too large for a compact computer. Therefore, the decision was made to build it using magnetic cores and diodes. The first Setun was a success and they went on to built 50 such machines. However, it was always a university project, not fully endorsed by the Soviet government, and viewed suspiciously by factory management. Despite requests from abroad for Setuns to be exported, the orders were not met. Against these obstacles the Setun fizzled out, and Brusentsov’s group was moved to offices in a hostel! At least, this is the picture painted by the few sources I’ve found and read. The story is of a ingenious computing architecture that was simply the Betamax of its time. The accuracy of this narrative is hard to judge. I suppose the interesting question is how a modern ternary computer would compete or even excel against its binary contemporaries. Or even, how a quantum computer would fare by going beyond the conventional qubit paradigm.

sources:
Malinovsky, Pioneers of Soviet Computing
Russian Virtual Computer Musuem
Donald Knuth, The Art of Computing


https://earltcampbell.com/2014/12/29/the-setun-computer/
 

Back
Top