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

335 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

The compiler turns your human readable source code into machine code.

Machine code is the low level mathematical instructions that can be understood by a CPU.

We conceptualise the machine code as ones and zeroes, but it represents electric signals that will be physically sent to the CPU when the program is run.

The CPU is physically designed and manufactured to perform mathematical operations based on the electric signals that are sent to it.

The specific design of what electric signals on what pins will trigger what operations – and likewise the way we translate the source code into the corresponding machine code – is the Instruction Set Architecture. They are documented standards, and you may have heard of some common ones such as ARM or x86.

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