Computer Languages, AI Languages, and Translator Programs

Fundamentals of Computer Languages

To communicate with a computer, a language that the computer understands is required.

  • Program: A set of instructions that tells the computer what to do.

  • Programming: The process of writing specific instructions in a computer language.

The development of computer languages is classified into distinct categories based on abstraction, hardware dependence, and execution methods.

Categories of Computer Languages

Machine Language

Machine language is classified as a Low-Level Language (LLL).

  • Format: Expressed strictly in binary form using 00s and 11s:

    • 00 represents the 'Off' state.

    • 11 represents the 'On' state.

  • Direct Comprehension: It is the only language that a computer understands.

  • Hardware Dependence: It is extremely machine dependent.

Assembly Language

Assembly language was developed to improve upon machine language by replacing binary instructions with human-readable representations.

  • Representation: Uses Mnemonic codes or Symbols in place of binary 00s and 11s.

  • Example: If the operation code for addition is 00100010 in machine language, it can be directly written as ADD in assembly language.

  • Usability: Because it uses symbolic codes, assembly language is significantly easier to work with than machine language.

High-Level Languages (HLL)

High-level languages were created to make programming accessible to a broader audience.

  • Characteristics: Machine independent, simple, and user-friendly.

  • Language Structure: Quite similar to the English language, enabling a large number of people to write computer programs.

  • Popular Examples: Basic, C, C++, and Java.

Advanced High-Level Languages

Advanced high-level languages represent further abstraction designed for specialized tasks.

  • Language Structure: Consist of statements that are similar to human-readable languages.

  • System Independence: Highly user-friendly and completely independent of any operating system.

  • Primary Applications: Used mainly in database programming and scripting.

  • Examples: PHP, Ruby, Python, Perl, SQL, and MatLab (MatrixLaboratory).

Artificial Intelligence (AI) Languages

AI languages are designed for specialized research and development in modern computing fields.

  • Problem-Solving Approach: Used in AI research to allow computers to solve problems without direct programming.

  • User Focus: Users focus on identifying problems and conditions without worrying about implementation details.

  • Fields of Application: Used to develop programs for the fields of Artificial Intelligence and Artificial Neural Networks.

  • Examples: Mercury, OPS5, and Proloc.

Translator Programs

A computer can understand only machine language. Therefore, programs written in any other language must be converted into machine language. Translator programs are used to convert high-level language programs into low-level language programs.

Assembler

  • Definition: An assembler is a program used to convert assembly language into machine language.

  • Function: It translates a program written in mnemonic codes into machine code so that the computer can understand it.

Interpreter

  • Definition: An interpreter translates a program written in a high-level language into a low-level language line-by-line.

  • Execution Mechanism: It executes an instruction and then repeats the procedure for the remaining instructions.

  • Error Handling: If any errors are found, they must be removed immediately during execution.

Compiler

  • Definition: A compiler is a translator program used to convert a high-level language program into machine language.

  • Execution Mechanism: It translates the whole program at once.

  • Output: Generates the object code for the program along with a list of errors.

  • Safety: Once all errors are removed, the object code is safe for use.

  • Performance: The execution speed of a compiler is faster as compared to an interpreter.