How does coding physically work?

118 viewsOtherTechnology

Like how exactly can a bunch of letters, numbers, and punctuation symbols make your computer do all kinds of things? Plus what happens inside the computer when it executes the code?

In: Technology

22 Answers

Anonymous 0 Comments

Physically? Inside a computer are transistors* they work almost exactly like a lightswitch, hit one and it can be on or off, they’re arranged kinda like a game of 20 questions, depending on the yes/no answers to the questions (the light being on or off) a different answer is reached. Now imagine the number of questions is more like 20 trillion. At a certain point interacting with the switches became too hard due to the increasing number of questions, so we used them to construct an abstract system to interact with all those questions more efficiently, like many robots. Imagine an office building, you could for example draw a picture on the face of the building by turning it’s many lights on or off, we design the ‘robots’ (operating systems, programming languages, compilers) to make this easy for us to do, so we can just write ‘draw a circle’ and the robots translate that into which switches should be on or off to reach that result. This also explains most computer issues, as those arise because either A: the person wrote a command the robots didn’t understand, or B: the robots did something wrong with the message and it became garbled.

*Transistors don’t physically move, but contain electrons that shift around rather like a physical switch.

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