A compiler is a special program that processes instructions written in a high-level programming language and converts them to machine language. A program that translates from a low-level language to a higher-level language is known as a decompiler.
Compilers are very large programs that allow error checking. Some compilers can translate high-level language into intermediate assembly language, which is then translated into machine code by an assembly program. Other compilers generate machine code directly.
What is a Compiler
level language has a built-in compiler. Basically, the compiler is the central part of said language, because it defines and translates the received instructions.
The advantages of using a compiler are:
- The executable program does not include the source code, therefore the compiled code is more secure.
- A compiled program executes faster than a program that is being interpreted at run time.
The disadvantages of using a compiler are:
- The object code needs to be created to get the final executable file, if the program is very long, the compilation process can be very slow.
The source code must be free of errors for the executable file to be generated.