How does a computer use a compiler to gather information of code?

331 views

I’m relating to how my computer actually “reads” the code I’m providing. So on a very basic level – how does it “understand” what the compiler tells it?

Is this some kind of electronic signal transmission or how does it work?

In: 0

7 Answers

Anonymous 0 Comments

It’s hard to answer this question without asking more questions. Simple as possible

We write code in a human readable language.
Compilers translate that into a thing that a computer can run

We wrote the compiler so that it could translate the code. Part of coding is we use libraries of pre written code so that we don’t have to rewrite everything ourselves and so we don’t have to know everything about everything

Some of those libraries are never changing and the same everywhere. Some of the libraries are specific to the computer but they have agreed to “names” and special “methods”. And the compiler puts those names and methods into the “compiled” code. It’s not really the compiler but the linker that does this. These are pulled in when the computer starts running your application

That’s how your application know specific things about your specific computer

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