10.2k views
4 votes
The memory unit of a computer has 2M Words of 32 bits (or 4 bytes) each. The computer has an instruction format with 4 fields: an opcode field; an addressing mode field to specify 1 of 6 addressing modes; a register address field to specify one of 7 registers; and a memory address field. Assume an instruction is 32 bits long. Answer the following:

A: How large must the mode field be?
B: How large must the register field be?
C: How large must the address field be?
D: How large is the opcode field?

1 Answer

3 votes

Answer:

Check the explanation

Step-by-step explanation:

Opcode Addressing Modes Register Address Memory Address

(05)bits (03) bits (03) bits (21) bits

< --------------------- ----- 32 bit Instruction Format --------------------------------------------------->

6 addressing modes will requires 03 bits in instruction format.

7 Register Address will require 03 bits in instruction format.

There are 2M words in memory.so we need 21 bits for representing memory address.

Out of total 32 bits, 21+03+03 gone just remaining 05 bits shows opcode.

Kindly check the attached image below to see the step by step explanation to the question above.

The memory unit of a computer has 2M Words of 32 bits (or 4 bytes) each. The computer-example-1