Machine Language is the language written as strings of binary 1`s and 0`s. It is the only language which a computer understands without using a translation program.
A machine language instruction has two parts. The first part is the operation code which tells the computer what function to perform and the second part is the operand which tells the computer where to find or store the data which is to be manipulated. A programmer needs to write numeric codes for the instruction and storage location of data.
- It is machine dependant i.e. it differs from computer to computer.
- It is difficult to program and write
- It is prone to errors
- It is difficult to modify
It is a low level programming language that allows a user to write a program using alphanumeric mnemonic codes, instead of numeric codes for a set of instructions.
It requires a translator known as assembler to convert assembly language into machine language so that it can be understood by the computer. It is easier to remember and write than machine language.
Assembler – It is a computer program which converts or translates assembly language into machine language. It assembles the machine language program in the main memory of the computer and makes it ready for execution.
- It is easy to understand and use
- It is easy to locate and correct errors
- It is easier to modify
- It is machine dependant
High level Language
It is a machine independent language. It enables a user to write programs in a language which resembles English words and familiar mathematical symbols. COBOL was the first high level language developed for business.
Each statement in a high level language is a micro instruction which is translated into several machine language instructions.
A compiler is a translator program which translates a high level programming language into equivalent machine language programs. It compiles a set of machine language instructions for every high level language program.
Source code: It is the input or the programming instructor of a procedural language.
The compiler translates the source code into machine level language which is known as object code. Object code can be saved and executed as and when desired by the user.
Source Code → Language Translator Program → Object code
High level language → Machine level language
Linker: A program used with a compiler to provide links to the libraries needed for an executable program. It takes one or more object code generated by a compiler and combines them into a single executable program.
Interpreter: It is a translator used for translating high level language into the desired output. It takes one statement, translates it into machine language instructions and then immediately executes the result. Its output is the result of program execution.
Advantages of High level Language –
- It is machine independent
- It is easier to learn and use
- It is easier to maintain and gives few errors
- It lowers efficiency
- It is less flexible