Differences between compiler and interpreter

broken image
broken image

However, the overall execution time is comparatively slower than compilers.Ĭompilers usually take a large amount of time to analyze the source code. Interpreters usually take less amount of time to analyze the source code. Scans the entire program and translates it as a whole into machine code. Translates program one statement at a time. However, there are differences between how an interpreter and a compiler works.

broken image

To convert source code into machine code, we use either a compiler or an interpreter.īoth compilers and interpreters are used to convert a program written in a high-level language into machine code understood by computers. It only understands the program written in 0's and 1's in binary, called the machine code. However, a computer does not understand high-level language. A high-level language is one that is understandable by us, humans.

broken image

We generally write a computer program using a high-level language.

broken image