TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why is binary used instead of ternary?

4 点作者 niche大约 10 年前
Is ternary not the next logical step in computing?

7 条评论

mathgeek大约 10 年前
Stack Overflow already has a great thread on this very question. <a href="http://stackoverflow.com/questions/764439/why-binary-and-not-ternary-computing" rel="nofollow">http:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;764439&#x2F;why-binary-and-not...</a>
jeffwass大约 10 年前
I think I heard this in a Unix fortune 15 years ago :<p>When engineers implement base-4 logic, will they call it quits?
kedean大约 10 年前
It&#x27;s completely possible, but it&#x27;s just not worth it. The information density of ternary is higher than binary, sure, but you now need 3 states to represent it. This applies to ternary vs base 4, and so on. As it turns out, it&#x27;s been proven that binary has the optimal ratio of info density to symbols, and any higher of a base gives you no net benefit. Unfortunately I don&#x27;t have a link to the proof on hand, but if someone else does I&#x27;d appreciate it.<p>We would also lose decades of knowledge on binary operations and how best to do it. Two&#x27;s complement is out the window, for instance.<p>Additionally, the entire CS mindset is built around boolean logic. Exclusive-or, for instance, makes no sense when you remove binary operation. There&#x27;s not much to gain from it either, since any sort of ternary operation can be implemented as a binary operation without that much overhead.
评论 #9200105 未加载
alain94040大约 10 年前
If you think in terms of voltage on a pin, how you would implement ternary? Binary is simple: 0V, or 5V (at least a long time ago...). Transitioning from one state to the other is obvious. How would you do it with ternary logic?
评论 #9198116 未加载
评论 #9198074 未加载
lazylester大约 10 年前
OK, let&#x27;s try ternary. Oh, why not go to quaternary, or quinary (I mighta made that word up), and so on. Before you know it, we&#x27;re back to analog!
niche大约 10 年前
nob: not only binary 10W &quot;1&quot; &quot;0&quot; &quot;Whatever&quot; (not to be mistaken for power measurement)<p>Could a binary computer teach itself to build ternary circuits?<p>Base(4) is effectively base~2, base_e is purportedly optimal, base`pi is compelling<p>Is 3 a concept best grasped by humans?<p>binary within ternary or ternary within binary?
victorhn大约 10 年前
log2(n) == c * log3(n)