What is Machine Language in Microprocessor and Microcontroller?:
Programmers write instructions in various programming languages. Some programs are directly understandÂable by the computer and other programs require intermediate translation steps. Nowadays hundreds of comÂputer languages are available for use in solving different problems. These programming languages are clasÂsified into three general types namely, Machine language, Assembly languages, High-level languages.
Machine languages is the ‘natural language’ of computers. Machine-language programs are usually writÂten in binary code. Therefore, 0s and 1s are used in a machine-language program. Machine languages are machine-dependent, that is, a particular machine languages can be used on only one type of computer. In this language, a specific binary code is used for each instruction. For example, to copy data from Register A to B, the binary code 0100 0111 is used. Similarly, different binary codes are available in the 8085 microprocessor for different operations such as addition, subtraction, increment, decrement, rotate, and compare. But it is very difficult to write machine-level programs. The program can be simplified by converting binary code to hexadecimal.
Advantages of Machine Languages:
- This is suitable for small and simple programs.
- Program execution is very fast and requires less computation time.
- Generally, this language is suitable for prototype applications as the final product.
Disadvantages of Machine Languages:
- A program written in machine code is a set of binary numbers. Therefore, program writing is difficult and time consumable.
- It is also very difficult to understand a program which is written in machine languages or hexadecimal form.
- Since a program is always written in 0s and 1s, each bit has to be entered individually. Thus, time taken for data entry becomes very slow and tiresome.
- There is always some possibility of errors in writing programs. Even a single bit error in any instrucÂtion can generate unsatisfactory results.
- Such programs tend to be very long.