[go: up one dir, main page]

0% found this document useful (0 votes)
52 views4 pages

Types of Computer Language

Computer language

Uploaded by

parvezmulla876
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views4 pages

Types of Computer Language

Computer language

Uploaded by

parvezmulla876
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Introduction to Types of Computer Language

The computer language is defined as code or syntax which is used to write


programs or any specific applications. The computer language is used to
communicate with computers. Broadly the computer language can be
classified into three categories assembly language, machine language, and
high-level language. The machine language is considered as oldest
computer language among all three. In machine language, the input is
directly given as binary input which is processed by the machine. Binary
inputs mean one and zero form. For computer language processing the
system needs compiler and interpreter to convert the language in computer
language so that it can be processed by a machine.
Different Types of Computer Language
Below are the top 3 types of computer language:
1. Machine Language
The machine language is sometimes referred to as machine code or object
code which is set of binary digits 0 and 1. These binary digits are understood
and read by a computer system and interpret it easily. It is considered a
native language as it can be directly understood by a central processing unit
(CPU). The machine language is not so easy to understand, as the language
uses the binary system in which the commands are written in 1 and 0 form
which is not easy to interpret. There is only one language which is
understood by computer language which is machine language. The
operating system of the computer system is used to identify the exact
machine language used for that particular system.
The operating system defines how the program should write so that it can
be converted to machine language and the system takes appropriate action.
The computer programs and scripts can also be written in other
programming languages like C, C++, and JAVA. However, these languages
cannot be directly understood by a computer system so there is a need for
a program that can convert these computer programs to machine language.
The compiler is used to convert the programs to machine language which
can be easily understood by computer systems. The compiler generates the
binary file and executable file.
Example of machine language for the text “Hello World”.
01001000 0110101 01101100 01101100 01101111 00100000
01010111 01101111 01110010 01101100 01100100.
2. Assembly Language
The assembly language is considered a low-level language for
microprocessors and many other programmable devices. The assembly
language is also considered as second-generation language. The first
generation language is machine language. The assembly language is
mostly famous for writing an operating system and also in writing different
desktop applications. The operations carried out by programmers using
assembly language are memory management, registry access, and clock
cycle operations. The drawback of assembly language is the code cannot
be reused and the language is not so easy to understand. The assembly
language is considered a group of other languages. It is used to implements
the symbolic representation of machine code which is used to program CPU
architecture. The other name of assembly language is assembly code. For
any processor, the most used programming language is assembly
language.
In assembly language, the programmer does the operation which can be
directly executed on a central processing unit (CPU). The language has
certain drawbacks as it does not contain any variables or functions in
programs and also the program is not portable on different processors. The
assembly language uses the same structure and commands which machine
language does use but it uses names in place of numbers. The operations
performed using the assembly language is very fast. The operations are
much faster when it is compared to high-level language.
3. High-Level Language
The development of high-level language was done when the programmers
face the issue in writing programs as the older language has portability
issues which mean the code written in one machine cannot be transferred
to other machines. Thus lead to the development of high-level language.
The high-level language is easy to understand and the code can be written
easily as the programs written are user-friendly in a high-level language.
The other advantage of code written in a high-level language is the code is
independent of a computer system which means the code can be
transferred to other machines. The high-level of language uses the concept
of abstraction and also focus on programming language rather than
focusing on computer hardware components like register utilization or
memory utilization.
The development of higher-level language is done for a programmer to
write a human-readable program that can be easily understood by any user.
The syntax used and the programming style can be easily understood by
humans if it is compared to low-level language. The only requirement in a
high-level language is the need of compiler. As the program written in a
high-level language is not directly understood by the computer system.
Before the execution of high-level programs, it needs to be converted to
machine level language. The examples of high-level language are C++, C,
JAVA, FORTRAN, Pascal, Perl, Ruby, and Visual Basic.
What is Translators? Different type of translators
A program written in high-level language is called as source code. To
convert the source code into machine code, translators are needed.
A translator takes a program written in source language as input and
converts it into a program in target language as output.
It also detects and reports the error during translation.
Roles of translator are:
• Translating the high-level language program input into an equivalent
machine language program.
• Providing diagnostic messages wherever the programmer violates
specification of the high-level language program.
Different type of translators

The different types of translator are as follows:


Compiler

Compiler is a translator which is used to convert programs in high-level


language to low-level language. It translates the entire program and also
reports the errors in source program encountered during the translation.

Interpreter
Interpreter is a translator which is used to convert programs in high-level
language to low-level language. Interpreter translates line by line and
reports the error once it encountered during the translation process.
It directly executes the operations specified in the source program when
the input is given by the user.
It gives better error diagnostics than a compiler.

Differences between compiler and interpreter

SI. Compiler Interpreter


No

1 Performs the translation of a program Performs statement by statement


as a whole. translation.

2 Execution is faster. Execution is slower.

3 Requires more memory as linking is Memory usage is efficient as no


needed for the generated intermediate intermediate object code is
object code. generated.

4 Debugging is hard as the error messages It stops translation when the first
are generated after scanning the entire error is met. Hence, debugging is
program only. easy.

5 Programming languages like C, C++ uses Programming languages like Python,


compilers. BASIC, and Ruby uses interpreters.
Assembler

Assembler is a translator which is used to translate the assembly language code


into machine language code.

You might also like