A set of logical instructions written to perform a specific task or tasks.
In my previous example I took a mundane task of clearing the bins now lets assume these tasks are to be performed by a computer therefore I shall again over simplify the situation and take a simple task of printing some message on the screen or the output device. Lets say the message is "Happy New Year". If you believe the sci-fi movies and think just saying "Computer show me Happy New Year on my screen" and your computer will do so... then all I can say dream on. Most computers cannot do so and even the ones which may be able to understand speech are very limited in their ability. Have you ever tried to dictate on your computer using the popular speech programs?. Then there is a small problem...computer as a machine does not understand English for that matter any human language. It can understand the language of 0's and 1's called binary thus making it understand your language is a bit of a problem. So how do we go about
My wonderful diagram shows you the task which has to be performed. 'INPUT' means the command or the instructions that you gave to the computer.As I said computer cannot understand the language you speak. So how do we convert it into something which it can understand. There in lies the magic of compilers or interpreters.
Getting back to our discussion as how to print "Happy New Year" on the screen. Now I can say
START
DISPLAY "Happy New Year".
STOP
There we have it our own program to print a message on the screen.(May be I can sell it for a few thousand pounds to IBM).
Your next question might be which language have I used? The answer is none this a style of writing program which are very close to the real thing yet they are not bound by any language. This style sometimes is called 'pseudocode'. For most part of the introduction I shall follow this pattern. Once the basics are out of the way I will take up some language to further illustrate my points.
No comments:
Post a Comment