"Computer programming has an integral role in our world. Without computer programming no one would be able to use cell phones, computers or smart TV. Learning programming can help to innovate and create solutions for a global society."
What is a computer program?
Computer program is an ordered and detailed collection of instructions that are carried out by a computer to perform specific operations.
What is programming?
Programming is implementation of logic to facilitate specified computer operators and functionality. It can occur in one or more programming languages which differ by application and model.
What are the basic functions of a computer program?
There are 3 main tasks that are done by a computer program.
Manipulate Data.
Perform Operations.
Provide Results.
Programming Languages.
A programming language is a notation for writing programs, which are specifications of a computation or algorithm.
Programming languages can be categorized into three main parts.
Machine Language.
Assembly Language
High-level programming language
Features of Machine Language
Executed directly on the machine
Fast in operation
No need of a language translator
Dependence on machines.
Difficult to understand by humans.
Features of Assembly language
Operations is comparatively slower than machine language
Assembly language should be translated to instructions using the language translator called “Assembler”.
Dependency on machines.
Use of symbols make it more simple to understand.
Features of High level programming language
Easy to understand and designed with simple english words.
High level languages should be translated to instructions before executing on a computer.
Do not depend on machines.
Programming Paradigms
A programming paradigm is simply defined as a way or a style and approach for computer programming. The programming paradigms can be classified as follows.
Here Let’s look at the imperative and declarative programming paradigms.
Imperative programming paradigm
This is the oldest programming paradigm.
This was developed with the emergence of machine and assembly language, which is suitable for the stored program concept of the Von Neumann architecture.
Simply in this paradigm, the style of programming focuses on how to be done except what to be done.
Here, it uses statements that changes the program's state.
Von Neumann architecture.
Declarative Paradigm
In declarative programming, the program is specifying the result you want. But not how to get it. So that expresses the logic of computation without describing it's control flow.
Below giving an example for the difference between imperative and declarative programming.
Sources:
Wikipedia
Text books.
Comments
Post a Comment