0% found this document useful (0 votes)
19 views11 pages

Instruction Formats: T.Avinash 237R1A05C2 Cse-B

The document provides an overview of instruction formats, which are binary patterns that specify operations for computers, consisting of fields for indirect addressing, operation codes, and addresses. It categorizes instruction formats into four types: three-address, two-address, one-address, and zero-address instructions, each with its own characteristics and examples. The document concludes with final tips summarizing the types and differences of instruction formats discussed.

Uploaded by

avishyam.tentu
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)
19 views11 pages

Instruction Formats: T.Avinash 237R1A05C2 Cse-B

The document provides an overview of instruction formats, which are binary patterns that specify operations for computers, consisting of fields for indirect addressing, operation codes, and addresses. It categorizes instruction formats into four types: three-address, two-address, one-address, and zero-address instructions, each with its own characteristics and examples. The document concludes with final tips summarizing the types and differences of instruction formats discussed.

Uploaded by

avishyam.tentu
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/ 11

INSTRUCTION FORMATS

T.Avinash
237R1A05C2
CSE-B
2

AGENDA
Introduction
What is an Instruction Format
Types of instruction formats
Description about the instruction formats
Final tips & takeaways
WHAT IS AN INSTRUCTION
FORMAT
• An instruction is a binary pattern that
specifies an operation to be performed
by the computer.
• It consists of three fields: a 1-bit field for
indirect addressing symbolized by I, a 4-
bit operation code(opcode), and an 11-
bit address field.
INSTRUCTION FORMATS…

• The most common fields found in instruction formats are:


i. An operation code field that specifies the operation
to be performed.
ii. An address field that designates a memory
address or a processor register.
iii. A mode field that specifies the way the operand or
the effective address is determined.
5

TYPES OF INSTRUCTION
FORMATS

• Three-Address Instructions
• Two-Address Instructions
• One Address Instructions
• Zero Address Instructions
THREE ADDRESS INSTRUCTION
• Computers with three-address instruction formats can use
each address field to specify either a processor register or
a memory operand.
• The program in assembly language that evaluates X = (A
+ B) * (C + D) is shown below, together with comments
that explain the register transfer operation of each
instruction.
• The advantage of the three-address format is that it
results in short programs when evaluating arithmetic
expressions. The disadvantage is that the binary-coded
instructions require too many bits to specify three
addresses.
TWO ADDRESS INSTRUCTION
• • Two-address instructions are the most common in
commercial computers. Here again each address field can
specify either a processor register or a memory word. The
program to evaluate
X = (A + B) * (C + D) is as follows:
ONE ADDRESS INSTRUCTION
• One-address instructions use an implied accumulator (AC)
register for all data manipulation. For multiplication and
division there is a need for a second register.
• However, here we will neglect the second register and
assume that the AC contains the result of all operations.
The program to evaluate X = (A + B) * (C + D) is
ZERO ADDRESS INSTRUCTION
• A stack-organized computer does not use an address field
for the instructions ADD and MUL. The PUSH and POP
instructions, however, need an address field to specify
the operand that communicates with the stack. The
following program shows how X = (A + B)*(C + D) will be
written for a stack-organized computer. (TOS stands for
top of stack.)
10

FINAL TIPS & TAKEAWAYS


• We discussed about the types of instruction formats.
• 4 types of instruction formats are described accordingly
with an example.
• And also we differentiated each of them.
THANK
YOU
T. Avinash
237R1A05C2
CSE-B

You might also like