Information Technology Reference
In-Depth Information
TABLE 2.4 Some Common Arithmetic Operations
Arithmetic operations
Meaning
ADD
Perform the arithmetic sum of two operands
SUBTRACT
Perform the arithmetic difference of two operands
MULTIPLY
Perform the product of two operands
DIVIDE
Perform the division of two operands
INCREMENT
Add one to the contents of a register
DECREMENT
Subtract one from the contents of a register
DIVIDE instructions on their instruction set. Table 2.4 shows some common arith-
metic operations and their meanings.
Logical instructions are used to perform logical operations such as AND, OR,
SHIFT, COMPARE, and ROTATE. As the names indicate, these instructions per-
form, respectively, and, or, shift, compare, and rotate operations on register or
memory contents. Table 2.5 presents a number of logical operations.
2.3.3. Sequencing Instructions
Control (sequencing) instructions are used to change the sequence in which
instructions are executed. They take the form of CONDITIONAL BRANCHING
(CONDITIONAL JUMP), UNCONDITIONAL BRANCHING (JUMP), or CALL
instructions. A common characteristic among these instructions is that their
execution changes the program counter (PC) value. The change made in the PC
value can be unconditional, for example, in the unconditional branching or the
jump instructions. In this case, the earlier value of the PC is lost and execution of
the program starts at a new value specified by the instruction. Consider, for example,
the instruction JUMP NEW-ADDRESS. Execution of this instruction will cause the
PC to be loaded with the memory location represented by NEW-ADDRESS
whereby the instruction stored at this new address is executed. On the other hand,
TABLE 2.5 Some Common Logical Operations
Logical operation
Meaning
AND
Perform the logical ANDing of two operands
OR
Perform the logical ORing of two operands
EXOR
Perform the XORing of two operands
NOT
Perform the complement of an operand
COMPARE
Perform logical comparison of two operands and
set flag accordingly
SHIFT
Perform logical shift (right or left) of the content
of a register
ROTATE
Perform logical shift (right or left) with
wraparound of the content of a register
Search WWH ::




Custom Search