Computer Languages
A Programming / Computer language is a formal language comprising a set of instructions that produce various kinds of output. Programming languages are used in computer programming to implement algorithms.
Computer Languages are classified into three major categories:--
- Machine Language
- Assembly Languages
- High-Level Languages
1- Machine Language:--
Machine Language is called the language of computer as computer understand only this language. This language consists of sequences of 0's and 1's.
Features of this language are :--
- Natural language of computer.
- Internally 0 and 1 are converted into electric signals.
- They are Machine Dependent.
- difficult to program, modify and error-prone.
- No translator is required.
- Execution of the program is very fast.
- Each and every command must be stated in the form 0 and 1.
2-Assesmbly Language:--
Assembly language commonly called as assembly, asm, symbolic machine code is a human readable notation.
Machine Languages, a program of bits encoding machine operations, is made readable by replacing the raw values with symbols called "MNEMONICS".
for eg: a computer with appropriate processor will understand X86 machine:
10110000 01100001
for programmers however it is easier to remember the equivalent assembly language representation:
MOV AL, 061H
which means to move the hexadecimal value 61(97 decimal) into the processor register with the name "AL". The mnemonics "MOV" means to move and a comma-separated lis of arguments or parameters follows it. This is called a typical Assembly Language statement.
MNEMONICS and their meanings
Mnemonics | Meanings |
LDDA X | Load accumulator with X |
ADD X | Add the contents of memory X to the contents of accumulator |
MUL X | Multiply the contents of memory X to the contents of accumulator. |
STA 1200H | Store contents of accumulator to memory location 1200H |
Features of this language are :--
- Easier to understand and modify.
- Easy to locate and correct answers.
- Assembly is any system software which is specific for a specific machine.
- Use of mnemonics to write programs which are small words specific to machine to denote a specific operation like ADD, SUB, MUL which represent opeations addition, subtraction, multiplication respectively.
- For writing programs set of mnemonics are fixed for a specific type of machine. The programs are written using these mnemonics but internally a translator called assembler converts them to machine language for.
3.High-Level Languages:--
We have seen that Assembly and Machine languages require deep knowledge of computer hardware where as in higher languages you have to know only English words and logic of the problem irrespective of the type of computer you are using.
Use of High-Level Languages makes program easy to read, write, and understand . Any high level languages converted to machine language requires specific translator. A translator for C programing will be different from a translator for FORTON language.
Features of this language are :--
- Program is written in simple English like language.
- Very less error prone.
- For each different HLL a separate translator is required.
- Lets programmer to concentrate on logic rather worry about hardware configurations.
Comments
Post a Comment