This chapter continues with the discussion of development of computer programs. Once a programmer has finished planning of a computer program, he/she is now ready to write the steps of the corresponding algorithm in a programming language.
Computer language or programming language is a language acceptable to a computer system, and the process of writing instructions in such a language is called programming or coding. The goal of this post is to introduce some popular programming languages.
Analogy with natural languages:
Language is a mans of communication. We use a natural language such as English, to communicate our emotions and ideas to others. Similarly a programmer uses a computer language to instruct computer what he/she want to do.
All natural languages (English, French, German, etc.) use a standard set of words and symbols for communication. Everyone uses that language understands these words and symbols. The set of words allowed in a language is called its vocabulary. For example, the word used in English from the vocabulary of English language. Each word has a definite meaning. Similarly, every computer language has a vocabulary of its own. Each word in the vocabulary has a definite unambiguous meaning. The main difference between natural language and the computer language is that natural languages have a large vocabulary but most languages use a very limited or restricted vocabulary. This is because of programming language by its very nature and purpose does not need to say too much. Every problem to be solved by a computer has to be broken down into discrete (simple and separate), logical steps basically compiling of four fundamental operations -
1. Input and Output operations.
2. Arithmetic operations.
3. Operations for data movement within CPU and Memory.
4. Logical or comparison operations.
Every natural language has a systematic method of using the words and symbols in that language identified by the grammar rules of language. Similarly, we need to use the words and symbols of a computer language as per the set rules, known as a syntax rules, of the language. In case of a natural language, one can use poor and incorrect vocabulary and grammar and still communicate his/her thoughts. However, in case of programming language, unless a programmer adheres exactly to the syntax rules of the language, even down to the punctuation marks, a computer will not understand his/her instruction.
Over the years, programming languages have progressed from machine oriented languages ( that use strings of binary 1s and 0s) to problem oriented languages ( that use common mathematical and/or English terms). However, we can classify all computer languages broadly into following three categories:
1. Machine language.
2. Assembly language.
3. High-level language.
I have made separate detailed post of these three languages, you can see from there.
Comments
Post a Comment