retagged by
2,278 views
1 votes
1 votes
A processor uses a $32$-bit instruction format and supports byte-addressable memory access. The $\text{ISA}$ of the processor has $150$ distinct instructions. The instructions are equally divided into two types, namely $\text{R}$-type and $\text{I}$-type, whose formats are shown below.

R - type Instruction Format:
\begin{array}{|l|l|l|l|l|}
\hline OPCODE & UNUSED & DST Register & SRC Register1 & SRC Register 2 \\
\hline
\end{array}

I - type Instruction Format:
\begin{array}{|l|l|l|l|}
\hline OPCODE & DST Register & SRC Register & \# Immediate value/address \\
\hline
\end{array}

In the $\text{OPCODE}$, $1$ bit is used to distinguish between $\text{I}$-type and $\text{R}$-type instructions and the remaining bits indicate the operation. The processor has $50$ architectural registers, and all register fields in the instructions are of equal size.

Let $\text{X}$ be the number of bits used to encode the $\text{UNUSED}$ field, $\text{Y}$ be the number of bits used to encode the $\text{OPCODE}$ field, and $\text{Z}$ be the number of bits used to encode the immediate value/address field. The value of $\text{X+2Y+Z}$ is __________.
retagged by

1 Answer

1 votes
1 votes
  • Opcode field(Y): There are 150 instructions, and they are equally divided into two types. Therefore, there are 75 I-type instructions and 75 R-type instructions. Since one bit is used to distinguish between instruction types, the number of bits used to encode opcode field is Y = (1+7) = 8
  • Register field: There are 50 architectural registers and all register fields in the instructions are of equal size. Therefore, the number of bits used to encode register field is 6

  • Unused field(X): The number of bits used to encode unused field in R-type instructions is X = 32 - (8 + 6 + 6 + 6) = 6
  • Immediate value/address field(Z): The number of bits used to encode immediate value/address field in I-type instructions is Z = 32 - (8 + 6 + 6) = 12

Therefore, the values of X, Y, and Z are:

  • X = 6 bits (UNUSED field)
  • Y = 8 bits (OPCODE field)
  • Z = 12 bits (immediate value/address field)

So the answer is 6 + 2 * 8 + 12 = 34

edited by
Answer:

Related questions

2.2k
views
1 answers
3 votes
Arjun asked Feb 16
2,195 views
A processor with $16$ general purpose registers uses a $32$-bit instruction format. The instruction format consists of an opcode field, an addressing ... maximum number of unique opcodes possible for every addressing mode is ___________.
24.9k
views
7 answers
66 votes
gatecse asked Feb 14, 2018
24,914 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 _________.
2.3k
views
1 answers
2 votes
Arjun asked Feb 16
2,292 views
A non-pipelined instruction execution unit operating at $2 \mathrm{GHz}$ takes an average of $6$ ... place) obtained by the pipelined design over the non-pipelined design is ____________.
21.6k
views
4 answers
68 votes
Akash Kanase asked Feb 12, 2016
21,570 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 _________.