Custom Search
 
  

 
Instruction Set

The number of instructions in a computers instruction set may range from less than 30 to more than 100. These instructions may be classified into categories such as input/output (I/O), data movement, arithmetic, logic, and transfer of control. Input/output instructions are used to communicate between I/O devices and the central processor. Data movement instructions are used for copying data from one storage location to another and for rearranging and changing of data elements in some prescribed manner. Arithmetic instructions permit addition, subtraction, multiplication, and division. They are common in all digital computers. Logic instructions allow comparison between variables, or between variables and constants. Transfer of control instructions are of two types, conditional or unconditional. Conditional transfer instructions are used to branch or change the sequence of program control, depending on the outcome of the comparison. If the out-come of a comparison is true, control is transferred to a specific statement number; if it proves false, processing continues sequentially through the program. Unconditional transfer instructions are used to change the sequence of program control to a specified program statement regardless of any condition.

Programming Languages

Programmers must use a language that can be understood by the computer. There are several methods that can achieve human-computer communication. For example, let us assume the computer only understands French and the programmer speaks English. The question arises: How are we to communicate with the computer? One approach is for the programmer to code the instructions with the help of a translating dictionary prior to giving them to the processor. This would be fine so far as the computer is concerned; however, it would be very awkward for the programmer. Another approach is a compromise between the programmer and computer. The programmer first writes instructions in a code that is easier to relate to English. This code is not the computers language; therefore, it does not understand the orders. The programmer solves this problem by giving the computer another program, one that enables it to translate the instruction code into its own language. This translation program, for example, would be equivalent to an English-to-French dictionary, leaving the translating job to be done by the computer.

The third and most desirable approach from an individuals standpoint, is for the computer to accept and interpret instructions written in everyday English terms. Each of these approaches has its place in the evolution of programming languages and is used in computers today. The first approach is known as machine language, the second as symbolic, and the third as procedure-oriented.

MACHINE LANGUAGES.With early computers, the programmer had to translate instructions into the machine language form that the computers understood. This language was a string of numbers that represented the instruction code and operand address(es).

In addition to remembering dozens of code numbers for the instructions in the computers instruction set, the programmer also had to keep track of the storage locations of data and instructions. This process was very time consuming, quite expensive and often resulted in errors. Correcting errors or making modifications to these programs was a very tedious process.

SYMBOLIC LANGUAGES.In the early 1950s, mnemonic instruction codes and symbolic addresses were developed. This improved the program preparation process by substituting letter symbols (mnemonic codes) for basic machine language instruction codes. Each computer has mnemonic code, although the symbols vary among the different makes and models of computers. The computer still uses machine language in actual processing, but it translates the symbolic language into machine language equivalent. Symbolic languages have many advantages over machine language coding in that less time is required to write a program, detail is reduced, and fewer errors are made. Errors which are made are easier to find, and programs are easier to modify.

PROCEDURE-ORIENTED LANGUAGES.The development of mnemonic techniques and macroinstructions led to the development of procedure-oriented languages. These languages are oriented toward a specific class of processing problems. A class of similar problems is isolated, and a language is developed to process these types of applications. Several languages have been designed to process problems of a scientific-mathematical nature and others that emphasize file processing. The most familiar of these are BASIC and FORTRAN for scientific or mathematical problems, and COBOL for file processing.

Programs written in procedure-oriented languages, unlike those in symbolic languages, may be used with a number of different computer makes and models. This feature greatly reduces reprogramming expenses when changing from one computer system to another. Other advantages to procedure-oriented languages are: (1) they are easier to learn than symbolic languages; (2) they require less time to write; (3) they provide better documen-tation; and (4) they are easier to maintain. However, there are some disadvantages of procedure-oriented languages. They require more space in memory and they process data at a slower rate than symbolic languages.







Western Governors University
 


Privacy Statement - Copyright Information. - Contact Us

Integrated Publishing, Inc. - A (SDVOSB) Service Disabled Veteran Owned Small Business