#) Explain about programming languages.
Programming Languages
Ans: A programming language is one which a computer programmer uses to express solution to a given problem so that it can be understood by a computer. There are many similarities between programming languages and speaking (natural) languages. Just as there are many speaking languages, like English, French, Nepali, so too there are many programming languages, like FORTRAN, Pascal, COBOL, Basic, PL/1 and C. Each programming language has its own grammatical (.syntax) rules which must be obeyed in order to write valid programs, just as a natural language has its own rules for forming sentences. And just as we can assign a meaning to an English sentence, say, each valid statement in a programming language has a specific meaning.
Let us suppose that we have written a program in the programming language C or QBASIC. We might think that the computer can understand and execute the statements, which make up the program C or QBASIC. However, this is not so, at least not directly. The program must first be translated into the (only) language which the computer can understand-this is called the machine language. The act of translating is part of a process called compiling. It is important to understand that the computer can only execute instructions, which are written in machine language. Thus no matter what programming language we use, it must first be translated into machine language before the computer can understand it.
Types of Language
1. Machine Language
When computers were first used, machine language was the only language available for writing programs. Machine language varies from one computer to another, but the basic principles are essentially the same. Everything one wishes to express in machine language is done using the binary number system. In order to illustrate the ideas involved, we will use a computer which has the following features:
a) Say 9999 words of memory, then it is numbered as 0 to 9998
b) A set of instructions, in which the computer can be programmed.
The fact is that a single human instruction to the computer is broken down into a series of simple steps. Computer instructions can be roughly classified as:
-instructions which move data from one word of memory to the next;
-instructions which move data between memory and the accumulator (where arithmetic can be done on it);
-instructions for performing the arithmetic operations ADD, SUBTRACT, MULTIPLY and DIVIDE;
-instructions for comparing two quantities;
-instructions for branching from one instruction to another, that is, for changing the normal order of executing instructions one after the other;
-instructions for performing input/output;
2. Assembly and low level languages
Assembly language is usually called a low-level programming language. We usually think of machine language, that is binary instructions, as the lowest-level programming language. Assembly language is a bit higher than machine language. Each computer has its own assembly language and it differs from computer to computer. Assembler translates or converts the program written in assembly language into machine code.
3. High level languages
The problem oriented languages rather than machine oriented languages are HLL. English words are used as instructions. Fortran and Cobol are the earliest and Pascal, PL/1, Basic, C are the popular. HLL are machine independent languages. A program is said to be portable if it can be used on other computers. Program written in HLL are portable
Related posts
Popular posts
-
Damber Nepali Songs
Top & Famous Songs Aja Aakash Ma Euta Tara Tara Antim Palta Bhetna Aau Sabai Sathi Gaye Bigreko Manche Ma Ke Samjhi Khelyau Timro Pauju ...
-
ACKNOWLEDGEMENT and table of content of E-shopping
ACKNOWLEDGEMENT This report has been prepared for the Final Year Project on topic “E-shoppin...
-
Questions for boring minds
1) Without touching,how will you kill a Plant ? a) By Knife b) By Rope and Gun c) By Scolding d) None 2) I was in Dream. In Dream I visited ...
Featured Post
If Something Happened to You, Could Your Family Find Your Money?
Nobody likes this question, so let's get it over with quickly. If you were seriously ill or died tomorrow, would your family know whe...
Popular Posts
-
Damber Nepali Songs
Top & Famous Songs Aja Aakash Ma Euta Tara Tara Antim Palta Bhetna Aau Sabai Sathi Gaye Bigreko Manche Ma Ke Samjhi Khelyau Timro Pauju ...
-
ACKNOWLEDGEMENT and table of content of E-shopping
ACKNOWLEDGEMENT This report has been prepared for the Final Year Project on topic “E-shoppin...
-
Questions for boring minds
1) Without touching,how will you kill a Plant ? a) By Knife b) By Rope and Gun c) By Scolding d) None 2) I was in Dream. In Dream I visited ...
-
Click on the link and get the most beautiful templates to download for free
Click To download the tempalte 1
-
What i have talked with my friends on 2011-04-12
Respected Sir, Things I have done on the DGC packs are: · CSV upload for the tax and city · Calculation of the total amo...
-
The main object of this lab is to be familiar with the DML(Data Manipulation Language)
DBMS LAB 4 The main object of this lab is to be familiar with the DML(Data Manipulation Language) Dele...
-
Drupal JavaScripts to hide and show resources
{# 1. Main slider paragraph template #} {# File: templates/paragraph--slider-with-resources.html.twig #} <div class="slider-with-res...
-
RIHANNA LYRICS S.O.S. (Rescue Me) Lyrics with video
[Intro] Lalala lalala la la lala la Ohhh You know... I never felt like this before Lalala lalala la la lala la Ohhh Feels like.. so real [Ve...
-
Final Year Project Report ON E-Shopping Named RupJayGri Shop declaration and recommendation
Pokhara University Faculty of Management Nobel College DECLARATION we hereby declare that the wor...
-
DataReader Class note which is very easy
The DataReader Class The DataReader object represents a read-only, forward-only stream of data, which...
No comments:
Post a Comment