Programming languages are the instructions that a computer can understand. A computer is basically a collection of circuits that use current as a means to do certain tasks. How could one talk to a computer and tell it what to do? Well, the only language that the computers will understand is the language of electric currents. Thus we need a machine language to communicate with a computer.
A computer doesn’t understand instructions in the usual languages like English or Hindi, rather it accepts inputs of a certain type only. These inputs are known as the computer language or the machine language. The machine language is entirely different than the ones we use. But the machine language can’t be used always. It is too simple to easily and conveniently denote all the information that a computer processes.
Thus we have developed languages that can be used to write instructions in, instructions that the computer can easily understand. These languages are like the machine language but are a little more complex than it. Thus it becomes possible to feed instruction into a computer with the help of the programming languages.
Browse more Topics under Computer Applications
A program is a set of instructions that is intended for a special purpose. For example, let us say that you want your computer to create a recipe for the sweetest cake in the world. In order to do this, you will have to tell the computer what to do first. You will have to tell the computer what a cake is, or what a recipe is! The set of instructions that you want the computer to follow or know forms a program.
The language in which these instructions are fed to the computer form the programming languages. These programming languages are converted into the machine language inside the computer. Remember that the computer can only understand the machine language or the binary language as it is also known. Binary language is also a programming language but it is too simple to be used for the complicated calculations that are to be done.
Having trouble with concepts like DBMS? Have an important exam soon? Click here and start your preparations now!
Assembly level Languages
The languages that the computer can understand but are more complex than the machine language or the binary language. Some examples of the assembly level languages are FORTRAN, COBOL, C, Python etc. Now that we have established that the computer can only understand the machine language and not any other, the question arises that how does the computer understand these assembly languages? The answer is that we convert these programming languages into the machine language. The part of the computer that does it is known as the compiler.
Questions on the Concept
Let us see some examples that may be asked on these topics.
Q 1: Out of the following options, one doesn’t belong. Pick the one that doesn’t
A) Interpreter B) Translator C) Compiler D) Debugger
Answer: Let us look at each option. Selecting options at random is not the correct strategy for the exams. So an interpreter in terms of the computer knowledge is a program that can analyze and execute a program line by line. For example, you have written three lines in the compiler. The lines will be in the assembly level language. The compiler is a program that runs these lines or in other words executes the instructions in these lines directly without converting them to the machine language.
With that in mind, we realize that option A has to do with the programming languages. Similarly, the compiler is that program which converts a given set of instructions into the machine language. The debugger is also a program that finds and removes “bugs” from a program. Bugs are errors that occur in a program while writing the code using a given programming language. Thus all the three options are related to the programming languages. The option B seems to be the one that doesn’t fit here. So the answer is B i.e Translator.
Find all the topics of Reasoning Ability here!
We have the most complete syllabus of quantitative aptitude in one place for you! Click here!
Some Programming Languages
There have been many programming languages since the development of computers. Every language has a set of rules that you need to follow while constructing sentences. These rules are called the Grammar. In programming, we call these rules the Syntax of the language. Every language has a syntax of its own and to write a code (program ) in that language, you need to follow this syntax. Following are some examples of the most common or famous programming languages:
- FORTRAN: It stands for Formula Translation. Used for mathematical calculations.
- CORAL: It stands for Computer Online Real-time Applications Language.
- HTML: It stands for Hyper Text Markup Language.
- COBOL: It stands for Common Business Oriented Language.
Other examples include LISP, ALGOL, Pascal, C, C ++, C #, Python, R etc. are all examples of some programming languages.
Q 1: Out of the following programming languages, which one will you use more likely if you were a scientist?
Ans: D) FORTRAN