Q1. The memory unit of a computer has 256K words of 32-bits each. The computer has an instruction format with four fields: an operation code field, a mode field to specify one of seven addressing modes, a register address field to specify one of 60 processor registers, and a memory address. Specify the instruction format and the number of bits in each field if the instruction is in one memory word
Answers
Explanation:
See Page 1
6.The memory unit of a computer has 256K words of 32 bits each. The computer has aninstruction format with four fields: an operation code field, a mode field to specify one of theseven addressing modes, a register address field to specify one of the 60 processor registers,and a memory address. Specify the instruction format and the number of bits in each field if theinstruction is in one memory word.Answer:Total (Word) = 32 bitsMode Field: 7 Addressing Modes: Requires 3 bits (23=8≈7)Register Address Field: 60 Registers: Requires 6 bits (26= 64≈60)256 K = 28x 210= 218and can be addressed with 18 bitsOpcode: 32 – (18+6+3) = 32 – 27 = 5 bits.7.A two word instruction is stored in memory at an address designated by the symbol W. Theaddress field of the instruction (stored at W+1) is designated by the symbol Y. The operand usedduring the execution of the instruction is stored at an address designated by the symbol Z. Anindex register contains the value X. State how Z is calculated from other addresses if theaddressing mode of the instruction is :a.Directb.Indirectc.Relatived.Indexed
Instruction format and the number of bits in each field
Explanation:
The Instruction format will be a 32- bit instruction
Format:
+---------+-----------+-----------------+----------------+
| OperationC | Register | Addressing Mode | Memory Address |
+---------+-----------+-----------------+----------------+
- It is given that the computer has 256 K word memory, Hence we can say that memory is word addressable.
- Hence, 7 addressing modes will require 3 bits because 7 < 2^3
- and 60 processor registers will require 6 bits since 60 < 2^6 the memory address field will require 18 bits
Thus, the number of bits left for operationC will have 32-(6+3+18) = 5 bits
so, maximum instructions the system supports = 32
hence, the Instruction format and the number of bits in each field is given above