Consider a 32-bit processor which supports 70 instructions. Each instruction…
2020
Consider a 32-bit processor which supports 70 instructions. Each instruction is 32 bit long and has 4 fields namely opcode, two register identifiers and an immediate operand of unsigned integer type. Maximum value of the immediate operand that can be supported by the processor is 8191. How many registers the processor has ?
- A.
32
- B.
64
- C.
128
- D.
16
Attempted by 68 students.
Show answer & explanation
Correct answer: B
1. Opcode: 70 instructions require 7 bits since 2^6 < 70 <= 2^7.
2. Immediate Operand: Max value 8191 requires 13 bits since 2^13 = 8192.
3. Register Bits: Total 32 bits minus opcode (7) and immediate (13) leaves 12 bits for two register identifiers.
4. Total Registers: Each register identifier uses 12 / 2 = 6 bits, allowing for 2^6 = 64 registers.
A video solution is available for this question — log in and enroll to watch it.