Machine language program

ComputersComputer ProgrammingMicroprocessor

Computer can understand only the language of Digital Electronics. Digital Electronics deals with presence and absence of voltages. Within the computer there are two logics can play their role. These logics are −

  • Positive Logic − Here presence of voltage will be denoted by 1 and absence of voltage will be denoted by 0

  • Negative Logic −Here presence of voltage will be denoted by 0 and absence of voltage will be denoted by 1

But obviously computer can follow anyone of the logics at a time, not both the logics simultaneously. To make the computer understand, a program can be written using only 0s and 1s. The data can also be specified and represented using only 0s and 1s. Such a program is called Machine Language program. Machine language was the first in the evolution of computer programming languages. Computer directly understands a program written in the machine language. So as a result, machine language program does not require any translator to convert from one form to another. In fact, even to this day, basically computers understand only the 0s and 1s.

Disadvantages of machine language program − Writing a program in machine language has the following drawbacks.

  • It is very tiresome to work with and highly error prone. While writing the program, a 1 and 0 can get interchanged due to typographical error. But then it is very difficult to locate it for correction. So a machine language program is very difficult to debug.

  • Just having a look at the program, it is very difficult to visualize the function of the program. In fact, it is very difficult to make out whether a particular bit sequence is an instruction in the program, or a data value, or the output result. As instructions, data, output and operands, all are represented using 0s and 1s in machine language.

  • Machine language programs are platform and architecture-dependent. The same program does not work on another computer by a different manufacturer. This is because machine language is different for different computers. Say the bite pattern 11110000 means addition in one architecture but might be representing subtraction in another architecture as well.

  • To develop a program in machine language, the programmer must be highly conversant with the organization and architecture of the computer system being used.

Advantages of machine language program −The only advantages of writing in machine language are

  • The Machine language program is executed faster than a program written in a high-level language (high-level language is discussed a little later). The efficiency of the program solely depends on the complexity of the program itself.

  • A translator like compiler or interpreter is not needed and so results in a cheaper computer system.

As a conclusion, we can mention that nowadays, machine language is rarely used, except where very high-speed execution is required. Machine language written program is also used in cheap microcomputer systems.

raja
Published on 02-Jan-2019 16:05:05
Advertisements