retagged by
424 views
0 votes
0 votes
Consider a hypothetical processor that supports two address, one address and zero address instructions. It has a $256$ word memory, and a $20$ bit instruction is placed in $1$ word of memory (memory is word addressable). Given that there exist $8$ two address instructions and $1984$ one address instructions. The total number of zero address instructions formulated is ________ (put in integers only)
retagged by

1 Answer

Best answer
3 votes
3 votes

It is given , 20 bit instruction is placed in 1 word of memory .

And we have 256 word memory , 256 = 28 so  8 bits for 1 address, 8 bits for 2 address and 20 - (8+8) =4 bits for opcode.

opcode = 4 bits 
 add1= 8 bits
 add2 = 8 bits

Given that there exist 8 two address instructions and 1984 one address instructions

with 20 bits , possible encoding is 220 .

No. of encoding for 2 address instructions = 8 *  28 * 28 = 219   bcoz two 8-bit address fields .

No. of encoding for 1 address instructions = 1984 *  28  bcoz one 8-bit address fields

So, number of possible 0-address instructions = 220 -  219 - ( 1984 *  28 )

= 524288 -  507904

= 16384

Now possible 0-address instructions  = 16384  .

selected by
Answer:

Related questions

426
views
2 answers
0 votes
Bikram asked May 27, 2017
426 views
Consider a memory hierarchy system consisting of two levels. The access time of level $1$ is $2$ ns. The miss penalty (The time to get data from level $2$, in ... $1$ is ___________ $\%$
635
views
2 answers
2 votes
Bikram asked May 27, 2017
635 views
Suppose there are $500$ memory references in which $50$ misses in the $1$st level cache and $20$ misses in the $2$nd level cache . Let ... memory reference/instruction , average number of stall cycles per instruction will be __________
595
views
2 answers
0 votes
Bikram asked May 27, 2017
595 views
Consider a two level memory hierarchy having only one level cache and main memory. Cache and Main memory access times are $20$ ns and $120$ ns/word respectively. ... is referenced $40 \%$ of the times, then average access time is _______ ns
352
views
1 answers
1 votes
Bikram asked May 27, 2017
352 views
Suppose that a direct-mapped cache has $2^{10}$ cache lines, with $2^4$ bytes of data per cache line. If the cache is used to store blocks for a ... bytes of space will be required for storing the tags is ________ (put the integer value)