Low Level And High-Level Programming Language

Are you new to the word programming or would you need to understand the term more? Read my previous article on introduction to programming here: Here.

Today, we will be talking about types of programming languages with examples. In the world of programming, there are two major kinds of programming languages which are high-level and low-level programming languages. As I mentioned in my previous article, we need programming languages to communicate with the computer. Let's talk about these kinds of programming languages in subsequent paragraphs

  1. Low-level Programming Language:

    This is sometimes referred to as the language of the computer but considering the assembly language, this doesn't seem true. Generally, low-level programming languages are closer to the computer's kernel(A kernel is the part of the computer that controls the hardware). This means low-level language can be used to manipulate the hardware of a computer. There are two types of low-level languages which are machine and assembly language.

    (a). Machine Language: The machine language is machine-oriented(designed to be directly understood and executed by the computer). It consists of binary (0s and 1s) or hexadecimal (base 16) code that can be directly executed by the computer which is not human readable. Is it possible to write in this kind of language you may ask. Of course, it is, you would need to know the architecture(design and characteristics) of the particular computer and it can be time-consuming to write in this language which is why we have high-level languages(more on this later). One advantage of machine languages is that they don't need to be transformed/translated for the computer to execute them since they are in the computer's language(binary or hex) already.

    (b). Assembly Language: Assembly language is also a low-level programming language that is more human-readable because it includes symbols and numbers called Mnemonics. For instance, instead of using the binary code 01001011 to represent the addition(+) operator in the case of binary/Machine language, we could just use the ADD keyword while writing in assembly language. In a metaphorical sense, you could say that assembly language is "part man, part god". This is because assembly language is a low-level programming language that is a bit more human-readable than machine code (the "part man" aspect), but it also allows direct control over the hardware of a computer, much like machine code does (the "part god" aspect). Unlike the Machine Language, the assembly language has to be transformed into the machine language using a tool called an assembler because the computer cannot understand keywords such as 'ADD'. Even with these descriptions of the assembly language, they are still not so human-readable and most importantly, portable. Hence the need for higher-level programming languages.

    It is important to note that one major drawback of low-level programming languages is that they are not portable, that is they are machine-dependent. You might run into an issue running one low-level language code in another machine of a different architecture.

  2. High-Level Language:

    Due to the drawbacks(not human readable, machine dependent, time consumption,...) of low-level languages, the high-level languages were developed. Now we can write programs in more human-readable language, and run our programs on different machines. In as much as they are not machine-dependent, it is also worth noting that they can be operating system-dependent because programs written for a Windows OS might not work for a MacOS. As I mentioned earlier, the computer only understands binary codes(Machine Language) which means high-level languages should be translated or transformed to these machine codes right? Ofcurs! Just like we use the assembler, they are tools for converting high-level languages to machine language which could be a compiler or interpreter depending on the kind of high-level language being used. There are lots of high-level languages. Here are some: Python, C, JavaScript, C#, C++, and so on.

In my next post, I will be talking about Language translators(assembler, Interpreter, and compiler)

Conclusion

  • Programs can be written in low-level or high-level languages

  • Machine languages require no translators since they are binary codes already

  • Assembly language requires an assembler to become machine codes

  • Both Machine and Assembly languages are low-level are not human readable and not portable

  • High-level languages require translators(compilers or interpreters) to become machine codes

  • Examples of high-level languages are C, C#, JavaScript, Python, and so on