edited by
360 views
1 votes
1 votes
In a 16 bit computer instruction format, the size of address field is 5 bits. The computer uses expanding opcode technique. It has two 2-address instructions and 1024 one address instruction. How many zeroaddress instruction can be formulated?
edited by

1 Answer

2 votes
2 votes

Total $\#$ of 2 address instruction  = $2^{16-5-5}=2^{6}=32$

Free instructions = $64-2=62$ 

Total $\#$ of 1 address instruction = $62 \times 2^5 = 1984$

Free instructions = $1984-1024 = 960$

Total $\#$ of 0 address instruction = $960 \times 2^{5}=\color{RED}{30720}$


Another approach

Total encoding with $16$  bits = $2^{16}$

$2$ address encoding = $2\times 2^5\times 2^5=2^{11}$

$1$ address encoding = $1024 \times 2^{5}=2^{15}$


Remaining encodings $=\  0$ address encoding = $2^{16}- 2^{15} -2^{11}$

$=65536-32768-2048=\color{REd}{30720}$ 

Related questions

12 votes
12 votes
3 answers
2
1 votes
1 votes
1 answer
3
isriram asked Jun 9, 2022
1,095 views
Consider a system which supports only 1-address type instructions. The size of memory the system has is $2^m$ KB. The system supports ' i ' distinct instructions. The len...
0 votes
0 votes
1 answer
4
someshawasthi asked Oct 27, 2022
503 views
Assume an instruction set that uses a fixed 31 bit instruction length. Operand specifies are 4 bits in length. If there are m-three operand instructions in total, then ho...