9. In the IBM 370 architecture (popular till 1990), an instruction can be either
ID: 3597998 • Letter: 9
Question
9. In the IBM 370 architecture (popular till 1990), an instruction can be either 2, or 4, or 6 bytes long. The length of the opcode field was fixed at 8 bits. There were 16 general purpose registers, used for arithmetic and addressing. Design suitable instruction layouts (bit allocation for fields in the instructions) for the cases discussed below. In other words, show the various fields in the machine level instruction and their lengths (in bits) for instructions in those cases (See class notes on Instruction Encoding under Instruction Set Architecture to see the format in which your solution should be presented) a. Instructions in the RR format. These instructions permit register-to-register operations. For adds the contents of registers 4 and 5, and puts the result example, the instruction AR 4 in register 4 b. Instructions in the RX format. These instructions permit one of the operands to be in a register and the other to be in memory. For example A 4,M adds the contents of register 4 and the memory location M and puts the result in register 4. The instruction provides the address of an operand M in the form of a triple (base register, index register, displacement value) Displacement values are expressed as 12 bit numbersExplanation / Answer
All of the instructions can fit together with their needed operands if variable-length opcodes are used. We can discover this without coming up with the encoding by enumeration:
If we want to break down how to actually encode these instructions:
So yes, all of these instructions can be encoded with 13 bits.
(if you interpreted it as 3 separate sets)
3 two-address instructions:
(yes)
30 one-address instructions:
(yes)
45 zero-address instructions:
All of the instructions can fit together with their needed operands if variable-length opcodes are used. We can discover this without coming up with the encoding by enumeration:
If we want to break down how to actually encode these instructions:
So yes, all of these instructions can be encoded with 13 bits.
(if you interpreted it as 3 separate sets)
3 two-address instructions:
(yes)
30 one-address instructions:
(yes)
45 zero-address instructions:
(yes)
All of the instructions can fit together with their needed operands if variable-length opcodes are used. We can discover this without coming up with the encoding by enumeration:
If we want to break down how to actually encode these instructions:
So yes, all of these instructions can be encoded with 13 bits.
(if you interpreted it as 3 separate sets)
3 two-address instructions:
(yes)
30 one-address instructions:
(yes)
45 zero-address instructions:
(yes)
All of the instructions can fit together with their needed operands if variable-length opcodes are used. We can discover this without coming up with the encoding by enumeration:
If we want to break down how to actually encode these instructions:
So yes, all of these instructions can be encoded with 13 bits.
(if you interpreted it as 3 separate sets)
3 two-address instructions:
(yes)
30 one-address instructions:
(yes)
45 zero-address instructions:
(yes)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.