The GATE Grind

GATE 2018 CS – Question 61

Computer Organization and Architecture · Instruction Set and Addressing Modes · 2 marks · Numerical answer

A processor has 16 integer registers (R0, R1, ..., R15) and 64 floating point registers (F0, F1, ..., F63). It uses a 2-byte instruction format. There are four categories of instructions: Type-1, Type-2, Type-3, and Type-4. Type-1 category consists of four instructions, each with 3 integer register operands (3Rs). Type-2 category consists of eight instructions, each with 2 floating point register operands (2Fs). Type-3 category consists of fourteen instructions, each with one integer register operand and one floating point register operand (1R+1F). Type-4 category consists of N instructions, each with a floating point register operand (1F).

The maximum value of N is ________.

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 32

Explanation

An instruction is 16 bits, so there are $2^{16}=65536$ encodings. Count how many each type uses (number of opcodes $\times$ operand encodings).

Used so far: $16384+32768+14336=63488$. Remaining encodings: $65536-63488=2048$.

$$N_{max}=\frac{2048}{64}=\mathbf{32}.$$

More Instruction Set and Addressing Modes questions

All Instruction Set and Addressing Modes questions →