Project ForgeSign up free
Computer Organization & Architecture
Pipelining & Instruction Sets
GATE 2016
Medium

A processor has 40 distinct instructions and 24 general purpose registers. A 32-bit instruction word has an opcode, two register operands and an immediate operand. The number of bits available for the immediate operand field is ____.

16

Explanation

Opcode needs ⌈log₂40⌉=6 bits. Each of the 2 register operands needs ⌈log₂24⌉=5 bits, totaling 10 bits. Immediate field = 32 − 6 − 10 = 16 bits.

Source: GATE CS 2016 (Session 2 / Set B) (2016)

This question is part of a 15-day revision cycle — sign in and Project Forge will bring it back the day before you'd forget it.

Start revising free