edited by
3,751 views
7 votes
7 votes

Consider a $32$- bit processor which supports $70$ instructions. Each instruction is $32$ bit long and has $4$ fields namely opcode, two register identifiers and an immediate operand of unsigned integer type. Maximum value of the immediate operand that can be supported by the processor is $8191$. How many registers the processor has?

  1. $32$
  2. $64$
  3. $128$
  4. $16$
edited by

2 Answers

11 votes
11 votes

$\underline{\textbf{Answer:}\Rightarrow}$

$\underline{\textbf{Explanation:}\Rightarrow}$

Opcode Reg1 Reg2 Immediate Operand

 

Number of instructions which are supported $=70$

$13-\text{bits}$ support the maximum value of immediate operand $=8191$

Now,

Number of bits needed for opcode $=7\;\text{bits}$

Number of bits left to represent register bits $=12$

which means $6-\text{bits}$ per register.

Hence, at max. $\mathbf{64}$ registers.

$\therefore \;\mathbf{(b)}$ is the correct option.

 

edited by
4 votes
4 votes

$32$ bit instruction contains opcode, two registers say $R1, R2$ and one unsigned immediate operand. 

Since 70 instructions are supported, each instructions will take $log70$= 7 bit for each opcode.

Maximum value of opcode is $8191$ that means it takes 13 bit ranging $0-8191$

Opcode(7 bit) R1 R2 Immediate Op.(13bit)

Bits needed for two registers = $32-7-13=12$

Each register takes 6 bits, i.e maximum 64 registers are possible.

Hence Option B) is correct

Answer:

Related questions

4 votes
4 votes
5 answers
1
Satbir asked Jan 13, 2020
4,258 views
A stack organized computer is characterised by instructions withindirect addressingdirect addressingzero addressingindex addressing
2 votes
2 votes
1 answer
2
Satbir asked Jan 13, 2020
3,070 views
Which of the following affects the processing power assuming they do not influence each otherData bus capabilityAddress schemeClock speed$3$ only$1$ and $3$ only$2$ and $...
6 votes
6 votes
4 answers
3
Satbir asked Jan 13, 2020
3,875 views
The immediate addressing mode can be used forLoading internal registers with initial valuesPerform arithmetic or logical operation on data contained in instructionsWhich ...
6 votes
6 votes
5 answers
4
Satbir asked Jan 13, 2020
4,438 views
A computer which issues instructions in order, has only $2$ registers and $3$ opcodes $\text{ADD, SUB}$ and $\text{MOV}$. Consider $2$ different implementations of the fo...