INTRODUCTION OF COMPUTER MACHINE LANGUAGE
Computers can be programmed to understand many different computer languages. But there is only one language which does not require any translator program to convert the language into machine understandable form and this language is called machine language. This language can be understood by the computers without help of any translator. This is the fundamental language of a computer. It is written as strings of 1s and 0s. The circuitries of a computer are so designed that it can understand the machine language and convert it into the electrical signals. An instruction or data which is written in machine language has two parts. The first part of the instruction is called operation code or shortly written as (Operation Code) OPCODE. The operation code of the instruction tells the computer to perform functions. The second part, known as OPERAND, of the instruction contains the address or location where to store or find the data. Thus each instruction tells the control unit of CPU what to do and the length and location of the data field that are involved in the operation such as reading, adding, subtracting, writing, and so on. We know that computers use binary digits 0s and 1s to perform the internal operations. Machine languages consist of binary numbers and CUP can directly understand this.
A typical program instruction to print a number on the printer might be: 101100111111010011101100.
Thus this is clear that it is not a very easy language to learn partly because of it is difficult to read it and understand it and partly because it is written in a number system with that we are not familiar. But some early programmers wrote their program in the binary form. Since programmers are much more familiar with the decimal number system and many of them prefer to write their programs in decimal number system. These programmers wrote their programs in decimal and leave the input devices to convert them into binary number system which is understandable by the computers. Hence the set of instructions written in either binary or decimal number system which can be understood by the computers directly is known as machine language.
ADVANTAGE OF MACHINE LANGUAGE
The programs written in machine languages are executed very fast because they do not need to be translated to understand them for computers.
DISADVANTAGES AND LIMITATION OF MACHINE LANGUAGE
The disadvantages and limitation of machine language are listed below.
- MACHINE DEPENDENCY
- DIFFICULT TO PROGRAM
- DIFFICULT TO MODIFY
- ERROR PRONE
The machine language is machine dependent because the internal design of every computer is different and it depend on the structure of ALU, control unit and the size of word length of the memory unit. Every computer is operated on signals so if the internal structure varies from computer to computer then a program written in machine langue for a particular computer will not respond for other computer. For example if one person is trying to learn machine language and after some time he becomes proficient in this language for and he writes programs for his computer if suddenly his computer fails to respond and he needs to buy a new computer then the codes he has written for his earlier computer will not work in his new computer because if the internal structure of his new computer will not match with the previous one then it will not work. Thus he has to learn and write new programs again the machine language for his new computer.
DIFFICULT TO PROGRAM:
Although computers can easily understand machine langue but for a humane it is difficult to program because it is compulsory for a human programmer either to learn the code number for various commands or to refer for a reference card. A programmer has to keep the records of locations of storage. A machine language programmer must be expert about hardware structure of the computer.
DIFFICULT TO MODIFY:
Machine language programs are difficult to modify because checking for an error in the program is like writing the whole program again. Modify a particular machine language program after long time is so difficult as writing a new one thus many programmers choose to write new program except wasting time and energy for checking the program.
Machine language programs are prone to errors. Since while writing programs in machine language a programmer has to remember the OPCODE and storage location of data thus it become very difficult for him to concentrate. Hence this results in program errors.