Low level languages – advantages and disadvantages

Low level language abbreviated as LLL, are languages close to the machine level instruction set. They provide less or no abstraction from the hardware. A low-level programming language interacts directly with the registers and memory. Since, instructions written in low level languages are machine dependent. Programs developed using low level languages are machine dependent and are not portable.

Low level language does not require any compiler or interpreter to translate the source to machine code. An assembler may translate the source code written in low level language to machine code.

Programs written in low level languages are fast and memory efficient. However, it is nightmare for programmers to write, debug and maintain low-level programs. They are mostly used to develop operating systems, device drivers, databases and applications that requires direct hardware access.

Low level languages are further classified in two more categories – Machine language and assembly language.

Classification of low level programming language
Classification of low level programming language

Machine language

Machine language is closest language to the hardware. It consists set of instructions that are executed directly by the computer. These instructions are a sequence of binary bits. Each instruction performs a very specific and small task. Instructions written in machine language are machine dependent and varies from computer to computer.

Example: SUB AX, BX = 00001011 00000001 00100010 is an instruction set to subtract values of two registers AX and BX.

In the starting days of programming, program were only written in machine language. Each and every programs were written as a sequence of binaries.

A Programmer must have additional knowledge about the architecture of the particular machine, before programming in machine language. Developing programs using machine language is tedious job. Since, it is very difficult to remember sequence of binaries for different computer architectures. Therefore, nowadays it is not much in practice.

Assembly language

Assembly language is an improvement over machine language. Similar to machine language, assembly language also interacts directly with the hardware. Instead of using raw binary sequence to represent an instruction set, assembly language uses mnemonics.

Mnemonics are short abbreviated English words used to specify a computer instruction. Each instruction in binary has a specific mnemonic. They are architecture dependent and there is a list of separate mnemonics for different computer architectures.

Examples of mnemonics are – ADD, MOV, SUB etc.

Mnemonics gave relief to the programmers from remembering binary sequence for specific instructions. As English words like ADD, MOV, SUB are easy to remember, than binary sequence 10001011. However, programmer still have to remember various mnemonics for different computer architectures.

Assembly language uses a special program called assembler. Assembler translates mnemonics to specific machine code.

Assembly language is still in use. It is used for developing operating systems, device drivers, compilers and other programs that requires direct hardware access.

Advantages of low level languages

  1. Programs developed using low level languages are fast and memory efficient.
  2. Programmers can utilize processor and memory in better way using a low level language.
  3. There is no need of any compiler or interpreters to translate the source to machine code. Thus, cuts the compilation and interpretation time.
  4. Low level languages provide direct manipulation of computer registers and storage.
  5. It can directly communicate with hardware devices.

Disadvantages of low level languages

  1. Programs developed using low level languages are machine dependent and are not portable.
  2. It is difficult to develop, debug and maintain.
  3. Low level programs are more error prone.
  4. Low level programming usually results in poor programming productivity.
  5. Programmer must have additional knowledge of the computer architecture of particular machine, for programming in low level language.