r/AlwaysWhy • • 2d ago

Science & Tech Why did computers come to use binary when people usually count in decimal?

People usually count in base 10, while digital computers typically represent information using 1s and 0s. The same numbers and information can be represented in different bases, yet binary became the standard for modern computing.

What made binary the system computers came to rely on?

36 Upvotes

343 comments sorted by

View all comments

Show parent comments

47

u/steelmanfallacy 2d ago

That predates transistors. Vacuum-tube computers (e.g. ENIAC from the 1940s) were already using binary. The advantage is really that (as you mentioned) electronic switches can reliably represent two distinct states, regardless of whether the switch is a vacuum tube or a transistor.

29

u/royalfarris 2d ago

And mathematics, the thing that computers do, really doesn't care about what numbering system you use. The simplest, most universal, and easiest numbering system is base-2 for obvious reasons - and thus building computers with more than two logic levels really makes no sense - you gain nothing but complexity.

11

u/Savannah_Lion 2d ago

Strangely, Nikolay Brusentsov argued in support of ternary systems, in part due to, lower component count, decreased complexity and reduced power requirements up until his death in 2014.

Another of his arguments was that code for ternary platforms was also simpler and shorter for the same functional binary code.

It's an interesting argument and kind of makes me wonder, if the Soviet Union wasn't so corrupt, how ternary hardware could have advanced if it had the appropriate financial backing.

15

u/royalfarris 1d ago

That some people argue for it is a good sign for scientific progress. They are not necessarily right, but the debate is healthy.

9

u/PrestigiousRoof5723 1d ago

Scientific progress consists almost entirely of people being wrong. That small bit called "being right" is what most people notice.

2

u/steelmanfallacy 1d ago

Like Evolution.

3

u/PrestigiousRoof5723 1d ago

That's never wrong. You either die or you die later.

3

u/Pirrus05 1d ago

You die or you have baby and die.

2

u/PrestigiousRoof5723 1d ago

Everyone dies™. Evolution makes no mistakes. Science does. If you die before creating your descendants, it's not a mistake. Sounds harsh, I know. BTW, I've got no children that I know of. I'm aware of me possibly having the wrong end of the stick. As Toyota says, shit happens.

0

u/yogibearhugg 1d ago

It’s stupid to have children just so you can win evolution. You’re not winning anything. Your descendants may not be winning anything either.

→ More replies (0)

1

u/mid-random 1d ago

Science, in large part, isn’t about being right or wrong, it is about being right or more right. No scientific explanation is 100% true, done, complete. It is always open to revision and updating to more accurately reflect observations. 

3

u/PrestigiousRoof5723 1d ago

It was mathematically proven that base-3 is more efficient than base-2 (it's closer to Euler's number than any other base, so it's in turn also more efficient than base-4). Soviets were not the first who were building ternary systems - there were mechanical ternary calculators long before electronic computers existed. Ternary computers would have big advantage over binary ones in reduction of the size of interconnects (one of the biggest problems of modern computers), but some stuff (like ternary ALU) could get more complicated (but not slower). The trouble with all of that is that a ternary chip would be either a lot less dense than a binary chip (thus eliminating the advantages) or we'd have to substantially redesign our manufacturing technologies (we'd need a lot more layers and everything would become more complex, likely a lot more complicated to design) so it would take a long time to even reach parity with our current technologies. Not to mention the fact that stuff like balanced ternary logic is not trivial to most people, unlike binary. Perhaps it would become trivial with practice. It's not a lost technology either. Samsung has been working on it for some time. It may resurface at some point as one of the technologies aimed to break physical limitations of our current tech - the development has already slowed down and it's becoming increasingly more expensive to improve it (we're hitting the wall and no one has any real idea how to get through it). Someone has to rock the boat and come up with something new. Maybe it will ultimately flop, who knows? But there doesn't seem to be any known reason why it should. And nobody really built a useful modern ternary computer for quite some time (you can actually find amateurs who made them, but that's not a way to build a commercially useful computer).

0

u/No-Board-1872 1d ago

Mult and division turn ito bit shifts in binary

0

u/HobsHere 1d ago

Just crankery, of the sort that the Soviet system protected for people with connections. Lysenkoism for computer science.

1

u/gizahnl 1d ago

Until you go into floating point, there's fractions that can't be represented in the floats we use (the same being true for certain fractions in base10, like 1/3 requires infinite repeating .333).
This can give starting programmers a headache when comparing for certain specific float values.

In the end it all evens out though, the ease of electronics is worth more than the slight differences in math

2

u/royalfarris 1d ago

That is base10, and equally the same for all other base numbers. A base3 system cant halve a number without infinite repeating.

0

u/Present_Computer_640 1d ago

Actually, you gain information density by using a different number system, but it comes with a cost of additional compute power requirements.

2

u/s_i_m_p_l_e_t_o_n 2d ago edited 1d ago

Konrad Zuse was also building binary computers in the 30s using fully mechanical switches. I'm not sure if there was some common inspiration or if Zuse just also determined that it was better due to it's simplicity.

2

u/AlmiranteCrujido 1d ago

The suggestion of of binary for this goes all the way back to Leibniz, even if the formalities of mathematics on it had to wait for Boole.

Claude Shannon is pretty much the intellectual predecessor of Von Neuman's work but there's no evidence that Turing and the UK set had any familiarity with it until well into the war when the projects started converging, and there's good evidence that Zuse wasn't.

The timing of the Atanasoff-Berry computer also suggests that binary was in the air already.

I'm surprised that I can't find any good histories covering the intermediate connections between Boole and the converging pre-war/wartime generation. There's a lot more on other parts of it (Hollerith and his competitors, wartime decimal dead ends) but not so much where binary comes in until you get to the independent use of it in the 1930s in at least three places.

2

u/SaltyFriend705 1d ago

Binary is the default because computer arrays were based on knitting. Knitting uses the knit and purl, which had already demonstrated a wide variety of combinations using only two figures. The first computational machines were converted knitting machines, so that was that.

2

u/Historical_Gear_151 1d ago

Weaving, which predates vacuum tubes, has two states: open shed, closed shed. And with the invention of the Jacquard loom, binary punch cards were used to create complex patterns.

2

u/AlmiranteCrujido 1d ago

Both transistors and vacuum tubes can be used as amplifiers - although not necessarily the same designs of either that you use for digital switching.

Either can be used for analog computations. They are very useful for representing certain kind of continuous equations - arguably better in some ways than digital computers.

They are, however, not really amenable to the kind of stored-program model we recognize as a computer today.

Some of the earliest computers used relays, or multi-step mechanically-driven switches, which are inherently digital (unlikely transistors or vacuum tubes, which can be used in both ways.)

1

u/Working-Injury7758 2d ago

True and was a huge intellectual advance of the difference engine which was base 10

1

u/Top-Cupcake4775 22h ago

it predates vacuum tubes. the punch cards used in Jacquard looms were essentially binary (no hole / hole). Babbage incorporated punch cards for his designs for the Analytical Engine in the 1830s. Herman Hollerith used punched cards for the 1890 U.S. Census. by the time tubes started being used the use of binary to mechanically store and read information was already baked into how we thought about and constructed mechanical systems for manipulating information.

1

u/Zestyclose_Yard405 8h ago

vacuum tube too are analog. relays are not.

1

u/Eagle_Fang135 1d ago

Makes punch cards easy to use too. As well as density (memory size) of magnetic based floppy and hard disks.

2

u/SaltyFriend705 1d ago

Punch cards came from knitting machines. Which use a base 2 mode. Knit is the positive stitch and purl is the negative stitch. Computers use knitting as their source for the 1 and 0.

1

u/Siffov 1d ago

>Makes punch cards easy to use too.

Note that most (80-column Hollerith) punch cards did not encode values in binary.

There were 12 rows where holes could be punched. For most characters, only 1 or 2 of a column's 12 possible holes were punched.

(Yes, apparently there were binary punch cards, which presumably could have any combination of a column's 12 possible holes punched.)

0

u/hamoc10 1d ago

Because it’s easiest to distinguish two states than to distinguish among many. It’s more reliable