A processor has general-purpose registers and distinct instruction types. An instruction is encoded in -bits. What is the maximum number of bits that can be used to store the immediate operand for the given instruction?
, / /
View worked solution
Answer: B
To find the maximum number of bits available for the immediate operand, we analyze the fields of the instruction format based on the given example ADD R1, #25:
- Opcode Field: There are distinct instruction types. The number of bits required for the opcode is:
- Register Field: There are general-purpose registers. The number of bits required to address one register is:
- Immediate Operand Field: Let this require bits.
The total instruction length is bits. Since the instruction ADD R1, #25 references only one register ( acts as both source and destination) and one immediate value, we have:
Thus, the maximum number of bits that can be used for the immediate operand is .
Free practice · Your answers on this page are not saved.
