CHAPTER -1
TOPIC - COMPUTER LANGUAGES
Computer Languages
How do you think we communicate with a computer? A computer
cannot understand any commands that you may give in English or in any
other language. It has its own set of instructions for communication, or
what we call computer languages. This is an important part of your
syllabus for banking exams. Let us take a look.
The user of a computer must be able to communicate with it. That means,
he must be able to give the computer commands and understand the
output that the computer generates. This is possible due to the invention
of computer languages. Basically, there are two main categories of
computer languages, namely Low Level Language and High Level
Language. Let us take a brief look at both these types of computer languages.
A language is the main medium of communicating between the Computer systems and
the most common are the programming languages. As we know a Computer only
understands binary numbers that is 0 and 1 to perform various operations but the languages
are developed for different types of work on a Computer. A language consists of all the
instructions to make a request to the system for processing a task. From the first generation
and now fourth generation of the Computers there were several programming languages
used to communicate with the Computer. Here we will go in the detail of the Computer
language and its types.
Computer Language Description:
A Computer language includes various languages that are used to communicate with a
Computer machine. Some of the languages like programming language which is a set of
codes or instructions used for communicating the machine. Machine code is also
considered as a computer language that can be used for programming and also HTML
which is a computer language or a markup language but not a programming language.
Similarly there are different types of languages developed for different types of work to
be performed by communicating with the machine. But all the languages that are now
available are categorized into two basic types of languages including Low-level language
and High level language.
Low Level Languages
Low level languages are the machine codes in which the instructions are given in machine
language in the form of 0 and 1 to a Computer system. It is mainly designed to operate
and handle all the hardware and instructions set architecture of a Computer. The main
function of the Low level language is to operate, manage and manipulate the hardware
and system components. There are various programs and applications written in low level
languages that are directly executable without any interpretation or translation. The most
famous and the base of all programming languages “C” and “C++” are mostly used Low
level languages till today. Low level language is also divided into two parts are Machine
language and Assembly language.
Machine Language
This is one of the most basic low level languages. The language was first developed to
interact with the first generation computers. It is written in binary code or machine code,
which means it basically comprises of only two digits – 1 and 0.
Assembly Language
This is the second generation programming language that has almost similar structure and
set of commands as Machine language. Instead of using numbers like in Machine
languages here we use words or names in English forms and also symbols. The programs
that have been written using words, names and symbols in assembly language are
converted to machine language using an Assembler. Because a Computer only
understands machine code languages that’s why we need an Assembler that can convert
the Assembly level language to Machine language so the Computer gets the instruction
and responds quickly.
High Level Language
When we talk about high level languages, these are programming languages. Some
prominent examples are COBOL, FORTRAN, BASIC, C, C++, PASCAL, LISP, Ada,
Algol, Prolog and Java. It is user-friendly as the programs are written in English using
words, symbols, characters, numbers that needs to be converted to machine code for
processing.
The important feature about such high level languages is that they allow the programmer to
write programs for all types of computers and systems. Every instruction in high level
language is converted to machine language for the computer to comprehend.
How does a computer translate High level language to Machine level
language
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 translators 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.
Assembler
Assembler is a translator which is used to translate the assembly language code into
machine language code.
Differences between compiler and interpreter
SI. Compiler Interpreter
No
1 Performs the translation of a Performs statement by
program as a whole. statement translation.
2 Execution is faster. Execution is slower.
3 Requires more memory as Memory usage is efficient as
linking is needed for the no intermediate object code is
generated intermediate object generated.
code.
4 Debugging is hard as the error It stops translation when the
messages are generated after first error is met. Hence,
scanning the entire program debugging is easy.
only.
5 Programming languages like Programming languages like
C, C++ uses compilers. Python, BASIC, and Ruby
uses interpreters.
Practical Activities - 1
Date: ________________________
1. Using drawing toolbar of Ms Word, Show the working of Interpreter & Compiler
2. Make a PPT on “ Computer Languages”.