in CO and Architecture retagged by
359 views
1 vote
1 vote
A system support zero address, one address & two address instructions. Let 16-bit instruction is stored in 128-word memory. Identify the correct among the following.

(A) 16K zero address, 128-one address, 2-two address instructions

(B) 256 K one address, 3-two address, 64-zero address instructions

(C) 28 K zero address, 2-two address, 32-one address instructions

(D) None of the above
in CO and Architecture retagged by
by
359 views

2 Answers

0 votes
0 votes
128 W memory => $2^7 * 1W$ => 7 bits address
instruction size = 16 bits

2 addr instruction → opcode size = 16 – 14 = 2 bits => 4 possible opcodes

option c )
total 2 addr opcodes possible = 4
total 2 addr opcodes taken = 2, so total free = 2

total 1 addr opcodes possible = $2 * 2^7 = 2^8$
total 1 addr opcodes taken = 32, total free = 256 – 32 = 224

total 0 addr opcodes possible = $224 * 2^7 = 28 * 8 * 2^7 = 28K$

therefore option c is correct.

PS: In exam we need to check for all 3 options, I got lucky coz I check ‘c’ first.

1 comment

reshown by
Bhai option A is also true please solve it once
1
1
0 votes
0 votes
Option A and C are correct

Given 16 bit instruction and 128 word memory, adress=7bit

 

A.

For Two address 2 bit opcode, 7 bit for Add1, 7 bit for Add2

So total 2-add instructions 2^2=4

And we are using 2 inst, so 2 left

 

For 1 address instruction, 7 bit for 1 address and remaining 9 for opcode.

In 1 address 2*2^7=256

We are using 128 inst. So 128 left

 

Finally  we have 128*2^7=16k  Zero address instructions.
by

Related questions