A processor has 40 instructions, 24 general-purpose registers and a 32-bit instruction with an opcode, two register operands and one immediate operand. How many bits remain for the immediate?
The opcode needs $\lceil\log_2 40\rceil=6$ bits and each register identifier needs $\lceil\log_2 24\rceil=5$. Subtracting both register fields and the opcode leaves 32−6−5−5=16 bits.
More Instruction Set and Addressing Modes questions
GATE 2016 CS (CS2) Q41– A processor has 64 registers and 12 instructions. Each instruction contains opcode, two…
GATE 2013 CS (CS1) Q38– Micro-operations are MBR←PC; MAR←X; PC←Y; Memory←MBR. Which operation can they implement?
GATE 2011 CS (CS1) Q31– LW R1,20(R2) loads a 32-bit word at address 20+contents(R2) into R1. Which offered…
GATE 2015 CS (CS2) Q54– Memory is byte-addressable; PC, PSW and other registers are 2 bytes. An upward-growing…
GATE 2021 CS (CS2) Q54– The same two bytes interpreted as an unsigned integer have a little-endian numerical value…
GATE 2026 CS (CS1) Q14– Match each addressing mode in List I with a data element or an element of a data structure…