Comments

You must log in or register to comment.

tdscanuck t1_j9v2gfj wrote

Yes, trinary systems exist.

We use binary for computing because it’s really easy to map the state of electrical switches (on, off) to binary digits.

Going trinary, or higher, means you can’t use switches. The math all still works fine but the hardware becomes far more complex. And, since you can emulate any system with any other, and binary is far easier to build, we stick with binary.

81

talaron t1_j9vcl66 wrote

Good explanation. One could add that in theory you can have as many levels as you want, but since electrical signals (as basically all signals) aren't exact, the on/off system makes it very easy and quick to filter out noise.

There isn't really a point in using a specific number of levels, like 3 or 4, simply because it isn't very efficient in practice, but if you use the raw signal directly with "all the levels", you end up with an analog signal. As long as you can live with some noise (e.g. for storing audio/video, where you wouldn't hear/see tiny differences), analog signals are a very efficient way to store and transmit data, but unlike digital ones they are likely to degrade over time (or distance, if we talk something like radio waves). Like, a video tape might lose its magnetism over time and become noisy, while a DVD always works perfectly until it is so damaged/scratched up that it can't be read at all anymore.

4

Oclure t1_j9vn6d5 wrote

I'd also add that while we can signify binary with high and low voltages the same doesn't work as well for trinary as you would need a mid voltage.

One likley issue here is that while it may seem like electrical states change instantly they actualy take a tiny amount of time as voltage drains from a high representing a 1 to a low representing a 0. Now add a mid voltage between 1 and 0 and the voltage has to actualy pass this mid state on its way from a 1 to a 0 meaning that if you read the systems state at the wrong time you could easily mistake a voltage in transition for one that's intended to be this mid voltage. . This is actualy a common issue with overclocking as the clock rate outruns the ability for the voltage states to change, however in the case of a binary system it's possible to stabilize the system again with a bit of overvolting at the expense of producing more heat.

So unfortunately, using our traditional system of representing two states becomes a lot less stable when adding a third state, and making a stable system that can represent trinary would likely add a lot of complexity.

2

xopranaut t1_j9v4n6k wrote

Balanced ternary uses 1, 0, and -1. It saw some use in Soviet computers in the 50s, and that page includes some discussion of its complexity versus binary.

16

sterlingphoenix t1_j9v26ot wrote

It's a binary system because electricity is either on or off. Adding a "kinda" that's actually stable and reliable is incredibly complex.

With that said, this is pretty much what quantum computing seeks to overturn and why it's assumed to have such an impact on computing.

Both these subjects have been posted about before so you can search for more complete answers.

12

metaphorm t1_j9vaa3r wrote

that's not true. electricity is a physical phenomenon that has all kinds of continuous quantities associated with it. Amps, Voltage, Resistance, Charge, etc. are all physical quantities associated with electricity that aren't binary at all.

what you might be thinking of is the way an electronic logic circuit uses electricity to determine the logical state of the system. electronic circuits measure voltage potentials on a wire to determine the signal on the wire. The convention is to map a "high" voltage to 1 and a "low" voltage to 0. The exact value of high and low don't matter here, the only thing that's important is that the circuit can reliably measure those values and reliably distinguish the high value from the low value. The wire is capable of having potentials that aren't the values mapped to 1 or 0. In a normal integrated electronic circuit, that would be a kind of error state, but it's still physically possible. It's physically possible because electricity is not inherently "on" or "off".

1

sterlingphoenix t1_j9vbavj wrote

> what you might be thinking of is the way an electronic logic circuit uses electricity

No, what i'm thinking is that this is ELI5, not ELIamanelectricalengineer (:

1

metaphorm t1_j9vc4n8 wrote

Rule #4 from the sidebar

​

>Explain for laypeople (but not actual 5-year-olds)
>
>Unless OP states otherwise, assume no knowledge beyond a typical secondary education program. Avoid unexplained technical terms. Don't condescend; "like I'm five" is a figure of speech meaning "keep it clear and simple."

I think I explained myself in my post at a level that someone who passed their high school physics class would understand.

2

sterlingphoenix t1_j9vd4qv wrote

> Explain for laypeople

Yes, not electrical engineers. I simplified it.

1

ScienceIsSexy420 t1_j9v43ya wrote

TL/DR: Yes, but it's not binary

Most of the answers seem to miss a fundamental point: binary is a base 2 numal system. This means each demical place, or digit, can only hold two possible values (0 or 1). Our traditional number system is a base ten system, so each digit can hold ten values (0-9). Another common numal system for computers is the hexadecimal system, in which each digit can hold 16 values. It is useful for computers because one byte is also 16 digits (this part may be wrong, it's been a while since I've taken a computer class).

But, crucially, you can have a number system with any base you want. If you wanna add another value to binary and make it trinary, you absolutely can....but it's not binary anymore, it's trinary

9

lurk876 t1_j9v9liu wrote

> Another common numal system for computers is the hexadecimal system, in which each digit can hold 16 values. It is useful for computers because one byte is also 16 digits (this part may be wrong, it's been a while since I've taken a computer class).

Hex is just a more human readable version of 4 bits (4 different 0/1 values). A byte is 8 bits which have 256 possible values

3

AlphaThree t1_j9v388l wrote

I'm assuming what you meant by this question is less the semantics and mathematics side and actually the computer engineering side. Computer logic operates in binary because the tiny switches that make up all of the logic in processor or microcontroller only have two determinate states, on or off.

The other option would be analog, which would technically be an infnitie number of states. There is a growing field of analog compute-in-memory being pioneered by SST. But this is extremely advanced level semi-conductor architecture and beyond the scope of what this question was likely looking for.

5

Any-Growth8158 t1_j9v27q3 wrote

Yes, but by definition that would no linger be binary.

Binary is used because it simplifies the electronics which have easily determined on/off states.

If you introduce 8 other states and add a 2, 3, 4, 5, 6, 7, 8, & 9 you have decimal.

4

Mammoth-Mud-9609 t1_j9v2gbg wrote

Binary works because of switches which can be in one of two positions on or off (open or closed) it doesn't work for a three position switch.

1

afcagroo t1_j9v4hwb wrote

Yes, and it has been done before.

As others noted, it's handy to have just two states, "on" and "off" (actually "mostly on" and "mostly off") because it works well with digital circuit design.

But it can be done, and in some cases (like flash memory) we sometimes use 3 or 4 states. On very rare occasions, even more. This vastly improves some things like storage density, but hurts other things such as complexity and signal to noise ratio.

One of the very good reasons to not use more than two states for most digital circuit design is power. When designing circuits where transistors are "mostly on" or "mostly off", it is possible to arrange things such that there isn't much current flow most of the time. When you add intermediate states to the transistors, it is much harder to avoid current flow and hence power consumption. This is a big deal in circuits that have millions or billions of transistors, even if each individual current path consumes little power.

You could introduce more "states" without them being represented by how much individual transistors are turned on. But that makes the circuits a lot larger, so you lose most of the potential benefit.

Of course, another reason now is legacy software. Everything is written for binary logic. While that's a problem that would be possible to get around, it would be painful. You'd need a darn good reason to do so.

1

allegiance113 t1_j9v4xsu wrote

Yes, you can definitely create a system with {0, 1, 2} and this is in base 3. Binary is in base 2 that uses only {0, 1} and this is machine-readable with an off (0) and an on (1) switch.

We humans use the decimal system which uses {0, 1, …, 9}. And in fact there are even higher bases such as the hexadecimal which uses the same as decimal but with additional A, B, …, F to represent 10, 11, …, 15 respectively. The decimal and hexadecimal are bases 10 and 16 respectively.

The base 3 thing is just not as used unlike the base 2, 10, and 16. But you can for sure define them, as well as for any other higher base

1

A_Garbage_Truck t1_j9v52yz wrote

there is sucha thnig as a trinary system, but for hardware its not really usable, since binary exists and its way simpler ot map out.

it isp ossible ot design hardware that understand trinary, but this is much more complex than it is worth for no real advantage...at least until we figure out quantum computing.

1

bendvis t1_j9v8w3x wrote

Modern SSDs with Multi-Level Cells (MLCs) actually do use multiple voltage levels to store multiple bits of data in a single memory cell. Triple-Level Cells can store 3 bits per cell. QLC's can store 4 bits. They end up just converting that back to binary for transmission though.

https://www.purestorage.com/knowledge/what-is-mlc.html

2

DarkAlman t1_j9v5qtg wrote

Binary was chosen for computers because it was easy to represent with transistors, 1 and 0 represent on and off states for a gate or a transistor.

Creating computers that use 3 positions (trinary) or multiple digits for bit like 0,1,2,3 are possible but the limitation is the hardware itself. You need a single stage electronic device (like a transistor) that can exist in multiple different states to represent those digits.

Such a device could be called a transtator, a replacement for a transistor that can exist in multiple different states. A Quantum computer could be based on such a device.

In theory such a computer would be able to perform significantly denser calculations and have higher speed. But our entire ecosystem of instruction sets and operating systems would also need to be completely redone. So it would have to be worth the significant effort.

1

taunugget t1_j9v6pvu wrote

There isn't really any advantage to adding a third symbol when you can just use more binary digits instead. With two binary digits you can have 4 values, and with 32 digits you can have billions. Sticking with binary allows us to build electronics that are fast, cheap, and reliable.

1

nullrecord t1_j9v9jkz wrote

Sure there is - more storage, or more bandwidth.

1

taunugget t1_j9vavfy wrote

You can get more storage/bandwidth by just adding more binary bits. To achieve the same result with a ternary system would require way more cost and effort.

1

nullrecord t1_j9vc0ox wrote

Without that you would never have ADSL or 4G or wifi. Instead of sending 1 bit at the time over the wire, the "bit" can have 64 states, representing 6 bits at a time - a 6-fold increase in bandwidth.

See here for a bit more:

https://en.wikipedia.org/wiki/Quadrature_amplitude_modulation

https://en.wikipedia.org/wiki/Phase-shift_keying#Quadrature_phase-shift_keying_.28QPSK.29

1

taunugget t1_j9vdphu wrote

That's a good point, lots of transceivers do encode/decode signals with multiple levels. I was only thinking about the processing and storage of data. Even a qam-64 symbol needs to be converted to binary to do anything useful with it.

2

nullrecord t1_j9ve7jy wrote

Sure, but as someone wrote in the other comment, even SSD stores multiple voltages per cell to increase storage capacity.

1

tyler1128 t1_j9v71af wrote

SSDs often use more than two values. The nice thing about binary is it is the most resistant to fluctuation. In the real world, if 1.2V is high and 0V is low, you are going to see many voltages other than the perfect values especially when transitioning. With binary you can say something like "If > 0.2V, 1, otherwise 0" whereas the more states you add, the more bands you have to create. "If < 0.2V, 0. If >= 0.2 V and < 0.6 V, 1. If >= 0.6 V, 2". The bins will keep getting smaller the more digits you allow.

1

damNSon189 t1_j9v7yya wrote

Because by definition binary means only two characters can be used. But yes there is a trinary system in which you can use 3 characters. And 4, and basically any number. Whether they are used or not depends on how useful they are. Binary, octal, decimal, hexadecimal are examples of them. What’s the usefulness of binary? That it’s the simplest in terms of how many symbols it requires: only two.

1

nsjr t1_j9v8zhi wrote

There were attempts to make decimal computers using voltage from 1~10v for example.

The problem happens on fluctuations, electricity being lost through wires, problems with energy escaping... And this can cause big problems of a 10 of the CPU becoming an 8 until reaches the GPU. If your part receives a 9.3v, it's a 9 that gained voltage along the current, or it's a 10 that lost it? Or an 8 that gained much more?

Binary is easy because "if there are ANY energy here, it's an 1. Otherwise, 0."

Far more reliable, electromagnetic interferes very little, error detection and correction are far more easy.

1

metaphorm t1_j9v9gc5 wrote

Binary systems can perform all of the same computations as ternary systems. A ternary system has additional downsides (complexity) compared to a binary system and the additional upsides (certain computations, if implemented in a way that takes advantage of ternary logic, can be faster than the equivalent on a binary system) aren't a big enough upside to be worth the downside.

1

drgrd t1_j9vahc2 wrote

Computers are made of transitors, which are basically switches controlled by electricity. Transistors are like a tap - they can let electricity through at any amount up to the supply voltage, but it turns out it's easiest for the whole system if we treat each one as either fully open or fully closed. If you look at the tap in your kitchen, you can say confidently if it's running or not, but it's a little harder to say whether it's half on, and you might make a mistake. The whole point of computers is that they don't make mistakes when it comes to math, so more reliable is better. Also you don't save as much as you'd think with a 3-value system over a 2-value system. 2 is the smallest number of values with any practical utility so that's what we use.

1

IatemyBlobby t1_j9vas9e wrote

Binary is unambiguous. Thinking of a physical representation could be a series of valves with fluid flowing through them. 0 = valve shut tight, 1 = valve open. You could make a “computer” with a bunch of valves. But introducing the 2 brings confusion. Assume 1 = valve half open, 2 = fully open. If a valve needed to switch from 0 to 2, there will be a certain amount of time that it is being registered as a “1”. Valves at different parts of a network will have different flow rates, and a fully open valve at point A might have the same flow rate as a half open valve at point B. Meaning the same “valve sensor” could not be used, because if that sensor was programmed to use valve A’s full/half flow rates, putting it at valve B would yield different values than expected.

Theres a lot more factors why trinary isn’t used for computing, but these give you an idea.

1

RingGiver t1_j9vavdm wrote

That's how additional bases work. You can go above 10 (most commonly base-16) by finding additional symbols too.

If you want to have it be anything more than a mathematical curiosity, you would have to find a practical application for it.

Binary's largest practical application is in digital systems, where every signal can ultimately be broken down into series discrete "on" or "off" switches on a circuit board.

Consider a byte of data. Instead of thinking of it as a number between 0 and 255 (inclusive), think of it as an electrical circuit with eight switches. Each bit desugnates one of those switches as on or off. 00000000 might mean that they are all in the off position, while 11111111 would likewise mean that they are in the on position.

If you were working with a system with three-position switches, a trinary number system like you describe would fit it well, but I don't know of any systems with "off," "on," and "more" as the switch positions.

1

ocher_stone t1_j9vbx45 wrote

Yes. Why do we use binary though?

You can communicate anything with two answers: Affirmative and Negative. For ease, saying "Yes." and not answering is the same as yes and no. Only being able to say "I am Groot." or nothing is the same. A "statement" and "not-that-statement" being the only two options are fine. Whatever it takes.

Imagine me asking what you want for dinner. Could I get the answer if all you can say is "Yes." Eventually. There are a lot of permutations, but we can go down the list. Or I can be smart, start categorizing the food. Make the algorithm smarter. Cheat. But we still only get one of two options from you. A yes or no.

You can dictate any book to me with those two options. It'll take forever, but it'll get done. English just uses language with a higher base (base ~171,476 in the Oxford dictionary) to save some time, but you can't just translate that to another language 1:1. If you are getting to the base of it all, a binary language, yes or no, is how you make sure everything works at the end of the day.

The simplest computer is a switch of yes, no and we can do anything we want at that level. We've just gotten better about efficiency and cutting corners to make our lives easier with other bases.

1

Plane_Pea5434 t1_j9vc19v wrote

You can usa any quantity of characters for a numeral system, binary, octal, decimal and hexadecimal are the most common AFAIK but there isn’t any limit to what you can use, if you mean in computers basically because we use “switches” that can be either on or off and 0/1 represent those states

1

Mike2220 t1_j9vccln wrote

The bi in binary means 2, so we use two digits which happen to be 0 and 1. (base 2)

A trinary system would be base 3 and yes would be the digits 0-2.

Commonly we use base 10 which is the digits 0-9

If you mean why we use binary and not trinary in computers, it's because a binary bit is easy to represent physically. Either it's on or off, something is there or it isn't, and it's very easy to detect/read by hardware

1

Flair_Helper t1_j9vdmmi wrote

Please read this entire message

Your submission has been removed for the following reason(s):

Questions based on a false premise are not allowed on ELI5. A question based on a false premise is one based on information that may not be true, or may not be the whole truth, and needs that information to stand as a question.

If you would like this removal reviewed, please read the detailed rules first. If you believe this submission was removed erroneously, please use this form and we will review your submission.

1

ComesInAnOldBox t1_j9v8gm4 wrote

It isn't actually 1 and 0. The 1 and 0 refer to whether or not a switch is open or closed, and therefore a circuit powered or unpowered. The symbols for closed and open circuits are | and O, the same as you've likely seen on your power switches. 1 and 0 just became the standard for typing.

0

metaphorm t1_j9vbp62 wrote

no, that's wrong. you're confusing logical circuits with binary arithmetic. there's an algebraic equivalency between them (Boolean algebra) but they aren't the same thing.

binary is a base of number representation. 0 and 1 have the same meaning in this context as they do in any other number representation context.

in computer systems, binary numbers are used to encode all kinds of different information, not only the state of a logical circuit.

0

ComesInAnOldBox t1_j9vg2bm wrote

Today, sure, but the original use of binary in computer systems came from "powered or unpowered," and binary data is stored or transmitted in a variety of ways and represents two opposing states: on or off, positive or negative, up or down, high frequency or low frequency, 0 degrees and 180 degrees phase states, black or white, etc.

Binary arithmetic is what it does with the information, while the binary itself is how the data itself is represented.

0

berael t1_j9v9h54 wrote

Binary uses 2 digits because that's what "binary" means.

A system that used 3 digits would be trinary.

0

No-Mammoth-1638 OP t1_j9vcb8f wrote

As you can see I've named that in the OP

1

berael t1_j9vd699 wrote

Thus making the question self-answering, so I'm not sure what else there is to do.

1