Programming Languages | Types of Programming Languages

Programming Languages

What is Programming Languages?

  1. A programming language is a set of commands, instructions and other syntax use to create a software program.
  2. Languages that programmers use to write code are called "high-level languages".
  3. The code written in high-level language can be compiled into a "low-level language", which is recognized directly by the computer hardware
  4. The most basic computer language is the machine language (low-level) that uses binary (0's and 1's) code which a computer can run (execute) very fast without using any translator or interpreter program
  5. The high-level languages (such as Basic, C, Java) are much simpler to use, but need to use another program (a compiler or an interpreter) to convert the high-level code into the machine code, and are therefore slower
  6. Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year.
  7. The description of a programming language is usually split into the two components such as syntax (form) and semantics (meaning).

Types of Programming Languages-

  1. Machine Languages
  2. Assembly Languages
  3. High level Languages

Machine Languages-

  1. Machine language is the only language that a computer understands.
  2. Machine language is a low-level programming language. It is easily understood by computers, but difficult to read by people.
  3. Each statement in a machine language program is a sequence of bits. Each bit may be set to 0 or 1.
  4. A series of bits represents instructions that a computer can understand. For example, the number 455 is represented by the bit sequence 111000111.
  5. Programs written in high-level languages are compiled and/or interpreted (converted) into machine language (0's and 1's) so computers can execute them.

Advantage of machine language-

  1. The only advantage is that program of machine language run very fast because no translation program is required for the CPU.

Disadvantage of machine language

  1. It is very difficult to program in machine language.
  2. The programmer has to remember a lot of code to write a program which results in program errors.
  3. It is difficult to debug the program.

Assembly Languages

  1. Assembly language is a representation of machine language.
  2. The program is in alphanumeric symbols instead of 0’s and 1’s. The designer chooses easy symbols that are to be remembered by the programmer, so that the programmer can easily develop the program in assembly language.
  3. The programs written in other than the machine language need to be converted to the machine language.
  4. Assemblers are used to convert assembly language program to machine language.
  5. Every processor has its own assembly language.
  6. The alphanumeric symbols are called mnemonics in the assembly language. The ADD, SUB, MUL, DIV, etc are some symbols called mnemonics.
Assembly Languages

Advantages of Assembly language

  1. The symbolic programming in assembly language is easier to understand and saves a lot of time and effort by the programmer.
  2. It is easier to correct errors and modify program instructions.

Disadvantages of Assembly language

  1. One of the major disadvantages is that assembly language is machine dependent.
  2. A program written for one computer might not run on other computers with different hardware configuration

High Level Languages

  1. Procedure-oriented languages are high-level languages. These languages are employed for easy and speedy development of a program.
  2. The disadvantages observed with assembly languages are overcome by high-level languages.
  3. The programmer does not need to remember the architecture and registers of a CPU for developing a program.
  4. The compilers are used to translate high-level language program to machine language.
  5. High level languages are designed to be used by the human operator or the programmer.
  6. High-level language doesn’t require addressing hardware constraints to a greater extent when developing a program.
  7. High level languages have the following features such as, easier to write, easier to read, easier to maintain, portable can across different CPU families, supports a wide range of data types.
  8. Examples of high level language are C, C++, Java, Python etc.

Advantages of High level language

  1. Testing and debugging a program is easier than in the assembly language.
  2. Portability of a program from one machine to other.

Disadvantage of High level language

  1. A disadvantage of high-level languages is that they are usually less powerful and less efficient, since statements are busy.
  2. High-level languages also need to be compiled and/or interpreted into machine language before execution.

Post a Comment

0 Comments