Concept of Computer Language: Before learning any language it is important to know what are the languages and what role they play. The Language a computer can understand and execute is known as Machine Language or Binary Language. The two main types of languages in computer field are:
- Low Level Language
- High Level Language
1. Low Level Computer Language:
These languages are of low level because these are machine dependent and are not portable. It means the program written using low level language on any computer can’t work on another machine or computer. The different types of low level languages are:
a. Machine Language
Although we can design a computer to make it understand many different computer languages, every computer understands only one language without using a translation program.
This language is called machine language of the computer. Normally the machine language of the computer is written as strings of binary l’s and 0’s. The circuitry of a computer can recognize the machine language instructions immediately.
So, we can say machine language is that language in which instructions are written in the form of numbers (0 and 1) so that a computer can understand and act on them.
Sometimes referred to as machine code or object code, machine language is a collection of binary digits or bits that the computer reads and interprets.
A computer cannot directly understand the programming languages used to create computer programs so the program code must be complied.
All programs and programming language eventually generate are run programs in machine language.
Machine language is made up of instructions and data that are all binary numbers.
b. Assembly Language
The Assembly Language was introduced in 1952 to overcome the limitations of Machine language.
Assembly Language is a software tool, is symbolic language that can be directly translated into machine language by a system program called assembler.
The output of an assembler is an object module containing the bit strings that make up the machine language program and information that tells a loader program where to place these bit strings in the computer memory.
A typical programmer uses a text editor to create a text file containing an assembly language program. The name source file and source program are often used for assembly language.
The assembler accepts a source program as input, checks for format errors and produces an object module containing the machine language program.
A loader than loads the object module into the memory of target machine. There the machine language program is run, possibly with the aid of a debugger.
The loader, debugger and machine language program described above must run on the target machine, the text editor and assembler may run there or on a different machine.
An assembler that runs on one machine and produces object modules for another is called a cross assembler.
For example, it is possible to create an assembly language program by using a text editor on a laptop, transfer the source file by using a serial data link to a work station that runs a cross assembler and transfer(or download) the object module to a loader in an embedded micro computer by way of another serial data link.
Although, every computer manufacturer defines a standard assembly language for a new machine when it is introduced, other vendors may define different assembly languages for the same machine.
In assembly language alpha numeric mnemonic codes instead of numeric codes are used for the instructions in the instruction set, for example: using ADD instead of 1110 (binary) or 14 (decimal) for the instruction to add, SUB instead of 1111 (binary) or 15 (decimal) for the instruction to subtract and so on. With this feature, programmer can remember easily and use the instructions in the instruction set.
In assembly language we use alpha numeric names instead of numeric addresses for representing address of fixed storage locations.
For example, we may choose to represent memory locations 0000,1000, 1001 as FRST, SCND and ANSR, respectively in an assembly language program.
With this feature a programmer can remember easily and use the storage locations of the data and instructions used in an assembly language program.
In short we can say that, the language that allows the use of letters and symbols instead of numbers for representing instructions and storage locations is called assembly language or symbolic language.
A program written in an assembly language is known as assembly language program.
- Languages and Machines: An Introduction to the Theory of Computer Science
- AMIE – Section (B) Programming Languages (CP-404) Computer Science and Engineering
2. High Level Computer Language
High level language is the next development in the evolution of computer languages. A high level language is a programming language designed to simplify computer programming.
High level languages are English like languages with less words also known as keywords and fewer ambiguities. Each high level language will have its own syntax and keywords.
The meaning of syntax here is grammar. It is “High level” since several steps removed from the actual code run on the computer’s processor.
High level source code contains easy to read syntax that is later converted into low level language, which can be recognized and run by a specific CPU.
Know about computer programming language in detail:
Most common programming languages are considered high level languages.
Examples include: C++, C#, Cobol, Fortran, Java, Java Script, Pascal, Python etc.
Each of these languages use different syntax. Some are designed for writing desktop software programs, while others are best suited for web development.
But these all are considered high level since they must be processed by a compiler or interpreter before the code is executed. Source code written in languages like C++ must be compiled into machine code in order to run.
The compilation process converts the human readable syntax of the high level language into low level code or machine readable code for a specific processor.
Some code written in scripting languages like Pert and PHP can be run through an interpreter, which converts high level language into low level language.
So we can conclude that although high level language is easy to learn in comparison to the machine language but it can’t get executed directly. It requires some translator to get it translated to machine language.
There are two types of translators for high level language programs. They are interpreter and compiler. In case of interpreter, prior execution, each and every line will get translated and then executed.
In case of compiler, the whole program will get translated as a whole and will create an executable file. And after that, as when required, the executable code will get executed.
These translators programs especially compilers, are huge one and quite expensive. The machine language code generated by the compiler might not be as compact as written straightaway in low level language.
Thus a program written in high level language usually takes longer time to execute.
Although programs written in high level language are easy to develop. While coding if we do some errors that can be easily seen during compilation and we can correct those.
The same high level language program works on any other computer, provided the respective compiler is available for the target architecture. So high level languages are portable.
To conclude, high level languages are almost used now days except where very high speed execution is required.