Question 60
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-addresssing 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?
Explanation
Previous | Next |
UGC NET CS December 2019 - Question 59 | UGC NET CS December 2019 - Question 61 |
Addressing Mode part uses only single bit = 1 bit (Direct and indirect)
Computer has 512 K words → 19 bits required to find a word in a Memory.
So, Number of bits used in Address part = 19 bits
Given that there are 256 registers → 8 bits required to identify a register uniquely
So, Number of bits used in register code = 8 bits
Given that instruction code stored in 1 word of memory. So, there are 32 bits in a instruction. Instruction has four parts, addressing mode, an operation code, register code part, and address part.
Number of bits reserved for operation code = 32-1-8-19 = 4 bits
Bits required for each part is as below:
1. Addressing mode (Direct and indirect) = 1
2. Operation code = 4
3. Register code = 8
4. Address part = 19
So, option 3 is correct answer