A programming language is a set of commands, instructions and other syntax use to create a software program.
Languages that programmers use to write code are called "high-level languages".
The code written in high-level language can be compiled into a "low-level language", which is recognized directly by the computer hardware
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
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
Thousands of different programming languages have been created, mainly in the computer field, and many more still are being created every year.
The description of a programming language is usually split into the two components such as syntax (form) and semantics (meaning).
Types of Programming Languages-
Machine Languages
Assembly Languages
High level Languages
Machine Languages-
Machine language is the only language that a computer understands.
Machine language is a low-level programming language. It is easily understood by computers, but difficult to read by people.
Each statement in a machine language program is a sequence of bits. Each bit may be set to 0 or 1.
A series of bits represents instructions that a computer can understand. For example, the number 455 is represented by the bit sequence 111000111.
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-
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
It is very difficult to program in machine language.
The programmer has to remember a lot of code to write a program which results in program errors.
It is difficult to debug the program.
Assembly Languages
Assembly language is a representation of machine language.
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.
The programs written in other than the machine language need to be converted to the machine language.
Assemblers are used to convert assembly language program to machine language.
Every processor has its own assembly language.
The alphanumeric symbols are called mnemonics in the assembly language. The ADD, SUB, MUL, DIV, etc are some symbols called mnemonics.
Advantages of Assembly language
The symbolic programming in assembly language is easier to understand and saves a lot of time and effort by the programmer.
It is easier to correct errors and modify program instructions.
Disadvantages of Assembly language
One of the major disadvantages is that assembly language is machine dependent.
A program written for one computer might not run on other computers with different hardware configuration
High Level Languages
Procedure-oriented languages are high-level languages. These languages are employed for easy and speedy development of a program.
The disadvantages observed with assembly languages are overcome by high-level languages.
The programmer does not need to remember the architecture and registers of a CPU for developing a program.
The compilers are used to translate high-level language program to machine language.
High level languages are designed to be used by the human operator or the programmer.
High-level language doesn’t require addressing hardware constraints to a greater extent when developing a program.
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.
Examples of high level language are C, C++, Java, Python etc.
Advantages of High level language
Testing and debugging a program is easier than in the assembly language.
Portability of a program from one machine to other.
Disadvantage of High level language
A disadvantage of high-level languages is that they are usually less powerful and less efficient, since statements are busy.
High-level languages also need to be compiled and/or interpreted into machine language before execution.
0 Comments