#) 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
-
Your Loan History Follows You: CIB Reports and Blacklisting in Nepal
Every time you apply for a loan from a bank or financial institution in Nepal, someone checks your record with the Credit Information Bur...
-
What a Share Trade Really Costs: Commission, Fees and Capital Gains Tax
You buy a share at Rs 500 and sell it at Rs 540. That's Rs 40 profit per share, right? Not quite. By the time the broker, SEBON, the ...
-
SIP in Nepal: Investing a Fixed Amount Every Month in Mutual Funds
A question I get a lot: "I don't have a big sum to invest. Is it even worth starting?" Yes. In fact, for most salaried peop...
-
EPF, CIT and SSF: Where the Retirement Deduction on Your Payslip Goes
If you have a salaried job in Nepal, your payslip probably has a line that quietly takes a chunk of your pay before you see it. It might ...
-
Festival Spending Without the Hangover: Start Saving for Next Dashain Now
Dashain is just behind us and Tihar is a couple of weeks away. If you're like most Nepali households, this is the most expensive stre...
-
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...
-
Reading Your Salary Slip: Where Your Pay Goes Before It Reaches You
Your offer letter said Rs 60,000 a month. Your bank account says something smaller. Most people shrug and assume "tax," but a s...
-
Small Scans, Big Leaks: Getting Control of Your Wallet and QR Spending
A few years ago, paying for tea meant opening your purse and seeing the notes get thinner. Now it's a scan, a beep, done. eSewa, Khal...
-
Buying Gold This Tihar? Jewellery Isn't the Same as Investing in Gold
In most Nepali families, gold isn't really a financial decision. It's a wedding gift, a mother's security, something you buy ...
-
Before You Sign for That Loan: What an EMI Really Costs You
Festival season is loan season. The scooter ads, the "zero down payment" phone offers, the cousin who just got a personal loan ...
No comments:
Post a Comment