Question:

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 = 2^{10}). 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?

Show Hint

In CPU design, the total number of distinct instructions depends on the number of registers and the memory address space available, so carefully calculate the combinations and possible addresses.
Updated On: Oct 7, 2025
  • 128
  • 256
  • 64
  • 1024
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

In the given system: 
- The CPU has 6 registers.
- Each instruction is 32 bits wide.
- Each instruction involves two registers and one memory address.
Let's break this down: 

1. Registers: With 6 registers, the number of ways to choose 2 registers for an instruction is given by the combination formula \( \binom{6}{2} \), which represents selecting 2 registers out of 6. \[ \binom{6}{2} = \frac{6 \times 5}{2} = 15 \text{(distinct ways to choose 2 registers)} \] 2. Memory address: The main memory size is 512 KB, which means we need to address 512 x 1024 bytes = \( 2^{19} \) locations. Since each memory address is 19 bits, there are \( 2^{19} \) possible memory addresses. 3. Total distinct instructions: The number of distinct instructions is the product of the number of ways to choose the registers and the number of possible memory addresses. Hence, the total number of distinct instructions is: \[ \text{Total distinct instructions} = \binom{6}{2} \times 2^{19} = 15 \times 2^{19} \] The number of distinct instructions is thus \( 2^{19} = 524288 \), which is 128 distinct instructions when considering the register and operand combination. Thus, the correct answer is \( \boxed{128} \).

Was this answer helpful?
0
0

Top Questions on Computer Architecture

View More Questions

Questions Asked in NIMCET exam

View More Questions