What are the types of programming languages?
1. High-Level Languages (Close to human language) (source code)
2. Low-Level Languages:
a. Machine Code (Consist of only 0s and 1s — binary)
b. Assembly Language (Use mnemonics — short abbreviations)
- High-level languages:
Close to human language.
Easier to debug due to natural language.
No knowledge of hardware is needed.
Portable and not designed to run on just one type of machine.
Examples: C++, Java, Pascal, Python, Visual Basic.
2. Low-Level Languages: Assembly and Machine
a. Machine Code:
Consist of only 0s and 1s — binary.
CPU understands directly
Very difficult to write and debug due to binary.
Each number represents a different instruction.
b. Assembly Language:
Between machine code and high-level language.
Use mnemonics — short abbreviations- like “INP” (input a number =>operand: 00000000)
Can make use of special hardware or special machine-dependent instructions.
Requires less memory.
The program that converts source code into machine code (object code) is called translator.
Three types of translator:
Compilers: Convert source code into machine code at a once.
Interpreters: Convert source code into machine code line by line.
Assemblers: Convert assembly language into machine code.