How does coding physically work?

136 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

When a person designs something like a CPU, they very deliberately arrange all the transistors do do very specific things. You have those that are responsible for doing math, those that specifically read and write memory and so on. It gets super complicated, but enough said that for very specific inputs, the circuit will perform very specific operations.

How this physically operates is rather complicated, but it comes down to using transistors letting a signal through or not, which translates to a 1 or a 0. By arranging those transistors appropriately (into Logic Gates), you can design a circuit that puts them in a specific order based on an input. And 1s and 0s in a specific order are a number. So by shuffling them around in the circuit in a controlled way, you can do math.

Then the designers tell everyone exactly what those inputs and operations are.

So someone then designs a program to translate a human-readable programming language (what you see programmers using) into those inputs (machine code). That program is the Compiler.

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