retagged by
29,383 views
26 votes
26 votes
A processor has $64$ registers and uses $16$-bit instruction format. It has two types of instructions: I-type and R-type. Each I-type instruction contains an opcode, a register name, and a $4$-bit immediate value. Each R-type instruction contains an opcode and two register names. If there are $8$ distinct I-type opcodes, then the maximum number of distinct R-type opcodes is _______.
retagged by

6 Answers

1 votes
1 votes

 

Let there are x instructions of type-R 

R-type instruction format

Opcode(4 bits)

Register (6bits)

Register(6bits)

 

Thus, from 2^4 (=16) instructions "x" instructions are of type-R and left over 4 bit instructions are

(2^4)-x 

 

Now, for type-I instruction format

I-type instruction format

Opcode(6 bits)

Register(6 bits)

Immediate value (4bits)

 

 

In Opcode field we assume as 4bits+2bits i.e., 4bit instructions for I-type are taken form left over 4 bit instructions

i.e. (2^4)-x 

I-type instruction format

                   Opcode                                                      Register                                           Immediate value

     4bits

      2bits

                           6bits

           4bits

 

As per question there are 8 instructions of I-type

=> ((2^4)-x) * (2^2) = 8

(2^4)-x = 8/4

16 - x = 2

x = 14

Therefore there are 14 instructions of R-type  

0 votes
0 votes
Ans is 14

We add total no of used addresses ( I type and R type)

 

(8×2^6×2^4)+(x×2^6×2^6)=2^16 { as 2^16 is the total encoding }

by solving we get x = 14
Answer:

Related questions

24.9k
views
7 answers
67 votes
gatecse asked Feb 14, 2018
24,948 views
A processor has $16$ integer registers $\text{(R0, R1}, \ldots ,\text{ R15)}$ and $64$ ... point register operand $\text{(1F)}.$The maximum value of $\text{N}$ is _________.
21.6k
views
4 answers
68 votes
Akash Kanase asked Feb 12, 2016
21,605 views
Consider a processor with $64$ registers and an instruction set of size twelve. Each instruction has five distinct fields, namely, opcode, two source register ... amount of memory (in bytes) consumed by the program text is _________.
18.9k
views
6 answers
49 votes
go_editor asked Sep 26, 2014
18,924 views
A machine has a $32\text{-bit}$ architecture, with $1\text{-word}$ long instructions. It has $64$ registers, each of which is $32$ ... immediate operand is an unsigned integer, the maximum value of the immediate operand is ____________