371 views
5 votes
5 votes

A computer using expanding opcode technique has $32-bit$ instructions and $13-bit$ addresses. If there are $60$ two-address instructions, and $128$ zero-address instructions, approximately how many one-address instructions can it support?

  1. $32\;K$
  2. $20\;K$
  3. $64\;K$
  4. $16\;K$

2 Answers

Best answer
12 votes
12 votes
No. of encoding for 32-bit instructions = $2^{32}$
    
We are using 13-bit addresses here and we can divide the entire possible encodings to 3 types of instructions as
    
$2^{26}\times 60 + 2^{13} \times n + 128 = 2^{32}$
    
$\implies 2^{13}\times n = 2^{32} - (2^{26} \times  60-2^7)$
    
$\implies n = \dfrac{2^{26}[2^6 - 60]  - 2^7}{2^{13}}$
    
$\implies n = \dfrac{2^{28}  - 2^7}{2^{13}}$   

$\implies n = \dfrac{2^{21}  - 1}{2^{6}} \approx 2^{15} \approx 32 K.$

Only option matching is option A.
selected by
1 votes
1 votes
$[(4*2^{13})-n]*2^{13}=128$

solving this eqn,we’ll get,

$n=2^{15}-\frac{1}{2^{6}}$$\approx 2^{15}=32K$
Answer:

Related questions

6 votes
6 votes
1 answer
2