GATE Computer ScienceHardGATE CSE · NIELIT

A 32-bit instruction format holds two register specifiers (the machine has 48 registers) and a 12-bit immediate; all remaining bits form the opcode. How many distinct opcodes can this format encode?

  1. A. 1024
  2. B. 128
  3. C. 512
  4. D. 256

Correct answer: D. 256

48 registers need ⌈log2 48⌉ = 6 bits each; opcode bits = 32 − 2·6 − 12 = 8, so 2^8 = 256.

More Computer Organization and Architecture questions

Exams that ask this topic