0% found this document useful (0 votes)
10 views15 pages

Computer Instructions

The document outlines the instruction code formats for a basic computer, detailing memory-reference, register-reference, and input-output instructions, each utilizing a 16-bit structure. It emphasizes the importance of a complete instruction set for constructing machine language programs, including arithmetic, logical, and control instructions. While the current instruction set is complete, it lacks efficiency for frequently used operations, suggesting the need for additional instructions for improved performance.

Uploaded by

hima bindu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views15 pages

Computer Instructions

The document outlines the instruction code formats for a basic computer, detailing memory-reference, register-reference, and input-output instructions, each utilizing a 16-bit structure. It emphasizes the importance of a complete instruction set for constructing machine language programs, including arithmetic, logical, and control instructions. While the current instruction set is complete, it lacks efficiency for frequently used operations, suggesting the need for additional instructions for improved performance.

Uploaded by

hima bindu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

Computer Instructions

BY
M R S. E. H I M A B I N D U
A S S T. P R O F E S S O R ( C S E - D S ) ,
SVIT
Computer Instructions

The basic computer has three instruction code formats, as


shown below.
Each format has 16 bits.
The operation code (opcode) part of the instruction contains
three bits and the meaning of the remaining 13 bits depends
on the operation code encountered.
A memory-reference instruction -12 bits to specify an
address
- 1 bit to specify the addressing
mode I.
I = 0 for direct address and
I = 1 for indirect address.
The register-reference instructions are recognized by the
operation code 111 with a 0 in the leftmost bit (bit 15) of the
instruction.

A register-reference instruction specifies an operation on


or a test of the AC register. An operand from memory is not
needed; therefore, the other 12 bits are used to specify the
operation or test to be executed.

An input–output instruction is recognized by the operation


code 111 with a 1 in the leftmost bit of the instruction. The
remaining 12 bits are used to specify the type of input–output
Memory-reference instructions
Register reference instructions
Input-output instructions
By using the hexadecimal equivalent we reduced the 16 bits of
an instruction code to four digits with each hexadecimal digit
being equivalent to four bits.
A memory-reference instruction has an address part of 12 bits.
The address part is denoted by three x’s and stand for the three
hexadecimal digits corresponding to the 12-bit address.
The last bit of the instruction is designated by the symbol I.
When I = 0, the last four bits of an instruction have a
hexadecimal digit equivalent from 0 to 6 since the last bit is 0.
When I = 1, the hexadecimal digit equivalent of the last four bits
of the instruction ranges from 8 to E since the last bit is 1.
Register-reference instructions use 16 bits to specify an
operation. The leftmost four bits are always 0111, which is
equivalent to hexadecimal 7. The other three hexadecimal
digits give the binary) equivalent of the remaining 12 bits.
The input–output instructions also use all 16 bits to specify an
operation. The last four bits are always 1111, equivalent to
hexadecimal F.
Instruction Set Completeness

A computer should have a set of instructions so that the user can


construct machine language programs to evaluate any function that is
known to be computable. The set of instructions are said to be complete
if the computer includes a sufficient number of instructions in each of
the following categories:
1. Arithmetic, logical, and shift instructions
2. Instructions for moving information to and from memory and
processor registers
3. Program control instructions together with instructions that check
status conditions

4. Input and output instructions


There is one arithmetic instruction, ADD, and two related
instructions, complement AC(CMA) and increment AC(INC).
With these three instructions we can add and subtract binary
numbers when negative numbers are in signed-2’s
complement representation.

The circulate instructions, CIR and CIL, can be used for


arithmetic shifts as well as any other type of shifts desired.
Multiplication and division can be performed using addition,
subtraction, and shifting.
There are three logic operations: AND, complement AC(CMA), and
clear AC(CLA). The AND and complement provide a NAND
operation. It can be shown that with the NAND operation it is
possible to implement all the other logic operations with two
variables.

Moving information from memory to AC is accomplished with the


load AC(LDA) instruction. Storing information from AC into memory
is done with the store AC(STA) instruction. The branch instructions
BUN, BSA, and ISZ, together with the four skip instructions, provide
capabilities for program control and checking of status conditions.
The input (INP) and output (OUT) instructions cause
information to be transferred between the computer and
external devices.
Although the set of instructions for the basic computer is
complete, it is not efficient because frequently used
operations are not performed rapidly. An efficient set of
instructions will include such instructions as subtract,
multiply, OR, and exclusive-OR. These operations must be
programmed in the basic computer. By using a limited
number of instructions it is possible to show the detailed logic
design of the computer. A more complete set of instructions
would have made the design too complex.
Thank you

You might also like