INTRODUCTION TO COMPUTER PROGRAMMING
A computer program is a collection of instructions that describe a task, or set of tasks, to be carried out by a computer. We can instruct a human being to do a particular task by speaking up or through any other media. As computers are bare machines we have to instruct them using some languages that are understood by the computer. For this purpose, communicating with the computer for instructing them to do a particular task we use special languages called 'Programming Languages'. The task of instructing the machines using programming languages is called 'Programming". Those persons who deals with the programming is known as 'Computer Programmers'.
We can classify the programming languages into two broad categories.
- Low Level Languages
- High Level Languages
1. Low Level Languages : Low Level languages are of two types :-
- Machine Languages and
- Assembly Languages.
Machine Language: As computers are electronic devices, they internally represents all data as binary 1 and 0. a binary 0 may be used to represent power off or low voltage whereas 1 may represent high voltage or power on state. Using machine language, programmer programs in computer's own language, that is binary language. A programmer programming in machine language deals with binary 0's and 1's. In machine all instructions are represented as combination's of binary 0's and 1's. The memory addresses for the data also be specified in the program. Hence an instruction such as a+b, should be in binary language, there may be corresponding binary combination's for each operator and operands, addresses for operands should be specified in the program. Hence programming in machine language is not an easy task. The limitation of machine language programming are : -
- Difficult to program
- Difficult to modify
- Error prone
- Machine Dependent (No Portability) : Programs written in machine language are not portable, which means we cannot copy it into another machine and use.
The main advantage of machine language is that, programs written in machine language can be fastly executed, because there's no need to convert the program into machine's code, its already in binary language.
Assembly Language: Assembly Language is also known as Symbolic language. In assembly language, we can program using symbols and alphabets. The following are the limitations of Assembly Language : -
- Machine Dependent.
- Deep knowledge in hardware required by the programmer.
Assembly language programs can be written using symbols and digits, as computer internally represent all data in binary form, an assembly program must be translated into equivalent machine code before executing the program. This translation is done by a translation program known as Assembler.
2. High Level Languages are user friendly languages; using which anybody having a little knowledge of programming language can program without bothering about internal structure or memory addresses. Examples of high level languages are: COBOL, BASIC, C, C++, JAVA, PYTHON etc. Programs written in high level languages can be easily ported to any other system with a little or no modification.
Programs written in high level languages such as C, C++ etc. are cannot directly understand by the computer, so they have to translated into machine code, and this translation is done by Compilers or Interpreters.


0 comments:
Post a Comment