0% found this document useful (0 votes)
99 views4 pages

Chapter 12. Isa - Characteristics and Functions: Hiendq@fe - Edu.vn

This document discusses machine instruction sets and addressing modes. It defines different types of addressing modes like immediate, direct, indirect, register, register indirect, displacement, and relative addressing. It also explains the difference between preindexing and postindexing. Variable-length instruction formats have the advantages of a large repertoire of opcodes and flexible addressing, but increase CPU complexity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
99 views4 pages

Chapter 12. Isa - Characteristics and Functions: Hiendq@fe - Edu.vn

This document discusses machine instruction sets and addressing modes. It defines different types of addressing modes like immediate, direct, indirect, register, register indirect, displacement, and relative addressing. It also explains the difference between preindexing and postindexing. Variable-length instruction formats have the advantages of a large repertoire of opcodes and flexible addressing, but increase CPU complexity.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Lê Chí Cường

Phạm Phú Ty

Hồ Tấn Thành Nhân

Đặng Kim Bình

CHAPTER 12. ISA – CHARACTERISTICS AND FUNCTIONS

12.1 What are the typical elements of a machine instruction?

Answer: Opcodes, source operand reference, result operand reference and


next instruction reference.

12.2 What types of locations can hold source and destination operands?

Answer: Main or virtual memory, processor register, immediate (contained in


a field in the instruction being executed), and an I/O device.
12.3 If an instruction contains four addresses, what might be the purpose
of each address?

Answer: The purpose could be to access or store information in memory or


registers, or to hold data from arithmetic operations.
12.4 List and briefly explain five important instruction set design issues.
Answer: Operation repertoire – How many and which operations to provide.

Data types: various types of data upon which operations are performed.

Instruction format: Instruction length(in bits), number of addresses, size of


various fields, etc.

Registers: Number of processor registers that can be referenced by


instructions, and their use

Addressing: mode or modes by which address of an operand is specified.


12.5 What types of operands are typical in machine instruction sets?
Answer: Addresses, numbers, characters, and logical data.
12.6 What is the relationship between the IRA character code and the
packed decimal representation?
Answer: The last four bits in IRA bit pattern 011XXXX, the numbers 0-9 are
represented using the same 4-bits as packed decimal.
[email protected] 1
12.7 What is the difference between an arithmetic shift and a logical
shift?
Answer: In a logical shift, the bits of a word are shifted left or right. On one
end, the bit that is shifted out is lost, while on the other end a zero is added in.
With arithmetic shift, treats the data as a signed integer and does not shift the
sign bit. On a right shift, the sign bit is replicated into the bit position to its
right, while with a left shift, a logic shift is performed on all bits but the sign bit.
12.8 Why are transfer of control instructions needed?
Answer: They are required for looping (allowing for repeated calls to
instructions), allow for decision making, and it allows for breaking up
programs into smaller pieces for easier programming.
12.9 List and briefly explain two common ways of generating the
condition to be tested in a conditional branch instruction.
Answer: One way is to test for some condition caused by an arithmetic
operation, and checking for 0, positive, negative, or overflow. A three-address
instruction format can also be used, with two addresses used for condition
testing.
12.10 What is meant by the term nesting of procedures?
Answer: Being able to call a procedure from within a procedure.
12.11 List three possible places for storing the return address for a
procedure return.
Answer: Register, start of called procedure, or the top of the stack.

[email protected] 2
CHAPTER 12. ISA – ADDRESSING MODES AND FORMATS

13.1 Briefly define immediate addressing.


Answer: Immediate addressing: The value of the operand is in the instruction.

13.2 Briefly define direct addressing.


Answer: Direct addressing: The address field contents the effective address of the
operand

13.3 Briefly define indirect addressing.


Answer: Indirect addressing: The address field refers to the address of a word in
memory, which in turn contains the effective address of the operand.

13.4 Briefly define register addressing.


Answer: Register addressing: The address field refers to a register that contains
the operand.

13.5 Briefly define register indirect addressing.


Answer: Register indirect addressing: The address field refers to a register, which
in turn contains the effective address of the operand.

13.6 Briefly define displacement addressing.


Answer: Displacement addressing: The instruction has two address fields, at least
one of which is explicit. The value contained in one address field (value = A) is
used directly. The other address field refers to a register whose contents are added
to A to produce the effective address.

13.7 Briefly define relative addressing.


Answer: Relative addressing: The implicitly referenced register is the program
counter (PC). That is, the current instruction address is added to the address field to
produce the EA.

13.8 What is the advantage of autoindexing?


Answer: It is typical that there is a need to increment or decrement the index
register after each reference to it. Because this is such a common operation, some

[email protected] 3
systems will automatically do this as part of the same instruction cycle, using
autoindexing.

13.9 What is the difference between postindexing and preindexing?


Answer: These are two forms of addressing, both of which involve indirect
addressing and indexing. With preindexing, the indexing is performed before the
indirection. With postindexing, the indexing is performed after the indirection.

13.10 What facts go into determining the use of the addressing bits of an
instruction?
Answer: Number of addressing modes.
Number of operands: Typical instructions on today's machines provide for two
operands.
Register versus memory: The more that registers can be used for operand
references, the fewer bits are needed.
Number of register sets: More the Better
Address range: This matters
Address granularity.

13.11 What are the advantages and disadvantages of using a variable-


length instruction format?
Answer: Advantages: It easy to provide a large repertoire of opcodes, with
different opcode lengths. Addressing can be more flexible, with various
combinations of register and memory references plus addressing modes.
Disadvantages: an increase in the complexity of the CPU.

[email protected] 4

You might also like