Open In App

GATE | GATE-CS-2014-(Set-1) | Question 65

Like Article
Like
Save
Share
Report

A machine has a 32-bit architecture, with 1-word long instructions. It has 64 registers, each of which is 32 bits long. It needs to support 45 instructions, which have an immediate operand in addition to two register operands. Assuming that the immediate operand is an unsigned integer, the maximum value of the immediate operand is ____________.
(A) 16383
(B) 16338
(C) 16388
(D) 16484


Answer: (A)

Explanation:

1 Word = 32 bits 

Each instruction has 32 bits. To support 45 instructions, opcode must contain 6-bits

Register operand1 requires 6 bits, since the total registers are 64. Register operand 2 also requires 6 bits. So total 18 bits for all 45 instruction and two register operands. So

32-18 = 14 

14-bits are left over for immediate Operand Using 14-bits, now

2^14 - 1 = 16383 

We can give maximum 16383.



Quiz of this Question


Last Updated : 10 Nov, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads