NIMCET 2025 Computer PYQ — Consider a system with a CPU having 6 registers and 32-bit instru… | Mathem Solvex | Mathem Solvex
Tip:A–D to answerE for explanationV for videoS to reveal answer
NIMCET 2025 — Computer PYQ
NIMCET | Computer | 2025
Consider a system with a CPU having 6 registers and 32-bit instructions. The maximum possible size of the main memory is 512 KB (1K=1024) Each instruction takes two registers and one memory address as operands. Which one of the following correctly gives the maximum possible distinct instructions that can be there in the instruction set of the CPU?
Choose the correct answer:
A.
128
(Correct Answer)
B.
256
C.
64
D.
1024
Correct Answer:
128
Explanation
1. Memory Address Bits:
Memory Size=512 KB=512×1024 bytes
Memory Size=29×210=219 bytes
Address Bits Required=19 bits
2. Register Bits:
Number of Registers=6
To represent 6 registers, we need n bits such that 2n≥6.
22=4(Too small)
23=8(Sufficient)
Bits per Register=3 bits
3. Opcode Bits Calculation:
The total instruction size is 32 bits.
Total Bits=Opcode+Reg1+Reg2+Address
32=Opcode+3+3+19
32=Opcode+25
Opcode Bits=32−25=7 bits
Final Equation
Maximum Distinct Instructions=2Opcode Bits
Maximum Distinct Instructions=27=128
Explanation
1. Memory Address Bits:
Memory Size=512 KB=512×1024 bytes
Memory Size=29×210=219 bytes
Address Bits Required=19 bits
2. Register Bits:
Number of Registers=6
To represent 6 registers, we need n bits such that 2n≥6.