Programming
Programming means telling a computer what to do.
So, what are the basic operations that a computer can perform?
1- Input:
Get data from the keyboard or from some file or other device.
2- Output:
Write
3- Math:
Perform some simple calculations, like addition and multiplication.
4- Conditional Execution:
Check some conditions and execute one sequence of statements or another.
5- Repetition:
Repeat some sequence of operations, usually with some variation.
Programming Languages
A set of words, symbols and codes used to write programs is called programming languages.
There are two types of programming languages:
1- Low-level language
2- High-level language
1- Low-Level Languages
i- Low-level languages are near to computer hardware and far from human languages.
ii- Writing a program in low-level languages requires a deep knowledge of the internal structure of computer hardware. Low-level languages are further divided into following categories:
i- Machine language
ii- Assembly language
i- Machine Language
1- A type of language in which instructions are written in binary form is called machine language.
2- It is the only language that is directly understood by the computer. It is also called fundamental language.
3- Programs written in machine language can be executed very fast by the computer.
4- Machine language is difficult to understand writing and modifying a program in this language takes a lot of time.
5- Programs written in machine language are machine-dependent every computer has its own machine language.
6- Machine language is also known as first-generation language.
ii- Assembly Language
1- It is one step higher than machine language in which symbols are used instead of binary code.
2- Example SUB instructions are used to subtract two numbers.
3- Assembly language is also called symbolic language. Its programs are easier to write and modify than a machine language.
4- Assembly language is mostly used for writing system software.
5- It is also known as a second-generation language.
2- High-Level-Languages
1- It is a type of language that is close to human languages called high-level language is easy to understand.
2- A program written in a high-level language is easy to write and modify.
3- High-level languages are further divided into the following categories:
i- Procedural languages
ii- Object-oriented languages
iii- Non-procedural languages
i- Procedural Languages
1- These languages are also known as third-generation languages or 3GL.
2- In these languages, a program is a predefined set of instructions computer executes these instructions in the same sequence in which these instructions are written.
3- Each instruction in this language tells the computer what to do and how to do.
4- Procedural languages have many advantages over machine and assembly languages such as:
i- Program statements are similar to English and are easy to learn.
ii- Less time is required to write programs.
iii- Programs are easier to understand and modify.
5- Some disadvantages of procedural languages over machine and assembly languages are:
i- Program execute more slowly.
ii- Language use computer resources less efficiently.
Most popular procedural languages re
FORTRAN- stands for FORmula TRANslation mainly used for engineering applications and scientific use.
BASIC- stands for Beginners All-purpose Symbolic Instruction Code. It was created in late 1960.
COBOL- stands for Common Business Oriented Language that is specially designed for business applications.
ii- Object-Oriented Languages
1- OOP is a technique in which programs are written on the basis of objects that is a collection of data and functions.
2- Objects may represent a person's thing or place in the real world.
3- In OOP data and all possible functions on data are grouped together.
4- These programs are easier to learn and modify. C++ and Java are the two most popular Object Oriented Languages.
5- For example, a person can be an object, which has some properties such as Name, Age and height etc. It has also some functions such as walking, talking, eat.
iii- Non-Procedural Languages
1- Non-procedural languages are also known as fourth-generation languages or 4GL in which the user only needs to tell the computer ''what to do'' not ''how to do"
2- An important advantage of non-procedural languages is that they can be used by non-technical users to perform a specific task.
3- These languages accelerate the program process and reduce coding errors.
4- 4GL are normally used in database applications and report generation.
5- SQL stands for Structured Query Language it is the most popular database query language developed by IBM.
0 Comments