Is it possible to design an expanding opcode to allow the fo
Is it possible to design an expanding opcode to allow the following to be encoded in a 10-bit instruction? A register is 2 bits. 15 instructions with two registers 175 instructions with one register 32 instructions with no registers
Solution
Answer:-
Since there are 175 register-reference instructions, we will need 10 bits for the opcode. (10 bits allows for up to 2 10 unique opcodes.) With 32 registers, we will need 2 bits to specify each register, so the instruction code format will be 16 bits:
