A computer uses a memory unit of 512 K words of 32 bits each. A binary instruction code is stored in one word of the memory. The instruction has four parts: an addressing mode field to specify one of the two-addressing mode (direct and indirect), an operation code, a register code part to specify one of the 256 registers and an address part. How many bits are there in addressing mode part, opcode part, register code part and the address part?
- AOption (a)
1, 3, 9, 19
- BOption (b)
1, 4, 9, 18
- COption (c)
1, 4, 8, 19
- DOption (d)
1, 3, 8, 20
View answer & explanationHide answer & explanation
Correct answer
1, 4, 8, 19
Why this answer is correct
Data:
Memory unit = 512 K words
1 word = 32 bits = 4 B
Binary instruction code stored in 1 word of memory
Instruction divided as follows,
| Addressing mode | Operation code | Register code | Address part |
|---|
Calculation:
Addressing mode = 1 bit for direct or indirect
Register code = ln (256) = 8 bits
Since, registers are already addressed, only memory needs to be addressed
Address part = ln (512 K) = 19 bits
Operation mode = 32 – 1 – 8 – 19 = 4 bits
Therefore, bits for addressing mode part, opcode part, register code part and the address part = (1, 4, 8, 19)




