retagged by
19,081 views
40 40 votes
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. The number of bits available for the immediate operand field is_______.

6 Answers

Best answer
63 63 votes
Instruction Opcode Size $= \log_2 40 = 6$

Register operand size $= \log_224 =5$

Total bits available $= 32$

Bits required for opcode $+$ two register operands $= 6 + 2 \times 5 = 16$

Bits available for immediate operand $= 32 - 16 = 16.$
edited by
2 2 votes

Ans: 16

For 40 distinct instructions, you need atleast 6 bits for Opcode

For 24 distinct registers you need at least 5 bits to represent a single General purpose register.

So you can see in the image, I have explained the value of x. 

 

 

 

1 1 vote

Answer : 16


For 40 distinct instructions : 

no. of bits need = Ceil (log(40)) =6

no. of bits need for 1 register =Ceil (log(24)) = 5

for another register = 5

for immediate operand :

no. of bits = 32-(6+5+5) = 16

6 5 5 16

op code       R1               R2          immediate

Answer:
Position:
Show:

Related questions

107 107 votes
8 answers 8 answers
33.1k
33.1k views
Akash Kanase asked Feb 12, 2016
33,055 views
Consider a processor with $64$ registers and an instruction set of size twelve. Each instruction has five distinct fields, namely, opcode, two source register identifiers...
141 141 votes
15 answers 15 answers
39.6k
39.6k views
Akash Kanase asked Feb 12, 2016
39,638 views
Suppose the functions $F$ and $G$ can be computed in $5$ and $3$ nanoseconds by functional units $U_{F}$ and $U_{G}$, respectively. Given two instances of $U_{F}$ and two...
75 75 votes
8 answers 8 answers
27.4k
27.4k views
Akash Kanase asked Feb 12, 2016
27,389 views
The width of the physical address on a machine is $40$ bits. The width of the tag field in a $512$ KB $8$-way set associative cache is ________ bits.
86 86 votes
15 answers 15 answers
26.1k
26.1k views
Akash Kanase asked Feb 12, 2016
26,098 views
A file system uses an in-memory cache to cache disk blocks. The miss rate of the cache is shown in the figure. The latency to read a block from the cache is $1$ ms and to...