This preview shows page 1. Sign up to view the full content.
Unformatted text preview: conditional or unconditional) for transfer of control
to the address given in the operand field
4. Data movement operations for moving data between memory locations and
5. Data movement operations for moving data from or to one of the computer's
Figure 12.1 shows atypical single-address machine language instruction. Although
some computers are designed to use only single-address instructions, many
computers are designed to use multiple-address instructions that include the
addresses of two or more operands. For example, the augend and addend may be
the two operands of an addition operation.
OPCODE (operation code) OPERAND (Address/Location) Figure 12.1. Instruction format.
We already know that all computers use binary digits (Os and Is) for performing
internal operations. Hence most computers' machine language instructions consist
of strings of binary numbers. For example, a typical program instruction to print
out a number on the printer might be
The program to add two numbers in memory and print the result might look
something like the following:
This is obviously not a very easy to use language, partly because it is difficult to
read and understand and partly because it is written in a number system with
which we are not familiar. But it will be surprising to note that some of the first
programmers, who worked with the first few computers, actually wrote their
programs in binary form as above.
Since human programmers are more familiar with the decimal number system,
most of them will prefer to write the computer instructions in decimal, and leave
the input device to convert these to binary. In fact, without too much effort, a
computer can be wired so that instead of using long strings of 1 s and 0s we can
use the more familiar decimal numbers. With this change, the preceding program
appears as follows: 10001471
This set of instructions, whether in binary or decimal, which can...
View Full Document
This document was uploaded on 04/07/2014.
- Spring '14