A programming language is a formal way of writing instructions that a computer can process to perform a particular task or solve a problem.
A programming language is a formal way of writing instructions that a computer can process to perform a particular task or solve a problem.
A programming language is a way for humans to give instructions to a computer. It provides rules, keywords, and syntax for writing programs.
Computers understand machine-level instructions, but writing large programs directly in binary form is difficult for humans. Programming languages provide a structured way to express logic and solve problems.
Programming languages can broadly be divided into Low-Level Languages and High-Level Languages.
| Category | Main Types | Main Characteristic |
|---|---|---|
| Low-Level Languages | Machine Language, Assembly Language | Close to hardware and machine dependent. |
| High-Level Languages | C, C++, Java, Python, JavaScript | Easier for humans to understand and more portable. |
Machine Language is the lowest-level programming language. It consists of binary codes, mainly 0s and 1s, that are directly understood and executed by the CPU.
Each processor has its own instruction set, so machine language is hardware-dependent.
Machine language is the language that the CPU directly understands. It uses binary instructions such as:
Assembly Language is a low-level language that uses mnemonics instead of binary codes. Common mnemonics include MOV, ADD, SUB, and JMP.
An assembler converts assembly language instructions into machine code.
Assembly language represents machine instructions using short symbolic words instead of only 0s and 1s.
High-Level Languages use syntax that is easier for humans to understand. They often use English-like keywords and mathematical notation.
Examples include C, C++, Java, Python, and JavaScript. High-level programs are generally translated using a compiler or interpreter before or during execution.
C is a high-level programming language, although it also provides low-level features that allow close interaction with system hardware.
| Feature | Low-Level | High-Level |
|---|---|---|
| Abstraction | Minimal | High |
| Portability | Low / No | High |
| Speed | Very fast | Generally slower due to translation |
| Ease of Use | Difficult | Easier |
| Examples | Machine, Assembly | C, Python, Java |
Programming languages evolved through different generations. Each generation increased the level of abstraction and made programming easier and more productive.
| Generation | Type | Example | Main Feature |
|---|---|---|---|
| 1GL | Machine Language | Binary | Directly understood by hardware |
| 2GL | Assembly Language | MOV, ADD | Uses mnemonics |
| 3GL | Procedural High-Level Language | C, Fortran, Pascal | Uses logic and control structures |
| 4GL | Non-Procedural Language | SQL, R | Focuses more on what is required |
| 5GL | AI-Based Language | Prolog, Mercury | Problem solving using higher-level approaches |
1GL → Machine | 2GL → Assembly | 3GL → Procedural | 4GL → Non-Procedural | 5GL → AI-Based
A good programming language should make programs easy to write, understand, test, maintain and execute.
| Feature | Meaning |
|---|---|
| Readability | Code should be easy to understand. |
| Writability | Programs should be easy to write. |
| Reliability | Programs should produce dependable results. |
| Portability | Programs should work on different platforms with minimal changes. |
| Efficiency | Programs should use time and memory effectively. |
| Abstraction | Complex implementation details can be hidden. |
| Modularity | Large programs can be divided into smaller modules or functions. |
Different programming languages are used for different types of applications.
| Language | Common Applications |
|---|---|
| C / C++ | System software, operating systems, embedded systems and games. |
| Python | AI, machine learning, data science and automation. |
| Java | Enterprise applications, Android and banking systems. |
| JavaScript | Web development and interactive web applications. |
| SQL | Database management and data querying. |
| Type / Generation | Remember This |
|---|---|
| Machine Language | Binary, lowest level, directly understood by CPU. |
| Assembly Language | Uses mnemonics and requires an assembler. |
| High-Level Language | Human-friendly, portable and easier to maintain. |
| 1GL | Machine Language. |
| 2GL | Assembly Language. |
| 3GL | Procedural languages such as C. |
| 4GL | Non-procedural languages such as SQL. |
| 5GL | AI-based languages such as Prolog. |
Remember the basic hierarchy: Machine → Assembly → High-Level . As the level increases, programming generally becomes easier for humans and the abstraction level increases.
After reading the topic, watch this Hindi lecture covering machine, assembly, low-level and high-level programming languages.
A short handwritten-style revision sheet covering machine language, assembly language, high-level languages and language generations will be provided here.
Use the mind map for quick revision of low-level and high-level languages and their generations.