Computer Language
The term computer language
includes a wide variety of languages used to communicate with computers.
Different kinds of languages have been developed to perform different types of
work on the computer. Basically languages can be divided into two categories.
Two basic types of computer languages are:
1. Lower-level language
A language that corresponds
directly to a specific machine. There are two types of low-level languages.
Machine language
A language that is directly
understood by the hardware. Machine language is the lowest and most Elementary
level of programming language. It was the first type of programming language to
be developed. It uses binary digits '0' and '1' for giving instructions.
Assembly Language
A slightly more user-friendly
language that directly corresponds to machine language. Assembly Language was
developed to overcome some of the many inconveniences of machine language. This
is another new level but very important language in which operation codes and
operands are given in the form of alphanumeric symbols instead of 0 and 1. It
is called mnemonics (nodes). Because of this feature Assembly Language is also
known as symbolic programming language.
2. High-level language
Any language that is independent
of the machine. Types of high-level languages are BASIC (beginners all-purpose
symbolic instruction code), Fortran (Formula Translation), Pl/1 (Programming
Language/one), ALGOL (Algorithmic Language), C, C++, JAVA etc. High-level
languages allow a user to give instruction in the English language which makes
them easier to learn. Programs developed on one system can be executed on other
systems and will produce the same outputs. It uses the translator program for
converting the high-level program into machine language. Compiler and
interpreter are used as translators in HLL.
Compiler
Compiler is a translator program
that converts to the whole HLL Source program into object code, machine program
code at once and also generates list of errors and shows it to the user.
Interpreter
Interpreter is translator program
that convert HLL programs line by line. If there is any error at any point or
line, program execution will stop until error is removed or debugged.
4GL (Fourth Generation Language)
This generation of language
allows non-programmer users to write program to query databases and to generate
custom reports. Characteristics of 4GL
- User-friendly
- Execution is fast
- Easy to learn and program by non-programmer user
- Uses of artificial intelligence and neural network
- 4GL are closer to human language than other high-level languages and are accessible to people without formal training as programmers. Clarion, Data flax, Forte Tool are example of 4GL.
Short Notes:
Comparison on human language and computer language
SN
|
Human Language
|
SN
|
Computer Language
|
1
|
Vocabulary
|
1
|
Keywords/ Reserved Words
|
2
|
Grammar
|
2
|
Syntax
|
3
|
Meaning/ Sense
|
3
|
Semantic
|
Generation of Computer Language
1st Generation Language - Machine Language
- It is the least level language,
- The instruction are written in the form of series of 1's and 0's,
- It is directly understood by computer,
- It is time consuming for encoding and decoding,
- It is quite difficult to write and understand,
- It is machine dependent i.e. varies from one system architecture to another architecture.
2nd Generation Language - Assembly Language
- It uses symbolic code (Mnemonic Code) and Binary Code (Machine Code 1's or 0's),
- It is also machine dependent language,
- It is quite easier than machine language,
- It is also called low level language.
3rd Generation Language - High Level Language
- More approach to human language,
- It uses English language for instructions.
- Procedural Language/ Procedural Oriented Language
- Most of the programming language falls on this categories. Example, COBOL, FORTRAN... etc.
4th Generation Language
- Problem Oriented Language/ Non-procedural Language
- Most of all database system falls on this categories.
5th Generation Language Natural Language
Language Processors or Translators
It is the
system software that translates source code to object code.
Types of Translator/ Language Processor
- Assembler
- Compiler/ Interpreter
Assembler
It is the system software that
translates a source code/program written in assembly language into machine
code.
Compiler/Interpreter
It is the system software that translates a source code/program written in high level language into machine code.Difference between Compiler and Interpreter
SN
|
Compiler
|
Interpreter
|
1
|
Compiler works on
the complete program at once. It takes the entire program at once.
|
Interpreter
program works line-by-line. It takes one statement at a time as input.
|
2
|
Compiler generates
intermediate code, called the object code or machine code.
|
Interpreter does
not generate intermediate object code or machine code.
|
3
|
Compiler executes
conditional control statements (like if-else and switch case) and logical
constructs faster than interpreter.
|
Interpreter
executes conditional control statements at a much slower speed.
|
4
|
Compiled
programs take more memory because
the entire object code has to reside in memory.
|
Interpreter does
not generate intermediate object code. As a result, interpreter programs
are more memory efficient.
|
5
|
Compile once and
run anytime. Compiled program does not need to be compiled every time.
|
Interpreted
programs are interpreted line-by-line every time they are run.
|
6
|
Errors are
reported after the entire program is checked for syntactical and other
errors.
|
Error is reported
as soon as the first error is encountered. Rest of the program will not be checked
until the existing error is removed.
|
7
|
A compiled
language is more difficult to debug.
|
Debugging is easy
because interpreter stops and reports errors as it encounters them.
|
8
|
Compiler does not
allow a program to run until it is completely error-free.
|
Interpreter runs
the program from fist line and stops execution only if it encounters an
error.
|
9
|
Compiled languages
are more efficient but difficult to debug.
|
Interpreted
languages are less efficient but easier to debug. This makes such languages
an ideal choice for new students.
|
10
|
Examples of programming languages that use Compilers: C,
C++, COBOL
|
Examples of programming languages that use interpreters:
BASIC, Visual Basic, Python, Ruby, PHP, Perl, MATLAB, Lisp
|
Bug
- The error of computer program.
- Error in computer language.
Debug
The process of
eliminating error (bug).
Types of Bugs
1. Syntax Error
- Due to the structure of instruction or reserved word.
- It is signaled by translator.
2. Logical Errors
- Due to the logic of programmer.
3. Runtime Errors
Due to hardware
fault.
There are brief and short notes both. I like the styles.
ReplyDeleteThank you for information on generation of computer languages.
ReplyDelete