Why computers use the binary system?

Why just ones and zeros? Wouldn't it be simpler to use the decimal system that we're already used to?
Binary numbers

Computers use the binary system (2 different states), not because of math, but physics. Math is only one of the things a computer can do. Computers are computers because they do logic. Math comes from logic, not the other way around.

Logic is the ability to make decisions.

When you want to make a decision, you need at least 2 choices. You can't make a decision based in only 1 option.

Examples:

So, to a computer do logic, it needs states (or things to distinguish).

This can be represented in various labels:

It can be more than 2 states: 10 states (decimal), 100 states, etc. But only add complexity.

To be able to distinguish beetween the 2 states electrically, you can determine:

But real electrical systems are not 100% exact. There's no such thing as exactly 5.00000V, or perfectly stable 0V. There is noise (EMI), drift (temperature), etc.

Electricty is analog, and logic requires clear distinctions and repeatable behavior. So we need to add voltage margins.

So, we need to define ranges:

A binary (2 states) computer at just 1 MHz is able to turn on and off, 1 MILION times per second!

Now imagine, today's computers are able to reach 5GHz (5000 times more than 1 MHz). That is 5 billion times per second (5 000 000 000) turning ON and OFF! Each change from ON -> OFF and OFF -> ON, ocurrs each at 0.0000000002 seconds! (200 pico seconds) 🤯

Since the change of state is so fast, we need a margin, to distinguish beetween 1 and 0.

In a decimal system, how do you reliably distinguish beetween 10 different states?

When you add just 1 more state, you are expoentially being harder to distinguish beetween them.

When you add more states to be able to distinguish beetween them you are just adding complexity ( = more cost) and margin for errors. And theres no benefit for adding more than 2 states. With only 2 states, you are adding reliably.

There's also a big missconception about computers: a computer is not just a fancy calculator. A calculator is a specialized tool. A computer is a general purpose tool. A computer can do much more things other than math. Math is just 1 of many things a computer can do.

You can do math (addition, subtraction, multiplication, etc) with a binary system (base 2) just fine as a decimal system (base 10). The rules of mathematics are base-independent.

Using a 10 state logic just because we use the decimal system, gives no computational benefit. Remember: computers are computers because of logic. Math comes from logic, not other way around.

Transistors are natural on/off devices

This is another big reason why computers use the binary system. Transistors are naturaly a ON/OFF device. Nothing in between, there's no such thing as: half ON or half OFF. Or it is ON, or it is OFF. So, the binary system fits that behavior.