Eli5 Where exactly do computers make decisions?

745 views

I understand the concept of coding, that it’s a bunch of if/then/unless kind of hardwired decisions. But where, PHYSICALLY, and how does this happen? This one I need actually explained like I’m five. I’ve never understood how code physically implements itself into fruition.

In: 1

10 Answers

Anonymous 0 Comments

It is a lot of interconnected switches that perform logical operations. that are today made of transistors but you can make it with mechanical switches, it would just be slower, Computer has been made with relays that are electrically controlled switches

A regular light switch just turns a lamp on and off with a single switch.

But in a staircase, you can turn it on and off by just flipping either switch. That is a logic function.

If we look at the position of the switches A and Be and call up 1 and down 0 on wiring can be

A B Light
0 0 on
0 1 off
1 0 off
1 1 on

That means if they have the same direction the lamp is on but they are in the opposite direction the light is off. This is the result of the wiring https://en.wikipedia.org/wiki/Multiway_switching#Traveler_system

As a logic circuit, this is a https://en.wikipedia.org/wiki/XNOR_gate

It is a connection like this between transistors that work as electrical control switches computers are built. As mentioned above computers can be made with electrically controlled mechanical switches, that is relays. In the 1940s to the late 1950s computer was built this way, Vacuum tubes, and transistors were faster, and transfers were a lot smaller too. The function function was the same.

For simpler control systems, relays were used before the computer was invented and continued to be used after they moved to transistors. They are still used in some systems like railway signaling where their advantage in handling high voltage and electrical interference is an advantage, the do not need to be fast the need to be reliable.

Take a look at [https://eater.net/8bit/](https://eater.net/8bit/) where translators are explained on the physic level and then they are used to build logic gates and then with logic chips 8-bit computers are built. This will show you how a computer works physically and how you can design one

You are viewing 1 out of 10 answers, click here to view all answers.