Programming language
Definition :
- A programming language can be considered as a tool to implement our ideas .
- It consists of commands and instructions which are used to create programs or software.
- Usually, programming languages that programmers use to write code are referred to as High Level Languages.
- Example: Python , C , Java , C++ , JavaScript etc.
Programming languages are mainly divided into two :
- High Level Languages
- Low Level Languages
1. High Level Languages :
High level languages
are languages that enables a programmer uses English and mathematical symbols
like + , - , / , *,% etc.. which are easier to read, write and maintain.
High Level
programming Languages include Python, Java, C,C++,JavaScript etc.
Below is an example
for writing programs in python:
First example:
If we want to print
any message on the screen then, use print( )
function.
print("Code
Malayalam")
Second example:
If we want to add 2
numbers, then use the + operator
Sum= 10+17
High Level Languages
are not directly understood by the computer and hence we need translators to
convert high level language to machine language.
There are three
types of translators:
- Interpreter
- Compiler
- Assembler
In Python , interpreter is used as the translator.
Interpreter is used
to translates high level language to machine language.
Interpreter
translates program line by line.
2. Low Level Languages :
Low Level Languages
are named " low " because their communication is close to how
different hardware communicate with each other.
They are
machine-oriented and it's difficult to learn them and also to do programming
with these languages.
Low level languages
are divided into two:
- Machine Language
- Assembly Language
1. Machine Language :
Machine Language is
the language which does require any translation and it is directly understood
by the computer.
All the instructions
used are binary , that is, string of 1s and 0s.
Example:
1010101000100101
1010101 1010100 0001101010101
2. Assembly Language :
Assembly
Language usually has one statement per
machine instruction and they are specific to particular type of processor or
operating systems.
Writing assembly
language programs are difficult and not
all programmers use them in daily tasks.
The translator used
is assembler.
Example:
ADD AX,BX [AX and BX are memory registers]
No comments:
Post a Comment