Eli5: If a compiler is a program that converts your code into binary form for the computer, unless my understanding is incorrect and it isn’t just a program, wouldn’t the compiler also need a compiler to run it since how do you run a program without a compiler?

1.06K views

Eli5: If a compiler is a program that converts your code into binary form for the computer, unless my understanding is incorrect and it isn’t just a program, wouldn’t the compiler also need a compiler to run it since how do you run a program without a compiler?

In: 360

25 Answers

Anonymous 0 Comments

A computer runs on what’s called “machine language”, basically what you are calling “binary form”. This machine language is not very friendly from a human’s perspective, however it is possible for a human to write a program directly in machine language. A compiler being just another program you can write. As u/Gnonthgol has pointed out, at this point since we have other compilers written it’s just easier to write the compiler in another language. You can also use a cross-compiler. The is the case where you develop the compiler for your new machine by writing it on a different type of computer that already has a compiler, but outputs a binary/machine language program that works on your new machine.

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