What is a Computer Pragram & Types of Languages

What is a program?

When a teacher wants a student to perform a task like completing the assignments, they give out specific instructions to carry out the job. For example, if your trainer needs you to complete a mathematics assignment to find the profit for June, they will direct you to subtract expenses incurred from the revenue earned in June. Similarly, when we want a computer to calculate the profit or solve a problem for us, we must provide clear and concise instructions on how to solve the problem.

In computing, a program is a specific set of ordered operations for a computer to perform. In the modern computer that John von Neumann outlined in 1945, the program contains a one-at-a-time sequence of instructions that the computer follows.

or

The set of instructions to be executed by a computer to solve a particular problem is called a program. To give such instructions, humans communicate with computers using formally created languages, called programming languages, that computers can understand.

Programming languages can be categorized as :

Low-level languages

High-level languages


Low-level languages

Low-level languages closely correspond to the language understood by the CPU. The following are the two types of low-level languages:

Machine code

Machine code consists of instructions written in binary, i.e., a sequence of ones and zeroes. A CPU can understand instructions written in the form of zeros and ones, and hence, the CPU can directly execute them. Machine code is hardware-specific; different types of CPUs have different machine codes.

Assembly language

Assembly language can be thought of as a more human-readable form of the machine code. It contains instructions like ADD (for addition) and SUB (for subtraction). Different types of CPUs have their own sets of assembly language instructions.


High-level languages

Low-level languages are not very human-friendly, and writing code in them is quite prone to errors, especially when there is a long list of instructions. Therefore, computer scientists have created high-level languages, which have an easy-to-read syntax, closer to the natural languages humans use to communicate.

C++, Python, Java are High-level languages



Complete and Continue  
Discussion

1 comments