Question 105

Computer Awareness Structure of instructions in CPU Hard

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?

(A) 128
(B) 64
(C) 256
(D) 1024
✓ Correct Answer: Option A Verified Solution

📘 Step-by-Step Solution & Detailed Explanation:

Given:

\[ \begin{aligned} &\text{CPU registers} = 6 \\ &\text{Instruction length} = 32\ \text{bits} \\ &\text{Main memory size} = 512\ \text{KB} = 512\times 2^{10}=2^{9}\times 2^{10}=2^{19}\ \text{bytes} \end{aligned} \]

Assumption: memory is byte-addressable (each distinct address selects one byte).

Number of bits required for a memory address = \(\log_2(2^{19}) = 19\ \text{bits}\).

Number of bits to encode one register = \(\left\lceil \log_2 6 \right\rceil = 3\ \text{bits}\), so two registers need \(3+3=6\ \text{bits}\).

Total bits used by operands = \(19\ (\text{address}) + 6\ (\text{two registers}) = 25\ \text{bits}\).

Remaining bits for opcode = \(32 - 25 = 7\ \text{bits}\).

\[ \therefore\ \text{Maximum distinct instructions} = 2^{7} = \boxed{128}. \]

(Note: if addresses were word-addressable or some other addressing unit were used, the address-bit count — and hence the result — would change.)

Practice Similar Structure of instructions in CPU Questions

Reinforce your conceptual grasp with related questions from NIMCET 2025:

Q88 Consider a 9-bit representation. Which of the following correctly gives...
Solve →
Q89 What is the equivalent decimal value of the unsigned binary number...
Solve →
Q90 Dynamic RAM (DRAM) stores each bit of data in a separate capacitor. Due to...
Solve →
Q91 Consider the Boolean expression \(X = (A+B).C \) over Boolean variables A,...
Solve →
Q92 What is the hexadecimal representation of the decimal number 265?
Solve →
Full-Length Test Series

Prepare for NIMCET Under Real Exam Conditions

Take timed full-length mock tests with authentic question distributions, negative marking (+12/-3 in Math), and instant All India Rank calculation.

Start Free Mock Test Series →