Computers represent values as voltages. However, voltages aren’t just on or off but can assume a value across a continuous range.
So what we call ‘1’ is actually a range towards the top end of the voltage spectrum and what we call ‘0’ is a range towards the bottom end. In between is a no-man’s-land that represents an indeterminate value.
If we wanted to have three values on that same range, we’d need two such indeterminate zones. If we wanted four, we’d need three such indeterminate zones.
There’s also another consideration: we want the difference between maximum and minimum voltage to be as small as possible. The larger the range, the longer it takes to switch between voltages – and that means our clock speed is lower.
So in the simplest sense, two value logic is the most efficient use of that voltage space. The more values you add, the more of those indeterminate zones you need (and the more voltage range you waste).
However, that’s not necessarily the whole story. If we can fit a lot of different values in our voltage range, we can save a lot of space/heat in our design.
There *is* a way to do this but it requires we make some sacrifices.
First, we have to sacrifice consistent clocking. On a binary line, everything is clocked at the same rate. On a line with more than two states, we want to clock the line based on the distance of the state change. On a 8-value line, we would want to make the clock timing for ‘0’ to ‘8’ much longer than the clock timing for ‘3’ to ‘4’.
Second, we need to ensure that the probability of adjacent transitions is much higher than further transitions.
So imagine we have an 8-value line where we always only do adjacent transitions. This can replace 3 binary lines at the same clock rate with only slightly less efficiency than a single binary line.
As you might suspect, building a general purpose computer to work like this is not trivial.
We CAN! and we have. [Ternary Computers](https://en.wikipedia.org/wiki/Ternary_computer) have been made. I had a professor who was tasked with using one once. They asked basic questions like “Where’s the math operators like 2 to the power of X or the sine of 90 degrees?” and the answer was “well you get to make those”. Turns out that was a hellish amount of work. Imagine just re-doing all the work that has been done in Computer Science over the last 70 years by all the professors and engineers in the world.
We kind of can, and do.
Initially 0s and 1s are used because we can say “0 is when voltage is between 0 and 2V, 1 is when voltage is between 3 and 5V, anything inbetween is undefined and should be ignored”.
NAND cells used for SSDs are now using more levels, so we can store more data in the same number of cells.
The S in SLC means single. It can do 0 and 1.
The M in MLC means multiple, but by convention it uses dual. It can store two bits, so 4 values.
Then there is TLC (triple) and QLC(quad), that can store 3 bits (8 values), and 4 bits (16 values).
Because of rounding errors.
A 0 or a 1 is actually a specific analog voltage, usually something like 0V or 1.2V. This means that there’s a grey area around 0.6V where the computer doesn’t know if it’s a 0 or a 1. If your computer chip creates this grey area, then the whole computer will stop functioning.
If you add a 2 or a 3, then you add more grey areas and the chance of your computer malfunctioning increases exponentially.
However, storage chips these days do indeed use more ‘numbers’, infact they can go all the way from 0-15 (QLC). This is because storage inherently has billions of identical storage cells and they can just turn off the ones that are defective. In addition, storage doesn’t have to be particularly fast, so you can just wait longer for the voltage to drift out of the grey area. Indeed, the storage chips that go from 0-15 are much slower than the ones that go from 0-1 or 0-3 or 0-7
Most processing chips have to run at a very high speed and only have very limited redundancy so a single defect that generates a grey area will require turning off 1/4 or 1/2 the chip. This is why factories that make storage cannot easily convert to factories that make processors and vice versa
– Circuit A can distinguish 2 different voltage levels.
– Circuit B can distinguish 4 different voltage levels.
Your question is “Why do we use Circuit A not Circuit B?” And the answer is that Circuit B costs [1] more than twice as much as Circuit A. So for efficiency you would want to replace Circuit B with two copies of Circuit A, and you’d still be able to distinguish 4 patterns: 00 01 10 11.
In theory, yes, you can make a computer that uses any number of digits. In practice, we always use 2 digits because that’s the most efficient [2].
[1] At this level costs are usually measured in size, power usage and heat.
[2] And also the simplest. And once you have a certain number of binary computers, you start to get “network effects.” Meaning that *even if* tomorrow someone makes a non-binary computer that’s more efficient, it will still struggle in the marketplace because we’ve already built a huge amount of infrastructure that assumes binary computers. All the circuit designs would need to fundamentally change, engineers and programmers would need to be re-trained, programming languages that assume binary would need to be replaced, programs and data files wouldn’t be compatible, and so on.
You could, but it won’t be very efficient.
Right now you have high and low voltage representing 1 and 0. The electronics can switch between high and low extremely fast, and it’s easy to detect which voltage it’s at. Say we wanted to do base 4 (0, 1, 2, 3). We’d need a range of four voltages the electronics switch between, and we’d have to detect which of the four voltages it’s at to to do our calculations. This is much harder to do, and now any slight fluctuation in voltage can give you the wrong answer.
Computers are digital. Instead of thinking of it as 0’s and 1’s. Think of it as ON or OFF. You have two states. This two state system makes it very accurate and prevents errors which is important when doing calculations.
If instead it was done with say voltage. We have 0-10V and 1V =1, 2V = 2, 3V = 3 etc. What happens when the Voltage is 2.5? If the calculation needed it to be a 2 and the computer took it to be a 3 you get the wrong answer.
You’ve gone from a digital system to an analogue one.
Analogue does not work well for calculations. It does work in other places, for example colour. If 2 is red and 3 is orange. 2.5 will give a colour in between, which is likely fine.
Latest Answers