A computer is an electronic machine capable of performing rapid calculations and data processing. However, unlike human beings, a computer possesses no innate intelligence or common sense; it cannot act independently. To execute any task, it requires a clear, step-by-step sequence of instructions provided by a human user. This human-to-machine communication is made possible through Computer Languages (also known as Programming Languages).
- Instruction (নির্দেশ): A command given to the computer's central processor to perform a specific fundamental operation (such as adding two numbers or moving a value from memory into a register).
- Program (প্রোগ্রাম): A logically organized, sequential collection of instructions written in a programming language designed to solve a specific problem or achieve a designated outcome.
- Programmer (প্রোগ্রামার): The individual who designs, writes, tests, and maintains computer programs.
- Programming (প্রোগ্রামিং): The complete intellectual and technical process of formulating an algorithm, coding it into a programming language, testing, and debugging it.
- Syntax (সিনট্যাক্স): The strict grammatical rules, punctuation, and structural conventions that govern how statements must be written in a specific programming language.
- Semantics (অর্থতত্ত্ব / সিম্যান্টিকস): The actual meaning, logic, and operational outcome of a syntactically correct statement when executed by the computer processor.
Consider the English sentence: "The apple ate the boy." Grammatically (syntax), this sentence is completely correct (Subject + Verb + Object). However, logically and meaningfully (semantics), it is nonsensical. Similarly, in programming, code may have perfect syntax yet produce disastrous results due to flawed semantic logic!
Computer languages have evolved dramatically over decades, moving progressively from raw electronic hardware switches toward natural human language and artificial intelligence. This evolutionary pathway is classified into five distinct generations:
Machine Language is the lowest and most elementary programming language. It is the only language that a computer's Central Processing Unit (CPU) can understand and execute directly without needing any translator.
- Binary Representation: Instructions and data are written entirely in binary code, consisting strictly of strings of 0s and 1s (e.g.,
10110000 01100001). In digital electronics, '0' represents low electrical voltage (OFF) and '1' represents high electrical voltage (ON). - Direct Execution: Because it matches the CPU's native instruction set, execution speed is the fastest possible with zero translation overhead.
- Hardware Dependency (যন্ত্র-নির্ভর): Machine language is strictly hardware-dependent. An instruction set written for an Intel x86 processor will not execute on an ARM or Motorola chip.
- Severe Disadvantages: Writing code in strings of 0s and 1s is excruciatingly tedious, virtually unreadable to humans, highly prone to typographical errors, and extremely difficult to debug or modify. Programmers had to memorize hundreds of numeric binary hardware opcodes and exact physical memory addresses.
To eliminate the harrowing nightmare of writing raw binary strings, computer scientists in the early 1950s created Assembly Language. It introduced human-readable symbolic codes called Mnemonics (উচ্চারণযোগ্য সংকেত) to replace numeric binary opcodes.
- Mnemonic Codes: Instead of writing binary patterns like
00000100for addition, programmers write concise English-like shorthand codes such asADD(addition),SUB(subtraction),MOV(move data),MUL(multiply), andJMP(jump to address). - Symbolic Memory Addressing: Instead of specifying physical binary memory addresses (e.g.,
1100101001110000), programmers can assign descriptive symbolic labels to memory locations, such asNUM1,TOTAL, orRESULT. - Requires a Translator: Because the CPU still only understands binary pulses, an assembly program cannot run directly. It requires a specialized translator program called an Assembler to convert mnemonic statements into machine code.
- Hardware Dependency: Like machine language, assembly language is still considered a Low-Level Language (LLL) because each mnemonic directly corresponds to a specific CPU architecture instruction. It is not portable to different processor families.
Emerging in the late 1950s and 1960s, High-Level Languages (HLL) revolutionized computer science by decoupling programming from underlying machine hardware architectures.
- English-Like Statements & Mathematical Notation: Programs are written using familiar English vocabulary words (e.g.,
print,if,else,while,input) combined with standard mathematical operators (+,-,*,/). - Machine Independence & Portability: A high-level program written on one computer can be executed on completely different computer hardware platforms with minimal or no modification.
- Translator Requirement: High-level source code must be translated into binary machine code before execution, utilizing either a Compiler or an Interpreter.
- Prominent Examples:
- FORTRAN (Formula Translation - 1957): Developed by John Backus at IBM, the first commercial high-level language, engineered for scientific, mathematical, and engineering calculations.
- COBOL (Common Business-Oriented Language - 1959): Spearheaded by Grace Hopper, tailored for corporate accounting, payroll, and banking databases.
- BASIC (Beginner's All-purpose Symbolic Instruction Code - 1964): Created by John Kemeny and Thomas Kurtz at Dartmouth College to teach programming to beginners.
- C (1972): Developed by Dennis Ritchie at Bell Labs; a powerful, efficient structured language used to build operating systems (including UNIX and Windows).
- C++ (1983): Developed by Bjarne Stroustrup, extending C with Object-Oriented features.
- Java (1995): Created by James Gosling at Sun Microsystems with the philosophy "Write Once, Run Anywhere" (WORA).
- Python (1991): Created by Guido van Rossum; celebrated for its clean, readable syntax and extensive versatility across data science, web development, and AI.
While 3GLs are procedural (the programmer must specify step-by-step HOW the computer must achieve the result), Fourth Generation Languages (4GL) are primarily declarative or non-procedural.
- Focus on 'WHAT' Rather than 'HOW': In a 4GL, the user simply describes what output data is needed, and the underlying database management engine determines the optimal mathematical steps to retrieve it.
- Human Orientation & Productivity: Designed to allow non-specialist business managers, database administrators, and researchers to query vast datasets without writing hundreds of lines of procedural loops.
- Key Example: Structured Query Language (SQL): To find all students who scored above 90 marks from a table of 100,000 records, one writes a simple declarative query:
SELECT name, marks FROM students WHERE marks > 90;
- Other examples include database report generators, Oracle Forms, SAS, and ABAP.
Fifth Generation Languages (5GL) represent the cutting edge of programming, designed around Artificial Intelligence (AI), neural computing, natural language processing (NLP), and automated constraint satisfaction.
- Constraint and Rule-Based Solving: Rather than coding an algorithm, the programmer feeds the system a collection of facts, rules, and constraints. When a user asks a query, the inference engine applies formal mathematical logic to deduce the answer.
- Natural Language Interfaces: Users can interact with computers using human conversational sentences rather than rigid programming syntax.
- Key Examples: Prolog (Programming in Logic), Mercury, and expert systems engines.
| Generation | Language Type | Instruction Format | Hardware Portability | Required Translator | Representative Examples |
|---|---|---|---|---|---|
| 1GL | Machine Language | Pure binary strings (0s and 1s) | Non-portable (Hardware dependent) | None (Direct CPU execution) | Binary opcodes (e.g., 10110000) |
| 2GL | Assembly Language | Symbolic Mnemonics (ADD, MOV) | Non-portable (CPU architecture specific) | Assembler | NASM, MASM, GNU Assembler |
| 3GL | High-Level Language | English-like syntax & math formulas | Highly Portable (Machine independent) | Compiler or Interpreter | C, C++, Java, Python, BASIC, FORTRAN |
| 4GL | Non-Procedural / Declarative | Human queries ('What' rather than 'How') | Completely Independent | Database Query Engine / Preprocessor | SQL, Oracle PL/SQL, Report Generators |
| 5GL | AI & Logic Programming | Logical rules, facts & natural language | Completely Independent | AI Inference Engine & Logic Resolvers | Prolog, Mercury, Expert Systems |