Balanced ternary

Balanced ternary is a type of numbering system. It is based on base 3.

The most common numbering system in use today is base 10, or decimal. With decimal, there are ten digits. these are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9. In ternary only 0, 1 and 2 are used. Balanced ternary is similar, but instead of using 0, 1 and 2, the numbers -1, 0 and 1 are used. The letter T is used to mean -1.

As with all numbering systems, each place is equal to the number Multiplied by the system's base raised to that positions location. For example with the base 10 number 1234, the value is 1x 103 (1000) + 2 x 102 (100) + 3 x 101 (10) + 4 x 100.(1) In base 3, these same values would be 27, 9, 3 and 1.

The benefits of using balanced ternary is that it is possible to write down numbers less than zero without the need to say whether a number is positive or negative. Another benefit is that when it comes to computers, there are much fewer rounding errors.

Comparing systems

Base10TernaryBalanced
Ternary
B. ternary
expanded
1111x1
221t1x3 + -1x1
310101x3 + 0x1
411111x3 + 1x1
5121tt1x9 + -1x3 + -1x1
6201t01x9 + -1x3 + 0x1
7211t11x9 + -1x3 + 1x1
82210t1x9 + 0x3 + -1x1
91001001x9 + 0x3 + 0x1
101011011x9 + 0x3 + 1x1
a
Base10TernaryBalanced
Ternary
B. ternary
expanded
-1-1t-1x1
-2-2t1-1x3 + 1x1
-3-10t0-1x3 + 0x1
-4-11tt-1x3 + -1x1
-5-12t11-1x9 + 1x3 + 1x1
-6-20t10-1x9 + 1x3 + 0x1
-9-21t1t-1x9 + 1x3 + -1x1
-8-22t01-1x9 + 0x3 + 1x1
-9-100t00-1x9 + 0x3 + 0x1
-10-101t0t=1x9 + 0x3 + -1x1


This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.