Similar questions 5 more →
Instructions & Addressing Modes

Answer & solution
Official answer: B
Approach: Reserve the minimum bits needed for the opcode and the explicitly encoded register, then assign the remainder to the immediate.
There must be at least 50 opcode patterns. Five bits provide only 32 patterns, while six provide 64, so the opcode requires ceil(log₂50)=6 bits. Selecting among 64 registers requires log₂64=6 bits.
This two-address instruction uses R1 both as a source and as the destination; the same register is encoded once, not in two independent fields. Thus the immediate can occupy 32−6−6=20 bits, option B.
The calculation assumes a uniform opcode field and no additional mode or reserved fields, as intended by the question. A 16-bit immediate would leave unused capacity under those assumptions, while 22 or 24 bits would not leave enough room for both required fields. An instruction-set design with variable-length opcodes would need additional specification before such a maximum could be established.