463 views
1 votes
1 votes
First field of the three field I.R. indicates opcode, second addresses a register from a set of 100 registers and the third is the memory address field . A 32 bit instruction is placed in 1 MB memory. If there are k instructions which address both register and memory and l instructions which addresses register, then find the number of zero address instructions.

2 Answers

Best answer
1 votes
1 votes
32 bits long instruction size,

|Opcode|Reg bits| m/m address|

7 bits are needed for registers and 20 bits are needed for memory address, hence there will 5 bits for opcode.

total number of possible instructions which refer both memory and registers are $2^{5}=32$, ifthere are k such instructions then number of instructions which refer only registers will be

(32-k)*$2^{20}$ and if there are such l instructions then there will be 0-address instructions as

$((32-k)*2^{20} - l)*2^{7}$
selected by

Related questions

0 votes
0 votes
1 answer
1
Shoto asked Jan 14, 2022
414 views
Can anyone please solve this?
0 votes
0 votes
2 answers
2
rsansiya111 asked Dec 23, 2021
377 views
In designing a computer’s cache system,
0 votes
0 votes
0 answers
3
rsansiya111 asked Dec 16, 2021
244 views
0 votes
0 votes
1 answer
4
rsansiya111 asked Dec 16, 2021
210 views