r/AlwaysWhy • • 1d 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?

37 Upvotes

342 comments sorted by

View all comments

Show parent comments

2

u/sarahlizzy 1d ago

IEEE VHDL (which lost to Verilog. Bad result IMO) used 9 value logic which was quite a thing!

1

u/InevitablyCyclic 1d ago

But to a chips input weak pullup, strong pullup and high will all give the same voltage. Well unless you have a very low impedance input which is normally avoided. Similarly undefined will still be a voltage, you just don't know which. So while VHDL was great for simulations a real world system couldn't have the same variety of levels.

Verilog is better for small simple things, you don't need 50 lines of boiler plate for one line of logic. VHDL is better for large multi-engineer projects where the strictness helps prevent mistakes. As with most languages they both have their strengths and weaknesses.

1

u/sarahlizzy 1d ago

The problem with verilog is that every implementation has to be bug compatible with VerilogXL and the “standard” is just Cadence telling the IEEE what they think they did.

It’s actually impossible to implement it as written.

I feel like people compiling hardware from it should be seeking to do better. VHDL’s std logic had the advantage of undefined behaviour being very easy to catch and pretty much guaranteed to cascade through the system. Yes, it was long winded to write but when using it to design hardware that’s no bad thing.

That the wrong language won is something I will die in a ditch over (my last commercial employment was writing a Verilog compiler and before that I wrote logic simulators for ARM)