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? $32\;K$ $20\;K$ $64\;K$ $16\;K$ CO and Architecture go2025-coa-1 normal expanding-opcode + – gatecse asked Aug 3, 2020 gatecse 371 views answer comment Share Follow See all 0 reply Please log in or register to add a comment.
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. gatecse answered Aug 3, 2020 • selected Sep 17, 2020 by Shaik Masthan gatecse comment Share Follow See all 5 Comments See all 5 5 Comments reply Show 2 previous comments Doraemon commented Nov 7, 2020 reply Follow Share @gatecse I have 1 doubt. Let x be the number of 1-address instruction,then, ((2^6-60)*2^13-x)*2^13>=128 (2^15-x)>=1/2^6 x<=(2^15-1/2^6) x<=32767 And the largest number in the range of x is 20K.then why is the answer not 20K? 0 votes 0 votes gatecse commented Nov 7, 2020 reply Follow Share how 20K and not 32K? 0 votes 0 votes Doraemon commented Nov 7, 2020 reply Follow Share x is the number of 1-address instruction and the condition is that x<=32767 then 20K=20*2^10=20480 32K=2^15=32768 the value of 32K is greater than 32767(which is the largest value that x could be). hence the largest number of 1-address instruction in the range of x is 20K 0 votes 0 votes Please log in or register to add a comment.
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$ mrinmoyh answered Nov 1, 2020 mrinmoyh comment Share Follow See 1 comment See all 1 1 comment reply Pranavpurkar commented Jan 2, 2023 reply Follow Share got it. 0 votes 0 votes Please log in or register to add a comment.