|
|
|
|
|
Balanced TernaryBalanced Ternary (aka "Signary") is a method of numeric representation which expands on binary and is similar to trinary. It is based on the principle of trivalent logic and uses three distinct atomic values: +1 (logical true), 0 (logical unknown) and -1 (logical false). Note that false is represented here by -1, instead of 0 (zero) as with binary. Using signary as a means of data representation offers a number of advantages over other methods. For example, integer negation becomes a simpler process, merely requiring a logical inversion instead of the twos-compliment routine required by binary. Additionally, the concept of an unknown logic value provides a new dimension to logic operations. Notation There are several different methods of notation: | Logic Value | Numeric Value | Method 1 | Method 2 | | true | +1 | + | 1 | | unknown | 0 | 0 | 0 | | false | -1 | - | 1 | For the purposes of this article, method 1 will be used. Integer Representation Integers can be represented using a similar method to binary. Unlike binary, however, negative numbers can use the same method and do not vary depending on the length of the data storage unit. The following table shows representations of all values from decimal -13 to decimal +13: | Decimal | Signary | Decimal | Signary | Decimal | Signary | | -13 | --- | -4 | -- | 5 | +-- | | -12 | --0 | -3 | -0 | 6 | +-0 | | -11 | --+ | -2 | -+ | 7 | +-+ | | -10 | -0- | -1 | - | 8 | +0- | | -9 | -00 | 0 | 0 | 9 | +00 | | -8 | -0+ | 1 | + | 10 | +0+ | | -7 | -+- | 2 | +- | 11 | ++- | | -6 | -+0 | 3 | +0 | 12 | ++0 | | -5 | -++ | 4 | ++ | 13 | +++ | Similarly to binary, the numeric value of each signary sequence can be determined from the sum of n x 3p for each digit, where n is the numeric value of the digit and p is the position of the digit (p = 0 for the least significant digit, p = 1 for the next least significant digit, etc). For example: | Multiplier | 34 | 33 | 32 | 31 | 30 | | Digit | + | - | + | - | 0 | | Value | +81 | -27 | +9 | -3 | 0 | = 60 | Also, it can be seen that negation requires a simple logical inversion, e.g. -11 = --+, +11 = ++-.
|  | altshausen air niagara free minded democratic league drzymala car liberal union (netherlands) radical league heads of government of krajina ravensburg thomas dowse edge of darkness zlatograd
| freedom party (netherlands) kami's lookout cliffe at hoo fusion saga kay cottee widecombe in the moor burned in address cradle board spaceshipone flight 17p botevgrad michael wearing
| kujukuri, chiba naruto, chiba sanbu, chiba hasunuma, chiba torrey canyon matsuo, chiba crumb (film) yokoshiba, chiba gabrovo shibayama, chiba sanbu district, chiba
| internet security in the mouth of the crocodile live in seattle mutsuzawa, chiba dravinja chosei, chiba shirako, chiba nagara, chiba mount seir chonan, chiba chosei district, chiba cardiff blues
|
|
 |
|
| Copyright 2005-2009 OnPedia.com. All Rights Reserved |
|
|