edited by
7,690 views
13 13 votes

A processor has $64$ general-purpose registers and $50$ distinct instruction types. An instruction is encoded in $32$-bits. What is the maximum number of bits that can be used to store the immediate operand for the given instruction?

$\text{ADD R1}$, $\#25$  / /  $\text{R 1=R 1+25}$

  1. $16$
  2. $20$
  3. $22$
  4. $24$

3 Answers

7 7 votes
(B) 20

we need 6 bits to represent registers
we need 6 bits to represent opcode (we have 50 distinct types of instructions)
we have 32 bits instruction
 

[ OPCODE | REGISTER | VALUE]
[ 6 | 6 | 32-(6+6) ]
= 32 - 12
= 20

Maximum 20 bits can be used to store immediate operand.
2 2 votes

<------------------------------------------------- 32bits-------------------------------------->

OpcodeRegisterOperand

Opcode=no.of bits to address differnt instructions=ceil(log(50))=6

There are 64 registers.So log(64)=6 bits needed to address all registers

Remaining bits for operands=32-(6+6)=20 bits

Answer:
Position:
Show:

Related questions

21 21 votes
4 4 answers
7.9k
7.9k views
Arjun asked Feb 27, 2025
7,894 views
Consider a memory system with $1 \mathrm{M}$ bytes of main memory and $16 \mathrm{~K}$ bytes of cache memory. Assume that the processor generates $20$-bit memory address,...
15 15 votes
4 4 answers
6.7k
6.7k views
Arjun asked Feb 27, 2025
6,720 views
Suppose a program is running on a non-pipelined single processor computer system. The computer is connected to an external device that can interrupt the processor asynchr...
40 40 votes
6 answers 6 answers
19.2k
19.2k views
Akash Kanase asked Feb 12, 2016
19,159 views
A processor has $40$ distinct instruction and $24$ general purpose registers. A $32$-bit instruction word has an opcode, two registers operands and an immediate operand. ...
79 79 votes
5 answers 5 answers
28.3k
28.3k views
go_editor asked Feb 12, 2015
28,326 views
Consider a processor with byte-addressable memory. Assume that all registers, including program counter (PC) and Program Status Word (PSW), are size of two bytes. A stack...