When a programmer writes something in a computer language, the resulting text document is called source code. However, a computer cannot understand text, but only numbers. Accordingly, the source code must be translated into commands that a computer processor can understand. The source code is treated as a list of instructions to the interpreter, which carries out the instructions. When handling interpreted code, you must run the interpreter program, which adds significant overhead, especially if the source code is small.
Compilers convert source code into executable code that can be run at a later time.
Also, because a compiler works on the entire source code at once, it can optimize the resulting executable code. Finally, executable code is very hard to reverse-engineer, that is, given a piece of executable code, it is very difficult to figure out what the corresponding source code was. This is a benefit for software companies who want to protect their trade secrets. Most programs written for Windows, the Macintosh operating system, or UNIX, are distributed as executable code. CPU instructions and related data.