retagged by
440 views
2 votes
2 votes
consider a system which supports 2-address, 1-address and 0-address instruction. the system has 'i' bits addresses. if there are 'x' 2-addresses instructions and 'y' 1-addresses. then  what is maximum number of 0-addresses instructions supported by system
retagged by

1 Answer

0 votes
0 votes
since instruction size is not give, assuming 1 W as instruction size. Since word size not given assuming 1W = 8 bits
total 2 addr opcodes possible = $2^{8-2i}$ out of these x are taken so, free = $2^{8-2i}-x$
total 1 addr opcodes possible = $(2^{8-2i}-x)*2^i$, out of these y are taken so, free = $(2^{8-2i}-x)*2^i-y$
total 0 addr opcodes possible = $((2^{8-2i}-x)*2^i-y)*2^i$

Now to maximise the total 0 addr opcodes possible, we need to leave as many FREE opcodes as possible in 2 addr and 1 addr opcodes pool.
So put x = 1, y = 1 (need to take minimum one 2 addr and one 1 addr, not mentioned in question, so assuming)

maximum 0 addr possible =

 $((2^{8-2i}-1)*2^i-1)*2^i$     OR   

$((2^{8-2i})*2^i)*2^i$ (if question allows to have zero 2 addr and zero 1 addr)

Related questions

424
views
1 answers
0 votes
Bikram asked May 27, 2017
424 views
Consider a hypothetical processor that supports two address, one address and zero address instructions. It has a $256$ word memory, and a $20$ bit ... total number of zero address instructions formulated is ________ (put in integers only)
299
views
1 answers
0 votes
Bikram asked Nov 25, 2016
299 views
The memory unit of a computer has $256$ K words of $32$ bits each. The computer has an instruction format with four fields: an operation code field, a mode field (to specify one of ... $5,6,3,18$5,18,6,3$5,3,6,18$
483
views
3 answers
1 votes
Bikram asked Nov 25, 2016
483 views
Consider a hypothetical processor that supports two addresses -- one address and zero address instructions. It has a $256$ ... instructions, then the total number of zero address instructions formulated are _______.
703
views
3 answers
2 votes
Bikram asked Nov 25, 2016
703 views
A computer has $32$ bit instructions and $12$ bit addresses.If there are $250$ two-address instructions, the number of one-address instructions that can be formulated are ______.