Translation from human language to computer language

Computer understands only 0s and 1s. 0 represents off state and 1 represents on state. But it is very difficult for a person to write a code that has 0s and 1s. A translation layer is made to translate from human language to the language the computer understands. It is called an interpreter or compiler. Interpreter does translation into computer language as a program executes, a compiler does translation beforehand. Usually compiled programs are much faster than interpreted programs.

Advantage of interpreted programs is that they can run with little or no modification on different types of hardware. For example PHP code can run with little modification in Windows and Mac environments.

An example of compiled programs are the programs written in C language. These programs are much faster than interpreted, but programs written in C and compiled in Windows will not run on Apple computers.

Is there anything in between? Yes. Programs that are written in .Net languages compile into intermediate code that requires a .Net framework for execution. Advantages of such programs are that these are as fast as compiled code and these can run in different environments with little or no modification.

Disadvantage is that .Net framework needs to be installed in the system for execution of such a program

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator