The GATE Grind

GATE 2016 CS (CS2) – Question 20

Computer Organization and Architecture · Instruction Set and Addressing Modes · 1 mark · Numerical answer

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?

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 16.0 to 16.0

Explanation

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

All Instruction Set and Addressing Modes questions →