HIGH LEVEL LANGUAGES -HIGH SCHOOL
Definition of Terms: Program, Computer Language & Programming Language
Introduction
In the world of computing, every operation you see your computer perform — from simple arithmetic to designing a website — is guided by programs written in different computer languages. Understanding how these languages work is the foundation of programming and software development.
This note explains what a program, computer language, and programming language are, and how they evolved from early machine code to modern high-level languages like Python and Java.
Definition of a Program
A program is a set of instructions written in a computer language to perform a specific task or solve a problem. Think of a program as a recipe: it tells the computer what steps to follow to achieve a result.
Key parts of a program
- Instructions/Statements: Steps the computer executes (read input, compute, show output).
- Variables: Named storage for data (e.g.,
age,score). - Data types: Types of values variables can hold (integer, string, float).
- Control structures: Decide flow of program (if-then, loops).
- Comments: Notes in code for humans — ignored by the computer.
Definition of a Computer Language
A computer language is a method of writing instructions so that a computer can carry out tasks. Languages range from machine code (binary) to human-friendly languages like Python.
Levels of computer languages
- Low-level languages: Close to hardware — machine code and assembly.
- High-level languages: Human-readable — Python, Java, C, BASIC.
Definition of a Programming Language
A programming language is a formal language used by programmers to write programs. It has rules (syntax) and keywords to express instructions that computers can execute after translation.
Types / Generations of Programming Languages
1. Machine Language (1st Generation)
Description: The earliest language, written in binary (0s and 1s) that the computer processor understands directly.
Example: 10101000 00000001
Advantages: Fast execution; no translation required.
Disadvantages: Hard to learn, write and debug; machine-dependent.
2. Assembly Language (2nd Generation)
Description: Uses mnemonic codes (e.g., MOV, ADD) which are easier than binary. Needs an assembler to convert to machine code.
Example:
MOV A, 4
ADD A, B
Advantages: Easier to read than machine code; efficient.
Disadvantages: Still hardware-dependent; requires translation.
3. High-Level Language (3rd Generation)
Description: Uses English-like statements and mathematical expressions. Programmers write in these languages and then use a compiler or interpreter to translate into machine code.
Examples: Python, C, C++, Java, BASIC, Pascal.
High-Level Language (HLL) — Definition, Advantages & Disadvantages
Definition: A High-Level Language (HLL) is a programming language that is easy for humans to read and write, using English-like keywords and structures. It is translated to machine code by a compiler or interpreter.
Features of HLL
- English-like commands (e.g.,
print,if,while). - Machine independence — portable code.
- Use of translators (compilers/interpreters).
- Supports structured and modular programming.
Advantages of HLL
- Easy to learn and use.
- Portable across systems.
- Faster development time.
- Rich libraries and built-in functions.
- Errors are easier to locate and fix.
Disadvantages of HLL
- Slower execution than low-level languages (translation overhead).
- Requires translation before running (compiler/interpreter).
- Less direct control over hardware.
4. Fourth Generation Languages (4GL)
Designed to reduce the time, effort and code required to develop programs. Examples: SQL, MATLAB. Often used for database queries and report generation.
5. Fifth Generation Languages (5GL)
Used for artificial intelligence and expert systems (e.g., Prolog). These aim to let the programmer state the problem, not the steps to solve it.
Translators: How Code Becomes Machine Instructions
Computers only understand machine code. Translators convert human-readable programs into machine code so the computer can execute them.
Types of translators
- Compiler: Translates the entire source code into machine code before execution (used by C, C++).
- Interpreter: Translates and executes code line-by-line (used by Python, JavaScript).
- Assembler: Converts assembly language into machine code.
| Translator | Input | Output |
|---|---|---|
| Compiler | High-level language | Machine code (whole program) |
| Interpreter | High-level language | Machine code (line-by-line) |
| Assembler | Assembly language | Machine code |
Importance of Programming Languages
- They enable humans to communicate instructions to computers.
- They make problem solving and automation possible.
- They are the foundation for building software, games, and apps.
- They teach logical thinking and structure.
Class Activity
- List three high-level programming languages and state one use for each.
- Write one advantage and one disadvantage of machine language.
- Describe the translator used for assembly language and its purpose.
Take-Home Assignment
- Explain the difference between a program and a programming language.
- State two characteristics of high-level languages.
- List the five generations of programming languages and give one example for each.
Practice Questions (Click to reveal answers)
1. What is a program?
2. Give one example of a high-level language.
3. Which translator is used in Assembly Language?
4. Mention one disadvantage of machine language.
5. Which generation of programming languages is often used in Artificial Intelligence?
Conclusion
Programming languages have evolved from low-level machine code to high-level languages that make programming easier and faster. Each generation brought improvements — making computers more accessible and powerful. Learning these basics prepares students to understand how software is built and to begin writing their own programs.
Comments
Post a Comment