Thursday, August 31, 2006

Development of ternary computers at Moscow State University


by Brousentsov N. P., Maslov S. P., Ramil Alvarez J., Zhogolev E.A.

It is known that the ternary arithmetic has essential advantages as compared with the binary one that is used in present-day computers. In connection with this Donald Knuth assumed that the replacement of "flip-flop" for "flip-flap-flop" one a "good" day will nevertheless happen. Now, when the binary computers predominate, it is hard to believe in a reality of such assumption, but if it would happen not only the computer arithmetic, but the informatics on the whole would become most simple and most perfect. The third value (Aristotle named it snmbebhkoV – attendant) what is very actual but hidden in binary logic, will become obvious and direct manipulated. Ternary logic has better accordance with the Nature and human informal thinking. Unfortunately, the modern researches of the multivalued (non-binary) logic are formal and are not associated with practical requests.

A remarkable exclusion is the experience of creating the ternary computers "Setun" and "Setun 70" at Moscow State University. This experience convincingly confirms practical preferences of ternary digital technique.

The design of small digital machine "Setun" (Setun is the little river which flows into the river "Moscow" near the University) was initiated by member of the academy of Sciences S. L. Sobolev at 1956. It was assumed to create small, inexpensive computer, simple in use and service for schools, research laboratories, design offices and for manufacture control. For such goal at the computer center of the University there was formed a group of young men (4 MS and 5 BA). The joint seminar for engineers and programmers was organized and S. L. Sobolev, K. A. Semendjev, M. R. Shura-Bura, I. S. Berezin were its permanent participants. The problems of optimization of computer architecture and technical realization were examined and the variants of future computer were discussed.

Due to the low reliability of the computer elements on vacuum tubes and inaccessibility of transistors the fast elements on miniature ferrite cores and semiconductor diodes were designed. These elements work as a controlled current transformer and were an effective base for implementation of the threshold logic and its ternary version in particular [7]. Ternary threshold logic elements as compared with the binary ones provide more speed and reliability, require less equipment and power. These were reasons to design a ternary computer.

"Setun" is a sequential computer containing the fast multiplier, thanks to the speed of operation as in parallel devices is achieved. The small (3 pages of 54 words) ferrite RAM that has page exchange with the main magnetic drum memory works as a cash.

"Setun" has an one-address architecture with one index-register. The contents of it, in dependence of value (+,0,-) of address modification trit, may be added to or subtracted from the address part of instruction. The instruction set consists only of 24 instructions including performing mantissa normalization for floating-point calculation, shift, combined multiplication and addition. Three instructions are reserved but have never been used because of the lack of necessity.

Simplicity, economy and elegance of computer architecture are the direct and practically very important consequence of the ternarity, more exactly – of representation of data and instructions by symmetrical (balanced) code, i.e. by code with digits 0, +1, -1. In opposite to binary code there is no difference between "signed" and "unsigned" number. As a result the amount of conditional instructions is decrease twice and it is possible to use them more easily; the arithmetic operations allow free variation of the length of operands and may be executed with different lengths; the ideal rounding is achieved simply by truncation, i.e. the truncation coincides with the rounding and there is the best approximation the rounding number by rounded.

The experience of creating, programming and application of "Setun" unambiguously confirmed the significant preferences of ternarity. In spite of the fact that the designers of the first were very young and the group was small, the specimen of "Setun" was ready in Dec. 1958, i.e. in two years since the beginning. "Setun" worked correctly at once without even debugging and began to execute the existing programs. At 1960 it was sufficient amount of programs and it was possible to present "Setun" for the official testing.

Such testing was passed in Apr. 1960 very successfully. The computer demonstrated unusual for that times reliability and stability of operation in wide range of ambient temperature and supply voltage. It was found that the computer is rather simple both in manufacturing and in service, suitable for wide range of applications. "Setun" was recommended for production.

Unfortunately the officials of the computer production in the USSR had negative position about non-planned and unusual "fruit of university fantasy". Instead of supporting the innovation and taking a possible profit they permanently attempted to annihilate "ugly duckling". There were many orders of "Setun", including ones for export, but only 10-15 computers were produced annually and none of them was exported aboard. The planned manufacture of "Setun" in Czechoslovakia was also broken. At 1965 the manufacturing of "Setun" was stopped in spite of unsatisfied requests. It was replaced by a binary computer of the same performance but more than 2.5 times more expensive.

In total there were produced 50 computers (including the specimens). The 30 ones were installed at universities and colleges, the rest – at research laboratories and plants. Geographically "Setun" were scattered all over the country – from Kaliningrad to Jakutsk and from Ashkhabad to Novosibirsk.

It was found that ternary computer is very favorable for seizing and application. Simplicity of programming in codes (it was decided not to make an assembler) permitted to design a few interpreters mostly in Polish inverse (postfix) notation. On such base it was possible to program the different tasks from engineering calculations and experimental results processing to manufacturing control and computer education.

On the base of "Setun’s" positive experience it was designed and exhaustively determined in Algol-like programming language the architecture of other ternary computer. This computer named "Setun 70" was introduced in 1970. In "Setun 70" the peculiarities of ternarity are embodied with more understanding and completeness: the ternary format for symbols encoding – "tryte" (analog of binary byte) consisting of 6 trits (~9.5 bits) is established; the instruction set is updated of auxiliary ternary logic and control instructions; arithmetic instructions now allow more variation of operand length – 1, 2 and 3 trytes and length of result may be up to 6 trytes.

The possibility to vary the length of the word-operands is expanded to the word-instructions. More exactly, in "Setun 70" the traditional conception of computer instruction as a word does not exists. The program is a sequence of tryte-operations and tryte-addresses. The executed combinations of such trytes may be interpreted as virtual instructions. But there is no necessity for a programmer to think about this – he (she) constructs postfix expressions directly from the operands and operations by similar way as it is made in mathematics.

"Setun 70" is a two-stack computer. Stack of operands is the evolution of accumulator of one-address "Setun". The return stack is the base of an automata that controls the nesting of subprograms. The simple improvement of such mechanism permits to transform "Setun 70" into some computer for the proposed Dijkstra E.W. structured programming.

An adequate realization of Dijkstra ideas named the "procedure programming", wholly proved his hopes about radical improvement of programming (the goal not achieved in "structured revolution"). Construction and modificatin of the programs on "procedure programming computer" became more easily (in 3-5 times) and the perfect correctness has been achieved.

However "Setun 70" was the last "ternac". After it the research was stopped. In "Setun 70" it was implemented the CAI system "Nastavnik", the binary versions of which are the perfect example of effective realization of computer didactic up to now. The "procedure programming" was transformed into the Dialogue System of Structured Programming (DSSP). DSSP as a matter of fact emulates "Setun 70" architecture on binary computers: thus it fulfills the advantages of "procedure programming". DSSP exists and evolves, on its base there is originated a high-level "construct programming" that allows in particular to realize the very simple and effective dialogue system of Boolean algebra.

Wednesday, August 23, 2006

10 Smallest Cell Phones

Sony Ericsson j220a

Other than Small and Lightweight, the Sony Ericsson j220a has these key features:
- Dimensions: 4 x 1.7 x .7 inches
- Weight : 2.9 oz
- Technology : GSM
- Band : Dual band "GSM 850" "GSM 1900"
- Predictive text input
- Games


Motorola V190
Appart from Small and Lightweight, the Motorola V190 also boasts:

- Dimensions: 3.37" x 1.81" x 0.91"
- Weight : 3.46 oz
- Technology : GSM
- Band : Multiband 800, 900, 1800, 1900
- Phone book numbers : 500
- Predictive text input

Nokia 6061
Appart from Small and Lightweight, the Nokia 6061 also boasts:

- Dimensions: 5.04 x 6.3 x 0 inches
- Weight : 3.25 ounces
- Technology : GSM,GPRS
- Band : 850,1900
- Phone book numbers : 500
- Predictive text input : predictive text input

Samsung a860
Appart from Small and Lightweight, the Samsung a860 also boasts:

- Dimensions: 3.30" x 1.80" x 0.90"
- Weight : 3.40 ounces
- Camera: camera
- Technology : CDMA
- Band : 850,1900
- Phone book numbers : 300

Nokia 6030
Appart from Small and Lightweight, the Nokia 6030 also boasts:

- Dimensions: 4.09 x 1.73 x 0.71 inches
- Weight : 3.17 ounces
- Technology : GSM,GPRS
- Band : 850,1900
- Phone book numbers : 500
- Predictive text input : T9

Nokia 2125i
Other than Small and Lightweight, the Nokia 2125i also boasts:

- Dimensions: 4.03 x 1.66 x 0.85 inches
- Weight : 2.9 ounces
- Technology : CDMA
- Band : 1900,800
- Phone book numbers : Variable
- Predictive text input : T9

Motorola C155
Appart from Small and Lightweight, the Motorola C155 also boasts:

- Dimensions: 4.09 x 1.93 x .94 inches
- Weight : 2.82 ounces
- Technology : GSM,GPRS
- Band : 850,1900
- Phone book numbers : Variable
- Predictive text input : iTap

Kyocera Slider V5
Appart from Small and Lightweight, the Kyocera Slider V5 also boasts:

- Dimensions: 3.48 closed x 1.89 x .90 inches
- Weight : 3.39 oz.
- Technology : CDMA
- Voice dialing numbers
- Voice note : 2 minutes
- Languages

LG MM-535
Appart from Small and Lightweight, the LG MM-535 has these key features:

- Dimensions: 3.93" x 1.89" x .98"
- Weight : 3.88 oz
- Camera: camera
- Technology : CDMA
- Band : Tri-Mode
- Phone book numbers : 500

LG 5400
Appart from Small and Lightweight, the LG 5400 also has:

- Dimensions: 3.5 x 1.9 x 1.0 inches
- Weight : 3.7 oz
- Camera: camera
- Technology : CDMA
- Band : 800/1900
- Phone book numbers : 200

Thursday, August 17, 2006

Nokia 6230i Bluetooth Mouse


Some guy saw an article on a USB Optical mouse that had been modded to include a Nokia Colour LCD Screen. This got him thinking, The screen was quite usefull but why go to all the effort of modding a mouse, why not use the whole Nokia?

FEATURES -
Bluetooth connection, no cable
Standard Java code, simple to port to other phones
Selectable buttons on phone for mouse buttons
Normal or Flipped orientation for phone (right way or upside down)
Uses existing Nokia Sync software to transfer data

IN DEVELOPMENT -
Standard Bluetooth mouse HID for no driver install!
Mouse over GPRS for PCs with net but no bluetooth
Display PC screen on Nokia phone


Many laptop owners carry a spare mouse because they dont like the built in control, or because they just like to use a mouse. This adds weight, things to remember etc when you go anywhere. Also, if you use somebody elses laptop you may not be able to use their pad at all! I often setup software for somebody else on a laptop and curse the wigglestick on the keyboard that they fumble on with because they are that slow anyway but it holds me up. If I had a mouse with me at all times that would be amazing. So, the NokiaMouse was born. Most phones now have a camera and can run Java, there is no reason that some software couldnt be written to watch for movement in the camera, and translate that into mouse signals for the PC. Bluetooth could be used to send the data to the PC.
So there was my challenge, a java program that took multiple frames from the nokia camera, translated that into direction and speed and sent it to the PC as mouse movements.

I dont intend to release this code as im trying to develop the Bluetooth HID before any kind of release, but it means any laptop owner need not carry a spare mouse or use the crappy touchpad!

Things didnt go entirely smoothly of course. The first thing everybody is probably saying is, but the camera only shows black when its flat on the mousepad! You are of course right, Light is needed. My temporary solution is to hold the phone about .6cm above the pad, letting light in the side. My camera picks up enough to see at this distance.

The initial code didnt use bluetooth, but a usb cable to the phone as I wasnt sure about accessing the bluetooth interface directly in java or how to make a real BT Mouse HID so it would pair as if it was a mouse. For now custom driver code runs on the PC and the phone, and data is sent over a usb lead.

After giving up on the idea of a proper mouse HID I used the bluetooth to just link the phone as normal and send the data over the Nokia driver to a special driver on the PC again, this isnt as convenient as the original plan as it needs software on the PC as well as the phone, if I can be bothered ill develop a proper HID mouse bluetooth driver for the nokia, this would mean that it could be used on ANY bluetooth pc without installing software!

A lot of thought went into the interface. Originaly the phone was the right way up with the screen at the top, but this put the buttons at the bottom! Not a good shape for a mouse. So, the phone was inverted with the screen where your palm would rest. This makes the keypad available for buttons. Not surprisingly I used three buttons, Star, Zero and Hash (pound for US'ites). Originally I intended to make the volume up/down on the side into a scroll wheel but it seems that its just not positioned right when the phone is upside down, and I decided that left right buttons were more important than scroll wheel.

The pattern is important. A nokia camera is no where near as good as a proper optical mouse detector and needs a good pattern to look at. Something with high contrast pattern that isnt too fine because,
Focus! At this distance the focus is wrong because its too close. You can artificialy sharpen the image, but something with clean edges and well defined patterns works better than the grain on your wooden desk or a one colour mouse pad.

Selectable buttons! You can now choose what buttons do what. This makes it easy to configure to your liking.
Flip-ably X/Y axis! The phone will now work either way up.
Bluetooth is now working over the Nokia PC kit

This software is only tested working on my nokia at the moment, I hope to make it work with almost any phone with both java and camera, but of course the camera interface is different on other devices...

original site of Bluetooth Mouse Project

Wednesday, August 16, 2006

Test

Test