Computer programming:
Computer programming means giving instruction to the computer and to interact with the computer we need a language to communicate with it. Languages like C, C++, Java, Python, swift, ruby, php, etc. Each language have their own features.
Why we need programming?
Suppose you have to arrange 15 different numbers and asked to arrange them in ascending order then you can do it easily, but what if the numbers are thousand? It is difficult task and time consuming as well. Result may also contain errors, to simplify this task we can write a program. If algorithm is correct then we will get result accurately and quickly. So, here programming takes place.
After we proceed for C language, let's get some knowledge about different types of computer programming language...
After we proceed for C language, let's get some knowledge about different types of computer programming language...
Types of languages:
Major two types of languages are available. One was Low level programming language and another one was high level programming language. There are also another languages are also available like scripting language, system language, domain-specific language, esoteric language, etc.
Low level Language:
A computer can’t understand instructions given to it in language which is used by human to communicate with each other like English or any other regional languages. Low level languages are either machine codes or are very close them. A computer can only understand and execute instructions given in the form of machine language like binary. Machine language and assembly languages are two types of low level language.
- Machine language:
Machine language is usually written in hex. Machine language is the only language that a computer can understand. It is the lowest and most elementary level of programming language and was the first type of programming language to be developed. Since a computer is capable of recognizing electric signals, it understands machine language. A manufacturer designs a computer to obey just one language, its machine code, which is represented inside the computer by a string of binary digits 0 and 1. The symbol 1 stands for the presence of an electric pulse and the 0 stands for the absence of an electric pulse.
- Advantages of machine language:
- Advantages of machine language:
Machine language requires no translator to translate the code. It is directly understood by the computer. It makes fast and efficient use of the computer.
- Dis-advantages of machine language:
- Dis-advantages of machine language:
It is very hard to find errors in a program written in the machine language. All memory addresses and operation codes have to be remembered.
- Assembly language:
Machine language is very complicated, to make it little bit easy another language is invented is called assembly language. Assembly language is another low level language, but very important language in which operation codes and operands are given in the form of alphanumeric symbols instead of 0’s and l’s. Alphanumeric symbols are also known as mnemonic codes and can combine in a maximum of five-letter combinations e.g. SUB for subtraction, ADD for addition, LABEL, START, END etc. Mnemonics are look like some symbolic word, so assembly language is also known as Symbolic Programming Language.
- Advantages of Assembly language:
- Advantages of Assembly language:
Assembly language is very easier to use and understand as compared to machine language. Assembly language is very easy to locate and correct errors as compared to machine language. So, assembly language can be easily modified.
- Dis-advantages of Assembly language:
- Dis-advantages of Assembly language:
Assembly language is also machine dependent language. Since it is machine dependent, the programmer have to understand the hardware.
High Level Languages:
Format of high level computer languages are similar to English or any other regional languages. The main purpose of making high level languages was to enable people to write programs very easily. Basically in high level language is symbolic languages which replaces mnemonics to mathematical symbols and / or English words. Every instruction in the high level language is translated into many machine language instructions that the computer hardware can understand. There are many different types of high level language.
- Types of high level language:
- String and list processing: Prolog (Program in Logic), LISP (List processing)
- Object oriented programming languages: C++, JAVA
- Algebraic formula type processing: FORTRAN (FORmula TRANslation), BASIC (Beginners all-purpose symbolic Instruction code), ALGOL (ALGOrithmic Language), APL (A Programming Language)
- Visual Programming Language: Visual Basic, Visual Java, Visual C
- Business Data Processing: RPG (Report Program Generator), COBOL (Common Business Oriented Language)
- Advantages of high level language:
- Advantages of high level language:
High level languages are easier to learn, because they are very user friendly. They are easier to maintain as well. High level are similar to English, they use well-known symbols and English vocabulary as well. They are not machine based language, they are object or problem oriented . A program written in a high-level language can be translated into many different machine languages. That program can run on any computer for which there exists an appropriate translator. High level language is independent of the machine on which it is used. For example programs developed in a high-level language can be run on any computer.
- Dis-advantages of high level language:
- Dis-advantages of high level language:
This language has to be translated into the machine language by a particular translator, which consumes time. The object code or program generated by a translator might be inefficient compared to an equivalent assembly language program.
C Language:
C language is invented by Dennis Ritchie in 1972 at Bell Telephone Laboratories. C is general-purpose, imperative, procedural computer programming language. C language developed for use with the Unix operating system.
C is widely used Professional language for different reasons:
It is very easy to learn.
Structured language.
C makes efficient programs.
It can handle low level activities.
It can be compile in different computers.
Structured language.
C makes efficient programs.
It can handle low level activities.
It can be compile in different computers.
No comments:
Post a Comment