25.3k views
5 votes
There are 55 registers, and total 60 instructions available in a general-purpose computer. The computer allows only 2-address instructions, where one operand can be a register, and another can be a memory location. The memory is byte addressable with 64KB (Kilo bytes) in size. The minimum number of bits to encode the instruction will be…………?

User Qtxo
by
4.5k points

1 Answer

3 votes

Answer:

31 bits.

Step-by-step explanation:

Given, total number of registers = 55

Total instructions = 60

Size of memory = 16 KB

Now, no of registers are 55. We find the next greater or equal power of 2 which is 64 = 26. Hence, 6 bits are required to represent a register operand.

Number of instructions = 60. We find the next greater or equal power of 2 which is 64 = 26. Hence, 6 bits are required to represent a instruction.

Size of memory = 64 KB = 26 * 210 * 23 bits = 219 bits. Hence, 19 bits are required to represent a memory location.

Now, an instruction has 2 parts, opcode and operand. As given there are only two address instructions which are memory operand and register operand.

Hence, total bits would be: 6 bits (opcode) + 6 bits (register operand) + 19 (memory operand) = 31 bits.

User TimSPQR
by
4.8k points