News for hackers. Stuff that matters.
Re:Ask HN: Why is binary used instead of ternary? by mathgeek on Friday March 13, 2015 @03:13PM (#9199290)
Stack Overflow already has a great thread on this very question. http://stackoverflow.com/questions/764439/why-binary-and-not...
Re:Ask HN: Why is binary used instead of ternary? by jeffwass on Friday March 13, 2015 @01:08PM (#9198269)
I think I heard this in a Unix fortune 15 years ago :

When engineers implement base-4 logic, will they call it quits?

Re:Ask HN: Why is binary used instead of ternary? by kedean on Friday March 13, 2015 @02:20PM (#9198845)
It's completely possible, but it'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'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't have a link to the proof on hand, but if someone else does I'd appreciate it.

We would also lose decades of knowledge on binary operations and how best to do it. Two's complement is out the window, for instance.

Additionally, the entire CS mindset is built around boolean logic. Exclusive-or, for instance, makes no sense when you remove binary operation. There'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.

Re:Ask HN: Why is binary used instead of ternary? by mcshaner1 on Friday March 13, 2015 @05:15PM (#9200105)
I think the optimal base is actually the natural log e, or about 2.71. I saw a derivation of this before but can't find the reference. Ternary actually comes about a bit better from an information density standpoint, but all the other points you made about difficulties with base 3 and benefits of base 2 still stand.
Re:Ask HN: Why is binary used instead of ternary? by kedean on Saturday March 14, 2015 @01:07PM (#9203295)
Good point, 2 is the optimal integer base.
Re:Ask HN: Why is binary used instead of ternary? by alain94040 on Friday March 13, 2015 @12:10PM (#9197898)
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?
Re:Ask HN: Why is binary used instead of ternary? by niche on Friday March 13, 2015 @12:45PM (#9198116)
You could have predefined gates 0V-1V= 0 1V-2V= 1 2V-3V= 2 / -1

Do negative voltages exist?

Positive voltage, negative voltage, no voltage

Ternary allows for measurements of relativity at the pin level whereas binary is a yes/no...

Re:Ask HN: Why is binary used instead of ternary? by niche on Friday March 13, 2015 @12:39PM (#9198074)
Well there are so many options here, which make things that much more exciting. So basically: 0V, 5V, everything else

:-)

Re:Ask HN: Why is binary used instead of ternary? by lazylester on Friday March 13, 2015 @04:11PM (#9199697)
OK, let'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're back to analog!
Re:Ask HN: Why is binary used instead of ternary? by niche on Sunday March 15, 2015 @11:57AM (#9206908)
nob: not only binary 10W "1" "0" "Whatever" (not to be mistaken for power measurement)

Could a binary computer teach itself to build ternary circuits?

Base(4) is effectively base~2, base_e is purportedly optimal, base`pi is compelling

Is 3 a concept best grasped by humans?

binary within ternary or ternary within binary?

Re:Ask HN: Why is binary used instead of ternary? by victorhn on Friday March 13, 2015 @12:53PM (#9198176)
log2(n) == c * log3(n)