Computer Languages and Generations of Computers
Science & Technology › IT, Telecommunications and Computers · Topic 14.19
A computer language is a set of rules and symbols used to give instructions to a computer. Languages are grouped into generations by how close they are to the machine or to human language. First generation languages are machine languages of binary code, second generation are assembly languages that use short codes called mnemonics, third generation are high-level languages such as FORTRAN of 1957, COBOL of 1959, BASIC, C created by Dennis Ritchie in 1972, C++, Java of 1995 and Python of 1991, fourth generation are languages for databases and reports such as SQL, and fifth generation are languages linked to artificial intelligence and logic, such as Prolog. A translator converts the program into machine code: an assembler for assembly language, a compiler for the whole program, and an interpreter line by line.
5 min read · UPSC Prelims · Science & Technology · IT, Telecommunications and Computers
At a Glance
- 1GL Machine language
- 2GL Assembly language
- 3GL High-level, C, Java, Python
- 4GL SQL and report tools
- 5GL AI and logic, Prolog
- Exam link UPSC Prelims, Science & Technology: IT, Telecommunications and Computers
Where Does It Fit?
This topic follows the account of cyber agencies. It returns to the basics of computing and explains how people tell computers what to do, which also links with the history of computer generations. Previous topic: National Cyber Coordination Centre. Next topic: Supercomputers and Their Applications.
What Are the Generations of Programming Languages?
| Generation | Features and examples |
|---|---|
| First (machine language) | Binary 0s and 1s that the processor runs directly. Fast but hard for humans to write and specific to one machine |
| Second (assembly language) | Uses mnemonics such as ADD and MOV that an assembler turns into machine code. Still machine specific |
| Third (high-level languages) | Closer to English and portable across machines. FORTRAN, COBOL, BASIC, Pascal, C, C++, Java, Python. Need a compiler or interpreter |
| Fourth (4GL) | Declarative languages that state what is wanted and not how. SQL for databases, report generators and some scripting tools |
| Fifth (5GL) | Problem solving using constraints and logic, for artificial intelligence. Prolog and Lisp are linked to this idea |
| Low-level versus high-level | Low-level languages give control over hardware, high-level languages are easier to write |
| Markup versus programming | HTML describes page structure but is not a programming language |
Which Translators and Famous Languages Matter?
- Assembler: converts assembly language to machine code
- Compiler: translates a whole program into machine code before it runs, giving faster execution. Used for C and C++
- Interpreter: translates and runs the program line by line, which helps in testing. Used in Python and JavaScript, though many use hybrid methods
- FORTRAN: 1957, by John Backus at IBM, for scientific computing
- COBOL: 1959, for business data processing, still used in banks
- C: 1972, by Dennis Ritchie at Bell Labs, used to write the UNIX operating system
- Java: 1995, by James Gosling at Sun Microsystems, with the idea of write once and run anywhere
- Python: 1991, by Guido van Rossum, popular for data science and artificial intelligence
What Else Should You Remember?
- Object-oriented programming: organises code in objects with data and functions, used in C++, Java and Python
- SQL: Structured Query Language, used to query relational databases
- JavaScript: the main language of web browsers, created by Brendan Eich in 1995
- Source and object code: source code is what the programmer writes, and object code is the machine code made by the compiler
- Algorithm and flowchart: a step-by-step method to solve a problem, and a diagram of it
- Bug and debugging: an error in a program and the process of finding and fixing it. The term bug is linked to a moth found in a Harvard computer in 1947
- Open source: software whose source code is public, such as Linux and Python
- Indian language computing: Unicode and the Bhashini mission support computing in Indian languages
- Hardware generations: separate from language generations, described in History and Generations of Computers
- Low-code: tools that let people build apps with little coding
- AI coding assistants: programs that help write code, a new trend
- Caution: languages are sometimes placed in different generations by different textbooks
- Pascal and BASIC: Pascal, named after Blaise Pascal, and BASIC were widely used for teaching beginners in the 1970s and 1980s
- Scripting languages: languages such as Python, JavaScript and PHP are used to automate tasks and build websites, and are usually interpreted
- Portability of Java: Java source is compiled into bytecode that runs on a Java Virtual Machine, so the same program works on different systems
- Machine dependence: machine and assembly programs run only on a processor family, while high-level programs can run on many machines after translation
- Language choice in India: Indian IT firms use Java, Python and C++ for software services, and COBOL still runs legacy systems in banks and government
- Syntax and semantics: syntax is the grammar rules of a language and semantics is the meaning of the statements, and errors in each are different
Why Does It Matter for the Exam?
- Generations: machine, assembly, high-level, 4GL, 5GL
- Translators: compiler versus interpreter
- Creators and years: C, Java, Python, FORTRAN
- Current affairs link: AI coding tools and Indian language computing
- Common errors: calling HTML a programming language or assembly a high-level language
As an analytical point, each generation of language raised the level of abstraction so that more people could program. India’s software industry grew on high-level languages and now works on AI tools.
Why Is This Topic Important?
- Generations Machine to AI
- Translators Compiler, interpreter
- People Ritchie, Gosling
What Came Next?
The next topic covers supercomputers and their applications. Next topic: Supercomputers and Their Applications.
Key People and Terms
- Machine language Binary instructions
- Assembler Assembly translator
- Compiler Whole program translator
- Interpreter Line by line translator
- Source code Human-written program
- SQL Database query language
Exam Corner
Points to Remember
- C: 1972, Dennis Ritchie.
- Java: 1995; Python: 1991.
- COBOL: 1959; FORTRAN: 1957.
- Compiler = whole program; interpreter = line by line.
- HTML is a markup language.
Do Not Confuse With
- Compiler and interpreter Whole program versus line by line
- Assembly and machine language Mnemonics versus binary
- Markup and programming language Describes structure versus performs logic
Memory Hook
One-zero machine, mnemonic assembly, English-like high level; compiler takes all, interpreter takes line.
Mains Angle
Questions ask for generations, translators and creators. These points help.
- Evolution Abstraction
- Importance Software industry
- Trend AI tools
A Question You May Face
An original practice question, not a past paper question.
“Explain the generations of computer languages and the difference between compilers and interpreters.”
How to Answer
- Generations 1GL to 5GL.
- Translators Assembler, compiler, interpreter.
- Examples C, Java, Python.
- Trend AI.
GS Relevance
Frequently Asked Questions
What are the generations of programming languages?
Programming languages are grouped into five generations. The first is machine language of binary code, the second is assembly language with short mnemonics, the third is high-level languages such as C, Java and Python, the fourth is declarative languages such as SQL, and the fifth is languages used for artificial intelligence and logic programming, such as Prolog.
What is the difference between a compiler and an interpreter?
A compiler translates the whole source program into machine code before it is run, so the program then runs fast. An interpreter translates and executes the program one line at a time, which makes finding errors easier but usually makes execution slower. C and C++ use compilers while Python is commonly interpreted.
Who created the C language?
Dennis Ritchie created the C programming language at Bell Laboratories in about 1972. It was used to write the UNIX operating system and became the base for many later languages including C++ and Java. It combines high-level features with the ability to control hardware closely.
What is an assembly language?
An assembly language is a low-level programming language that uses short symbolic codes called mnemonics, such as ADD or MOV, in place of binary machine instructions. A program called an assembler converts it into machine code. It is easier than binary but still tied to a particular processor type.
Is HTML a programming language?
No. HTML, HyperText Markup Language, is a markup language that describes the structure and content of web pages using tags, but it does not contain logic such as loops and decisions. Web pages combine HTML with style sheets and programming languages such as JavaScript to make them interactive.
PYQ Practice — Statement Analysis
1 A compiler translates the entire program before execution.
An interpreter works line by line.
2 Assembly language is a high-level language.
It is a low-level language.
3 C was developed by Dennis Ritchie.
At Bell Labs in 1972.
4 HTML is a fifth generation programming language.
It is a markup language.
Past Mains Questions on This Topic
This topic comes under IT, Telecommunications and Computers. UPSC Mains questions asked on the matching syllabus topic, year-wise with marks:
Related Topics
Browse the full Science & Technology index