Introduction To Program and Programming Language

Filter Course


Introduction To Program and Programming Language

Published by: Zaya

Published date: 17 Jun 2021

Introduction To Program and Programming Language Photo

Introduction To Program And programming

Program

A computer program is a collection of instructions that performs a specific task when executed by a computer. A computer program is usually written by a computer programmer in a programming language.

Programming Language

A programming language is a formal language, which comprises a set of instructions that produce various kinds of output. Most programming languages consist of instructions for computers. It is divided into three types:

  • Machine Language
  • Assembly Language
  • High-Level Language

A. Machine Language

  • It is the representation of a computer program, which is actually read and understand by the computer.
  • It is machine-dependent and is not portable.
  • The programs in machine code consist of a sequence of machine instructions.
  •  The machine instructions are in binary code.
  • Instructions specify operations and memory cells involved in the operation.

Example:

Operation Address
0010 0000   0000     0100
0100 0000   0000     0101
0010 0000  0000     0110

B. Assembly Language

  • It is the symbolic representation of the machine language of a specific processor.
  • it is converted to machine code by an assembler.
  • Usually, each line of assembly code produces one machine instruction (one-to-one correspondence).
  • Programming in the assembly language is slow and error-prone is more efficient in terms of hardware performance.
  • It uses a mnemonic representation of the instruction and data.
  • It is also machine-dependent and usually portable.

Example:

   Load        Price
   Add          Tax
   Store         Cost

C. High-Level Language

  • It is a programming language that uses statements consisting of English-like keywords such as “FOR”, “PRINT”, or “IF”,…..etc.
  • Each statement corresponds to several machine language instructions (one-to-many correspondence).
  • It is much easier to program than in assembly language.
  • Data are referenced using descriptive names.
  • Operations can be described using familiar symbols.
    Cost:- Price +Tax
  • It is machine-dependent and is portable but must be compiled for different platforms.

Examples:

Pascal, C, C++, Java, etc.

Generation of  Programming Language

There are five types of generation of programming languages. They are as follows,

  1. First Generation of programming language
  2. Second Generation of programming language
  3. Third Generation of programming language
  4. Fourth Generation of programming language
  5. Fifth Generation of programming language

1. First Generation of Programming Language

A first-generation (programming) language (1GL) is a grouping of programming languages that are machine-level languages used to program first-generation computers. Originally, no translator was used to compile or assemble the first-generation language.

2. Second Generation of Programming Language

A second-generation programming language is also known as an assembly language. These archaic programming languages were popular during the late 1950s. A second-generation language uses alphabet letters, so programming is technically easier than just using a complex series of zeros and ones.

3. Third Generation of Programming Language

The third generation of programming language also known as a “3GL,” refers to a high-level programming language such as FORTRAN, COBOL, BASIC, Pascal, and C. It is a step above assembly language and a step below a fourth-generation language (4GL).

4. Fourth Generation of Programming Language

A fourth-generation programming language (4GL) is any computer programming language that belongs to a class of languages envisioned as an advancement upon third-generation programming languages (3GL).

5. Fifth Generation of Programming Language

A fifth-generation programming language (5GL) is any programming language based on problem-solving using constraints given to the program, rather than using an algorithm written by a programmer.

Program Design Methodology

Program Design Methodology is really all about solving problems but we use a computer to do that for us With small problems. you may be able to get away with just thinking of the solution to the problem in your head.