Ternary vs Binary: Difference between revisions
No edit summary |
No edit summary |
||
(11 intermediate revisions by the same user not shown) | |||
Line 35: | Line 35: | ||
<hr /> | <hr /> | ||
<table style="table-layout: fixed; width: 100%;"> | |||
<table style="table-layout: fixed; width: 100%; font-size: 0.7cm;"> | |||
<tr> | <tr> | ||
< | <th colspan="3">Power of 3</th> | ||
<th></th> | |||
<th colspan="2">Power of 2</th> | |||
</tr> | |||
<tr> | |||
<td>3<sup>0</sup></td> | |||
<td>1</td> | |||
<td>?</td> | |||
<td></td> | |||
<td>1</td> | |||
<td>2<sup>0</sup></td> | |||
</tr> | |||
<tr> | |||
<td>3<sup>1</sup></td> | |||
</td> | <td>3</td> | ||
<td> | <td>±1</td> | ||
<td></td> | |||
<td>2</td> | |||
<td>2<sup>1</sup></td> | |||
</tr> | |||
<tr> | |||
<td>3<sup>2</sup></td> | |||
<td>9</td> | |||
<td>±4</td> | |||
<td></td> | |||
<td>4</td> | |||
<td>2<sup>2</sup></td> | |||
</tr> | |||
<tr> | |||
</td> | <td>3<sup>3</sup></td> | ||
<td>27</td> | |||
<td>±13</td> | |||
<td></td> | |||
<td>8</td> | |||
<td>2<sup>3</sup></td> | |||
</tr> | |||
<tr> | |||
<td>3<sup>4</sup></td> | |||
<td>81</td> | |||
<td>±40</td> | |||
<td></td> | |||
<td>16</td> | |||
<td>2<sup>4</sup></td> | |||
</tr> | |||
<tr> | |||
<td>3<sup>5</sup></td> | |||
<td>243</td> | |||
<td>±121</td> | |||
<td></td> | |||
<td>32</td> | |||
<td>2<sup>5</sup></td> | |||
</tr> | |||
<tr> | |||
<td style="background-color: lime;">3<sup>6</sup></td> | |||
<td style="background-color: lime;">729</td> | |||
<td style="background-color: lime;">±364</td> | |||
<td></td> | |||
<td>64</td> | |||
<td>2<sup>6</sup></td> | |||
</tr> | |||
<tr> | |||
<td>3<sup>7</sup></td> | |||
<td>2187</td> | |||
<td>±1093</td> | |||
<td></td> | |||
<td>128</td> | |||
<td>2<sup>7</sup></td> | |||
</tr> | |||
<tr> | |||
<td>3<sup>8</sup></td> | |||
<td>6561</td> | |||
<td>±3280</td> | |||
<td></td> | |||
<td>256</td> | |||
<td>2<sup>8</sup></td> | |||
</tr> | |||
<tr> | |||
<td>3<sup>9</sup></td> | |||
<td>19683</td> | |||
<td>±9841</td> | |||
<td></td> | |||
<td>512</td> | |||
<td>2<sup>9</sup></td> | |||
</tr> | |||
<tr> | |||
<td>3<sup>10</sup></td> | |||
<td>59049</td> | |||
<td>±29524</td> | |||
<td></td> | |||
<td style="background-color: lime;">1024</td> | |||
<td style="background-color: lime;">2<sup>10</sup></td> | |||
</tr> | |||
<tr> | |||
<td>3<sup>11</sup></td> | |||
<td>177147</td> | |||
<td>±88573</td> | |||
<td></td> | |||
<td>2048</td> | |||
<td>2<sup>11</sup></td> | |||
</tr> | |||
<tr> | |||
<td>3<sup>12</sup></td> | |||
<td>531441</td> | |||
<td>±265720</td> | |||
<td></td> | |||
<td>4096</td> | |||
<td>2<sup>12</sup></td> | |||
</tr> | </tr> | ||
</table> | </table> | ||
* [[Magic Number]] | |||
</div> | </div> |
Latest revision as of 17:43, 12 March 2025
Binary is flat out the better easier cheaper option for computing due to the very nature of how transistors work and current fabrication technology. However it does not mean we can't still explore ternary computer design.
Maybe in the future someone will discover a semiconductor or material/atomic science electrical switch that supports three states as intrinsically as transistors and binary.
Balanced ternary is almost 'pretty'. It handles negatives naturally without numbers compliment. Unsigned ternary requires messy 3s compliment addition to handle negative numbers and subtraction. Just like 2s compliments with binary. Unsigned ternary may have faster adder logic than balanced but the added complexity of 3s compliment does not seem like a good tradeoff.
Balanced Ternary | Binary | Unsigned Ternary |
---|---|---|
Negative, Zero, Positive | Zero One | Zero, One, Two |
- 0 + | 0 1 | 0 1 2 |
Natural Negatives | Two's Complement | Three's Complement |
Power of 3 | Power of 2 | ||||
---|---|---|---|---|---|
30 | 1 | ? | 1 | 20 | |
31 | 3 | ±1 | 2 | 21 | |
32 | 9 | ±4 | 4 | 22 | |
33 | 27 | ±13 | 8 | 23 | |
34 | 81 | ±40 | 16 | 24 | |
35 | 243 | ±121 | 32 | 25 | |
36 | 729 | ±364 | 64 | 26 | |
37 | 2187 | ±1093 | 128 | 27 | |
38 | 6561 | ±3280 | 256 | 28 | |
39 | 19683 | ±9841 | 512 | 29 | |
310 | 59049 | ±29524 | 1024 | 210 | |
311 | 177147 | ±88573 | 2048 | 211 | |
312 | 531441 | ±265720 | 4096 | 212 |