Categories: Basics

What is program?

Program is a collection of instructions. Instruction specifies an operation such as add, subtract, multiply, store and so on. Computer works by executing the programs stored in its memory. One who writes programs is called programmer. The first programmer in the world is Lady Ada. Collection of programs is called software.

Program should be written in a programming language. Before writing a program, it is better to write a pseudo code as given below.

Input Number1, Number2
Add Number1 and Number2
Print Sum

Pseudo code is one that explains the logic in a simple unambiguous manner. Programmer can write this in his own way. The code says that two numbers (as input) symbolically represented as Number1 and Number2 respectively to be fed into the system, add the given two numbers and print the sum in an output device, say console (or monitor).

Now it is possible to write a simple program that adds two numbers is written can be written in a programming language, say, BASIC programming language.

10 READ Number1, Number2
20 SUM = Number1 + Number2
30 PRINT SUM
40 END

Now the computer should be asked to execute the program. This can be done by command, for example, Run. Once the program is executed the data should be fed and the result, that is, sum will be displayed in the monitor. For example, if the two numbers are given as input are 10 and 20 then the sum 30 will appear on the screen.

Robin

Share
Published by
Robin

Recent Posts

Hard Computing

What is hard computing? Hard computing is a traditional computing. It requires a precisely stated…

5 years ago

Soft Computing

Soft computing is a problem solving technology. It tends to fuse synergically different aspects of…

5 years ago

Cluster Computing

Cluster computing is an approach to achieve high performance, reliability or high throughput computing by…

5 years ago

Magnitude Comparator

Magnitude Comparator is a combinational circuit capable of comparing the relative magnitude of two binary…

10 years ago

Full-Subtractor

Full subtractor is a combinational circuit capable of performing subtraction on two bits namely minuend…

10 years ago

Half-Subtractor

Half-subtractor is a combinational circuit capable of subtracting a binary number from another binary number.…

10 years ago