COSC120
FUNDAMENTAL INSTRUCTIONS

Fundamental instructions are "generic" instructions available for constructing algorithms. They are the "building blocks" for program design. Each fundamental instruction is language independent but it has its counterpart in a high-level language.

The fundamental instructions are-- assign instruction, read in instruction, write out instruction, loop instruction, selection instruction. Subroutine calls are considered by some to be fundamental instructions.

First, some definitions:

VARIABLE
          Name of a memory location whose value is allowed to change while the program is being executed.

CONSTANT
          A name of a memory location whose value is NOT allowed to change while the program is being executed.

EXPRESSION
          A combination of operators, constants, variables, parentheses which has a value.

CONDITION:(sometimes called a Boolean expression)
          A "statement" that has value of TRUE or FALSE. THE FUNDAMENTAL INSTRUCTIONS: 2. The READ IN (or INPUT) instruction gets one or more data items from an input device and stores it in memory under the variable names specified in the read instruction. 3. The WRITE instruction evaluates one or more expressions and writes the resulting values to an output device. (For this class, the screen or a file will be used for output.) 4. The LOOP Instruction. 5. SELECTION Instructions.