Programming Concepts Explained | What is Programming | Programming Languages Explained

Programming Concepts Explained | What is Programming | Programming Languages Explained

A program can be defined as a set of instructions that need to be executed to accomplish a computing task. A person who writes or performs the program is known as a programmer. A programmer uses some specific languages to write a program which are known as programming languages e.g. C++, Java, etc. 

Programming Language

It is a set of commands, instructions, and other syntax used to create a software program. Programming language must be simple, easy to learn, and use. It must be consistent in terms of syntax and semantics. Programming languages are mainly categorized into three parts which are as follows 

Low-Level Language (LLL) 

These programming languages are more difficult to understand. It is designed to operate and handle the entire instruction set of a computer system directly which is generally used to write the system software. e.g. Machine language and Assembly language. 

  • Machine Language: It is the only language understood by computers. Sometimes, it is referred to as machine code or object code, or binary language. It is a collection of binary digits (0 or 1) or bits that the computer reads and interprets. 
  • Assembly Language: It is a low-level programming language that is used as an interface with computer hardware. It uses structured commands as substitutions for numbers, allowing humans to read the code easier than looking at binary codes. 

Medium Level Language (MLL)

 It serves as the bridge between raw hardware and the programming layer of a computer system. It is designed to improve the translated code before it is executed by the processor. e.g. C. 

High-Level Language (HLL)

It is an advanced computer programming language that is not limited to one computer, is designed for a specific job, and is easier to understand. The main advantage of high-level languages over low-level languages is that they are easier to read, write and understand. e.g. BASIC, C, FORTRAN, Java, Pascal, etc.

Terms Related to Programming 

  • Program Documentation: It is a kind of documentation that gives a comprehensive procedural description of a program. It shows how software is written. The program documentation describes what exactly a program does by mentioning the requirements of the input data and the effect of performing a programming task. 
  • OOPs: OOPs stands for Object Oriented Programming in which programs are considered as a collection of objects. Each object is nothing but an instance of a class. 
  • De-Bugging: It is the process of locating and fixing or bypassing bugs (errors) in computer program code.

Language Translator 

It helps in converting programming languages to machine language. The translated program is called the object code. Types of programming languages, language translator is divided into three categories which are as follows 

Assembler 

It converts a program written in assembly language into machine language. Assembly language consists of mnemonic codes, which are difficult to learn and machine-dependent. 

Interpreter 

It converts an HLL program into machine language by converting it line-by-line. If there is any error in any line, it stops the execution of the program immediately and reports to the user at the same time. Program execution cannot resume until the error is rectified by the user. The interpreter is very useful for debugging and suitable for a novice programmer. This is a slow process and consumes less memory space. 

Compiler

It converts the HLL program into machine language, which can be understood by the processor. For each high-level language, the machine requires a separate compiler. A compiler creates a unique object program, i.e. if a source program is compiled, there is no need for that source program because the output can be obtained by executing that object program. The compiler converts the entire HLL program in one go and reports all the errors of the program along with the line numbers.

Generation of Languages 

The concept of language generations, sometimes called levels, is closely connected to the advances in technology that brought about computer generations. The five generations of language are as follows 

  • The first generation languages or 1 GLs are low-level languages like machine language. 
  • The second generation languages or 2GLs are also low-level languages that generally consist of assembly language. 
  • The third generation languages or 3GLs are high-level languages such as Java. 
  • The fourth generation languages or 4GLs are the languages that consist of statements similar to the statements of human language. 4GLs are commonly used in database programming and scripting programming. 
  • The fifth generation languages or 5GLs are programming languages that contain visual tools, which help to develop a program. A good example of 5GLs is Visual Basic. 

Error

An error in a program is called a bug. It is a term used to describe any issue that arises unexpectedly that causes computers to not function properly. The types of error are classified into four categories which are as follows 

Syntax Error

When the rules of the programming language are not followed, the compiler will show a syntax error. 

Semantic Error

Semantic errors are reported by the compiler when the statements written in the program are not meaningful to the compiler. 

Logical Error

Logical errors are those errors that occur in the output of the program. The presence of logical errors leads to undesired or incorrect output. 

Runtime Error

Runtime errors are those errors that occur during the execution of a program. It generally occurs due to some illegal operation performed in the program.

Algorithm

An algorithm is a step-by-step method of solving a problem. It is commonly used for data processing, calculation, and other related computer and mathematical operations. 

The desirable features of an algorithm are 

  • Each step of the algorithm should be simple. 
  • It must be in a finite number of steps. 
  • It should be as efficient as possible. 
  • It should be clear in the sense. 
  • It should be effective, i.e. it must lead to a unique solution to the problem. 

  • Visual Basic is an interpreted language.
  • Reserved words are words that a programming language has set aside for its use. 
  • Pseudocode is not a programming language, but simply an informal way of describing a program. It does not follow any syntax strictly. 
  • Control structure is a statement or block of statements in a programming language that determined the control flow or sequence of execution of other instructions or statements. 
  • Looping is a control structure that is used in a program to execute a particular set of statements repeatedly

Post a Comment

Previous Post Next Post