High level programming languages are the ones that most of us recognise. The syntax (words & grammar) ofhigh level languages are closer to natural language, or the language that we speak.
Often, when we are programming we will read our statements as if they are pseudocode, or even structured English. For example, if I was reading the following Python code, I may read it in my head as “If x does not equal 3 then, add 1 to x”:
if x != 3:
x += 1
Even in Python, which looks quite different from our natural language, the code is not simple enough for a computer to understand. Instead, when we run our code it is translated down into machine code. Code which is close to machine code such as Assembley language is known as a Low Level Language.
To translate the code, the programmer can chose to use a variety of types of translator.
A compiler takes high level languages and translates them to a low level language. All of the code is translated at once and an executable file is produced.
This means that the executable file can be shared with others who won’t need a translator on their machine to run the program, but they also won’t be able to see the code. The downside of this is that the compiler can only translate for one particular processor which means different versions are needed for different processors.
An interpreter takes high level languages and translates them to a low level language line by line. In doing so it can stop if it finds an error and output this to the user.
This is particularly useful for debugging code, and running web pages which may change depending on the inputs.
Even Assembley language is still to complex for a computer, so this is translated to pure machine code…. binary! An assembler translates Assembly Language into pure machine code.
Find this page helpful? Share the love on your social media mentioning @TeachAllAboutIT and we’ll enter you in our monthly draw to win a gift voucher for any product on the site!