Computer Languages and Types of Computer Languages

1. What is a Computer Language?

  • Just like humans use languages (Urdu, Sindhi, English) to communicate with each other,
    computers also need a language to understand what we want them to do.
  • Computers only understand binary language (0 and 1).
  • Writing everything in 0s and 1s is very hard for humans, so computer languages are divided into different types to make them easier.

2. Types of Computer Languages

A. Low-Level Language

  • Called low-level because it is very close to the computer’s hardware.
  • Difficult for humans, but easy and fast for the computer.
  • Two types: Machine Language and Assembly Language.

i. Machine Language

  • The first generation programming language.
  • Written in binary code (0s and 1s).
  • Example:
    • 10110000 01100001 → This could be an instruction to move the number 97 into a computer register.
  • Advantage:
    • Very fast (directly understood by the CPU, no translator needed).
  • Disadvantage:
    • Very difficult to read and write.
    • One small mistake in a 0 or 1 can completely change the program.

Analogy for students:
It’s like speaking in computer’s mother tongue (binary), but humans don’t understand it easily.

ii. Assembly Language

  • The second generation programming language.
  • Uses mnemonics (symbols/short codes) instead of 0s and 1s.
  • Examples:
    • ADD A, B → Add numbers stored in A and B.
    • MOV A, 5 → Move number 5 into location A.
  • Needs an Assembler (software that translates assembly code into machine code).
  • Advantage:
    • Easier than machine language.
    • Programs are shorter and easier to debug.
  • Disadvantage:
    • Still machine dependent (a program written for Intel processor may not work on another type of processor).

Analogy for students:
If machine language is numbers, assembly language is like using short forms or SMS codes (LOL, BRB). Easier than numbers, but still not full English.

B. High-Level Language

  • The third generation programming language.
  • Close to human language (English-like statements).
  • Each statement can perform many instructions in machine language.
  • Needs a Compiler or Interpreter to convert into machine code.

Examples:

  • C → widely used in system programming.
  • Python → simple and modern, used in AI and data science.
  • Java → used in Android apps.
  • BASIC, FORTRAN, Pascal → older but important in history.

Example Code in High-Level Language (Python):

print("Hello, World!")

This single line prints “Hello, World!” on the screen. Imagine how many binary codes this one line is hiding!

Advantages:

  • Easy to learn, read, and write.
  • Program development is fast.
  • Portable: same program can run on different computers with little or no change.

Disadvantages:

  • Slower than low-level, because translation is needed.
  • Less control over hardware.

Analogy for students:
High-level language is like speaking English/Urdu with full sentences. Everyone can understand, and you don’t have to learn difficult codes.

3. Difference Between Low-Level & High-Level Languages

FeatureLow-Level LanguageHigh-Level Language
ClosenessClose to hardwareClose to human language
Ease of UseHard for humansEasy for humans
ExecutionFast, no/less translation neededSlower, needs Compiler/Interpreter
PortabilityNot portable (machine dependent)Portable (works on different systems)
ExamplesMachine, AssemblyC, Java, Python, BASIC

4. Quick Recap for Students

  • Machine Language → Only 0s and 1s. Very fast, very difficult.
  • Assembly Language → Uses mnemonics. Easier than machine, needs Assembler.
  • High-Level Language → English-like, very easy, needs Compiler/Interpreter.
error: Content is protected !!
Scroll to Top