Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Number 19 is the question i want help with. Suppose a computer has an instructio

ID: 3813189 • Letter: N

Question

Number 19 is the question i want help with.

Suppose a computer has an instruction format with space for opcode and three register values or one register value and an address. What are the various formats that could be used for an ADD instruction are on this machine? Given 16-bit instructions, is it possible to use expanding opcodes allow to following to be encoded assuming we have a total of 32 registers? If so, show the If not, explain why is it not possible. 60 instructions with two register operands 30 instructions with one register operand 3 instructions with one 10-bit address 26 instructions with zero operands. What is the difference between using direct and indirect addressing? Gove example.

Explanation / Answer

19.

Instruction = 16 bit

Registers = 32 = 5 bits required (25 = 32)

opcode = 60 = 111100 in binary = 6 bits required

total = 6 +5+5 = 16.

So it is feasible.

30 opcodes = 11110 = 5 bits

register = 5 bits

5+5 <16

so it is fasible.

3 opcode = 2 bits

2+10 = 12 < 16

So its feasible

26 instruction require 5 bits(11010)

can be easily achieved using 16 bit instructions

opcode(6 bits) Reg1 (5 bits) Reg2(5 bits)