3.5 EDITOR, ASSEMBLER, INTERPRETOR & COMPILER

To write a program in any of the programming languages requires an editor. This is a program that is used to create text files. While saving the program, filename and extension as per programming language is required to be given e.g in C programming language f1.c, in C++ f1.cpp or f1.C, in Java f1.java etc. The extension may also depend on the conventions of the operating system used, for instance, in unix the extension for a C++ program is .C while for Windows it would be .cpp. 

There are different types of editors. Some of the programming languages have some specific built in editors.


A Programming Language is different from machine language, which is understood by a computer in the sense that it can be directly executed. Hence a program in any higher level programming language like C requires a translation process that can translate the source program into machine code so that it can be executed by the computer. 

As you may already know from a previous unit, programming languages can be low level languages or high level languages. 

Assembly language is a low level programming language similar to machine language, but far easier to write and understand because machine language binary instructions and operands are replaced by mnemonics that are comprehensible to humans. Just As a program written in programming language requires a translator to translate the source program in machine code, a program written in assembly language uses the utility named as assembler for translation purpose. Assembly language is the most basic programming language available for any processor. With assembly language, a programmer works only with operations implemented directly on the physical CPU. Assembly language lacks high-level conveniences such as variables and functions, and it is not portable between various families of processors.


High level programming languages provide: 
  • Good readability 
  • Portability
  • Easy debugging 
  • Easy software development

Hence Programming languages translators are broadly divided into two categories: 

  • Compilers 
  • Interpreters

Compiled Language : An additional program called a compiler translates a program written in a programming language; into a new file that does not require any other program to execute itself, such a file is called an executable. 

e.g. C, C++, Pascal are languages that are typically compiled 

Compilers produce better optimized code that generally runs faster and compiled code is self-sufficient and can be run on their intended platforms without the compiler present. 

Interpreter : An interpreter is a program that translates each statement in the programming language into machine code and runs it. Such an arrangement means that to run the program one must always have the interpreter available. 

e.g Basic , Prolog, Perl are languages that are typically interpreted. 

Programs in any language can be interpreted or compiled. So there are basic compilers available as well. Compiled code runs faster and does not need the compiler at run time, whereas interpreted code is slower and needs the interpreter every time the program has to be run.

Comments

Popular posts from this blog

3.5 SOCIAL NETWORKING

3.6 BLOG

3.4 COLLABORATIONS