retagged by
4,639 views
1 votes
1 votes
A machine support 16 bit instruction format size of address field is 4 bit the computer uses expanding opcode technique and 34 two address instructions and 100 one address instructions. The number of zero address instruction it can support is......
retagged by

2 Answers

Best answer
11 votes
11 votes

Instruction size = 16 bits, hence total number of encodings will be = 216

Size of address field is 4 bit , so encodings will be = 24

This machine uses 0,1,2 address instructions.

34 2-address instructions will take = 34 * 2* 24 encodings.

100 1-address instructions will take = 100 * 2 encodings

N 0-address instructions will take = (216 - (34 * 2* 2 + 100 * 2 ))encodings = 55232 = which will also be the total 0 - address instructions.

selected by
4 votes
4 votes

Total Two address instruction can be  = 28 = 256

Two address instruction used = 34

Total left two address instruction = 256-34 = 222.

One address instruction possible from 222 two address instruction = 222*24 = 222*16

One address instruction used = 100

Total left one address instruction = 222*16 - 100 = 3452

Zero address instruction possible from 3452 one address instruction = 3452*24 = 3452*16 = 55232

Related questions

2 votes
2 votes
1 answer
1
2 votes
2 votes
1 answer
3
lovish_bhatia asked Aug 15, 2023
192 views
consider a system which supports 2-address and 1-address instructions. The system has 18 bits instructions. if there are 7 2-address instructions and 1152 1-address instr...