retagged by
11,664 views
12 votes
12 votes
A computer uses expanding opcode. It has 16 bit instructions 6 bit addresses, it supports one address, two address instructions only. If there are n two address instructions, the maximum number of one address instructions are?
retagged by

3 Answers

Best answer
24 votes
24 votes

We have 16 bits for instructions- no. of encoding = $2^{16}$

Since, 6 bit addresses are used, and we have $n$ two address instructions it would take $2^6 \times 2^6 \times n$ encoding.

Given, only one address and two address instructions are present. So, all remaining encoding can be used for one address instructions which will be $2^{16} - 2^{12} \times n$ which will correspond to $\left(2^{16} - 2^{12} \times n \right) /2^6 = 2^{10} - n \times 2^6 $ one address instructions as address field needs $2^6$ bits. 

http://www.personal.kent.edu/~aguercio/CS35101Slides/Tanenbaum/CA_Ch05_PartII.pdf

selected by
14 votes
14 votes
16 bit instruction

6 bit address

so no of bits for opcode =4

so 16 instructions  are possible

out of them n are two address

so no of one address instruction possible=(16-n)*2^6=(16-n)* 64
0 votes
0 votes

This is the ans

Related questions

8 votes
8 votes
1 answer
3
4 votes
4 votes
2 answers
4
Na462 asked Jul 31, 2018
2,130 views
A computer has 170 different operations. Word size is 4 bytes one word instructions requires two address fields. One address for register and one address for memory. If t...