High and Low Level Languages
Programming languages
What is a program?
Programs are our way of telling a computer what to do, how to do it, and when to do it. This enables a single computer to perform many different types of tasks. A COMPUTER PROGRAM is a list of instructions that enable a computer to perform a specific task. Computer programs can be written in high-level languages or low-level languages, depending on the task to be performed and the computer to be used.
High-level languages
High-level languages enable a programmer to focus on the problem to be solved and require no knowledge of the hardware and instruction set of the computer that will use the program. Programs written in a high-level language are easier to:
• read and understand as the language used is closer to human language
• write in a shorter time
• debug at the development stage
• maintain once in use.
An example of a high level language can be python.
Low-level languages
Low-level languages can refer to machine code, the binary instructions that a computer understands, or an assembly language that needs to be translated into machine code.
Machine code
Machine code or machine language is a set of instructions executed directly by a computer’s central processing unit (CPU)
Translators
A translator is a program that converts source code into object code. Generally, there are three types of translator: compilers and interpreters.
Compilers
A COMPILER is a computer program that translates a program written in a high-level language (HLL) into machine code so that it can be directly used by a computer to perform a required task
Interpreters
An INTERPRETER is a computer program that reads a statement from a program written in a high-level language, performs the action specified and then does the same with the next statement and so on.
Assemblers
An ASSEMBLER is a computer program that translates a program written in an assembly language into machine code so that it can be directly used by a computer to perform a required task.
Syntax errors
When a program is being compiled, if any syntax errors are found no translated program is produced. Instead, a list of all the errors in the whole program is produced. The programmer corrects these errors and recompiles the program. When a program is being interpreted, the interpreter performs the actions specified by each statement until a syntax error is found
Using an Integrated/Interactive Development Environment (IDE)
Most high-level programming languages offer the use of an IDE for program development. This contains an editor with an interpreter and/or compiler together with debugging tools, which can improve the speed of program development.