- A programming language is a means of communication for the user to communicate with the computer system.
- The programming language is a set of instructions which tells the computer what to do.
- This is a language which is understood by both man and machine. There are a number of programming languages.
- However all these languages are designed to perform at least certain basic instructions and operations;
- These instructions and operations are :
- Input/output operations,
- Arithmetic operations – mathematical operations like addition, subtraction,
- Logical operations – Comparison for equality, inequality etc.
- Movement of instructions and data to and from the CPU.
Types of programming languages
- Machine Language
- Assembly Language
- High Level Language
- Low Level Language
- This is the only language which is understood by the computer.
- This is the language nearest to the machine. In this language the programs are written in binary code i.e. the instructions are made only by a combination of binary digits 0 and 1.
- Machine language may vary from machine to machine depending upon the computer architecture.
- Machine language is difficult to read and write, since it does not resemble conventional mathematical notation or human language, and its codes vary from computer to computer.
- Assembly language is one level above machine language.
- It uses short mnemonic codes for instructions and allows the programmer to introduce names for blocks of memory that hold data.
- One might thus write “add pay, total” instead of “0110101100101000” for an instruction that adds two numbers.
- Assembly language is designed to be easily translated into machine language.
- The program written in assembly language has to be converted into machine language for use by the computer.
- This is achieved with the help of the assembler. The assembler is a system program which is supplied by the manufacturer.
- It converts the assembly program into a machine readable program and the resulting program is called the object program.
- Thus the input to the assembler is the source program and the output of the assembler is the object program.
- The assembler translates each assembly language instruction into a corresponding machine code.
High Level Language
- Higher level languages make use of English like words and statements and mathematical symbols for instructions.
- The first high-level languages were introduced in the 1950’s.
- Higher level languages make programming easier, since they are relatively easy to learn. Less time is required to write programs in high level languages.
- The programmer is not required to know the detailed working of the computer system in order to program in a high level language.
- Today, high-level languages are in widespread use. These include BASIC, C, C++, Cobol, FORTRAN, Java, Pascal, Perl, PHP, Python, Ruby, and Visual Basic.
Low Level Language
- Low-level languages are designed to operate and handle the entire hardware and instructions set architecture of a computer directly.
- Low-level languages are considered to be closer to computers.
- In other words, their prime function is to operate, manage and manipulate the computing hardware and components.
- Programs and applications written in a low-level language are directly executable on the computing hardware without any interpretation or translation.