The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+1 vote
67 views
In a $32$-bit computer instruction format, the size of address field is $9$-bits. The computer uses expanding opcode technique and has $28$ three-address instructions, $2040$ two-address instructions, $4040$ one-address instructions. The number of zero-address instructions it can support is ________
asked in CO & Architecture by Boss (17.2k points)
edited by | 67 views

2 Answers

+2 votes
The number of free bit patterns after removing 3-address instructions= 32-28=4. Thus total possible 2-address instructions= $4*2^9=2048$.
The number of free bit patterns after removing 2-address instructions: $2048-2040=8$
The number of possible 1-address instructions: $8*2^9=4096$
The free bit patterns after removing 1-address instructions: $4096-4040=56$.
Thus number of possible zero address instructions:$56*2^9=28672$
answered by Boss (17.2k points)
+1 vote
Total encodings are $2^{32}$

Number of encodings used in $three$ address instruction$=28*2^9*2^9*2^9$

Number of encodings used in $two$ address instruction$=2040*2^9*2^9$

Number of encodings used in $one$ address instruction$=4040*2^9$

Remaining encodings can be used for zero address instruction$=2^{32}-(28*2^9*2^9*2^9+2040*2^9*2^9+4040*2^9)=28672$
answered by Boss (11k points)
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,117 questions
53,218 answers
184,618 comments
70,454 users