0% found this document useful (0 votes)
21 views

Types of Computer Language

Uploaded by

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

Types of Computer Language

Uploaded by

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

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. It is used to
communicate with computers.
Broadly the computer language can be
classified into three categories:-

• assembly language,
• machine language, and
• high-level language
Machine Language
• Machine language is a low-level language made up of binary numbers or bits
that a computer can understand.
• It is also known as machine code or object code and is extremely tough to
comprehend.
• The only language that the computer understands is machine language.
• In the computer, all data like videos, programs, pictures are represented in
binary.
• The CPU processes this machine code or binary data as input. Then, an
application or operating system gets the resulting output from the CPU and
displays it visually.
• For example, the ASCII code 01000001 represents the letter "A" in machine
language, yet it is shown on the screen as "A“

• Example of machine language for the text “Hello World”:-


• 01001000 0110101 01101100 01101100 01101111 00100000 01010111
01101111 01110010 01101100 01100100
Advantages and Disadvantages of machine language
Advantages Disadvantages
Machine language Complex language for
makes fast and efficient programming:
use of the computer. All operation codes have to be
remembered

It requires no translator Time consuming


to translate the code. It
is directly understood by
the computer.

Error Prone
It is hard to amend or find errors
in a program written in the
machine language

Machine dependent :program


written for one system cannot
execute on other system
Assembly language or middle level language

Middle-level language is a computer language in which the instructions are created using
symbols such as letters, digits and special characters.

Assembly language is an example of middle-level language.


In assembly language, we use predefined words called mnemonics. It is symbolic
representation of machine language
Binary code instructions in low-level language are replaced with mnemonics and
operands in middle-level language.

But the computer cannot understand mnemonics, so we use a translator


called Assembler to translate mnemonics into machine language.
Assembler is a translator which takes assembly code as input and produces machine
code as output.

That means, the computer cannot understand middle-level language, so it needs to be


translated into a low-level language to make it understandable by the computer.
Assembler is used to translate middle-level language into low-level language.
Example assemblylanguage
Pros of Learning/Using Assembly Language Cons of Learning/Using Assembly Language

Assembly language makes it faster to run It is incredibly difficult to write code in assembly
complex code. language compared to high-level languages.

Simpler for humans to understand than The syntax is hard to learn and can be difficult to
machine-level language. remember or use quickly.

Convenient to use in testing, debugging, The code is longer and more complex than with
optimization, and development. a high-level language.

Requires little memory and works well with It lacks portability between devices with
devices with low random access memory (RAM). different processors.

Assembly language can be used to reverse It’s often bypassed by compilers that convert
engineer software where the source code is not high-level languages straight to machine
available. language.
The high-level language is a programming language that allows a programmer to write the
programs which are independent of a particular type of computer.
The high-level languages are considered as high-level because they are closer to human
languages than machine-level languages.

When writing a program in a high-level language, then the whole attention needs to be
paid to the logic of the problem.
High level programs require compilers/interpreters to translate source code to machine
language.
We can compile the source code written in high level language to multiple machine
languages. Thus, they are machine independent language.
High level languages are grouped in two categories based on
execution model – compiled or interpreted languages.
Example of complied language: c,c++ c#,cobol
Example of interpreted languageL- Java Script,Perl,Python etc
Advantages of High level language
• High level languages are programmer friendly. They are easy to write, debug
and maintain.
• It provide higher level of abstraction from machine languages.

• Easy to learn.
• Less error prone, easy to find and debug errors.
• High level programming results in better programming productivity.

Disadvantages of High level language


• It takes additional translation times to translate the source to machine code.
• High level programs are comparatively slower than low level programs.
• Compared to low level programs, they are generally less memory efficient.
• Cannot communicate directly with the hardware.
Low-level language High-level language

It is a machine-friendly language, i.e., the It is a user-friendly language as this language


computer understands the machine language, is written in simple English words, which can
which is represented in 0 or 1. be easily understood by humans.

The low-level language takes more time to It executes at a faster pace.


execute.

It requires the assembler to convert the It requires the compiler to convert the high-
assembly code into machine code. level language instructions into machine code.

The machine code cannot run on all machines, The high-level code can run all the platforms,
so it is not a portable language. so it is a portable language.

It is memory efficient. It is less memory efficient.

Debugging and maintenance are not easier in Debugging and maintenance are easier in a
a low-level language. high-level language.
Machine-level language Assembly language

The machine-level language comes at the lowest The assembly language comes above the machine
level in the hierarchy, so it has zero abstraction language means that it has less abstraction level
level from the hardware. from the hardware.

It cannot be easily understood by humans. It is easy to read, write, and maintain.

The machine-level language is written in binary The assembly language is written in simple English
digits, i.e., 0 and 1. language, so it is easily understandable by the
users.

It does not require any translator as the machine In assembly language, the assembler is used to
code is directly executed by the computer. convert the assembly code into machine code.

It is a first-generation programming language. It is a second-generation programming language.

You might also like