Why Do Computers Use the Binary Number System (0,1)? Why don't they use Ternary Number System (0,1,2) or any other number system instead? What is the gain in using Binary Numbers?
-
Because they run on electricity and that can either be on or off, that's 0 or 1. On tells the circuit to count consider 1, off tells the circuit to consider 0. All the other Number systems are computed based on a combination of binary numbers. That's the very basic principle. Different variations exist – Hanky Panky Jun 13 '14 at 05:35
-
@Hanky웃Panky: It's entirely possible to build a system that uses multiple voltage levels to represent 0, 1, or 2. I think some storage technologies commonly use 4-level representation, though I'm far from an expert on the subject. – user2357112 Jun 13 '14 at 05:40
-
Of course it is, and that's the reason I mentioned different variations exist. But that's the very basic explanation of that. One needs a lot of research to even have some understanding of those and not just a Q n A session. My comment was just an appetizer, not the main course – Hanky Panky Jun 13 '14 at 05:41
-
I am tempted to assert it is a *result/consequence* of [(two-state) Transistors](http://en.wikipedia.org/wiki/Transistor) which are "*the* fundamental building block of modern electronic devices". If transistors inherently worked on/by a tri-state system, I would not be surprised to see a ternary base used widely .. – user2864740 Jun 13 '14 at 06:02
-
I have read quantum computing will keep 0,1 and other state, I am not a expert on this subject but better read it. It says" A quantum computer, on the other hand, would store information as either a 1, 0, or a quantum superposition of the two states. Such a "quantum bit," called a qubit, allows for far greater flexibility than the binary system." http://physics.about.com/od/quantumphysics/f/quantumcomp.htm – jayalalk Jun 13 '14 at 06:22
-
possible duplicate of [Why do computers work in binary?](http://stackoverflow.com/questions/5165013/why-do-computers-work-in-binary) – B.K. Jun 13 '14 at 06:29
-
...and another: http://stackoverflow.com/questions/764439/why-binary-and-not-ternary-computing – B.K. Jun 13 '14 at 06:30
-
Note that computers using a base other than 2 have existed: for instance, see http://en.wikipedia.org/wiki/Setun – jub0bs Nov 28 '14 at 15:51
4 Answers
This is a classic example of software thinking in a hardware world :)
Oh my. Am I the only one who remembers vacuum tubes, or valves as we used to call them? Logic DIDN'T start with transistors, friends. The first computer (ENIAC) used lots of tubes, diodes and relays.
As has been mentioned, the usage of the binary system in modern computers relates to electrical states and logic. If you will recall, TTL (Transistor-Transistor Logic) advanced computing significantly (making it orders of magnitude faster, cheaper and more reliable to create memory and logic circuits) TTL devices are made up of electronic semi-conducting material (Silicon) which when assembled and configured as a transistor, can be made to either amplify a signal or act as a gated switch.
You can arrange large arrays of these TTL circuits to "store" states. We can go on, but suffice to say the reason for BINARY being around is the same then as it is today.
Numbers are represented by bits, those bits are discrete electrical lines with the state logic of TRUE/FALSE, which is mapped directly to the electrical representations of ON/OFF.
This is the only reliable and economic hardware architecture that makes sense. Ones (1's) and Zero's (0's) rule the world because they are the most granular, reliable and cost effective circuits to produce.

- 388
- 5
- 14
Using binary system is the cheapest for building the hardware. There is 0V or vdd - nothing else. An inverter needs only 2 transistors and has the best speed/current ratio you can get. If you try multi level you will need window comparators that require typically 4 transistors per level (and N-1 reference voltages) and that are much slower than a simple inverter. Way too expensive for simple logic! Multi level only makes sense for slow memories (you reduce the number of memory cells but you have to sacrifice speed in the read amplifiers. This is one reason why non volatile memories are slower than RAM)

- 87
- 6
-
And those voltage levels would have to be separated by a volt or so if you want to design gates with low leakage when not switching, still forcing transistors fully on or fully off. Modern CMOS logic is quite low power when not switching, only leakage. It's fairly necessary to preserve that attribute to reach the logic densities we have on current CPUs without melting; power density is already a limiting factor. See the [power wall section in this nice article](http://www.lighterra.com/papers/modernmicroprocessors/). – Peter Cordes Oct 06 '21 at 02:42
-
And with power scaling with V^2 (because the loads are basically capacitive, so more charge x more energy per charge), running at 3V instead of [near threshold around 1V](https://www.realworldtech.com/near-threshold-voltage/) would mean 9x the power for switching from 0 to 3V or vice versa. Less for the smaller transitions e.g. between 1V and 2V. – Peter Cordes Oct 06 '21 at 02:45
-
1You could further reduce voltage swing using current mode logic. 100mV pp is feasible. But you trade AC performance against DC current consumption. So CML (current mode logic) only has a sweet spot between 5GHz and 50GHz. – Ricardo Erckert Oct 06 '21 at 20:59
-
Interesting. But that tradeoff / sweet spot is assuming the gate is actually switching every cycle, right? To not melt, modern CPUs need a decent percentage of their logic to be "[dark](https://en.wikipedia.org/wiki/Dark_silicon)" at any given time, like SRAM or unused execution units. I guess if you can power-gate your CML logic blocks (not just stop the clock), that could work if you can tolerate whatever latency they need to settle after re-applying power. – Peter Cordes Oct 06 '21 at 21:18
-
That's correct. A typical application of such high speed CML is using them as dividers for frequency measurements etc. – Ricardo Erckert Oct 06 '21 at 21:23
Computers are made to process data in the various form such as image,file,words,numbers,audio,video etc. These are handeled by tiny transisters which are highly sensitive to the very small current supply.They just switch on and off. By using these switches binary numbers come in to play a role.If the switch is on it is represented by 1 otherwise it is represented by zero.If computer use these 1 and zeros then we need to use these tiny transisters.There are many tiny transisters in the computer which are less expensive than other types of transisters. So it is best options to use 1 and zeros(binary)and handled by the tiny transisters in the form of switch on(1) and switch off(0) form.

- 1
- 1
Is it not the question of gain. It is the amount of research and development and of course the capital that would be required to bring out a product that matters. The current binary system is a result of decades of evolution. Unless it is for some high-end research and and in-house development, nobody would be interested to use it at least in this decade.

- 13
- 1