• edited by
31,651 views
74 74 votes
A machine has a $32\text{-bit}$ architecture, with $1\text{-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 ____________

8 Answers

Best answer
120 120 votes
$64$ registers means $6$ bits $(\lceil \log_2 64 \rceil = 6)$ for a register operand. So, $2$ register operands require $12$ bits. Now, $45$ instructions require another $6$ bits for opcode $(\lceil \log_2 45 \rceil = 6)$. So, totally $18$ bits. Now we have $32 - 18 = 14$ bits left for the immediate operand. So, the max value will be $2^{14} - 1 = 16383$ (as the operand is unsigned we do not need a sign bit and with $14$ bits we can represent from $0$ to $2^{14} -1$)
• edited by
12 12 votes
Instruction 32 bit = (6+6+6+14) bit 
⌈log45⌉=6 bit opcode R1 ⌈log64⌉=6 bit R2 ⌈log64⌉=6 bit remaining 14 bit oprand

It needs to support 45 instructions,   means types of instruction supported is of45 

2 2 votes

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.

14-bits are left over for immediate Operand Using 14-bits,
we can give maximum 16383,

Since 2^14=16384(from 0 to 16383) 

2 2 votes

Answer : 16383

no. of bits for 45 instructions / opcode = ⌈$\log _{2}45$⌉ = 6

no. of bits for each register operand = ⌈$\log _{2}64$⌉ =6

6 (opcode) 6 (r1) 6 (r2) p  (immediate)

no. of immediate operand bits = no. of bits for machine - (6 + 6 + 6 )

no. of immediate operand bits = 32 - 18 = 14 bits 

for max value of immediate operand you have to put all 1's in all 14 immediate bits 

so, max value of immediate operand  = $2^{14}$-1 = 16383

1 1 vote

16,383.

32 bit architecture means word size of CPU is 32 bit, which means instruction size = 32 bit.

It is given that register memory size is 64 register, to access 1 register 6 bits are required(log 64 base2)

The size of ISA(instruction set architecture) = 45 which require 6 bit for opcode(as 5 won’t be sufficient)

So, now the feilds of instruction will have bifurcation like this,

opcode+register1+register2+Immediate value = 32  bit

Immediate value = 32 – (6+6+6) = 14

Now, Immediate value is given to be unsigned and the range of unsigned is 0 to 2^(n) – 1

So maximum unsigned value that can be represented in this instruction = 2^(14) – 1 = 16,383.

0 0 votes
  1. Bit Allocation:
  • Opcode: To support 45 instructions, we need 6 bits for the opcode ($2^6 = 64,$ which is greater than $45$).
  • Register Operands: To address 64 registers, we need 6 bits for each register operand ($2^6 = 64$). So, two register operands require 12 bits.
  • Immediate Operand: The remaining bits in the 32-bit instruction word are available for the immediate operand. This leaves $32 - 6 - 12 = 14$ bits for the immediate operand.
  1. Maximum Value:
  • With 14 bits, the maximum unsigned integer value that can be represented is 2^14 - 1 =  16383

Therefore, the maximum value of the immediate operand in this machine architecture is $16383$.

Answer:
Position:
Show:

Related questions

78 78 votes
11 answers 11 answers
33.7k
33.7k views
go_editor asked Sep 28, 2014
33,681 views
Consider a $6$-stage instruction pipeline, where all stages are perfectly balanced. Assume that there is no cycle-time overhead of pipelining. When an application is exec...
108 108 votes
8 answers 8 answers
33.3k
33.3k views
Akash Kanase asked Feb 12, 2016
33,348 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 identifiers...
57 57 votes
6 answers 6 answers
20.2k
20.2k views
Kathleen asked Sep 12, 2014
20,173 views
In an $11$-bit computer instruction format, the size of address field is $4$-bits. The computer uses expanding OP code technique and has $5$ two-address instructions and ...
36 36 votes
2 answers 2 answers
8.3k
8.3k views
Kathleen asked Oct 4, 2014
8,312 views
State True or False with one line explanationExpanding opcode instruction formats are commonly employed in RISC. (Reduced Instruction Set Computers) machines.