Programming Languages

Computer program is a set of instructions that makes the computer/hardware to perform a set of particular task in order. Without Programs, computers are useless and can not perform any operations.

To instruct a computer to perform a certain job , we need a language which can be understand by the computer. The language which are used to instruct the computer  to do certain jobs are called Computer Programming Languages.

Some of the programming languages are C,C++, Java, Python etc.

The process of writing, testing, debugging/troubleshooting, and maintaining the source code is called computer programming.

The person who writes the program is called the programmer.

Level of Programming Language

The programming language level is divided into three levels: machine language, assembly language, and high-level programming language

type of programming language
Figure: Level of Programming Language

Low Level Programming Language

In Low level programming language each instruction is directly translated into a single machine code.

It is machine dependent – Only work for a certain machine

Machine Level Language

machine language is computer understandable language which consist only binary number (0 and 1)

Machine language is a sequence of instruction written in the form of binary numbers consisting of 1’s and 0’s to which the computers respond directly.

The advantage of machine language is that they execute fast as the computer understands them and doesn’t need translation into other forms.

Disadvantage:

  1. It is machine Dependent
  2. It is Difficult to write
  3. Difficult to remember different machine codes for different operations.

Example :

To add two numbers 3 and 6 in machine language like :

11          10111001   110

3                    (machine code for addition )  6

Assembly Language

Assembly language is a symbolic representation (called mnemonics) of machine code.

The assembly languages program must be  translated into machine code by a separate program called an assembler.

assembly language translate

The assembler program recognizes the character strings that make up the symbolic names of the various machine operations and substitutes the required machine code for each instructions.

To add two numbers 3 and 6 in assembly  language :

11          add  110

Sum of the Examples of instructions for assembly language are as follows.

CodeMeaning
ADDAddition
SUBSubtraction
INRIncrease
DCRDecrease
CMPCompare

Advantage :

Writing a program in assembly language is more convenient than writing in machine Language

Program Written in the form of symbolic instruction

It is useful writing program in embedded system because it needs fewer  codes than high level language

It is also useful for device programming

Disadvantage:

Hard to Remember mnemonics

Machine Dependent

Less efficient than machine language – translated into machine language before execution

High Level Language

High level programing is a more user friendly and to some extent platform independent. It is similar to natural language and so are easy to remember and write.

High level languages are easy to learn and work but while executing they have to be translated into  to machine language.

It is slow in execution but efficient for Developing Programs

C,C++,C#, Java, Python are the example of High level language.

Advantages

  1. Easy to understand and use
  2. Portability- can be run in different machine with little or no change.
  3. Easy in Debugging – Error can be easily detected and removed
  4. Fast Development  of Software  – Commands of these language are similar closer to English language.

Disadvantages

  1. It Required more execution time
  2. Need own translator to translate high-level language to low-level language.

Compiler and Interpreter

Compiler and Interpreter are language translator which translate the high level language into a Machine level language.

compiler and interpreter

Difference between compiler and interpreter

CompilerInterpreter
Compiler scans the entire program before translating it into machine codeInterpreter translates and executes the program line by line.
Syntax errors are found only after the compilation of complete program.Syntax errors can be found after translation of every line.
It takes less execution timeIt takes more execution time.
CPU utilization is more.CPU utilization is less as compared to the compiler.
C, C++, C# etc.Python, MATLAB
Your Page Title
Please follow and like us:
error
fb-share-icon

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top