BY pragyansharma polavarapu
PART ONE
A SIMPLE VIEW OF A SOFTWARE PROGRAM
Before coming of WINDOWS software, the commands to CPU
were always given through software instructions which were like precise coded
commands of a military office.
After coming of WINDOWS programming environment many software
actions are performed “graphically” i.e. by clicking small picture buttons( icons )
or flag like vertical menu lists or by using the conversational
style in dialogue boxes etc.
While using dialogue boxes , no sooner we give an answer to a
question ,another question pops up. After two or three such questions the
computer is satisfied with our answer.This is really interactive programming of
high quality.
The “icons”( little half centimeter size
pictures in square boxes ) appear in tool bars/task
bars at top and bottom of WINDOW. When the MOUSE clicks
an icon action takes place to
open/close/edit files .The files may be of any
category--text/photo/ sound/audio/ video.
With aid of INTERNET many further facilities are provided
–linking to “files and folders of any category anywhere on earth”.
Let us understand the series of magical actions that go on in computer’s
robotic brain (the CPU).
IMPORTANCE OF “RESERVED WORDS” IN SOFTWARE PROGRAMS
Let us consider only a text type SOFTWARE PROGRAM . The
SOFTWARE PROGRAM is like the working steps of an algebra sum. Each
line of program has some RESERVED WORD. The
“reserved words” are code words to activate important and huge electronic
circuits( low voltage electricity) . The “reserved words” of each software
language have to be approved by IEEE the International controlling
authority.
The reserved words create a kind of working link between
computer’s robotic brain(CPU) and the human
user and generate actions similar
to verbs/ adjectives/ adverbs/ prepositions in English grammar.
The RESERVED WORDS are also like heavy duty trucks in a
parcel office carrying heavy parcels to and from the
parcel office. But if we type the RESERVED
WORD in wrong context or with wrong spelling and even if
we put an unnecessary comma/full stop the
computer stops working showing a prominent error
message .
SOFTWARE INSTRUCTION
It is a sentence like part
of a software program just like a step in an alzebra problem. When we type,
on key board of computer , a SOFTWARE INSTRUCTION (
containing RESERVED WORDS ), we see immediately
huge actions on the computer screen .The RESERVED WORDS are like big engines moving data and are like
nouns,verbs,adjectives etc we see in sentences.
Examples of actions done by
RESERVED WORDS in software instructions --
(a) Copy 20 paras of English text from page 3 of
file X to page 9 of file Y,
(b) Play a video of an old selected tennis match from
internet
( c ) Play a old favourite film song
(d) Show a series of 50 photos from a photo folder
(e) Paint a picture of a palace in “PAINT” program, and so on
Some RESERVED WORDS can initiate bigger actions
(a) Opening on the computer
screen a e-book looking exactly like a printed book to read
(b) Opening a computer file to write/ edit etc .
There are more complex actions resembling human thinking .
(a) Select object A OR object B
(b) Select object A AND object
B
( c )DO-UNTIL ( ex: load parcels UNTILL number
loaded reaches 20)
(d) IF-THEN-ELSE (IF colour
of toy is red THEN put in box A, ELSE ( other colors)
put in box B.
After typing a
“SOFTWARE INSTRUCTION”( in a standard software
language) we can see a cricket match, read
an online newspaper, enjoy an old film video etc. How is it that mere typing words on computer
keyboard results in such almost magical actions?
THE DIGITAL BRAIN
In computer’s digital brain there are only
two mathematical 0s and 1s. Different combinations
of the 0s and 1s create all numbers and
words of our human languages --- the alphabets (
A,B,C,D,a,b,c,d etc), the numbers ( 0,1,2,3,4etc),the symbols ( ?,+,=,@,% etc)
It may please be remembered that the 0 and 1 of
computer’s digital strings represent two selected low
voltages(like 2v,3v.5v,8v etc). The voltage levels in computers parallel
circuits are like water levels in parallel cement canals
.The two voltages in computer ,selected to represent 0 and 1 are always low
voltages.
SOFTWARE PROGRAM
A software program is like the group of
working steps for solving a particular type of problem in
algebra. Every mathematical problem of that model will be solved only as per
those working steps.
The SOFTWARE PROGRAM consists of a series of working steps
called “software instructions” to solve all
the problems solvable under the software program of that model.
DECLARING “CONSTANTS” AND
“VARIABLES” .
In a SOFTWARE PROGRAM also ,just as in algebra , the first duty is
to DECLARE (i.e. define) CONSTANTS and VARIABLES
. the same constants and same type variables will be used in all problems solved under that particular software
program.
This defining of
CONSTANTS and VARIABLES for each
new SOFTWARE PROGRAM is done through the
“DECLARE” statement.
In the real world,we deal with objects of
a particular type in specific situations. In
a hotel we think of tea, coffee , sweets ,ice creams etc. In a class
room we think of books, pencils, black board,chalk piece
. In a fruit market we think of different types of fruits
.
Similar purpose is served by the DECLARE statement at the beginning
of a software program. The DECLARE statement should show the following:
(a) NAMES OF THE OBJECTS we come across in all the problems solved under that software program
. These are declared as CONSTANTS.
( b) The different NUMBER OF OBJECTS of each category in a problem is the VARIABLE .
EXAMPLE OF A SOFTWARE PROGRAM .
Now we can understand meaning of words SOFTWARE
PROGRAM , SOFTWARE
INSTRUCTION and RESERVED WORD .
The SOFTWARE PROGRAM is
like an accurate engineering plan to do a big work like building
.
It should be written most accurately like a science formula. Not even an
extra coma /full stop is permitted.
The software program is typed on keyboard of
computer in an internationally standardized
“ software language”.
Immediately a TRANSLATOR PROGRAM ( existing
inside computer) translates the
program into machine language strings of
the 01010101 . Each string of
eight/ten 0s and 1s represents only one alphabet letter or a
number.
A ROUGH EXAMPLE TO
COSTRUCT A SIMPLE SOFTWARE PROGRAM
(Not written in software language.Software syntax is not followed.
A simplified explanatory rough work )
______________________________________
DECLARE
(A) p,q,r,k,l,m,x are CONSTANTS
(B) VARIABLES (i.e. problem data and answer data i.e.
the numbers)
( C )BEGIN
p= 12,21,35
q= 18,45,56
r= 28,51,11
(1) k= p+q+r
(2)l=3p+5q-4r
(3)m=8p-6q+4r
(4) x= (10k-15l+21m)/6
(5) PRINT x1,x2,x3
for the three sets of values of p,q and r
END
__________________________________________
Here,in a very rough way, we say that (A) and (B) at
the top are for DECLARING the CONSTANTS and VARIABLES. The items under(C) upto (5) are the main software program . The
reserved word END indicates the end of software program.
The sets of values for p,q,r,k,l,m are together
called INPUT . The three answers x1,x2 and
x3 are the OUTPUT
Again,the final answer OUTPUT is translated from the 01010101
labguage into human language and ordinary mathematics by
the TRANSLATOR PROGRAM .
PART TWO
SPEED OF PROCESSING OF A COMPUTER PROGRAM
Every thing inside computer is done in “millionth of second”
units. The RESERVED WORDS work like heavy machines
lifting data,shifting data etc.Processing of problem inside computer
is all done only in the 01010101 digital language. At the end the
answer is translated to human language and ordinary
numbers and printed on the computer screen(OUTPUT) under orders of
CPU.
Finally we can say software program creates actions in
the software world just like actions created by heavy machines in
real world . Software is not like an essay written in English language by a
school student .Everything moves in computer at millionth- of- second
speed. The software program is like a virtual silent heavy machine
with different parts .
The electrical impulse travels in wires at
speed a little less than 300,000 kilometers per second (speed of
light)! Scientists felt that
if speed of flow of electricity is used by mathematicians by making current circuits to solve mathematics, the toughest
mathematical problems in science and engineering can be solved in seconds.
Scientists noticed that in electricity
there are only two very definite states “SWITCH ON” and “SWITCH OFF”. Can a two
symbol mathematics be invented?
Ordinary mathematics has the digits
---0,1,2,3,4,5,6,7,8,9 to construct the entire world of numbers .
Can numbers be represented by a two symbol mathematics
i.e. only by 0 and 1?
The result is Boolean algebra invented by
George Boole( 1815-1864 ).He represented all numbers as
different groups of only 0s and 1s( now strings of eight
0s and 1s) . These 0s and 1s are not of mathematics but
are like any general symbols like (p,q) or (x,y).
0000 0001=1
0000 0010=2
0000 0100=4
0000 1000=8
George Boole invented methods to
convert ordinary numbers to Boolean
notation of 01010101 language . He invented methods to perform
addition, subtraction, multiplication, division,square,square root etc
through Boolean mathematics of 01010101 notation.
Can numbers flow in electric wires .
A number can not be denoted by a single current channel i.e.
a single current circuit. It should be represented by a
group of eight parallel, independent
and un-mixing electric current circuits.
Let us consider a group of eight
parallel currents like water levels in eight exactly similar cement canal of
rectangular cross section. Just as water
levels in all canals is
restricted to only two levels (say 2 feet or 5 feet) ,electric current level
(called voltage) is restricted to two
voltages say 2volts and 5 volts.Right at time of manufacture , the computer
companies should specify which two low voltages will represent the symbols 0
and 1. They should follow this in all the thousands of computers produced by
their company.
Electronic parts like the submicroscopic size
transistors can not work at high voltages. the two selected voltages are very
low ---like (2v,5v), (3v,8v) etc. Only thse two voltages represent 0
and 1 in all their computers.the ordinary numbers (1,2,3,4,5,6,7,8,9,0) are
represented in following way i.e. each number by eight parallel voltages which
should be only by voltages represented by digits 0 and 1
0000 0001=1
0000 0010=2
0000 0100=4
Comments
Post a Comment