Computer instructions can be classified into three categories: data transfer instructions, data manipulation instructions, and program control instructions. Data transfer instructions move data between locations without changing it. Data manipulation instructions perform arithmetic, logical, and shift operations. Program control instructions provide decision-making and allow changing the flow of a program. Common data transfer instructions include load, store, move, exchange, input, and output. Arithmetic instructions perform addition, subtraction, multiplication, and division. Logical and bit manipulation instructions perform AND, OR, and XOR operations on bits. Shift instructions move bits left or right. Program control instructions include branch, jump, skip, call, and return.
2. Items
• Definition
• Data transfer instruction
• Data manipulation
Arithmetic instruction
Logical and bit manipulation instruction
Shift instruction
• Program control instruction
3. Data transfer and manipulation
Computer provides an extensive set of
instruction to give the user flexibility to carry
out various computational task.
The instruction set of different computer differ
from each other mostly in the way the
operands are determined from address and
mode field.
The actual operation available in the istruction
from one computer to another.
4. Cont…
Computer instruction can be classified into three
categories:-
• Data transfer instruction
• Data manipulation instruction
• Program control
Data transfer instruction cause transfer of data
from one location to another with out changing
the binary information content.
5. Cont…
Data manipulation instruction are those perform
arithmetic, logical and shift operation. The
program taken control instruction provide
decision making capability and changes to
taken by program when executed in the
computer.
6. Data transfer instruction
• Data transfer instruction move data from one
place in the computer to another with out
changing the data contents.
• The most common transfer are between
memory and processer register between
processer register and input or output and
between processer register themselves.
8. Data manipulation instruction
Data manipulation instruction perform operation
on data and provide the computational
capabilities for computer.
There are three basic types
• Arithmetic instruction
• Logical ad bit manipulation instruction
• Shift instruction
9. Arithmetic instruction
• The basic arithmetic operation are addition,
subtraction, multiplication and division.
• Most computer provide instruction for all four
operation.
• Some small computer have only addition and
possibly subtraction instruction the
multiplication and division must then be
generated by means of software subroutine.
10. Logical and bit manipulation
instruction
• Logical instruction perform binary operation
on strings of bits stored in register. They are
useful for manipulation individual bits or
group of bits that represent binary coded
information.
• The AND, OR and XOR instruction produce
the corresponding logical operation on
individual bits of the operands. Although they
performed the Boolean operations.
11. Shift instruction
• Instruction to shift the contents of an operand are
quite useful and are often provide in several
variations.
• Shift are operations in which the bit of a word are
moved to the left or right.
• The bit shifted in at the end of the word
determines the type of the shift used.
• Shift instruction may specify either logical shift ,
arithmetic shift or rotate type operation. In either
case the shift to be the right or to the left
12. Program control
• Instruction are always stored in successive
memory location.
• When processed in the CPU the instruction are
fetched from consecutive memory location
executed.
• Each time an instruction is fetched from
memory. The program counter is incremented
so that it contains the address of the next
instruction in sequences.