BUILDING BLOCKS OF ALGORITHMS

1. Basic Actions & Instructions
(i) Assignment of a value to a variable is denoted by
variable ← expression;
where the expression is composed from variable and constant operands using familiar operators like +, -, * etc.
Assignment action includes evaluation of the expression on the R.H.S. An example of assignment instruction/statement is
−+2← rji*j ;

It is assumed that each of the variables occurring on R.H.S. of the above statement,
has a value associated with it before the execution of the above statement. The
association of a value to a variable, whether occurring on L.H.S or on R.H.S, is made
according to the following rule:

For each variable name, say i, there is a unique location, say loc 1 (i), in the main
memory. Each location loc(i), at any point of time contains a unique value say v(i).
Thus the value v(i) is associated to variable i.

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

error: Content is protected !!