A computer has 32bit instructions and 12bit addresses Suppos
A computer has 32-bit instructions and 12-bit addresses. Suppose there are 248 2-address instructions. How many 1-address instructions can be formulated? Explain your answer.
Solution
Answer:-
12 bit two address instruction will reserved 24 bit of instruction and remaining 8 bits will be used for opcode.
Total number of opcode that can be generated from 8 bit is 2^8 = 256.
Since 250 two address instruction has already used 250 possible opcode pattern then only 6 possible pattern is left to assign to one address instruction i.e 256 - 250 .
6 (possible opcode)*2^12(bits pattern possible due to one address instruction) = 24576.
Total one address instruction possible is 24576.
