Computer Fundamental
Computer Tutorial

Machine Language



Machine Language

A program written in machine language is a collection of binary digits or bits that the computer reads and interprets. It is a system of instructions and data executed directly by a computer∙s CPU. It is also referred to as machine code or object code. It is written as strings of 0’s and 1’s.

Programming languages

Some of the features of a program written in machine language are as follows:
» The computer can understand the programs written in machine language directly. No translation of the program is needed.
» Program written in machine language can be executed very fast (Since no translation is required).
» Machine language is defined by the hardware of a computer. It depends on the type of the processor or processor family that the computer uses, and is thus machine-dependent. A machine- level program written on one computer may not work on another computer with a different processor.
» Computers may also differ in other details, such as memory arrangement, operating systems, and peripheral devices; because a program normally relies on such factors, different computer may not run the same machine language program, even when the same type of processor is used.
» Most machine-level instructions have one or more opcode fields which specify the basic instruction type (such as arithmetic, logical, jump, etc), the actual operation (such as add or compare), and some other fields.
» It is difficult to write a program in machine language as it has to be written in binary code. For e.g., 00010001 11001001. Such programs are also difficult to modify.
» Since writing programs in machine language is very difficult, programs are hardly written in machine language.